File manager - Edit - /home/autoph/public_html/projects/ahg-hr/assets/VueSelect.7228c3ba.js
Back
import{o as l,b as r,as as E,a4 as d,av as c,aw as h,d as u,F as C,m as k,f as V,t as g,c as w,S as _,j as p,a6 as B,ax as M,p as S,X as L,e as O,w as I,k as $,h as m,Y as j,_ as N,r as A}from"./index.836ff972.js";import{I as K}from"./index.31d8f3a7.js";var R=Object.defineProperty,z=Object.defineProperties,U=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,P=(e,s,t)=>s in e?R(e,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[s]=t,y=(e,s)=>{for(var t in s||(s={}))J.call(s,t)&&P(e,t,s[t]);if(D)for(var t of D(s))q.call(s,t)&&P(e,t,s[t]);return e},T=(e,s)=>z(e,U(s));const H={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(e){this.autoscroll&&e&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var e;const s=((e=this.$refs.dropdownMenu)==null?void 0:e.children[this.typeAheadPointer])||!1;if(s){const t=this.getDropdownViewport(),{top:n,bottom:a,height:o}=s.getBoundingClientRect();if(n<t.top)return this.$refs.dropdownMenu.scrollTop=s.offsetTop;if(a>t.bottom)return this.$refs.dropdownMenu.scrollTop=s.offsetTop-(t.height-o)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},X={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let e=0;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},open(e){e&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let e=this.typeAheadPointer-1;e>=0;e--)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadDown(){for(let e=this.typeAheadPointer+1;e<this.filteredOptions.length;e++)if(this.selectable(this.filteredOptions[e])){this.typeAheadPointer=e;break}},typeAheadSelect(){const e=this.filteredOptions[this.typeAheadPointer];e&&this.selectable(e)&&this.select(e)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},Y={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(e){this.mutableLoading=e}},methods:{toggleLoading(e=null){return e==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=e}}},x=(e,s)=>{const t=e.__vccOpts||e;for(const[n,a]of s)t[n]=a;return t},Q={},G={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},W=u("path",{d:"M6.895455 5l2.842897-2.842898c.348864-.348863.348864-.914488 0-1.263636L9.106534.261648c-.348864-.348864-.914489-.348864-1.263636 0L5 3.104545 2.157102.261648c-.348863-.348864-.914488-.348864-1.263636 0L.261648.893466c-.348864.348864-.348864.914489 0 1.263636L3.104545 5 .261648 7.842898c-.348864.348863-.348864.914488 0 1.263636l.631818.631818c.348864.348864.914773.348864 1.263636 0L5 6.895455l2.842898 2.842897c.348863.348864.914772.348864 1.263636 0l.631818-.631818c.348864-.348864.348864-.914489 0-1.263636L6.895455 5z"},null,-1),Z=[W];function ee(e,s){return l(),r("svg",G,Z)}const te=x(Q,[["render",ee]]),se={},oe={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},ie=u("path",{d:"M9.211364 7.59931l4.48338-4.867229c.407008-.441854.407008-1.158247 0-1.60046l-.73712-.80023c-.407008-.441854-1.066904-.441854-1.474243 0L7 5.198617 2.51662.33139c-.407008-.441853-1.066904-.441853-1.474243 0l-.737121.80023c-.407008.441854-.407008 1.158248 0 1.600461l4.48338 4.867228L7 10l2.211364-2.40069z"},null,-1),ne=[ie];function le(e,s){return l(),r("svg",oe,ne)}const ae=x(se,[["render",le]]),F={Deselect:te,OpenIndicator:ae},re={mounted(e,{instance:s}){if(s.appendToBody){const{height:t,top:n,left:a,width:o}=s.$refs.toggle.getBoundingClientRect();let b=window.scrollX||window.pageXOffset,i=window.scrollY||window.pageYOffset;e.unbindPosition=s.calculatePosition(e,s,{width:o+"px",left:b+a+"px",top:i+n+t+"px"}),document.body.appendChild(e)}},unmounted(e,{instance:s}){s.appendToBody&&(e.unbindPosition&&typeof e.unbindPosition=="function"&&e.unbindPosition(),e.parentNode&&e.parentNode.removeChild(e))}};function de(e){const s={};return Object.keys(e).sort().forEach(t=>{s[t]=e[t]}),JSON.stringify(s)}let ce=0;function he(){return++ce}const pe={components:y({},F),directives:{appendToBody:re},mixins:[H,X,Y],compatConfig:{MODE:3},emits:["open","close","update:modelValue","search","search:compositionstart","search:compositionend","search:keydown","search:blur","search:focus","search:input","option:created","option:selecting","option:selected","option:deselecting","option:deselected"],props:{modelValue:{},components:{type:Object,default:()=>({})},options:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},deselectFromDropdown:{type:Boolean,default:!1},searchable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},placeholder:{type:String,default:""},transition:{type:String,default:"vs__fade"},clearSearchOnSelect:{type:Boolean,default:!0},closeOnSelect:{type:Boolean,default:!0},label:{type:String,default:"label"},autocomplete:{type:String,default:"off"},reduce:{type:Function,default:e=>e},selectable:{type:Function,default:e=>!0},getOptionLabel:{type:Function,default(e){return typeof e=="object"?e.hasOwnProperty(this.label)?e[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(e)}. https://vue-select.org/api/props.html#getoptionlabel`):e}},getOptionKey:{type:Function,default(e){if(typeof e!="object")return e;try{return e.hasOwnProperty("id")?e.id:de(e)}catch(s){return console.warn(`[vue-select warn]: Could not stringify this option to generate unique key. Please provide'getOptionKey' prop to return a unique key for each option. https://vue-select.org/api/props.html#getoptionkey`,e,s)}}},onTab:{type:Function,default:function(){this.selectOnTab&&!this.isComposing&&this.typeAheadSelect()}},taggable:{type:Boolean,default:!1},tabindex:{type:Number,default:null},pushTags:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},filterBy:{type:Function,default(e,s,t){return(s||"").toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1}},filter:{type:Function,default(e,s){return e.filter(t=>{let n=this.getOptionLabel(t);return typeof n=="number"&&(n=n.toString()),this.filterBy(t,n,s)})}},createOption:{type:Function,default(e){return typeof this.optionList[0]=="object"?{[this.label]:e}:e}},resetOnOptionsChange:{default:!1,validator:e=>["function","boolean"].includes(typeof e)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:e,multiple:s}){return e&&!s}},noDrop:{type:Boolean,default:!1},inputId:{type:String},dir:{type:String,default:"auto"},selectOnTab:{type:Boolean,default:!1},selectOnKeyCodes:{type:Array,default:()=>[13]},searchInputQuerySelector:{type:String,default:"[type=search]"},mapKeydown:{type:Function,default:(e,s)=>e},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(e,s,{width:t,top:n,left:a}){e.style.top=n,e.style.left=a,e.style.width=t}},dropdownShouldOpen:{type:Function,default({noDrop:e,open:s,mutableLoading:t}){return e?!1:s&&!t}},uid:{type:[String,Number],default:()=>he()}},data(){return{search:"",open:!1,isComposing:!1,pushedTags:[],_value:[],deselectButtons:[]}},computed:{isReducingValues(){return this.$props.reduce!==this.$options.props.reduce.default},isTrackingValues(){return typeof this.modelValue>"u"||this.isReducingValues},selectedValue(){let e=this.modelValue;return this.isTrackingValues&&(e=this.$data._value),e!=null&&e!==""?[].concat(e):[]},optionList(){return this.options.concat(this.pushTags?this.pushedTags:[])},searchEl(){return this.$slots.search?this.$refs.selectedOptions.querySelector(this.searchInputQuerySelector):this.$refs.search},scope(){const e={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:y({disabled:this.disabled,placeholder:this.searchPlaceholder,tabindex:this.tabindex,readonly:!this.searchable,id:this.inputId,"aria-autocomplete":"list","aria-labelledby":`vs${this.uid}__combobox`,"aria-controls":`vs${this.uid}__listbox`,ref:"search",type:"search",autocomplete:this.autocomplete,value:this.search},this.dropdownOpen&&this.filteredOptions[this.typeAheadPointer]?{"aria-activedescendant":`vs${this.uid}__option-${this.typeAheadPointer}`}:{}),events:{compositionstart:()=>this.isComposing=!0,compositionend:()=>this.isComposing=!1,keydown:this.onSearchKeyDown,blur:this.onSearchBlur,focus:this.onSearchFocus,input:s=>this.search=s.target.value}},spinner:{loading:this.mutableLoading},noOptions:{search:this.search,loading:this.mutableLoading,searching:this.searching},openIndicator:{attributes:{ref:"openIndicator",role:"presentation",class:"vs__open-indicator"}},listHeader:e,listFooter:e,header:T(y({},e),{deselect:this.deselect}),footer:T(y({},e),{deselect:this.deselect})}},childComponents(){return y(y({},F),this.components)},stateClasses(){return{"vs--open":this.dropdownOpen,"vs--single":!this.multiple,"vs--multiple":this.multiple,"vs--searching":this.searching&&!this.noDrop,"vs--searchable":this.searchable&&!this.noDrop,"vs--unsearchable":!this.searchable,"vs--loading":this.mutableLoading,"vs--disabled":this.disabled}},searching(){return!!this.search},dropdownOpen(){return this.dropdownShouldOpen(this)},searchPlaceholder(){return this.isValueEmpty&&this.placeholder?this.placeholder:void 0},filteredOptions(){const e=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return e;const s=this.search.length?this.filter(e,this.search,this):e;if(this.taggable&&this.search.length){const t=this.createOption(this.search);this.optionExists(t)||s.unshift(t)}return s},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(e,s){const t=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(e,s,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&t()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(e){this.isTrackingValues&&this.setInternalValueFromOptions(e)}},multiple(){this.clearSelection()},open(e){this.$emit(e?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(e){Array.isArray(e)?this.$data._value=e.map(s=>this.findOptionFromReducedValue(s)):this.$data._value=this.findOptionFromReducedValue(e)},select(e){this.$emit("option:selecting",e),this.isOptionSelected(e)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(e):(this.taggable&&!this.optionExists(e)&&(this.$emit("option:created",e),this.pushTag(e)),this.multiple&&(e=this.selectedValue.concat(e)),this.updateValue(e),this.$emit("option:selected",e)),this.onAfterSelect(e)},deselect(e){this.$emit("option:deselecting",e),this.updateValue(this.selectedValue.filter(s=>!this.optionComparator(s,e))),this.$emit("option:deselected",e)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(e){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(e){typeof this.modelValue>"u"&&(this.$data._value=e),e!==null&&(Array.isArray(e)?e=e.map(s=>this.reduce(s)):e=this.reduce(e)),this.$emit("update:modelValue",e)},toggleDropdown(e){const s=e.target!==this.searchEl;s&&e.preventDefault();const t=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||t.filter(Boolean).some(n=>n.contains(e.target)||n===e.target)){e.preventDefault();return}this.open&&s?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(e){return this.selectedValue.some(s=>this.optionComparator(s,e))},isOptionDeselectable(e){return this.isOptionSelected(e)&&this.deselectFromDropdown},optionComparator(e,s){return this.getOptionKey(e)===this.getOptionKey(s)},findOptionFromReducedValue(e){const s=n=>JSON.stringify(this.reduce(n))===JSON.stringify(e),t=[...this.options,...this.pushedTags].filter(s);return t.length===1?t[0]:t.find(n=>this.optionComparator(n,this.$data._value))||e},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let e=null;this.multiple&&(e=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(e)}},optionExists(e){return this.optionList.some(s=>this.optionComparator(s,e))},normalizeOptionForSlot(e){return typeof e=="object"?e:{[this.label]:e}},pushTag(e){this.pushedTags.push(e)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:e,multiple:s}=this;this.clearSearchOnBlur({clearSearchOnSelect:e,multiple:s})&&(this.search=""),this.closeSearchOptions();return}if(this.search.length===0&&this.options.length===0){this.closeSearchOptions();return}},onSearchFocus(){this.open=!0,this.$emit("search:focus")},onMousedown(){this.mousedown=!0},onMouseUp(){this.mousedown=!1},onSearchKeyDown(e){const s=a=>(a.preventDefault(),!this.isComposing&&this.typeAheadSelect()),t={8:a=>this.maybeDeleteValue(),9:a=>this.onTab(),27:a=>this.onEscape(),38:a=>(a.preventDefault(),this.typeAheadUp()),40:a=>(a.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(a=>t[a]=s);const n=this.mapKeydown(t,this);if(typeof n[e.keyCode]=="function")return n[e.keyCode](e)}}},ue=["dir"],fe=["id","aria-expanded","aria-owns"],ye={ref:"selectedOptions",class:"vs__selected-options"},ge=["disabled","title","aria-label","onClick"],me={ref:"actions",class:"vs__actions"},be=["disabled"],ve={class:"vs__spinner"},Oe=["id"],we=["id","aria-selected","onMouseover","onClick"],_e={key:0,class:"vs__no-options"},Se=V(" Sorry, no matching options. "),Ve=["id"];function xe(e,s,t,n,a,o){const b=E("append-to-body");return l(),r("div",{dir:t.dir,class:m(["v-select",o.stateClasses])},[d(e.$slots,"header",c(h(o.scope.header))),u("div",{id:`vs${t.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":o.dropdownOpen.toString(),"aria-owns":`vs${t.uid}__listbox`,"aria-label":"Search for option",onMousedown:s[1]||(s[1]=i=>o.toggleDropdown(i))},[u("div",ye,[(l(!0),r(C,null,k(o.selectedValue,(i,f)=>d(e.$slots,"selected-option-container",{option:o.normalizeOptionForSlot(i),deselect:o.deselect,multiple:t.multiple,disabled:t.disabled},()=>[(l(),r("span",{key:t.getOptionKey(i),class:"vs__selected"},[d(e.$slots,"selected-option",c(h(o.normalizeOptionForSlot(i))),()=>[V(g(t.getOptionLabel(i)),1)]),t.multiple?(l(),r("button",{key:0,ref_for:!0,ref:v=>a.deselectButtons[f]=v,disabled:t.disabled,type:"button",class:"vs__deselect",title:`Deselect ${t.getOptionLabel(i)}`,"aria-label":`Deselect ${t.getOptionLabel(i)}`,onClick:v=>o.deselect(i)},[(l(),w(_(o.childComponents.Deselect)))],8,ge)):p("",!0)]))])),256)),d(e.$slots,"search",c(h(o.scope.search)),()=>[u("input",B({class:"vs__search"},o.scope.search.attributes,M(o.scope.search.events)),null,16)])],512),u("div",me,[S(u("button",{ref:"clearButton",disabled:t.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:s[0]||(s[0]=(...i)=>o.clearSelection&&o.clearSelection(...i))},[(l(),w(_(o.childComponents.Deselect)))],8,be),[[L,o.showClearButton]]),d(e.$slots,"open-indicator",c(h(o.scope.openIndicator)),()=>[t.noDrop?p("",!0):(l(),w(_(o.childComponents.OpenIndicator),c(B({key:0},o.scope.openIndicator.attributes)),null,16))]),d(e.$slots,"spinner",c(h(o.scope.spinner)),()=>[S(u("div",ve,"Loading...",512),[[L,e.mutableLoading]])])],512)],40,fe),O(j,{name:t.transition},{default:I(()=>[o.dropdownOpen?S((l(),r("ul",{id:`vs${t.uid}__listbox`,ref:"dropdownMenu",key:`vs${t.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:s[2]||(s[2]=$((...i)=>o.onMousedown&&o.onMousedown(...i),["prevent"])),onMouseup:s[3]||(s[3]=(...i)=>o.onMouseUp&&o.onMouseUp(...i))},[d(e.$slots,"list-header",c(h(o.scope.listHeader))),(l(!0),r(C,null,k(o.filteredOptions,(i,f)=>(l(),r("li",{id:`vs${t.uid}__option-${f}`,key:t.getOptionKey(i),role:"option",class:m(["vs__dropdown-option",{"vs__dropdown-option--deselect":o.isOptionDeselectable(i)&&f===e.typeAheadPointer,"vs__dropdown-option--selected":o.isOptionSelected(i),"vs__dropdown-option--highlight":f===e.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(i)}]),"aria-selected":f===e.typeAheadPointer?!0:null,onMouseover:v=>t.selectable(i)?e.typeAheadPointer=f:null,onClick:$(v=>t.selectable(i)?o.select(i):null,["prevent","stop"])},[d(e.$slots,"option",c(h(o.normalizeOptionForSlot(i))),()=>[V(g(t.getOptionLabel(i)),1)])],42,we))),128)),o.filteredOptions.length===0?(l(),r("li",_e,[d(e.$slots,"no-options",c(h(o.scope.noOptions)),()=>[Se])])):p("",!0),d(e.$slots,"list-footer",c(h(o.scope.listFooter)))],40,Oe)),[[b]]):(l(),r("ul",{key:1,id:`vs${t.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,Ve))]),_:3},8,["name"]),d(e.$slots,"footer",c(h(o.scope.footer)))],10,ue)}const Ce=x(pe,[["render",xe]]);const ke={components:{vSelect:Ce,Icon:K},props:{placeholder:{type:String,default:"Select Option"},label:{type:String},classLabel:{type:String,default:" "},classInput:{type:String,default:"classinput"},name:{type:String},modelValue:{default:""},error:{type:String},isReadonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},horizontal:{type:Boolean,default:!1},validate:{type:String},msgTooltip:{type:Boolean,default:!1},description:{type:String},multiple:{type:Boolean,default:!1},options:{type:Array}}},Be=["for"],Le={class:"relative"},$e={key:0},Ae={class:"flex text-xl absolute right-[14px] top-1/2 -translate-y-1/2"},De={key:0,class:"text-danger-500"},Pe={key:1,class:"text-success-500"},Te={key:3,class:"block text-secondary-500 font-light leading-4 text-xs mt-2"};function Fe(e,s,t,n,a,o){const b=A("vSelect"),i=A("Icon");return l(),r("div",{class:m(["fromGroup relative",`${t.error?"has-error":""} ${t.horizontal?"flex":""} ${t.validate?"is-valid":""} `])},[t.label?(l(),r("label",{key:0,class:m(`${t.classLabel} inline-block input-label `),for:t.name},g(t.label),11,Be)):p("",!0),u("div",Le,[e.$slots.default?p("",!0):(l(),r("div",$e,[O(b,{name:t.name,error:t.error,id:t.name,readonly:t.isReadonly,disabled:t.disabled,validate:t.validate,multiple:t.multiple,options:t.options},null,8,["name","error","id","readonly","disabled","validate","multiple","options"])])),d(e.$slots,"default"),u("div",Ae,[t.error?(l(),r("span",De,[O(i,{icon:"heroicons-outline:information-circle"})])):p("",!0),t.validate?(l(),r("span",Pe,[O(i,{icon:"bi:check-lg"})])):p("",!0)])]),t.error?(l(),r("span",{key:1,class:m(["mt-2",t.msgTooltip?" inline-block bg-danger-500 text-white text-[10px] px-2 py-1 rounded":" text-danger-500 block text-sm"])},g(t.error),3)):p("",!0),t.validate?(l(),r("span",{key:2,class:m(["mt-2",t.msgTooltip?" inline-block bg-success-500 text-white text-[10px] px-2 py-1 rounded":" text-success-500 block text-sm"])},g(t.validate),3)):p("",!0),t.description?(l(),r("span",Te,g(t.description),1)):p("",!0)],2)}const Ie=N(ke,[["render",Fe]]);export{Ie as V};
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings