"use strict";(self.webpackChunktainacan=self.webpackChunktainacan||[]).push([[6518],{36096(e,t,l){l.d(t,{A:()=>n});const n={mixins:[l(8926).s],emits:["input"],data:function(){return{valueInit:0,valueEnd:10,selectedInterval:""}},watch:{query:{handler:function(){this.updateSelectedValues()},deep:!0}},mounted:function(){this.updateSelectedValues()},methods:{changeInterval:function(){""!==this.selectedInterval?(this.valueInit=this.filterTypeOptions.intervals[this.selectedInterval].from,this.valueEnd=this.filterTypeOptions.intervals[this.selectedInterval].to,this.emit()):(this.$emit("input",{type:"DECIMAL",compare:"BETWEEN",metadatum_id:this.metadatumId,collection_id:this.collectionId,value:[null,null]}),this.valueEnd=null,this.valueInit=null)},emit:function(){var e=[this.valueInit,this.valueEnd],t=Number.isInteger(this.valueInit)&&Number.isInteger(this.valueEnd)?"NUMERIC":"DECIMAL";this.$emit("input",{type:t,compare:"BETWEEN",metadatum_id:this.metadatumId,collection_id:this.collectionId,value:e})},updateSelectedValues:function(){var e=this;if(!this.query||!this.query.metaquery||!Array.isArray(this.query.metaquery))return!1;var t=this.query.metaquery.findIndex((function(t){return t.key==e.metadatumId}));if(t>=0){var l=this.query.metaquery[t];if(!l.value||!l.value.length>1||null==l.value[0]||null==l.value[1])return!1;this.valueInit=l.value[0],this.valueEnd=l.value[1],this.selectedInterval=this.filterTypeOptions.intervals.findIndex((function(t){return t.from==e.valueInit&&t.to==e.valueEnd})),this.selectedInterval=this.selectedInterval>=0?this.selectedInterval:""}else this.valueInit=null,this.valueEnd=null,this.selectedInterval=""}}}},11015(e,t,l){l.d(t,{X:()=>u});var n=l(6934),a={value:""},i=["value"];function u(e,t,l,u,r,s){var d=(0,n.g2)("b-select");return(0,n.uX)(),(0,n.CE)("div",null,[(0,n.bF)(d,{modelValue:r.selectedInterval,"onUpdate:modelValue":[t[0]||(t[0]=function(e){return r.selectedInterval=e}),t[1]||(t[1]=function(t){e.resetPage(),s.changeInterval(t)})],expanded:"","aria-labelledby":"filter-label-id-"+e.filter.id,placeholder:e.filter.placeholder?e.filter.placeholder:e.$i18n.get("instruction_select_a_interval")},{default:(0,n.k6)((function(){return[(0,n.Lk)("option",a,(0,n.v_)(e.$i18n.get("label_selectbox_init"))+"... ",1),((0,n.uX)(!0),(0,n.CE)(n.FK,null,(0,n.pI)(e.filterTypeOptions.intervals,(function(e,t){return(0,n.uX)(),(0,n.CE)("option",{key:t,value:t},(0,n.v_)(e.label),9,i)})),128))]})),_:1},8,["modelValue","aria-labelledby","placeholder"])])}},97815(e,t,l){l.d(t,{A:()=>r});var n=l(31601),a=l.n(n),i=l(76314),u=l.n(i)()(a());u.push([e.id,"\n.field[data-v-576b0798] {\n        margin-bottom: 0.125em !important;\n}\n",""]);const r=u},66536(e,t,l){var n=l(85072),a=l.n(n),i=l(97825),u=l.n(i),r=l(77659),s=l.n(r),d=l(55056),v=l.n(d),c=l(10540),o=l.n(c),h=l(63494),m=l.n(h),I=l(97815),f={};f.styleTagTransform=m(),f.setAttributes=v(),f.insert=s().bind(null,"head"),f.domAPI=u(),f.insertStyleElement=o();a()(I.A,f),I.A&&I.A.locals&&I.A.locals},96518(e,t,l){l.r(t),l.d(t,{default:()=>i});var n=l(74606),a=l(35693);l(51179);const i=(0,l(66262).A)(a.A,[["render",n.X],["__scopeId","data-v-576b0798"]])},35693(e,t,l){l.d(t,{A:()=>n.A});var n=l(36096)},74606(e,t,l){l.d(t,{X:()=>n.X});var n=l(11015)},51179(e,t,l){l(66536)}}]);