PageSourceSearch

https://exato.digital/js/src_components_boxes_table_vue-src_compon…ts_inputs_input-time-picker_vue.803133fc.js

js exato.digital collected 2026-10-05 08:50:01 UTC 54,362 bytes, 2 lines download raw bytes

1"use strict";(globalThis["webpackChunkdirect_digital_web_app"]=globalThis["webpackChunkdirect_digital_web_app"]||[]).push([["src_components_boxes_table_vue-src_components_inputs_input-time-picker_vue"],{53839(e,t,s){s.d(t,{A:()=>h});var i=s(85690);const n={class:"exato-table"};function o(e,t,s,o,a,r){return(0,i.openBlock)(),(0,i.createElementBlock)("table",n,[(0,i.renderSlot)(e.$slots,"default",{},void 0,!0)])}const a=(0,i.defineComponent)({compatConfig:{MODE:3},name:"TableBase"});var r=s(71241);const l=(0,r.A)(a,[["render",o],["__scopeId","data-v-bc31376c"]]),h=l},60254(e,t,s){s.d(t,{A:()=>u});var i=s(85690);const n=["xlink:href"];function o(e,t,s,o,a,r){return(0,i.openBlock)(),(0,i.createElementBlock)("svg",{class:(0,i.normalizeClass)(["icon",e.iconSizeClass]),onClick:t[0]||(t[0]=(...t)=>e.handleClick&&e.handleClick(...t))},[(0,i.createElementVNode)("use",{"xlink:href":e.path},null,8,n)],2)}s(74423);const a={"micro-2":"icon-micro-2",micro:"icon-micro",extrasmall:"icon-extrasmall","small-2":"icon-small-2",small:"icon-small",medium:"icon-medium",big:"icon-big"},r=(0,i.defineComponent)({compatConfig:{MODE:3},name:"IconBase",props:{path:{type:String,required:!0},size:{type:String,required:!0,validator(e){return Object.keys(a).includes(e)}}},emits:["click"],computed:{iconSizeClass(){return a[this.size]}},methods:{handleClick(e){this.$emit("click",e)}}});var l=s(71241);const h=(0,l.A)(r,[["render",o]]),u=h},96525(e,t,s){s.d(t,{A:()=>M});var i=s(85690);const n={class:"input-icon"};function o(e,t,s,o,a,r){const l=(0,i.resolveComponent)("VueTimepicker"),h=(0,i.resolveComponent)("Icon");return(0,i.openBlock)(),(0,i.createElementBlock)("div",n,[(0,i.createVNode)(l,{"hide-clear-button":"","advanced-keyboard":"","close-on-complete":"",format:e.displayFormat,"model-value":e.dis
1playValue,"onUpdate:modelValue":e.handleInput},null,8,["format","model-value","onUpdate:modelValue"]),(0,i.createVNode)(h,{size:"small",path:"/images/icon-lib.svg#icon-time",class:"icon-time input-icon-append click-ignore"})])}s(74423);var a=s(35931),r=s(60254);const l=["id","name","value","placeholder","tabindex","disabled","readonly","autocomplete"],h={key:0,class:"controls",tabindex:"-1"},u={key:1,class:"custom-icon"},d=["textContent"],c=["disabled","data-key","onClick","textContent"],p=["textContent"],m=["disabled","data-key","onClick","textContent"],g=["textContent"],y=["disabled","data-key","onClick","textContent"],k=["textContent"],f=["disabled","data-key","onClick","textContent"],b=["textContent"],T=["tabindex","data-key","disabled","onClick","onKeydown","textContent"],C=["textContent"],w=["tabindex","data-key","disabled","onClick","onKeydown","textContent"],S=["textContent"],v=["tabindex","data-key","disabled","onClick","onKeydown","textContent"],I=["textContent"],x=["tabindex","data-key","disabled","onClick","onKeydown","textContent"];function B(e,t,s,n,o,a){return(0,i.openBlock)(),(0,i.createElementBlock)("span",{class:"vue__time-picker time-picker",style:(0,i.normalizeStyle)(e.inputWidthStyle)},[(0,i.createElementVNode)("input",{id:e.id,ref:"input",type:"text",class:(0,i.normalizeClass)(["display-time",[e.inputClass,{"is-empty":e.inputIsEmpty,invalid:e.hasInvalidInput,"all-selected":e.allValueSelected,disabled:e.disabled,"has-custom-icon":e.$slots&&e.$slots.icon}]]),style:(0,i.normalizeStyle)(e.inputWidthStyle),name:e.name,value:e.inputIsEmpty?null:e.customDisplayTime,placeholder:e.placeholder?e.placeholder:e.formatString,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,readonly:!e.manualInput,autocomplete:e.autocomplete,onFocus:t[0]||(t[0]=(...t)=>e.onFocus&&e.onFocus(...t)),onChange:t[1]||(t[1]=(...t)=>e.onChange&&e.onChange(...t)),onBlur:t[2]||(t[2]=t=>{e.debounceBlur(),e.blurEvent()}),onMousedown:t[3]||(t[3]=(...t)=>e.onMouseDown&&e.onMouseDown(...t)),onKeydown:[t[4]||(t[4]=(...t)=>e.keyDownHandler&&e.keyDownHandler(...t)),t[8]||(t[8]=(0,i.withKeys)((0,i.withModifiers)((...t)=>e.escBlur&&e.escBlur(...t),["exact"]),["esc"]))],onCompositionstart:t[5]||(t[5]=(...t)=>e.onCompostionStart&&e.onCompostionStart(...t)),onCompositionend:t[6]||(t[6]=(...t)=>e.onCompostionEnd&&e.onCompostionEnd(...t)),onPaste:t[7]||(t[7]=(...t)=>e.pasteHandler&&e.pasteHandler(...t))},null,46,l),e.showClearBtn||e.showDropdownBtn?((0,i.openBlock)(),(0,i.createElementBlock)("div",h,[!e.isActive&&e.showClearBtn?((0,i.openBlock)(),(0,i.createElementBlock)("span",{key:0,class:(0,i.normalizeClass)(["clear-btn",{"has-custom-btn":e.$slots&&e.$slots.clearButton}]),tabindex:"-1",onClick:t[9]||(t[9]=(...t)=>e.clearTime&&e.clearTime(...t))},[(0,i.renderSlot)(e.$slots,"clearButton",{},()=>[t[43]||(t[43]=(0,i.createElementVNode)("span",{class:"char"},"×",-1))])],2)):(0,i.createCommentVNode)("",!0),e.showDropdownBtn?((0,i.openBlock)(),(0,i.createElementBlock)("span",{key:1,class:(0,i.normalizeClass)(["dropdown-btn",{"has-custom-btn":e.$slots&&e.$slots.dropdownButton}]),tabindex:"-1",onClick:t[10]||(t[10]=t=>e.setDropdownState(!e.fixedDropdownButton||!e.showDropdown,!0)),onMousedown:t[11]||(t[11]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.renderSlot)(e.$slots,"dropdownButton",{},()=>[t[44]||(t[44]=(0,i.createElementVNode)("span",{class:"char"},"▾",-1))])],34)):(0,i.createCommentVNode)("",!0)])):(0,i.createCommentVNode)("",!0),e.$slots&&e.$slots.icon?((0,i.openBlock)(),(0,i.createElementBlock)("div",u,[(0,i.renderSlot)(e.$slots,"icon")])):(0,i.createCommentVNode)("",!0),e.showDropdown?((0,i.openBlock)(),(0,i.createElementBlock)("div",{key:2,class:"time-picker-overlay",tabindex:"-1",onClick:t[12]||(t[12]=(...t)=>e.toggleActive&&e.toggleActive(...t))})):(0,i.createCommentVNode)("",!0),(0,i.withDirectives)((0,i.createElementVNode)("div",{ref:"dropdown",class:(0,i.normalizeClass)(["dropdown",[e.dropdownDirClass]]),tabindex:"-1",style:(0,i.normalizeStyle)(e.inputWidthStyle),onMouseup:t[41]||(t[41]=(...t)=>e.keepFocusing&&e.keepFocusing(...t)),onClick:t[42]||(t[42]=(0,i.withModifiers)(()=>{},["stop"]))},[(0,i.createElementVNode)("div",{class:"select-list",style:(0,i.normalizeStyle)(e.inputWidthStyle),tabindex:"-1"},[e.advancedKeyboard?(0,i.createCommentVNode)("",!0):((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,{key:0},(0,i.renderList)(e.columnsSequence,s=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,["hour"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"hours",onScroll:t[13]||(t[13]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",textContent:(0,i.toDisplayString)(e.hourLabelText)},null,8,d),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.hours,(t,s)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledHours||e.opts.hideDisabledHours&&!e.isDisabled("hour",t)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:s,class:(0,i.normalizeClass)({active:e.hour===t}),disabled:e.isDisabled("hour",t)||void 0,"data-key":t,onClick:s=>e.select("hour",t),textContent:(0,i.toDisplayString)(t)},null,10,c)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0),"minute"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"minutes",onScroll:t[14]||(t[14]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",textContent:(0,i.toDisplayString)(e.minuteLabelText)},null,8,p),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.minutes,(t,s)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledMinutes||e.opts.hideDisabledMinutes&&!e.isDisabled("minute",t)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:s,class:(0,i.normalizeClass)({active:e.minute===t}),disabled:e.isDisabled("minute",t)||void 0,"data-key":t,onClick:s=>e.select("minute",t),textContent:(0,i.toDisplayString)(t)},null,10,m)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0),"second"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"seconds",onScroll:t[15]||(t[15]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",textContent:(0,i.toDisplayString)(e.secondLabelText)},null,8,g),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.seconds,(t,s)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledSeconds||e.opts.hideDisabledSeconds&&!e.isDisabled("second",t)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:s,class:(0,i.normalizeClass)({active:e.second===t}),disabled:e.isDisabled("second",t)||void 0,"data-key":t,onClick:s=>e.select("second",t),textContent:(0,i.toDisplayString)(t)},null,10,y)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0),"apm"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"apms",onScroll:t[16]||(t[16]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",textContent:(0,i.toDisplayString)(e.apmLabelText)},null,8,k),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.apms,(t,s)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledHours||e.opts.hideDisabledHours&&!e.isDisabled("apm",t)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:s,class:(0,i.normalizeClass)({active:e.apm===t}),disabled:e.isDisabled("apm",t)||void 0,"data-key":t,onClick:s=>e.select("apm",t),textContent:(0,i.toDisplayString)(e.apmDisplayText(t))},null,10,f)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0)],64))),256)),e.advancedKeyboard?((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,{key:1},(0,i.renderList)(e.columnsSequence,s=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,["hour"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"hours",tabindex:"-1",onScroll:t[22]||(t[22]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",tabindex:"-1",textContent:(0,i.toDisplayString)(e.hourLabelText)},null,8,b),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.hours,(s,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledHours||e.opts.hideDisabledHours&&!e.isDisabled("hour",s)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:n,class:(0,i.normalizeClass)({active:e.hour===s}),tabindex:e.isDisabled("hour",s)?-1:e.tabindex,"data-key":s,disabled:e.isDisabled("hour",s)||void 0,onClick:t=>e.select("hour",s),onKeydown:[(0,i.withKeys)(t=>e.onTab("hour",s,t),["tab"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("hour",s),["prevent"]),["space"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("hour",s),["prevent"]),["enter"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.prevItem("hour",s),["prevent"]),["up"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.nextItem("hour",s),["prevent"]),["down"]),t[17]||(t[17]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toLeftColumn("hour"),["prevent"]),["left"])),t[18]||(t[18]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toRightColumn("hour"),["prevent"]),["right"])),t[19]||(t[19]=(0,i.withKeys)((0,i.withModifiers)((...t)=>e.debounceBlur&&e.debounceBlur(...t),["exact"]),["esc"]))],onBlur:t[20]||(t[20]=(...t)=>e.debounceBlur&&e.debounceBlur(...t)),onFocus:t[21]||(t[21]=(...t)=>e.keepFocusing&&e.keepFocusing(...t)),textContent:(0,i.toDisplayString)(s)},null,42,T)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0),"minute"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"minutes",tabindex:"-1",onScroll:t[28]||(t[28]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",tabindex:"-1",textContent:(0,i.toDisplayString)(e.minuteLabelText)},null,8,C),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.minutes,(s,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledMinutes||e.opts.hideDisabledMinutes&&!e.isDisabled("minute",s)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:n,class:(0,i.normalizeClass)({active:e.minute===s}),tabindex:e.isDisabled("minute",s)?-1:e.tabindex,"data-key":s,disabled:e.isDisabled("minute",s)||void 0,onClick:t=>e.select("minute",s),onKeydown:[(0,i.withKeys)(t=>e.onTab("minute",s,t),["tab"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("minute",s),["prevent"]),["space"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("minute",s),["prevent"]),["enter"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.prevItem("minute",s),["prevent"]),["up"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.nextItem("minute",s),["prevent"]),["down"]),t[23]||(t[23]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toLeftColumn("minute"),["prevent"]),["left"])),t[24]||(t[24]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toRightColumn("minute"),["prevent"]),["right"])),t[25]||(t[25]=(0,i.withKeys)((0,i.withModifiers)((...t)=>e.debounceBlur&&e.debounceBlur(...t),["exact"]),["esc"]))],onBlur:t[26]||(t[26]=(...t)=>
1e.debounceBlur&&e.debounceBlur(...t)),onFocus:t[27]||(t[27]=(...t)=>e.keepFocusing&&e.keepFocusing(...t)),textContent:(0,i.toDisplayString)(s)},null,42,w)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0),"second"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"seconds",tabindex:"-1",onScroll:t[34]||(t[34]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",tabindex:"-1",textContent:(0,i.toDisplayString)(e.secondLabelText)},null,8,S),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.seconds,(s,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledSeconds||e.opts.hideDisabledSeconds&&!e.isDisabled("second",s)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:n,class:(0,i.normalizeClass)({active:e.second===s}),tabindex:e.isDisabled("second",s)?-1:e.tabindex,"data-key":s,disabled:e.isDisabled("second",s)||void 0,onClick:t=>e.select("second",s),onKeydown:[(0,i.withKeys)(t=>e.onTab("second",s,t),["tab"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("second",s),["prevent"]),["space"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("second",s),["prevent"]),["enter"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.prevItem("second",s),["prevent"]),["up"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.nextItem("second",s),["prevent"]),["down"]),t[29]||(t[29]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toLeftColumn("second"),["prevent"]),["left"])),t[30]||(t[30]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toRightColumn("second"),["prevent"]),["right"])),t[31]||(t[31]=(0,i.withKeys)((0,i.withModifiers)((...t)=>e.debounceBlur&&e.debounceBlur(...t),["exact"]),["esc"]))],onBlur:t[32]||(t[32]=(...t)=>e.debounceBlur&&e.debounceBlur(...t)),onFocus:t[33]||(t[33]=(...t)=>e.keepFocusing&&e.keepFocusing(...t)),textContent:(0,i.toDisplayString)(s)},null,42,v)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0),"apm"===s?((0,i.openBlock)(),(0,i.createElementBlock)("ul",{key:s,class:"apms",tabindex:"-1",onScroll:t[40]||(t[40]=(...t)=>e.keepFocusing&&e.keepFocusing(...t))},[(0,i.createElementVNode)("li",{class:"hint",tabindex:"-1",textContent:(0,i.toDisplayString)(e.apmLabelText)},null,8,I),((0,i.openBlock)(!0),(0,i.createElementBlock)(i.Fragment,null,(0,i.renderList)(e.apms,(s,n)=>((0,i.openBlock)(),(0,i.createElementBlock)(i.Fragment,null,[!e.opts.hideDisabledHours||e.opts.hideDisabledHours&&!e.isDisabled("apm",s)?((0,i.openBlock)(),(0,i.createElementBlock)("li",{key:n,class:(0,i.normalizeClass)({active:e.apm===s}),tabindex:e.isDisabled("apm",s)?-1:e.tabindex,"data-key":s,disabled:e.isDisabled("apm",s)||void 0,onClick:t=>e.select("apm",s),onKeydown:[(0,i.withKeys)(t=>e.onTab("apm",s,t),["tab"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("apm",s),["prevent"]),["space"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.select("apm",s),["prevent"]),["enter"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.prevItem("apm",s),["prevent"]),["up"]),(0,i.withKeys)((0,i.withModifiers)(t=>e.nextItem("apm",s),["prevent"]),["down"]),t[35]||(t[35]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toLeftColumn("apm"),["prevent"]),["left"])),t[36]||(t[36]=(0,i.withKeys)((0,i.withModifiers)(t=>e.toRightColumn("apm"),["prevent"]),["right"])),t[37]||(t[37]=(0,i.withKeys)((0,i.withModifiers)((...t)=>e.debounceBlur&&e.debounceBlur(...t),["exact"]),["esc"]))],onBlur:t[38]||(t[38]=(...t)=>e.debounceBlur&&e.debounceBlur(...t)),onFocus:t[39]||(t[39]=(...t)=>e.keepFocusing&&e.keepFocusing(...t)),textContent:(0,i.toDisplayString)(e.apmDisplayText(s))},null,42,x)):(0,i.createCommentVNode)("",!0)],64))),256))],32)):(0,i.createCommentVNode)("",!0)],64))),256)):(0,i.createCommentVNode)("",!0)],4)],38),[[i.vShow,e.showDropdown]])],4)}s(44114),s(18111),s(22489),s(7588),s(61701),s(13579);const D={HOUR_TOKENS:["HH","H","hh","h","kk","k"],MINUTE_TOKENS:["mm","m"],SECOND_TOKENS:["ss","s"],APM_TOKENS:["A","a"],BASIC_TYPES:["hour","minute","second","apm"]},V={format:"HH:mm",minuteInterval:1,secondInterval:1,hourRange:null,minuteRange:null,secondRange:null,hideDisabledHours:!1,hideDisabledMinutes:!1,hideDisabledSeconds:!1,hideDisabledItems:!1,hideDropdown:!1,blurDelay:300,manualInputTimeout:1e3,dropOffsetHeight:160},E=(0,i.defineComponent)({name:"VueTimepicker",compatConfig:{MODE:3},props:{modelValue:{type:[Object,String]},format:{type:String},minuteInterval:{type:[Number,String]},secondInterval:{type:[Number,String]},hourRange:{type:Array},minuteRange:{type:Array},secondRange:{type:Array},hideDisabledHours:{type:Boolean,default:!1},hideDisabledMinutes:{type:Boolean,default:!1},hideDisabledSeconds:{type:Boolean,default:!1},hideDisabledItems:{type:Boolean,default:!1},hideClearButton:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},closeOnComplete:{type:Boolean,default:!1},id:{type:String},name:{type:String},inputClass:{type:[String,Object,Array]},placeholder:{type:String},tabindex:{type:[Number,String],default:0}
1,inputWidth:{type:String},autocomplete:{type:String,default:"off"},hourLabel:{type:String},minuteLabel:{type:String},secondLabel:{type:String},apmLabel:{type:String},amText:{type:String},pmText:{type:String},blurDelay:{type:[Number,String]},advancedKeyboard:{type:Boolean,default:!1},lazy:{type:Boolean,default:!1},autoScroll:{type:Boolean,default:!1},dropDirection:{type:String,default:"down"},dropOffsetHeight:{type:[Number,String]},containerId:{type:String},appendToBody:{type:Boolean,default:!1},manualInput:{type:Boolean,default:!1},manualInputTimeout:{type:[Number,String]},hideDropdown:{type:Boolean,default:!1},fixedDropdownButton:{type:Boolean,default:!1},debugMode:{type:Boolean,default:!1}},emits:["update:modelValue","change","open","close","error","focus","blur"],data(){return{timeValue:{},hours:[],minutes:[],seconds:[],apms:[],isActive:!1,showDropdown:!1,isFocusing:!1,debounceTimer:void 0,hourType:"HH",minuteType:"mm",secondType:"",apmType:"",hour:"",minute:"",second:"",apm:"",fullValues:void 0,bakDisplayTime:void 0,doClearApmChecking:!1,selectionTimer:void 0,kbInputTimer:void 0,kbInputLog:"",bakCurrentPos:void 0,forceDropOnTop:!1}},computed:{opts(){const e=Object.assign({},V);return this.format&&this.format.length&&(e.format=String(this.format)),this.isNumber(this.minuteInterval)&&(e.minuteInterval=+this.minuteInterval),(!e.minuteInterval||e.minuteInterval<1||e.minuteInterval>60)&&(this.debugMode&&(e.minuteInterval>60?this.debugLog(`"minute-interval" should be less than 60. Current value is ${this.minuteInterval}`):(0===e.minuteInterval||e.minuteInterval<1)&&this.debugLog(`"minute-interval" should be NO less than 1. Current value is ${this.minuteInterval}`)),0===e.minuteInterval?e.minuteInterval=60:e.minuteInterval=1),this.isNumber(this.secondInterval)&&(e.secondInterval=+this.secondInterval),(!e.secondInterval||e.secondInterval<1||e.secondInterval>60)&&(this.debugMode&&(e.secondInterval>60?this.debugLog(`"second-interval" should be less than 60. Current value is ${this.secondInterval}`):(0===e.secondInterval||e.secondInterval<1)&&this.debugLog(`"second-interval" should be NO less than 1. Current value is ${this.secondInterval}`)),0===e.secondInterval?e.secondInterval=60:e.secondInterval=1),this.hourRange&&Array.isArray(this.hourRange)&&(e.hourRange=JSON.parse(JSON.stringify(this.hourRange)),!this.hourRange.length&&this.debugMode&&this.debugLog('The "hour-range" array is empty (length === 0)')),this.minuteRange&&Array.isArray(this.minuteRange)&&(e.minuteRange=JSON.parse(JSON.stringify(this.minuteRange)),!this.minuteRange.length&&this.debugMode&&this.debugLog('The "minute-range" array is empty (length === 0)')),this.secondRange&&Array.isArray(this.secondRange)&&(e.secondRange=JSON.parse(JSON.stringify(this.secondRange)),!this.secondRange.length&&this.debugMode&&this.debugLog('The "second-range" array is empty (length === 0)')),this.hideDisabledItems&&(e.hideDisabledItems=!0),(this.hideDisabledHours||this.hideDisabledItems)&&(e.hideDisabledHours=!0),(this.hideDisabledMinutes||this.hideDisabledItems)&&(e.hideDisabledMinutes=!0),(this.hideDisabledSeconds||this.hideDisabledItems)&&(e.hideDisabledSeconds=!0),this.hideDropdown&&(this.manualInput?e.hideDropdown=!0:this.debugMode&&this.debugLog('"hide-dropdown" only works with "manual-input" mode')),this.blurDelay&&+this.blurDelay>0&&(e.blurDelay=+this.blurDelay),this.manualInputTimeout&&+this.manualInputTimeout>0&&(e.manualInputTimeout=+this.manualInputTimeout),this.dropOffsetHeight&&+this.dropOffsetHeight>0&&(e.dropOffsetHeight=+this.dropOffsetHeight),e},useStringValue(){return"string"===typeof this.modelValue},formatString(){return this.opts.format||V.format},inUse(){const e=D.BASIC_TYPES.filter(e=>this.getTokenByType(e));e.sort((e,t)=>this.formatString.indexOf(this.getTokenByType(e)||null)-this.formatString.indexOf(this.getTokenByType(t)||null));const t=e.map(e=>this.getTokenByType(e));return{hour:!!this.hourType,minute:!!this.minuteType,second:!!this.secondType,apm:!!this.apmType,types:e||[],tokens:t||[]}},displayTime(){let e=String(this.formatString);return this.hour&&(e=e.replace(new RegExp(this.hourType,"g"),this.hour)),this.minute&&(e=e.replace(new RegExp(this.minuteType,"g"),this.minute)),this.second&&this.secondType&&(e=e.replace(new RegExp(this.secondType,"g"),this.second)),this.apm&&this.apmType&&(e=e.replace(new RegExp(this.apmType,"g"),this.apm)),e},customDisplayTime(){return this.amText||this.pmText?this.displayTime.replace(new RegExp(this.apm,"g"),this.apmDisplayText(this.apm)):this.displayTime},inputIsEmpty(){return this.formatString===this.displayTime},allValueSelected(){return!(this.inUse.hour&&!this.hour||this.inUse.minute&&!this.minute||this.inUse.second&&!this.second||this.inUse.apm&&!this.apm)},columnsSequence(){return this.inUse.types.map(e=>e)||[]},showClearBtn(){return!this.hideClearButton&&!this.disabled&&!this.inputIsEmpty},showDropdownBtn(){return!!this.fixedDropdownButton||!(!this.opts.hideDropdown||!this.isActive||this.showDropdown)},baseOn12Hours(){return"h"===this.hourType||"hh"===this.hourType},hourRangeIn24HrFormat(){if(!this.hourType||!this.opts.hourRange)return!1;if(!this.opts.hourRange.length)return[];const e=[];return this.opts.hourRange.forEach(t=>{if(t instanceof Array){t.length>2&&this.debugMode&&this.debugLog(`Nested array within "hour-range" must contain no more than two items. Only the first two items of ${JSON.stringify(t)} will be taken into account.`);let s=t[0],i=t[1]||t[0];this.is12hRange(s)&&(s=this.translate12hRange(s)),this.is12hRange(i)&&(i=this.translate12hRange(i));for(let t=+s;t<=+i;t++)t<0||t>24||e.includes(t)||e.push(t)}else{if(t=this.is12hRange(t)?this.translate12hRange(t):+t,t<0||t>24)return;e.includes(t)||e.push(t)}}),e.sort((e,t)=>
1e-t),e},restrictedHourRange(){if(!this.hourRangeIn24HrFormat)return!1;if(this.baseOn12Hours){const e=this.hourRangeIn24HrFormat.map(e=>12===e?"12p":24===e||0===e?"12a":e>12?e%12+"p":`${e}a`);return e}return this.hourRangeIn24HrFormat},validHoursList(){if(!this.manualInput)return!1;if(this.restrictedHourRange){let e=[];if(this.baseOn12Hours){e=this.restrictedHourRange.map(e=>{const t=e.substr(0,e.length-1),s=e.substr(-1);return`${this.formatValue(this.hourType,t)}${s}`});const t=e.indexOf("12a");return t>0&&e.unshift(e.splice(t,1)[0]),e}return e=this.restrictedHourRange.map(e=>this.formatValue(this.hourType,e)),e.length>1&&e[0]&&"24"===e[0]&&e.push(e.shift()),e}return this.baseOn12Hours?[].concat([],this.hours.map(e=>`${e}a`),this.hours.map(e=>`${e}p`)):this.hours},has(){const e={customApmText:!1},t=!!this.apmType;if(t&&this.hourRangeIn24HrFormat&&this.hourRangeIn24HrFormat.length){const t=[].concat([],this.hourRangeIn24HrFormat);e.am=t.some(e=>e<12||24===e),e.pm=t.some(e=>e>=12&&e<24)}else e.am=t,e.pm=t;return(this.amText&&this.amText.length||this.pmText&&this.pmText.length)&&(e.customApmText=!0),e},minuteRangeList(){return!(!this.minuteType||!this.opts.minuteRange)&&(this.opts.minuteRange.length?this.renderRangeList(this.opts.minuteRange,"minute"):[])},secondRangeList(){return!(!this.secondType||!this.opts.secondRange)&&(this.opts.secondRange.length?this.renderRangeList(this.opts.secondRange,"second"):[])},hourLabelText(){return this.hourLabel||this.hourType},minuteLabelText(){return this.minuteLabel||this.minuteType},secondLabelText(){return this.secondLabel||this.secondType},apmLabelText(){return this.apmLabel||this.apmType},inputWidthStyle(){if(this.inputWidth&&this.inputWidth.length)return{width:this.inputWidth}},tokenRegexBase(){return this.inUse.tokens.join("|")},tokenChunks(){if(!this.manualInput&&!this.useStringValue)return!1;const e=String(this.formatString),t=`(${this.tokenRegexBase})+?`,s=this.getMatchAllByRegex(e,t),i=[];for(let n of s){const e=n[0],t={index:n.index,token:e,type:this.getTokenType(e),needsCalibrate:e.length<2,len:(e||"").length};i.push(t)}return i},needsPosCalibrate(){return!!this.manualInput&&this.tokenChunks.some(e=>e.needsCalibrate)},tokenChunksPos(){if(!this.manualInput)return!1;if(!this.needsPosCalibrate)return this.tokenChunks.map(e=>({token:e.token,type:e.type,start:e.index,end:e.index+e.len}));const e=[];let t=0;return this.tokenChunks.forEach(s=>{let i;if("apm"===s.type&&this.has.customApmText)if(this.apm&&this.apm.length){const e="am"===this.apm.toLowerCase()?this.amText:this.pmText;i=e&&e.length?e.length:s.len}else i=s.len;else i=this[s.type]&&this[s.type].length?this[s.type].length:s.len;e.push({token:s.token,type:s.type,start:s.index+t,end:s.index+t+i}),s.needsCalibrate&&i>s.len&&(t+=i-s.len)}),e},invalidValues(){if(this.inputIsEmpty)return[];if(!this.restrictedHourRange&&!this.minuteRangeList&&!this.secondRangeList&&1===this.opts.minuteInterval&&1===this.opts.secondInterval)return[];const e=[];return!this.inUse.hour||this.isEmptyValue(this.hourType,this.hour)||this.isValidValue(this.hourType,this.hour)&&!this.isDisabled("hour",this.hour)||e.push("hour"),!this.inUse.minute||this.isEmptyValue(this.minuteType,this.minute)||this.isValidValue(this.minuteType,this.minute)&&!this.isDisabled("minute",this.minute)&&!this.notInInterval("minute",this.minute)||e.push("minute"),!this.inUse.second||this.isEmptyValue(this.secondType,this.second)||this.isValidValue(this.secondType,this.second)&&!this.isDisabled("second",this.second)&&!this.notInInterval("second",this.second)||e.push("second"),!this.inUse.apm||this.isEmptyValue(this.apmType,this.apm)||this.isValidValue(this.apmType,this.apm)&&!this.isDisabled("apm",this.apm)||e.push("apm"),e.length?e:[]},hasInvalidInput(){return Boolean(this.invalidValues&&this.invalidValues.length)},autoDirectionEnabled(){return"auto"===this.dropDirection},dropdownDirClass(){return this.autoDirectionEnabled?this.forceDropOnTop?"drop-up":"drop-down":"up"===this.dropDirection?"drop-up":"drop-down"}},watch:{"opts.format"(e){this.renderFormat(e)},"opts.minuteInterval"(e){this.renderList("minute",e)},"opts.secondInterval"(e){this.renderList("second",e)},modelValue:{deep:!0,handler(){this.readValues()}},displayTime(){this.fillValues()},disabled(e){e&&(this.isActive&&(this.isActive=!1),this.showDropdown&&(this.showDropdown=!1))},"invalidValues.length"(e,t){e&&e>=1?this.$emit("error",this.invalidValues):t&&t>=1&&this.$emit("error",[])}},mounted(){window.clearTimeout(this.debounceTimer),window.clearTimeout(this.selectionTimer),window.clearTimeout(this.kbInputTimer),this.renderFormat()},beforeUnmount(){window.clearTimeout(this.debounceTimer),window.clearTimeout(this.selectionTimer),window.clearTimeout(this.kbInputTimer)},methods:{formatValue(e,t){if(!this.isNumber(t))return"";switch(t=+t,e){case"H":case"h":case"k":case"m":case"s":return["h","k"].includes(e)&&0===t?"k"===e?"24":"12":String(t);case"HH":case"mm":case"ss":case"hh":case"kk":return["hh","kk"].includes(e)&&0===t?"kk"===e?"24":"12":t<10?`0${t}`:String(t);default:return""}},checkAcceptingType(e,t){if(!e||!t||!t.length)return"";for(let s=0;s<e.length;s++)if(t.indexOf(e[s])>-1)return e[s];return""},renderFormat(e){e=e||this.opts.format||V.format;let t=this.checkAcceptingType(D.HOUR_TOKENS,e),s=this.checkAcceptingType(D.MINUTE_TOKENS,e);this.secondType=this.checkAcceptingType(D.SECOND_TOKENS,e),this.apmType=this.checkAcceptingType(D.APM_TOKENS,e),t||s||this.secondType||this.apmType||(this.debugMode&&this.format&&this.debugLog(`No valid tokens found in your defined "format" string "${this.format}". Fallback to the default "HH:mm" format.`),t="HH",s="mm"),this.hourType=t,this.minuteType=s,this.hourType?this.renderHoursList():this.hours=[],this.minuteType?this.renderList("minute"):this.minutes=[],this.secondType?this.renderList("second"):this.seconds=[],this.apmType?this.renderApmList():this.apms=[],this.$nextTick(()=>{this.readValues()})},renderHoursList(){const e=this.baseOn12Hours?12:24,t=[];for(let s=0;s<e;s++)"k"===this.hourType||"kk"===this.hourType?t.push(this.formatValue(this.hourType,s+1)):t.push(this.formatValue(this.hourType,s));this.hours=t},renderList(e,t){if(!this.isMinuteOrSecond(e))return;const s="minute"===e;t=t||(s?this.opts.minuteInterval||V.minuteInterval:this.opts.secondInterval||V.secondInterval);const i=[];for(let n=0;n<60;n+=t)i.push(this.formatValue(s?this.minuteType:this.secondType,n));s?this.minutes=i:this.seconds=i},renderApmList(){this.apms="A"===this.apmType?["AM","PM"]:["am","pm"]},readValues(){this.useStringValue?(this.debugMode&&this.debugLog(`Received a string value: "${this.modelValue}"`),this.readStringValues(this.modelValue)):(this.debugMode&&this.debugLog(`Received an object value: "${JSON.stringify(this.modelValue||{})}"`),this.readObjectValues(this.modelValue))},readObjectValues(e){const t=JSON.parse(JSON.stringify(e||{})),s=Object.keys(t);
10!==s.length?(D.BASIC_TYPES.forEach(e=>{const i=this.getTokenByType(e);if(s.indexOf(i)>-1){const s=this.sanitizedValue(i,t[i]);this[e]=s,t[i]=s}else this[e]=""}),this.timeValue=t):this.addFallbackValues()},getMatchAllByRegex(e,t){const s="polyfillTest",i=Boolean(!s.matchAll||"function"!==typeof s.matchAll);return i?this.polyfillMatchAll(e,t):e.matchAll(new RegExp(t,"g"))},readStringValues(e){if(!e||!e.length)return void this.addFallbackValues();const t=String(this.formatString),s=`(${this.tokenRegexBase})+?`,i=`[^(${this.tokenRegexBase})]+`,n=this.getMatchAllByRegex(t,s),o=this.getMatchAllByRegex(t,i),a=[],r=[];for(let u of n){const e={index:u.index,token:u[0],isValueToken:!0};a.push(e),r.push(e)}for(let u of o)a.push({index:u.index,token:u[0]});a.sort((e,t)=>e.index<t.index?-1:1);let l="";a.forEach(e=>{if(e.isValueToken){const t=this.getTokenRegex(e.token)||"";l+=t}else{const t=e.token.replace(/\\{0}(\*|\?|\.|\+)/g,"\\$1");l+=`(?:${t})`}});const h=new RegExp(l);if(h.test(e)){const t=e.match(new RegExp(l)),s=t.slice(1,r.length+1),i={};if(s.forEach((e,t)=>{if(r[t]){const s=r[t].token;i[s]=this.setValueFromString(e,s)}}),this.timeValue=i,this.debugMode){const e=r.map(e=>e&&e.token);this.debugLog(`Successfully parsed values ${JSON.stringify(s)}\nfor ${JSON.stringify(e)}\nin format pattern '${this.formatString}'`)}}else this.debugMode&&this.debugLog(`The input string in "v-model" does NOT match the "format" pattern\nformat: ${this.formatString}\nv-model: ${e}`)},polyfillMatchAll(e,t){const s=e.match(new RegExp(t,"g")),i=[],n=[];return s&&s.length&&s.forEach(t=>{const s=n.findIndex(e=>e.str===t);let o;if(s>=0)n[s]&&n[s].regex&&(o=n[s].regex.exec(e).index);else{const s=new RegExp(t,"g");o=s.exec(e).index,n.push({str:String(t),regex:s})}i.push({0:String(t),index:o})}),i},addFallbackValues(){const e={};this.inUse.types.forEach(t=>{e[this.getTokenByType(t)]=""}),this.timeValue=e},setValueFromString(e,t){if(!t||!e)return"";const s=this.getTokenType(t);if(!s||!s.length)return"";const i=e!==this.getTokenByType(s)?e:"";return this[s]=i,i},fillValues(e){const t={},s=this.hour,i=this.hourType;let n;if(i&&this.isNumber(s)){const e=+s,n=!(!this.baseOn12Hours||!this.apm)&&this.lowerCasedApm(this.apm);D.HOUR_TOKENS.forEach(o=>{if(o===i)return void(t[o]=s);let a,r;switch(o){case"H":case"HH":case"k":case"kk":a=this.baseOn12Hours?"pm"===n?e<12?e+12:e:["k","kk"].includes(o)?12===e?24:e:e%12:["k","kk"].includes(o)?0===e?24:e:e%24,t[o]=this.formatValue(o,a);break;case"h":case"hh":this.baseOn12Hours?(a=e,r=n||""):e>11&&e<24?(r="pm",a=12===e?12:e%12):(r="am",a=e%12===0?12:e),t[o]=this.formatValue(o,a),t.a=r,t.A=r.toUpperCase();break}})}else D.HOUR_TOKENS.forEach(e=>t[e]=""),n=this.lowerCasedApm(this.apm||""),t.a=n,t.A=n.toUpperCase();t.m=this.formatValue("m",this.minute),t.mm=this.formatValue("mm",this.minute),t.s=this.formatValue("s",this.second),t.ss=this.formatValue("ss",this.second),this.fullValues=t,this.lazy&&!e||this.emitTimeValue(),this.closeOnComplete&&this.allValueSelected&&this.showDropdown&&this.toggleActive()},getFullData(){return this.fullValues||this.fillValues(),{data:JSON.parse(JSON.stringify(this.fullValues)),displayTime:this.inputIsEmpty?"":String(this.displayTime)}},emitTimeValue(){if(this.lazy&&this.bakDisplayTime===this.displayTime)return void(this.debugMode&&this.debugLog("The value does not change on `lazy` mode. Skip the emitting `input` and `change` event."));const e=this.getFullData();if(this.useStringValue)this.$emit("update:modelValue",e.displayTime);else{const t=e.data,s=this.inUse.tokens||[],i={};s.forEach(e=>{i[e]=t[e]||""}),this.$emit("update:modelValue",JSON.parse(JSON.stringify(i)))}this.$emit("change",e)},translate12hRange(e){const t=this.match12hRange(e);return 12===+t[1]?+t[1]+("p"===t[2].toLowerCase()?0:12):+t[1]+("p"===t[2].toLowerCase()?12:0)},isDisabled(e,t){if(!this.isBasicType(e)||!this.inUse[e])return!0;switch(e){case"hour":return this.isDisabledHour(t);case"minute":case"second":return!!this[`${e}RangeList`]&&!this[`${e}RangeList`].includes(t);case"apm":return!!this.restrictedHourRange&&!this.has[this.lowerCasedApm(t)];default:return!0}},isDisabledHour(e){if(!this.restrictedHourRange)return!1;if(this.baseOn12Hours){if(this.apm&&this.apm.length){const t="am"===this.apm.toLowerCase()?"a":"p";return!this.restrictedHourRange.includes(`${+e}${t}`)}return!1}return("HH"!==this.hourType&&"H"!==this.hourType||0!==+e||!this.restrictedHourRange.includes(24))&&!this.restrictedHourRange.includes(+e)},notInInterval(e,t){if(e&&this.isMinuteOrSecond(e))return 1!==this.opts[`${e}Interval`]&&+t%this.opts[`${e}Interval`]!==0},renderRangeList(e,t){if(!e||!t||!this.isMinuteOrSecond(t))return[];const s=[];let i;
1if(e.forEach(e=>{if(e instanceof Array){e.length>2&&this.debugMode&&this.debugLog(`Nested array within "${t}-range" must contain no more than two items. Only the first two items of ${JSON.stringify(e)} will be taken into account.`);const n=e[0],o=e[1]||e[0];for(let e=+n;e<=+o;e++)e<0||e>59||(i=this.formatValue(this.getTokenByType(t),e),s.includes(i)||s.push(i))}else{if(+e<0||+e>59)return;i=this.formatValue(this.getTokenByType(t),e),s.includes(i)||s.push(i)}}),s.sort((e,t)=>e-t),this.debugMode){const e=("minute"===t?this.minutes:this.seconds)||[],i=e.filter(e=>s.includes(e));i&&i.length||("minute"===t?this.debugLog(`The minute list is empty due to the "minute-range" config\nminute-range: ${JSON.stringify(this.minuteRange)}\nminute-interval: ${this.opts.minuteInterval}`):this.debugLog(`The second list is empty due to the "second-range" config\nsecond-range: ${JSON.stringify(this.secondRange)}\nsecond-interval: ${this.opts.secondInterval}`))}return s},forceApmSelection(){if(!this.manualInput&&this.apmType&&!this.apm&&(this.has.am||this.has.pm)){this.doClearApmChecking=!0;const e=this.has.am?"am":"pm";this.apm="A"===this.apmType?e.toUpperCase():e}},emptyApmSelection(){this.doClearApmChecking&&""===this.hour&&""===this.minute&&""===this.second&&(this.apm=""),this.doClearApmChecking=!1},apmDisplayText(e){return this.amText&&"am"===this.lowerCasedApm(e)?this.amText:this.pmText&&"pm"===this.lowerCasedApm(e)?this.pmText:e},toggleActive(){this.disabled||(this.isActive=!this.isActive,this.isActive?(this.isFocusing=!0,this.manualInput&&this.$emit("focus"),this.opts.hideDropdown||this.setDropdownState(!0),this.lazy&&(this.bakDisplayTime=String(this.displayTime||"")),this.manualInput&&!this.inputIsEmpty&&this.$nextTick(()=>{this.$refs.input&&0===this.$refs.input.selectionStart&&this.$refs.input.selectionEnd===this.displayTime.length&&this.selectFirstSlot()})):(this.showDropdown?this.setDropdownState(!1):this.manualInput&&this.$emit("blur",this.getFullData()),this.isFocusing=!1,this.lazy&&(this.fillValues(!0),this.bakDisplayTime=void 0)),this.restrictedHourRange&&this.baseOn12Hours&&(this.showDropdown?this.forceApmSelection():this.emptyApmSelection()),this.showDropdown&&this.checkForAutoScroll())},setDropdownState(e,t=!1){e?(this.appendToBody&&this.appendDropdownToBody(),this.keepFocusing(),this.autoDirectionEnabled&&this.checkDropDirection(),this.showDropdown=!0,this.$emit("open"),t&&(this.fixedDropdownButton&&(this.isActive=!0),this.$emit("blur",this.getFullData()),this.checkForAutoScroll())):(this.showDropdown=!1,this.$emit("close",this.getFullData()),this.appendToBody&&this.removeDropdownFromBody())},appendDropdownToBody(){const e=this.$refs&&this.$refs.dropdown,t=document.getElementsByTagName("body")[0];t&&e&&(window.addEventListener("scroll",this.updateDropdownPos),e.classList.add("vue__time-picker-dropdown"),this.updateDropdownPos(),t.appendChild(e))},updateDropdownPos(){if(!this.appendToBody)return;const e=this.$refs&&this.$refs.dropdown,t=document.getElementsByTagName("body")[0];if(t&&e){const t=this.$el.getBoundingClientRect();"drop-up"===this.dropdownDirClass?(e.style.bottom=window.innerHeight-t.y+"px",e.style.top="auto"):(e.style.top=`${t.y+t.height}px`,e.style.bottom="auto"),e.style.left=`${t.x}px`}},removeDropdownFromBody(){const e=this.$refs&&this.$refs.dropdown,t=document.getElementsByTagName("body")[0];t&&e&&t.contains(e)&&t.removeChild(e),e&&(e.classList.remove("vue__time-picker-dropdown"),e.style.top="",e.style.bottom="",e.style.left="",this.$el.appendChild(e)),window.removeEventListener("scroll",this.updateDropdownPos)},blurEvent(){this.manualInput&&!this.opts.hideDropdown&&this.$emit("blur",this.getFullData())},select(e,t){this.isBasicType(e)&&!this.isDisabled(e,t)&&(this[e]=t,this.doClearApmChecking&&(this.doClearApmChecking=!1))},clearTime(){this.disabled||(this.hour="",this.minute="",this.second="",this.apm="",this.manualInput&&this.$refs&&this.$refs.input&&this.$refs.input.value.length&&(this.$refs.input.value=""),this.lazy&&this.fillValues(!0))},checkForAutoScroll(){this.inputIsEmpty||(this.autoScroll?this.$nextTick(()=>{this.scrollToSelectedValues()}):this.advancedKeyboard&&this.$nextTick(()=>{const e=this.inUse.types[0];this.scrollToSelected(e,!0)}))},scrollToSelected(e,t=!1){if(!this.timeValue||this.inputIsEmpty)return;let s;s=this.appendToBody&&this.$refs&&this.$refs.dropdown?this.$refs.dropdown.querySelectorAll(`ul.${e}s`)[0]:this.$el.querySelectorAll(`ul.${e}s`)[0];let i=this.activeItemInCol(e)[0];!i&&t&&(i=this.validItemsInCol(e)[0]),s&&i&&(s.scrollTop=i.offsetTop||0,this.advancedKeyboard&&i.focus())},scrollToSelectedValues(){this.timeValue&&!this.inputIsEmpty&&this.inUse.types.forEac
1h(e=>{this.scrollToSelected(e)})},onFocus(){this.disabled||(this.isFocusing||(this.isFocusing=!0),this.isActive||this.toggleActive())},escBlur(){if(this.disabled)return;window.clearTimeout(this.debounceTimer),this.isFocusing=!1;const e=this.$el.querySelectorAll("input.display-time")[0];e&&e.blur()},debounceBlur(){this.disabled||(this.isFocusing=!1,window.clearTimeout(this.debounceTimer),this.debounceTimer=window.setTimeout(()=>{window.clearTimeout(this.debounceTimer),this.onBlur()},this.opts.blurDelay))},onBlur(){this.disabled||this.isFocusing||!this.isActive||this.toggleActive()},keepFocusing(){this.disabled||(window.clearTimeout(this.debounceTimer),this.isFocusing||(this.isFocusing=!0))},onTab(e,t,s){if(this.appendToBody&&s.shiftKey){const i=this.inUse.types[0];if(e!==i)return;const n=this.validItemsInCol(i)[0];n&&n.getAttribute("data-key")===String(t)&&(s.preventDefault(),this.$refs&&this.$refs.input&&this.$refs.input.focus())}},validItemsInCol(e){const t=`${e}s`;return this.appendToBody&&this.$refs&&this.$refs.dropdown?this.$refs.dropdown.querySelectorAll(`ul.${t} > li:not(.hint):not([disabled])`):this.$el.querySelectorAll(`ul.${t} > li:not(.hint):not([disabled])`)},activeItemInCol(e){const t=`${e}s`;return this.appendToBody&&this.$refs&&this.$refs.dropdown?this.$refs.dropdown.querySelectorAll(`ul.${t} > li.active:not(.hint)`):this.$el.querySelectorAll(`ul.${t} > li.active:not(.hint)`)},getClosestSibling(e,t,s=!1){const i=this.validItemsInCol(e),n=Array.prototype.findIndex.call(i,e=>e.getAttribute("data-key")===t);return s&&0===n?i[i.length-1]:s||n!==i.length-1?n<0?i[0]:s?i[n-1]:i[n+1]:i[0]},prevItem(e,t,s=!1){const i=this.getClosestSibling(e,t,!0);if(i)return s?i:i.focus()},nextItem(e,t,s=!1){const i=this.getClosestSibling(e,t,!1);if(i)return s?i:i.focus()},getSideColumnName(e,t=!1){const s=this.inUse.types.indexOf(e);if(t&&s<=0)this.debugMode&&this.debugLog("You're in the leftmost list already");else{if(t||s!==this.inUse.types.length-1)return this.inUse.types[t?s-1:s+1];this.debugMode&&this.debugLog("You're in the rightmost list already")}},getFirstItemInSideColumn(e,t=!1){const s=this.getSideColumnName(e,t);if(!s)return;const i=this.validItemsInCol(s);return i&&i[0]?i[0]:void 0},getActiveItemInSideColumn(e,t=!1){const s=this.getSideColumnName(e,t);if(!s)return;const i=this.activeItemInCol(s);return i&&i[0]?i[0]:void 0},toLeftColumn(e){const t=this.getActiveItemInSideColumn(e,!0)||this.getFirstItemInSideColumn(e,!0);t&&t.focus()},toRightColumn(e){const t=this.getActiveItemInSideColumn(e,!1)||this.getFirstItemInSideColumn(e,!1);t&&t.focus()},onMouseDown(){this.manualInput&&(window.clearTimeout(this.selectionTimer),this.selectionTimer=window.setTimeout(()=>{if(window.clearTimeout(this.selectionTimer),this.$refs&&this.$refs.input){const e=this.getNearestChunkByPos(this.$refs.input.selectionStart||0);this.debounceSetInputSelection(e)}},50))},keyDownHandler(e){if(e.isComposing||229===e.keyCode)return e.preventDefault(),e.stopPropagation(),!1;e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105?(e.preventDefault(),this.keyboardInput(e.key)):[65,80,77].includes(e.keyCode)?(e.preventDefault(),this.keyboardInput(e.key,!0)):e.keyCode>=37&&e.keyCode<=40?(e.preventDefault(),this.clearKbInputLog(),this.arrowHandler(e)):8===e.keyCode||46===e.keyCode?(e.preventDefault(),this.clearKbInputLog(),this.clearTime()):9===e.keyCode?(this.clearKbInputLog(),this.tabHandler(e)):186===e.keyCode||32===e.keyCode?(e.preventDefault(),this.clearKbInputLog(),this.toNextSlot()):27===e.keyCode||e.metaKey||e.ctrlKey||e.preventDefault()},onCompostionStart(e){return e.preventDefault(),e.stopPropagation(),this.bakCurrentPos=this.getCurrentTokenChunk(),!1},onCompostionEnd(e){e.preventDefault(),e.stopPropagation();const t=e.data;let s=!1;return this.has.customApmText&&(s=this.isCustomApmText(t)),s&&this.setSanitizedValueToSection("apm",s),this.$refs.input.value=this.has.customApmText?this.customDisplayTime:this.displayTime,this.$nextTick(()=>{if(this.bakCurrentPos){const e=JSON.parse(JSON.stringify(this.bakCurrentPos));s&&(e.end=e.start+t.length),this.debounceSetInputSelection(e),this.bakCurrentPos=null}}),!1},pasteHandler(e){e.preventDefault();let t=(e.clipboardData||window.clipboardData).getData("text");this.debugMode&&this.debugLog(`Pasting value "${t}" from clipboard`),t&&t.length&&(this.has.customApmText&&(t=this.replaceCustomApmText(t)),this.inputIsEmpty?this.readStringValues(t):(this.kbInputLog=t.substr(-2,2),this.setKbInput(),this.debounceClearKbLog()))},arrowHandler(e){const t={37:"L",38:"U",39:"R",40:"D"}[e.keyCode];if("U"===t||"D"===t)if(this.inputIsEmpty)this.selectFirstValidValue();else{const e=this.getCurrentTokenChunk();if(!e)return void this.selectFirstValidValue();const s=e.type;this.getClosestValidItemInCol(s,this[s],t);const i=this.getCurrentTokenChunk();this.debounceSetInputSelection(i)}else"R"===t?this.toLateralToken(!1):"L"===t&&this.toLateralToken(!0)},tabHandler(e){if(!this.inputIsEmpty&&this.tokenChunksPos&&this.tokenChunksPos.length){const t=this.getCurrentTokenChunk();if(!t)return;const s=this.tokenChunksPos[0],i=this.tokenChunksPos[this.tokenChunksPos.length-1];(e.shiftKey&&t.token!==s.token||!e.shiftKey&&t.token!==i.token)&&(e.preventDefault(),this.toLateralToken(e.shiftKey))}else if(this.appendToBody&&this.advancedKeyboard){if(e.shiftKey)return;if(e.preventDefault(),this.inputIsEmpty){const e=this.inUse.types[0],t=this.validItemsInCol(e)[0];t&&t.focus()}}},keyboardInput(e,t=!1){const s=this.getCurrentTokenChunk();!s||"apm"!==s.type&&t||"apm"===s.type&&!t||(this.kbInputLog=`${this.kbInputLog.substr(-1)}${e}`,this.setKbInput(),this.debounceClearKbLog())},clearKbInputLog(){window.clearTimeout(this.kbInputTimer),this.kbInputLog=""},debounceClearKbLog(){window.clearTimeout(this.kbInputTimer),this.kbInputTimer=window.setTimeout(()=>{this.clearKbInputLog()},this.opts.manualInputTimeout)},setKbInput(e){e=e||this.kbInputLog;const t=this.getCurrentTokenChunk();if(!t||!e||!e.length)return;const s=t.type,i=t.token;let n;if("apm"===s)this.lowerCasedApm(e).includes("a")?n="am":this.lowerCasedApm(e).includes("p")&&(n="pm"),n&&(n="A"===i?n.toUpperCase():n);else if(this.isValidValue(i,e))n=e;else{const t=this.formatValue(i,e.substr(-1));this.isValidValue(i,t)&&(n=t)}if(n){this.setSanitizedValueToSection(s,n);const e=this.getCurrentTokenChunk();this.debounceSetInputSelection(e)}this.debugMode&&(n?this.debugLog(`Successfully set value "${n}" from latest input "${e}" for the "${s}" slot`):this.debugLog(`Value "${e}
1" is invalid in the "${s}" slot`))},onChange(){if(!this.manualInput||!this.$refs||!this.$refs.input)return;const e=this.$refs.input.value||"";e&&e.length&&this.readStringValues(e)},getNearestChunkByPos(e){if(!this.tokenChunksPos||!this.tokenChunksPos.length)return;let t,s=-1;for(let i=0;i<this.tokenChunksPos.length;i++){const n=JSON.parse(JSON.stringify(this.tokenChunksPos[i]));if(n.start===e)return n;const o=Math.abs(n.start-e);if(s<0)t=n,s=o;else{if(s<=o)return t;s=o,t=n}}return t},selectFirstValidValue(){if(!this.tokenChunksPos||!this.tokenChunksPos.length)return;const e=this.tokenChunksPos[0].type;"hour"===e?this.getClosestHourItem():this.getClosestValidItemInCol(e,this[e]),this.selectFirstSlot()},getClosestHourItem(e,t="U"){if(!this.validHoursList||!this.validHoursList.length)return void(this.debugMode&&this.debugLog(`No valid hour values found, please check your "hour-range" config\nhour-range: ${JSON.stringify(this.hourRange)}`));if(!e)return void this.setManualHour(this.validHoursList[0]);const s=this.validHoursList.findIndex(t=>{if(this.baseOn12Hours){const s=`${e}${"pm"===this.lowerCasedApm(this.apm)?"p":"a"}`;return t===s}return t===e});let i;i=-1===s?0:"D"===t?0===s?this.validHoursList.length-1:s-1:(s+1)%this.validHoursList.length;const n=this.validHoursList[i];this.setManualHour(n)},getClosestValidItemInCol(e,t,s="U"){if("hour"===e)this.getClosestHourItem(t,s);else{const t="D"===s?this.prevItem(e,this[e],!0):this.nextItem(e,this[e],!0);t&&this.select(e,t.getAttribute("data-key"))}},setSanitizedValueToSection(e,t){if(!e||!this.getTokenByType(e))return;const s=this.sanitizedValue(this.getTokenByType(e),t);this[e]=s},setManualHour(e){if(this.is12hRange(e)){const t=this.match12hRange(e),s="a"===t[2]?"AM":"PM";this.setSanitizedValueToSection("apm","a"===this.apmType?s.toLowerCase():s),this.setSanitizedValueToSection("hour",t[1])}else this.setSanitizedValueToSection("hour",e)},debounceSetInputSelection({start:e=0,end:t=0}){this.$nextTick(()=>{this.setInputSelectionRange(e,t)}),window.clearTimeout(this.selectionTimer),this.selectionTimer=window.setTimeout(()=>{window.clearTimeout(this.selectionTimer),!this.$refs.input||this.$refs.input.selectionStart===e&&this.$refs.input.selectionEnd===t||this.setInputSelectionRange(e,t)},30)},setInputSelectionRange(e,t){this.$refs&&this.$refs.input&&this.$refs.input.setSelectionRange(e,t)},getCurrentTokenChunk(){return this.getNearestChunkByPos(this.$refs.input&&this.$refs.input.selectionStart||0)},selectFirstSlot(){const e=this.getNearestChunkByPos(0);this.debounceSetInputSelection(e)},toNextSlot(){if(!this.inputIsEmpty&&this.tokenChunksPos&&this.tokenChunksPos.length){const e=this.getCurrentTokenChunk();if(!e)return;const t=this.tokenChunksPos[this.tokenChunksPos.length-1];e.token!==t.token&&this.toLateralToken(!1)}},toLateralToken(e){const t=this.getCurrentTokenChunk();if(!t)return void this.selectFirstValidValue();const s=this.tokenChunksPos.findIndex(e=>e.token===t.token);if(!e&&s>=this.tokenChunksPos.length-1||e&&0===s)return void(this.debugMode&&(e?this.debugLog("You're in the leftmost slot already"):this.debugLog("You're in the rightmost slot already")));const i=e?this.tokenChunksPos[s-1]:this.tokenChunksPos[s+1];this.debounceSetInputSelection(i)},isCustomApmText(e){return!(!e||!e.length)&&(this.amText&&this.amText===e?"A"===this.apmType?"AM":"am":!(!this.pmText||this.pmText!==e)&&("A"===this.apmType?"PM":"pm"))},replaceCustomApmText(e){return this.amText&&this.amText.length&&e.includes(this.amText)?e.replace(new RegExp(this.amText,"g"),"A"===this.apmType?"AM":"am"):this.pmText&&this.pmText.length&&e.includes(this.pmText)?e.replace(new RegExp(this.pmText,"g"),"A"===this.apmType?"PM":"pm"):e},checkDropDirection(){if(!this.$el)return;let e;this.containerId&&this.containerId.length&&(e=document.getElementById(this.containerId),!e&&this.debugMode&&this.debugLog(`Container with id "${this.containerId}" not found. Fallback to document body.`));const t=this.$el;let s;if(e&&e.offsetHeight)s=e.offsetTop+e.offsetHeight-(t.offsetTop+t.offsetHeight);else{const e=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight);s=e-(t.offsetTop+t.offsetHeight)}this.forceDropOnTop=this.opts.dropOffsetHeight>s},is12hRange(e){return/^\d{1,2}(a|p|A|P)$/.test(e)},match12hRange(e){return e.match(/^(\d{1,2})(a|p|A|P)$/)},isNumber(e){return!isNaN(parseFloat(e))&&isFinite(e)},isBasicType(e){return D.BASIC_TYPES.includes(e)},lowerCasedApm(e){return(e||"").toLowerCase()},getTokenRegex(e){switch(e){case"HH":return"([01][0-9]|2[0-3]|H{2})";case"H":return"([0-9]{1}|1[0-9]|2[0-3]|H{1})";case"hh":return"(0[1-9]|1[0-2]|h{2})";case"h":return"([1-9]{1}|1[0-2]|h{1})";case"kk":return"(0[1-9]|1[0-9]|2[0-4]|k{2})";case"k":return"([1-9]{1}|1[0-9]|2[0-4]|k{1})";case"mm":return"([0-5][0-9]|m{2})";case"ss":return"([0-5][0-9]|s{2})";case"m":return"([0-9]{1}|[1-5][0-9]|m{1})";case"s":return"([0-9]{1}|[1-5][0-9]|s{1})";case"A":return"(AM|PM|A{1})";case"a":return"(am|pm|a{1})";default:return""}},isEmptyValue(e,t){return!t||!t.length||t&&t===e},isValidValue(e,t){if(!e||this.isEmptyValue(e,t))return!1;const s=this.getTokenRegex(e);return!(!s||!s.length)&&new RegExp(`^${s}$`).test(t)},sanitizedValue(e,t){return this.isValidValue(e,t)?t:""},getTokenType(e){return this.inUse.types[this.inUse.tokens.indexOf(e)]||""},getTokenByType(e){return this[`${e}Type`]||""},isMinuteOrSecond(e){return["minute","second"].includes(e)},debugLog(e){if(!e||!e.length)return;let t="";if(this.id&&(t+=`#${this.id}`),this.name&&(t+=`[name=${this.name}]`),this.inputClass){let e=[];"string"===typeof this.inputClass?e=this.inputClass.split(/\s/g):Array.isArray(this.inputClass)?e=[].concat([],this.inputClass):"object"===typeof this.inputClass&&Object.keys(this.inputClass).forEac
1h(t=>{this.inputClass[t]&&e.push(t)});for(let s of e)s&&s.trim().length&&(t+=`.${s.trim()}`)}const s=`DEBUG: ${e}${t?`\n\t(${t})`:""}`;window.console.debug&&"function"===typeof window.console.debug?window.console.debug(s):window.console.log(s)}}});var $=s(71241);const A=(0,$.A)(E,[["render",B]]),H=A,L=(e,t)=>{let[s="HH",i="mm",n="ss"]=e.split(":"),o="hh",a="AM";if(""!==s&&"HH"!==s){let e=parseInt(s,10);e>=12?(a="PM",e>12&&(e-=12)):0===e&&(e=12),o=e.toString().padStart(2,"0")}let r=t.replace("hh",o).replace("mm",i.padStart(2,"0")).replace("ss",n.padStart(2,"0")).replace("A",a);return t.includes("mm")||(r=r.replace(/[: ]?mm[: ]?/g,"")),t.includes("ss")||(r=r.replace(/[: ]?ss[: ]?/g,"")),r=r.trim(),r},F=(e,t)=>{let[s="",i="AM"]=e.split(" "),[n="hh",o="mm",a="ss"]=s.split(":"),r="HH";if(""!==n&&"hh"!==n){let e=parseInt(n,10);"PM"===i&&e<12?e+=12:"AM"===i&&12===e&&(e=0),r=e.toString().padStart(2,"0")}let l=t.replace("HH",r).replace("mm",o.padStart(2,"0")).replace("ss",a.padStart(2,"0"));return t.includes("mm")||(l=l.replace(/[: ]?mm[: ]?/g,"")),t.includes("ss")||(l=l.replace(/[: ]?ss[: ]?/g,"")),l=l.trim(),l},R=(0,i.defineComponent)({components:{VueTimepicker:H,Icon:r.A},compatConfig:{MODE:3},inheritAttrs:!1,props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(){const{locale:e}=(0,a.s9)({useScope:"global"});return{locale:e}},computed:{displayFormat(){return"en-US"===this.locale?"hh:mm A":"HH:mm"},outputFormat(){return"HH:mm"},displayValue(){return"en-US"===this.locale?L(this.modelValue,this.displayFormat):F(this.modelValue,this.displayFormat)}},methods:{handleInput(e){let t=e;"en-US"===this.locale&&(t=F(t,this.outputFormat)),this.$emit("update:modelValue",t)}}}),N=(0,$.A)(R,[["render",o],["__scopeId","data-v-575c3697"]]),M=N}}]);
2//# sourceMappingURL=src_components_boxes_table_vue-src_components_inputs_input-time-picker_vue.803133fc.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.