r3ui-lib 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/r3ui-lib.css +1 -1
- package/dist/ui-library.es.js +24411 -20009
- package/dist/ui-library.umd.js +32 -29
- package/package.json +1 -1
package/dist/ui-library.umd.js
CHANGED
|
@@ -1,51 +1,54 @@
|
|
|
1
|
-
(function(Fe,d){typeof exports=="object"&&typeof module<"u"?d(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],d):(Fe=typeof globalThis<"u"?globalThis:Fe||self,d(Fe.UiLibrary={},Fe.Vue))})(this,(function(Fe,d){"use strict";const Qn={__name:"Spinner",props:{isSmall:{type:Boolean,default:!1}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["spinner-border",{"spinner-border-sm":s.isSmall}]),role:"status"},null,2))}},Ys={__name:"Icon",props:{name:{type:String,required:!0}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("i",{class:d.normalizeClass(`bi bi-${s.name}`)},null,2))}},Ba={class:"d-inline-flex align-items-center justify-content-center"},Na={key:2},Ia={__name:"DefaultButton",props:{label:{type:String,default:""},icon:{type:String,default:""},iconPosition:{type:String,default:"left",validator(s){return["right","left"].includes(s)}},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isFullWidth:{type:Boolean,default:!1},customClasses:{type:Array,default:()=>[]},styles:{type:String,default:"primary",validator(s){return["primary","light","secondary","success","danger","warning","info"].includes(s)}}},emits:["submit"],setup(s,{emit:e}){const t=s,i=e,n=d.computed(()=>`btn-${t.styles}`);function r(){t.isLoading||t.isDisabled||i("submit")}return(a,o)=>(d.openBlock(),d.createElementBlock("button",{"data-test":"DefaultButton",class:d.normalizeClass(["btn",[s.isLoading||s.isDisabled?"disabled":"",s.isFullWidth?"w-100":"",s.styles?n.value:"",...s.customClasses]]),onClick:d.withModifiers(r,["prevent"])},[d.createElementVNode("div",Ba,[s.icon&&s.iconPosition==="left"?(d.openBlock(),d.createBlock(Ys,{key:0,name:s.icon,class:"me-2"},null,8,["name"])):d.createCommentVNode("",!0),s.isLoading?(d.openBlock(),d.createBlock(Qn,{key:1,isSmall:!0})):d.createCommentVNode("",!0),s.label?(d.openBlock(),d.createElementBlock("span",Na,d.toDisplayString(s.label),1)):d.createCommentVNode("",!0),s.icon&&s.iconPosition==="right"?(d.openBlock(),d.createBlock(Ys,{key:3,name:s.icon,class:"ms-2"},null,8,["name"])):d.createCommentVNode("",!0)])],2))}},Va=d.defineComponent({__name:"AddButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},iconClass:{default:"bi bi-plus-circle-fill pe-2"}},emits:["click"],setup(s,{emit:e}){const t=s,i=e,n=()=>{t.disabled||i("click")};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["d-flex add-button",{"opacity-75 disabled":r.disabled}]),style:{cursor:"pointer"},"data-test":"AddButton",onClick:n},[d.createElementVNode("i",{class:d.normalizeClass(r.iconClass)},null,2),d.createTextVNode(" "+d.toDisplayString(r.label||r.text||"Добавить"),1)],2))}}),it=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},ja=it(Va,[["__scopeId","data-v-cf07042b"]]),Wa=it(d.defineComponent({__name:"PrintButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1}},emits:["print"],setup(s,{emit:e}){const t=s,i=e,n=()=>{t.disabled||(window.print(),i("print"))};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["col-auto print-button",{"opacity-75 disabled":r.disabled}]),style:{cursor:"pointer"},"data-test":"PrintButton",onClick:n},[d.createTextVNode(d.toDisplayString(r.label||r.text||"Печать")+" ",1),a[0]||(a[0]=d.createElementVNode("i",{class:"ps-2 bi bi-printer-fill"},null,-1))],2))}}),[["__scopeId","data-v-52020521"]]),Ya=it(d.defineComponent({__name:"ExportButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},exportType:{default:"default"}},emits:["export"],setup(s,{emit:e}){const t=s,i=e,n=()=>{t.disabled||i("export",t.exportType)};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["col-auto export-button",{"opacity-75 disabled":r.disabled}]),style:{cursor:"pointer"},"data-test":"ExportButton",onClick:n},[d.createTextVNode(d.toDisplayString(r.label||r.text||"Экспорт")+" ",1),a[0]||(a[0]=d.createElementVNode("i",{class:"ps-2 bi bi-file-earmark-arrow-down-fill"},null,-1))],2))}}),[["__scopeId","data-v-20f08c06"]]);function Ga(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var rs={exports:{}};/*!
|
|
1
|
+
(function(Ce,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],l):(Ce=typeof globalThis<"u"?globalThis:Ce||self,l(Ce.UiLibrary={},Ce.Vue))})(this,(function(Ce,l){"use strict";const ur={__name:"Spinner",props:{isSmall:{type:Boolean,default:!1}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["spinner-border",{"spinner-border-sm":n.isSmall}]),role:"status"},null,2))}},cr={__name:"Icon",props:{name:{type:String,required:!0}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("i",{class:l.normalizeClass(`bi bi-${n.name}`)},null,2))}},Oc={class:"d-inline-flex align-items-center justify-content-center"},Lc={key:2},Pc={__name:"DefaultButton",props:{label:{type:String,default:""},icon:{type:String,default:""},iconPosition:{type:String,default:"left",validator(n){return["right","left"].includes(n)}},isLoading:{type:Boolean,default:!1},isDisabled:{type:Boolean,default:!1},isFullWidth:{type:Boolean,default:!1},customClasses:{type:Array,default:()=>[]},styles:{type:String,default:"primary",validator(n){return["primary","light","secondary","success","danger","warning","info"].includes(n)}}},emits:["submit"],setup(n,{emit:e}){const t=n,i=e,r=l.computed(()=>`btn-${t.styles}`);function s(){t.isLoading||t.isDisabled||i("submit")}return(a,o)=>(l.openBlock(),l.createElementBlock("button",{"data-test":"DefaultButton",class:l.normalizeClass(["btn",[n.isLoading||n.isDisabled?"disabled":"",n.isFullWidth?"w-100":"",n.styles?r.value:"",...n.customClasses]]),onClick:l.withModifiers(s,["prevent"])},[l.createElementVNode("div",Oc,[n.icon&&n.iconPosition==="left"?(l.openBlock(),l.createBlock(cr,{key:0,name:n.icon,class:"me-2"},null,8,["name"])):l.createCommentVNode("",!0),n.isLoading?(l.openBlock(),l.createBlock(ur,{key:1,isSmall:!0})):l.createCommentVNode("",!0),n.label?(l.openBlock(),l.createElementBlock("span",Lc,l.toDisplayString(n.label),1)):l.createCommentVNode("",!0),n.icon&&n.iconPosition==="right"?(l.openBlock(),l.createBlock(cr,{key:3,name:n.icon,class:"ms-2"},null,8,["name"])):l.createCommentVNode("",!0)])],2))}},Ac=l.defineComponent({__name:"AddButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},iconClass:{default:"bi bi-plus-circle-fill pe-2"}},emits:["click"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||i("click")};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["d-flex add-button",{"opacity-75 disabled":s.disabled}]),style:{cursor:"pointer"},"data-test":"AddButton",onClick:r},[l.createElementVNode("i",{class:l.normalizeClass(s.iconClass)},null,2),l.createTextVNode(" "+l.toDisplayString(s.label||s.text||"Добавить"),1)],2))}}),Ve=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},Ca=Ve(Ac,[["__scopeId","data-v-cf07042b"]]),Fc={"data-test":"CollapseButton"},Bc=["id"],Nc=["id"],Vc=Ve(l.defineComponent({__name:"CollapseButton",props:{isCollapsed:{type:Boolean,default:!0},expandText:{default:"Развернуть все"},collapseText:{default:"Свернуть все"},expandId:{default:"expand-filters-btn"},collapseId:{default:"collapse-filters-btn"},buttonStyle:{default:"padding: 8px 24px; margin-bottom: 32px"},iconStyle:{default:"font-size: 10px"},expandLabel:{default:"Развернуть все"},collapseLabel:{default:"Свернуть все"},isColapsed:{type:Boolean}},emits:["emitCollapseToggle","emitColapsed","expand","collapse"],setup(n,{emit:e}){const t=n,i=e,r=l.computed(()=>t.isCollapsed),s=l.computed(()=>t.expandText),a=l.computed(()=>t.collapseText),o=()=>{i("emitCollapseToggle",!1),i("emitColapsed",!1),i("expand")},u=()=>{i("emitCollapseToggle",!0),i("emitColapsed",!0),i("collapse")};return(c,d)=>(l.openBlock(),l.createElementBlock("div",Fc,[r.value?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",id:c.expandId,class:"btn btn-light collapse-button",onClick:o,style:l.normalizeStyle(c.buttonStyle)},[l.createTextVNode(l.toDisplayString(s.value)+" ",1),l.createElementVNode("i",{class:"bi bi-caret-down-fill",style:l.normalizeStyle(c.iconStyle)},null,4)],12,Bc)):l.createCommentVNode("",!0),r.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",id:c.collapseId,class:"btn btn-light collapse-button",onClick:u,style:l.normalizeStyle(c.buttonStyle)},[l.createTextVNode(l.toDisplayString(a.value)+" ",1),l.createElementVNode("i",{class:"bi bi-caret-up-fill",style:l.normalizeStyle(c.iconStyle)},null,4)],12,Nc))]))}}),[["__scopeId","data-v-a0502514"]]),Hc=Ve(l.defineComponent({__name:"ExportButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1},exportType:{default:"default"}},emits:["export"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||i("export",t.exportType)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["col-auto export-button",{"opacity-75 disabled":s.disabled}]),style:{cursor:"pointer"},"data-test":"ExportButton",onClick:r},[l.createTextVNode(l.toDisplayString(s.label||s.text||"Экспорт")+" ",1),a[0]||(a[0]=l.createElementVNode("i",{class:"ps-2 bi bi-file-earmark-arrow-down-fill"},null,-1))],2))}}),[["__scopeId","data-v-20f08c06"]]),zc=Ve(l.defineComponent({__name:"PrintButton",props:{label:{default:""},text:{default:""},disabled:{type:Boolean,default:!1}},emits:["print"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||(window.print(),i("print"))};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["col-auto print-button",{"opacity-75 disabled":s.disabled}]),style:{cursor:"pointer"},"data-test":"PrintButton",onClick:r},[l.createTextVNode(l.toDisplayString(s.label||s.text||"Печать")+" ",1),a[0]||(a[0]=l.createElementVNode("i",{class:"ps-2 bi bi-printer-fill"},null,-1))],2))}}),[["__scopeId","data-v-52020521"]]),Ic=["disabled"],$c={class:"clear-form-button__label"},jc=Ve(l.defineComponent({__name:"ClearFormButton",props:{label:{default:"Очистить"},disabled:{type:Boolean,default:!1}},emits:["clear"],setup(n,{emit:e}){const t=n,i=e,r=()=>{t.disabled||i("clear",!0)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["clear-form-button",{"clear-form-button--disabled":s.disabled}]),disabled:s.disabled,"data-test":"ClearFormButton",onClick:r},[a[0]||(a[0]=l.createElementVNode("div",{class:"clear-form-button__icon"},[l.createElementVNode("i",{class:"bi bi-trash-fill"})],-1)),l.createElementVNode("div",$c,l.toDisplayString(s.label),1)],10,Ic))}}),[["__scopeId","data-v-ed163ff4"]]),Wc={class:"toggle-buttons","data-test":"ToggleButtons"},Gc=["onClick"],Yc=Ve(l.defineComponent({__name:"ToggleButtons",props:{options:{},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=e,i=r=>{t("update:modelValue",r.name)};return(r,s)=>(l.openBlock(),l.createElementBlock("div",Wc,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.options,a=>(l.openBlock(),l.createElementBlock("button",{key:a.name,type:"button",class:l.normalizeClass(["toggle-buttons__button",{"toggle-buttons__button--active":r.modelValue===a.name}]),onClick:o=>i(a)},l.toDisplayString(a.title),11,Gc))),128))]))}}),[["__scopeId","data-v-4eae7f5d"]]);var Ea=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ka(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function Uc(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function i(){var r=!1;try{r=this instanceof i}catch{}return r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var dr,Sa;function vi(){return Sa||(Sa=1,dr=TypeError),dr}const qc=Uc(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var hr,xa;function gn(){if(xa)return hr;xa=1;var n=typeof Map=="function"&&Map.prototype,e=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,t=n&&e&&typeof e.get=="function"?e.get:null,i=n&&Map.prototype.forEach,r=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,a=r&&s&&typeof s.get=="function"?s.get:null,o=r&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,c=u?WeakMap.prototype.has:null,d=typeof WeakSet=="function"&&WeakSet.prototype,p=d?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,f=h?WeakRef.prototype.deref:null,_=Boolean.prototype.valueOf,k=Object.prototype.toString,w=Function.prototype.toString,y=String.prototype.match,v=String.prototype.slice,R=String.prototype.replace,m=String.prototype.toUpperCase,x=String.prototype.toLowerCase,g=RegExp.prototype.test,S=Array.prototype.concat,C=Array.prototype.join,E=Array.prototype.slice,b=Math.floor,T=typeof BigInt=="function"?BigInt.prototype.valueOf:null,M=Object.getOwnPropertySymbols,O=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,F=typeof Symbol=="function"&&typeof Symbol.iterator=="object",z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===F||!0)?Symbol.toStringTag:null,$=Object.prototype.propertyIsEnumerable,H=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(J){return J.__proto__}:null);function V(J,ee){if(J===1/0||J===-1/0||J!==J||J&&J>-1e3&&J<1e3||g.call(/e/,ee))return ee;var Be=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof J=="number"){var Ie=J<0?-b(-J):b(J);if(Ie!==J){var Me=String(Ie),ke=v.call(ee,Me.length+1);return R.call(Me,Be,"$&_")+"."+R.call(R.call(ke,/([0-9]{3})/g,"$&_"),/_$/,"")}}return R.call(ee,Be,"$&_")}var Y=qc,D=Y.custom,P=se(D)?D:null,I={__proto__:null,double:'"',single:"'"},N={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};hr=function J(ee,Be,Ie,Me){var ke=Be||{};if(we(ke,"quoteStyle")&&!we(I,ke.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(we(ke,"maxStringLength")&&(typeof ke.maxStringLength=="number"?ke.maxStringLength<0&&ke.maxStringLength!==1/0:ke.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var pt=we(ke,"customInspect")?ke.customInspect:!0;if(typeof pt!="boolean"&&pt!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(we(ke,"indent")&&ke.indent!==null&&ke.indent!==" "&&!(parseInt(ke.indent,10)===ke.indent&&ke.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(we(ke,"numericSeparator")&&typeof ke.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var et=ke.numericSeparator;if(typeof ee>"u")return"undefined";if(ee===null)return"null";if(typeof ee=="boolean")return ee?"true":"false";if(typeof ee=="string")return Re(ee,ke);if(typeof ee=="number"){if(ee===0)return 1/0/ee>0?"0":"-0";var L=String(ee);return et?V(ee,L):L}if(typeof ee=="bigint"){var A=String(ee)+"n";return et?V(ee,A):A}var W=typeof ke.depth>"u"?5:ke.depth;if(typeof Ie>"u"&&(Ie=0),Ie>=W&&W>0&&typeof ee=="object")return ne(ee)?"[Array]":"[Object]";var te=pn(ke,Ie);if(typeof Me>"u")Me=[];else if(Ne(Me,ee)>=0)return"[Circular]";function ce(ai,Hi,wa){if(Hi&&(Me=E.call(Me),Me.push(Hi)),wa){var lr={depth:ke.depth};return we(ke,"quoteStyle")&&(lr.quoteStyle=ke.quoteStyle),J(ai,lr,Ie+1,Me)}return J(ai,ke,Ie+1,Me)}if(typeof ee=="function"&&!B(ee)){var fe=Fe(ee),Te=Ue(ee,ce);return"[Function"+(fe?": "+fe:" (anonymous)")+"]"+(Te.length>0?" { "+C.call(Te,", ")+" }":"")}if(se(ee)){var ye=F?R.call(String(ee),/^(Symbol\(.*\))_[^)]*$/,"$1"):O.call(ee);return typeof ee=="object"&&!F?_e(ye):ye}if(ve(ee)){for(var De="<"+x.call(String(ee.nodeName)),be=ee.attributes||[],xe=0;xe<be.length;xe++)De+=" "+be[xe].name+"="+U(Z(be[xe].value),"double",ke);return De+=">",ee.childNodes&&ee.childNodes.length&&(De+="..."),De+="</"+x.call(String(ee.nodeName))+">",De}if(ne(ee)){if(ee.length===0)return"[]";var Ye=Ue(ee,ce);return te&&!ze(Ye)?"["+Zt(Ye,te)+"]":"[ "+C.call(Ye,", ")+" ]"}if(Q(ee)){var mt=Ue(ee,ce);return!("cause"in Error.prototype)&&"cause"in ee&&!$.call(ee,"cause")?"{ ["+String(ee)+"] "+C.call(S.call("[cause]: "+ce(ee.cause),mt),", ")+" }":mt.length===0?"["+String(ee)+"]":"{ ["+String(ee)+"] "+C.call(mt,", ")+" }"}if(typeof ee=="object"&&pt){if(P&&typeof ee[P]=="function"&&Y)return Y(ee,{depth:W-Ie});if(pt!=="symbol"&&typeof ee.inspect=="function")return ee.inspect()}if(re(ee)){var lt=[];return i&&i.call(ee,function(ai,Hi){lt.push(ce(Hi,ee,!0)+" => "+ce(ai,ee))}),Le("Map",t.call(ee),lt,te)}if(le(ee)){var si=[];return o&&o.call(ee,function(ai){si.push(ce(ai,ee))}),Le("Set",a.call(ee),si,te)}if(K(ee))return ue("WeakMap");if(ae(ee))return ue("WeakSet");if(ie(ee))return ue("WeakRef");if(q(ee))return _e(ce(Number(ee)));if(pe(ee))return _e(ce(T.call(ee)));if(oe(ee))return _e(_.call(ee));if(X(ee))return _e(ce(String(ee)));if(typeof window<"u"&&ee===window)return"{ [object Window] }";if(typeof globalThis<"u"&&ee===globalThis||typeof Ea<"u"&&ee===Ea)return"{ [object globalThis] }";if(!G(ee)&&!B(ee)){var zt=Ue(ee,ce),ar=H?H(ee)===Object.prototype:ee instanceof Object||ee.constructor===Object,bi=ee instanceof Object?"":"null prototype",or=!ar&&z&&Object(ee)===ee&&z in ee?v.call(Ae(ee),8,-1):bi?"Object":"",ya=ar||typeof ee.constructor!="function"?"":ee.constructor.name?ee.constructor.name+" ":"",mn=ya+(or||bi?"["+C.call(S.call([],or||[],bi||[]),": ")+"] ":"");return zt.length===0?mn+"{}":te?mn+"{"+Zt(zt,te)+"}":mn+"{ "+C.call(zt,", ")+" }"}return String(ee)};function U(J,ee,Be){var Ie=Be.quoteStyle||ee,Me=I[Ie];return Me+J+Me}function Z(J){return R.call(String(J),/"/g,""")}function j(J){return!z||!(typeof J=="object"&&(z in J||typeof J[z]<"u"))}function ne(J){return Ae(J)==="[object Array]"&&j(J)}function G(J){return Ae(J)==="[object Date]"&&j(J)}function B(J){return Ae(J)==="[object RegExp]"&&j(J)}function Q(J){return Ae(J)==="[object Error]"&&j(J)}function X(J){return Ae(J)==="[object String]"&&j(J)}function q(J){return Ae(J)==="[object Number]"&&j(J)}function oe(J){return Ae(J)==="[object Boolean]"&&j(J)}function se(J){if(F)return J&&typeof J=="object"&&J instanceof Symbol;if(typeof J=="symbol")return!0;if(!J||typeof J!="object"||!O)return!1;try{return O.call(J),!0}catch{}return!1}function pe(J){if(!J||typeof J!="object"||!T)return!1;try{return T.call(J),!0}catch{}return!1}var me=Object.prototype.hasOwnProperty||function(J){return J in this};function we(J,ee){return me.call(J,ee)}function Ae(J){return k.call(J)}function Fe(J){if(J.name)return J.name;var ee=y.call(w.call(J),/^function\s*([\w$]+)/);return ee?ee[1]:null}function Ne(J,ee){if(J.indexOf)return J.indexOf(ee);for(var Be=0,Ie=J.length;Be<Ie;Be++)if(J[Be]===ee)return Be;return-1}function re(J){if(!t||!J||typeof J!="object")return!1;try{t.call(J);try{a.call(J)}catch{return!0}return J instanceof Map}catch{}return!1}function K(J){if(!c||!J||typeof J!="object")return!1;try{c.call(J,c);try{p.call(J,p)}catch{return!0}return J instanceof WeakMap}catch{}return!1}function ie(J){if(!f||!J||typeof J!="object")return!1;try{return f.call(J),!0}catch{}return!1}function le(J){if(!a||!J||typeof J!="object")return!1;try{a.call(J);try{t.call(J)}catch{return!0}return J instanceof Set}catch{}return!1}function ae(J){if(!p||!J||typeof J!="object")return!1;try{p.call(J,p);try{c.call(J,c)}catch{return!0}return J instanceof WeakSet}catch{}return!1}function ve(J){return!J||typeof J!="object"?!1:typeof HTMLElement<"u"&&J instanceof HTMLElement?!0:typeof J.nodeName=="string"&&typeof J.getAttribute=="function"}function Re(J,ee){if(J.length>ee.maxStringLength){var Be=J.length-ee.maxStringLength,Ie="... "+Be+" more character"+(Be>1?"s":"");return Re(v.call(J,0,ee.maxStringLength),ee)+Ie}var Me=N[ee.quoteStyle||"single"];Me.lastIndex=0;var ke=R.call(R.call(J,Me,"\\$1"),/[\x00-\x1f]/g,Se);return U(ke,"single",ee)}function Se(J){var ee=J.charCodeAt(0),Be={8:"b",9:"t",10:"n",12:"f",13:"r"}[ee];return Be?"\\"+Be:"\\x"+(ee<16?"0":"")+m.call(ee.toString(16))}function _e(J){return"Object("+J+")"}function ue(J){return J+" { ? }"}function Le(J,ee,Be,Ie){var Me=Ie?Zt(Be,Ie):C.call(Be,", ");return J+" ("+ee+") {"+Me+"}"}function ze(J){for(var ee=0;ee<J.length;ee++)if(Ne(J[ee],`
|
|
2
|
+
`)>=0)return!1;return!0}function pn(J,ee){var Be;if(J.indent===" ")Be=" ";else if(typeof J.indent=="number"&&J.indent>0)Be=C.call(Array(J.indent+1)," ");else return null;return{base:Be,prev:C.call(Array(ee+1),Be)}}function Zt(J,ee){if(J.length===0)return"";var Be=`
|
|
3
|
+
`+ee.prev+ee.base;return Be+C.call(J,","+Be)+`
|
|
4
|
+
`+ee.prev}function Ue(J,ee){var Be=ne(J),Ie=[];if(Be){Ie.length=J.length;for(var Me=0;Me<J.length;Me++)Ie[Me]=we(J,Me)?ee(J[Me],J):""}var ke=typeof M=="function"?M(J):[],pt;if(F){pt={};for(var et=0;et<ke.length;et++)pt["$"+ke[et]]=ke[et]}for(var L in J)we(J,L)&&(Be&&String(Number(L))===L&&L<J.length||F&&pt["$"+L]instanceof Symbol||(g.call(/[^\w$]/,L)?Ie.push(ee(L,J)+": "+ee(J[L],J)):Ie.push(L+": "+ee(J[L],J))));if(typeof M=="function")for(var A=0;A<ke.length;A++)$.call(J,ke[A])&&Ie.push("["+ee(ke[A])+"]: "+ee(J[ke[A]],J));return Ie}return hr}var fr,_a;function Kc(){if(_a)return fr;_a=1;var n=gn(),e=vi(),t=function(o,u,c){for(var d=o,p;(p=d.next)!=null;d=p)if(p.key===u)return d.next=p.next,c||(p.next=o.next,o.next=p),p},i=function(o,u){if(o){var c=t(o,u);return c&&c.value}},r=function(o,u,c){var d=t(o,u);d?d.value=c:o.next={key:u,next:o.next,value:c}},s=function(o,u){return o?!!t(o,u):!1},a=function(o,u){if(o)return t(o,u,!0)};return fr=function(){var u,c={assert:function(d){if(!c.has(d))throw new e("Side channel does not contain "+n(d))},delete:function(d){var p=u&&u.next,h=a(u,d);return h&&p&&p===h&&(u=void 0),!!h},get:function(d){return i(u,d)},has:function(d){return s(u,d)},set:function(d,p){u||(u={next:void 0}),r(u,d,p)}};return c},fr}var pr,Ma;function Ra(){return Ma||(Ma=1,pr=Object),pr}var mr,Ta;function Jc(){return Ta||(Ta=1,mr=Error),mr}var gr,Da;function Xc(){return Da||(Da=1,gr=EvalError),gr}var br,Oa;function Zc(){return Oa||(Oa=1,br=RangeError),br}var vr,La;function Qc(){return La||(La=1,vr=ReferenceError),vr}var yr,Pa;function ed(){return Pa||(Pa=1,yr=SyntaxError),yr}var wr,Aa;function td(){return Aa||(Aa=1,wr=URIError),wr}var Cr,Fa;function id(){return Fa||(Fa=1,Cr=Math.abs),Cr}var Er,Ba;function nd(){return Ba||(Ba=1,Er=Math.floor),Er}var kr,Na;function rd(){return Na||(Na=1,kr=Math.max),kr}var Sr,Va;function sd(){return Va||(Va=1,Sr=Math.min),Sr}var xr,Ha;function ad(){return Ha||(Ha=1,xr=Math.pow),xr}var _r,za;function od(){return za||(za=1,_r=Math.round),_r}var Mr,Ia;function ld(){return Ia||(Ia=1,Mr=Number.isNaN||function(e){return e!==e}),Mr}var Rr,$a;function ud(){if($a)return Rr;$a=1;var n=ld();return Rr=function(t){return n(t)||t===0?t:t<0?-1:1},Rr}var Tr,ja;function cd(){return ja||(ja=1,Tr=Object.getOwnPropertyDescriptor),Tr}var Dr,Wa;function Ga(){if(Wa)return Dr;Wa=1;var n=cd();if(n)try{n([],"length")}catch{n=null}return Dr=n,Dr}var Or,Ya;function dd(){if(Ya)return Or;Ya=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return Or=n,Or}var Lr,Ua;function hd(){return Ua||(Ua=1,Lr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var r=42;e[t]=r;for(var s in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}),Lr}var Pr,qa;function fd(){if(qa)return Pr;qa=1;var n=typeof Symbol<"u"&&Symbol,e=hd();return Pr=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Pr}var Ar,Ka;function Ja(){return Ka||(Ka=1,Ar=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ar}var Fr,Xa;function Za(){if(Xa)return Fr;Xa=1;var n=Ra();return Fr=n.getPrototypeOf||null,Fr}var Br,Qa;function pd(){if(Qa)return Br;Qa=1;var n="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,i="[object Function]",r=function(u,c){for(var d=[],p=0;p<u.length;p+=1)d[p]=u[p];for(var h=0;h<c.length;h+=1)d[h+u.length]=c[h];return d},s=function(u,c){for(var d=[],p=c,h=0;p<u.length;p+=1,h+=1)d[h]=u[p];return d},a=function(o,u){for(var c="",d=0;d<o.length;d+=1)c+=o[d],d+1<o.length&&(c+=u);return c};return Br=function(u){var c=this;if(typeof c!="function"||e.apply(c)!==i)throw new TypeError(n+c);for(var d=s(arguments,1),p,h=function(){if(this instanceof p){var y=c.apply(this,r(d,arguments));return Object(y)===y?y:this}return c.apply(u,r(d,arguments))},f=t(0,c.length-d.length),_=[],k=0;k<f;k++)_[k]="$"+k;if(p=Function("binder","return function ("+a(_,",")+"){ return binder.apply(this,arguments); }")(h),c.prototype){var w=function(){};w.prototype=c.prototype,p.prototype=new w,w.prototype=null}return p},Br}var Nr,eo;function bn(){if(eo)return Nr;eo=1;var n=pd();return Nr=Function.prototype.bind||n,Nr}var Vr,to;function Hr(){return to||(to=1,Vr=Function.prototype.call),Vr}var zr,io;function no(){return io||(io=1,zr=Function.prototype.apply),zr}var Ir,ro;function md(){return ro||(ro=1,Ir=typeof Reflect<"u"&&Reflect&&Reflect.apply),Ir}var $r,so;function gd(){if(so)return $r;so=1;var n=bn(),e=no(),t=Hr(),i=md();return $r=i||n.call(t,e),$r}var jr,ao;function oo(){if(ao)return jr;ao=1;var n=bn(),e=vi(),t=Hr(),i=gd();return jr=function(s){if(s.length<1||typeof s[0]!="function")throw new e("a function is required");return i(n,t,s)},jr}var Wr,lo;function bd(){if(lo)return Wr;lo=1;var n=oo(),e=Ga(),t;try{t=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var i=!!t&&e&&e(Object.prototype,"__proto__"),r=Object,s=r.getPrototypeOf;return Wr=i&&typeof i.get=="function"?n([i.get]):typeof s=="function"?function(o){return s(o==null?o:r(o))}:!1,Wr}var Gr,uo;function vd(){if(uo)return Gr;uo=1;var n=Ja(),e=Za(),t=bd();return Gr=n?function(r){return n(r)}:e?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return e(r)}:t?function(r){return t(r)}:null,Gr}var Yr,co;function yd(){if(co)return Yr;co=1;var n=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=bn();return Yr=t.call(n,e),Yr}var Ur,ho;function qr(){if(ho)return Ur;ho=1;var n,e=Ra(),t=Jc(),i=Xc(),r=Zc(),s=Qc(),a=ed(),o=vi(),u=td(),c=id(),d=nd(),p=rd(),h=sd(),f=ad(),_=od(),k=ud(),w=Function,y=function(B){try{return w('"use strict"; return ('+B+").constructor;")()}catch{}},v=Ga(),R=dd(),m=function(){throw new o},x=v?(function(){try{return arguments.callee,m}catch{try{return v(arguments,"callee").get}catch{return m}}})():m,g=fd()(),S=vd(),C=Za(),E=Ja(),b=no(),T=Hr(),M={},O=typeof Uint8Array>"u"||!S?n:S(Uint8Array),F={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":g&&S?S([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":i,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&S?S(S([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!S?n:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":r,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!S?n:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&S?S(""[Symbol.iterator]()):n,"%Symbol%":g?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":x,"%TypedArray%":O,"%TypeError%":o,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":T,"%Function.prototype.apply%":b,"%Object.defineProperty%":R,"%Object.getPrototypeOf%":C,"%Math.abs%":c,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":h,"%Math.pow%":f,"%Math.round%":_,"%Math.sign%":k,"%Reflect.getPrototypeOf%":E};if(S)try{null.error}catch(B){var z=S(S(B));F["%Error.prototype%"]=z}var $=function B(Q){var X;if(Q==="%AsyncFunction%")X=y("async function () {}");else if(Q==="%GeneratorFunction%")X=y("function* () {}");else if(Q==="%AsyncGeneratorFunction%")X=y("async function* () {}");else if(Q==="%AsyncGenerator%"){var q=B("%AsyncGeneratorFunction%");q&&(X=q.prototype)}else if(Q==="%AsyncIteratorPrototype%"){var oe=B("%AsyncGenerator%");oe&&S&&(X=S(oe.prototype))}return F[Q]=X,X},H={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},V=bn(),Y=yd(),D=V.call(T,Array.prototype.concat),P=V.call(b,Array.prototype.splice),I=V.call(T,String.prototype.replace),N=V.call(T,String.prototype.slice),U=V.call(T,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,ne=function(Q){var X=N(Q,0,1),q=N(Q,-1);if(X==="%"&&q!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&X!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var oe=[];return I(Q,Z,function(se,pe,me,we){oe[oe.length]=me?I(we,j,"$1"):pe||se}),oe},G=function(Q,X){var q=Q,oe;if(Y(H,q)&&(oe=H[q],q="%"+oe[0]+"%"),Y(F,q)){var se=F[q];if(se===M&&(se=$(q)),typeof se>"u"&&!X)throw new o("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:oe,name:q,value:se}}throw new a("intrinsic "+Q+" does not exist!")};return Ur=function(Q,X){if(typeof Q!="string"||Q.length===0)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!="boolean")throw new o('"allowMissing" argument must be a boolean');if(U(/^%?[^%]*%?$/,Q)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var q=ne(Q),oe=q.length>0?q[0]:"",se=G("%"+oe+"%",X),pe=se.name,me=se.value,we=!1,Ae=se.alias;Ae&&(oe=Ae[0],P(q,D([0,1],Ae)));for(var Fe=1,Ne=!0;Fe<q.length;Fe+=1){var re=q[Fe],K=N(re,0,1),ie=N(re,-1);if((K==='"'||K==="'"||K==="`"||ie==='"'||ie==="'"||ie==="`")&&K!==ie)throw new a("property names with quotes must have matching quotes");if((re==="constructor"||!Ne)&&(we=!0),oe+="."+re,pe="%"+oe+"%",Y(F,pe))me=F[pe];else if(me!=null){if(!(re in me)){if(!X)throw new o("base intrinsic for "+Q+" exists, but the property is not available.");return}if(v&&Fe+1>=q.length){var le=v(me,re);Ne=!!le,Ne&&"get"in le&&!("originalValue"in le.get)?me=le.get:me=me[re]}else Ne=Y(me,re),me=me[re];Ne&&!we&&(F[pe]=me)}}return me},Ur}var Kr,fo;function po(){if(fo)return Kr;fo=1;var n=qr(),e=oo(),t=e([n("%String.prototype.indexOf%")]);return Kr=function(r,s){var a=n(r,!!s);return typeof a=="function"&&t(r,".prototype.")>-1?e([a]):a},Kr}var Jr,mo;function go(){if(mo)return Jr;mo=1;var n=qr(),e=po(),t=gn(),i=vi(),r=n("%Map%",!0),s=e("Map.prototype.get",!0),a=e("Map.prototype.set",!0),o=e("Map.prototype.has",!0),u=e("Map.prototype.delete",!0),c=e("Map.prototype.size",!0);return Jr=!!r&&function(){var p,h={assert:function(f){if(!h.has(f))throw new i("Side channel does not contain "+t(f))},delete:function(f){if(p){var _=u(p,f);return c(p)===0&&(p=void 0),_}return!1},get:function(f){if(p)return s(p,f)},has:function(f){return p?o(p,f):!1},set:function(f,_){p||(p=new r),a(p,f,_)}};return h},Jr}var Xr,bo;function wd(){if(bo)return Xr;bo=1;var n=qr(),e=po(),t=gn(),i=go(),r=vi(),s=n("%WeakMap%",!0),a=e("WeakMap.prototype.get",!0),o=e("WeakMap.prototype.set",!0),u=e("WeakMap.prototype.has",!0),c=e("WeakMap.prototype.delete",!0);return Xr=s?function(){var p,h,f={assert:function(_){if(!f.has(_))throw new r("Side channel does not contain "+t(_))},delete:function(_){if(s&&_&&(typeof _=="object"||typeof _=="function")){if(p)return c(p,_)}else if(i&&h)return h.delete(_);return!1},get:function(_){return s&&_&&(typeof _=="object"||typeof _=="function")&&p?a(p,_):h&&h.get(_)},has:function(_){return s&&_&&(typeof _=="object"||typeof _=="function")&&p?u(p,_):!!h&&h.has(_)},set:function(_,k){s&&_&&(typeof _=="object"||typeof _=="function")?(p||(p=new s),o(p,_,k)):i&&(h||(h=i()),h.set(_,k))}};return f}:i,Xr}var Zr,vo;function Cd(){if(vo)return Zr;vo=1;var n=vi(),e=gn(),t=Kc(),i=go(),r=wd(),s=r||i||t;return Zr=function(){var o,u={assert:function(c){if(!u.has(c))throw new n("Side channel does not contain "+e(c))},delete:function(c){return!!o&&o.delete(c)},get:function(c){return o&&o.get(c)},has:function(c){return!!o&&o.has(c)},set:function(c,d){o||(o=s()),o.set(c,d)}};return u},Zr}var Qr,yo;function es(){if(yo)return Qr;yo=1;var n=String.prototype.replace,e=/%20/g,t={RFC1738:"RFC1738",RFC3986:"RFC3986"};return Qr={default:t.RFC3986,formatters:{RFC1738:function(i){return n.call(i,e,"+")},RFC3986:function(i){return String(i)}},RFC1738:t.RFC1738,RFC3986:t.RFC3986},Qr}var ts,wo;function Co(){if(wo)return ts;wo=1;var n=es(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i=(function(){for(var w=[],y=0;y<256;++y)w.push("%"+((y<16?"0":"")+y.toString(16)).toUpperCase());return w})(),r=function(y){for(;y.length>1;){var v=y.pop(),R=v.obj[v.prop];if(t(R)){for(var m=[],x=0;x<R.length;++x)typeof R[x]<"u"&&m.push(R[x]);v.obj[v.prop]=m}}},s=function(y,v){for(var R=v&&v.plainObjects?{__proto__:null}:{},m=0;m<y.length;++m)typeof y[m]<"u"&&(R[m]=y[m]);return R},a=function w(y,v,R){if(!v)return y;if(typeof v!="object"&&typeof v!="function"){if(t(y))y.push(v);else if(y&&typeof y=="object")(R&&(R.plainObjects||R.allowPrototypes)||!e.call(Object.prototype,v))&&(y[v]=!0);else return[y,v];return y}if(!y||typeof y!="object")return[y].concat(v);var m=y;return t(y)&&!t(v)&&(m=s(y,R)),t(y)&&t(v)?(v.forEach(function(x,g){if(e.call(y,g)){var S=y[g];S&&typeof S=="object"&&x&&typeof x=="object"?y[g]=w(S,x,R):y.push(x)}else y[g]=x}),y):Object.keys(v).reduce(function(x,g){var S=v[g];return e.call(x,g)?x[g]=w(x[g],S,R):x[g]=S,x},m)},o=function(y,v){return Object.keys(v).reduce(function(R,m){return R[m]=v[m],R},y)},u=function(w,y,v){var R=w.replace(/\+/g," ");if(v==="iso-8859-1")return R.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(R)}catch{return R}},c=1024,d=function(y,v,R,m,x){if(y.length===0)return y;var g=y;if(typeof y=="symbol"?g=Symbol.prototype.toString.call(y):typeof y!="string"&&(g=String(y)),R==="iso-8859-1")return escape(g).replace(/%u[0-9a-f]{4}/gi,function(O){return"%26%23"+parseInt(O.slice(2),16)+"%3B"});for(var S="",C=0;C<g.length;C+=c){for(var E=g.length>=c?g.slice(C,C+c):g,b=[],T=0;T<E.length;++T){var M=E.charCodeAt(T);if(M===45||M===46||M===95||M===126||M>=48&&M<=57||M>=65&&M<=90||M>=97&&M<=122||x===n.RFC1738&&(M===40||M===41)){b[b.length]=E.charAt(T);continue}if(M<128){b[b.length]=i[M];continue}if(M<2048){b[b.length]=i[192|M>>6]+i[128|M&63];continue}if(M<55296||M>=57344){b[b.length]=i[224|M>>12]+i[128|M>>6&63]+i[128|M&63];continue}T+=1,M=65536+((M&1023)<<10|E.charCodeAt(T)&1023),b[b.length]=i[240|M>>18]+i[128|M>>12&63]+i[128|M>>6&63]+i[128|M&63]}S+=b.join("")}return S},p=function(y){for(var v=[{obj:{o:y},prop:"o"}],R=[],m=0;m<v.length;++m)for(var x=v[m],g=x.obj[x.prop],S=Object.keys(g),C=0;C<S.length;++C){var E=S[C],b=g[E];typeof b=="object"&&b!==null&&R.indexOf(b)===-1&&(v.push({obj:g,prop:E}),R.push(b))}return r(v),y},h=function(y){return Object.prototype.toString.call(y)==="[object RegExp]"},f=function(y){return!y||typeof y!="object"?!1:!!(y.constructor&&y.constructor.isBuffer&&y.constructor.isBuffer(y))},_=function(y,v){return[].concat(y,v)},k=function(y,v){if(t(y)){for(var R=[],m=0;m<y.length;m+=1)R.push(v(y[m]));return R}return v(y)};return ts={arrayToObject:s,assign:o,combine:_,compact:p,decode:u,encode:d,isBuffer:f,isRegExp:h,maybeMap:k,merge:a},ts}var is,Eo;function Ed(){if(Eo)return is;Eo=1;var n=Cd(),e=Co(),t=es(),i=Object.prototype.hasOwnProperty,r={brackets:function(w){return w+"[]"},comma:"comma",indices:function(w,y){return w+"["+y+"]"},repeat:function(w){return w}},s=Array.isArray,a=Array.prototype.push,o=function(k,w){a.apply(k,s(w)?w:[w])},u=Date.prototype.toISOString,c=t.default,d={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:e.encode,encodeValuesOnly:!1,filter:void 0,format:c,formatter:t.formatters[c],indices:!1,serializeDate:function(w){return u.call(w)},skipNulls:!1,strictNullHandling:!1},p=function(w){return typeof w=="string"||typeof w=="number"||typeof w=="boolean"||typeof w=="symbol"||typeof w=="bigint"},h={},f=function k(w,y,v,R,m,x,g,S,C,E,b,T,M,O,F,z,$,H){for(var V=w,Y=H,D=0,P=!1;(Y=Y.get(h))!==void 0&&!P;){var I=Y.get(w);if(D+=1,typeof I<"u"){if(I===D)throw new RangeError("Cyclic object value");P=!0}typeof Y.get(h)>"u"&&(D=0)}if(typeof E=="function"?V=E(y,V):V instanceof Date?V=M(V):v==="comma"&&s(V)&&(V=e.maybeMap(V,function(pe){return pe instanceof Date?M(pe):pe})),V===null){if(x)return C&&!z?C(y,d.encoder,$,"key",O):y;V=""}if(p(V)||e.isBuffer(V)){if(C){var N=z?y:C(y,d.encoder,$,"key",O);return[F(N)+"="+F(C(V,d.encoder,$,"value",O))]}return[F(y)+"="+F(String(V))]}var U=[];if(typeof V>"u")return U;var Z;if(v==="comma"&&s(V))z&&C&&(V=e.maybeMap(V,C)),Z=[{value:V.length>0?V.join(",")||null:void 0}];else if(s(E))Z=E;else{var j=Object.keys(V);Z=b?j.sort(b):j}var ne=S?String(y).replace(/\./g,"%2E"):String(y),G=R&&s(V)&&V.length===1?ne+"[]":ne;if(m&&s(V)&&V.length===0)return G+"[]";for(var B=0;B<Z.length;++B){var Q=Z[B],X=typeof Q=="object"&&Q&&typeof Q.value<"u"?Q.value:V[Q];if(!(g&&X===null)){var q=T&&S?String(Q).replace(/\./g,"%2E"):String(Q),oe=s(V)?typeof v=="function"?v(G,q):G:G+(T?"."+q:"["+q+"]");H.set(w,D);var se=n();se.set(h,H),o(U,k(X,oe,v,R,m,x,g,S,v==="comma"&&z&&s(V)?null:C,E,b,T,M,O,F,z,$,se))}}return U},_=function(w){if(!w)return d;if(typeof w.allowEmptyArrays<"u"&&typeof w.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof w.encodeDotInKeys<"u"&&typeof w.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(w.encoder!==null&&typeof w.encoder<"u"&&typeof w.encoder!="function")throw new TypeError("Encoder has to be a function.");var y=w.charset||d.charset;if(typeof w.charset<"u"&&w.charset!=="utf-8"&&w.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=t.default;if(typeof w.format<"u"){if(!i.call(t.formatters,w.format))throw new TypeError("Unknown format option provided.");v=w.format}var R=t.formatters[v],m=d.filter;(typeof w.filter=="function"||s(w.filter))&&(m=w.filter);var x;if(w.arrayFormat in r?x=w.arrayFormat:"indices"in w?x=w.indices?"indices":"repeat":x=d.arrayFormat,"commaRoundTrip"in w&&typeof w.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g=typeof w.allowDots>"u"?w.encodeDotInKeys===!0?!0:d.allowDots:!!w.allowDots;return{addQueryPrefix:typeof w.addQueryPrefix=="boolean"?w.addQueryPrefix:d.addQueryPrefix,allowDots:g,allowEmptyArrays:typeof w.allowEmptyArrays=="boolean"?!!w.allowEmptyArrays:d.allowEmptyArrays,arrayFormat:x,charset:y,charsetSentinel:typeof w.charsetSentinel=="boolean"?w.charsetSentinel:d.charsetSentinel,commaRoundTrip:!!w.commaRoundTrip,delimiter:typeof w.delimiter>"u"?d.delimiter:w.delimiter,encode:typeof w.encode=="boolean"?w.encode:d.encode,encodeDotInKeys:typeof w.encodeDotInKeys=="boolean"?w.encodeDotInKeys:d.encodeDotInKeys,encoder:typeof w.encoder=="function"?w.encoder:d.encoder,encodeValuesOnly:typeof w.encodeValuesOnly=="boolean"?w.encodeValuesOnly:d.encodeValuesOnly,filter:m,format:v,formatter:R,serializeDate:typeof w.serializeDate=="function"?w.serializeDate:d.serializeDate,skipNulls:typeof w.skipNulls=="boolean"?w.skipNulls:d.skipNulls,sort:typeof w.sort=="function"?w.sort:null,strictNullHandling:typeof w.strictNullHandling=="boolean"?w.strictNullHandling:d.strictNullHandling}};return is=function(k,w){var y=k,v=_(w),R,m;typeof v.filter=="function"?(m=v.filter,y=m("",y)):s(v.filter)&&(m=v.filter,R=m);var x=[];if(typeof y!="object"||y===null)return"";var g=r[v.arrayFormat],S=g==="comma"&&v.commaRoundTrip;R||(R=Object.keys(y)),v.sort&&R.sort(v.sort);for(var C=n(),E=0;E<R.length;++E){var b=R[E],T=y[b];v.skipNulls&&T===null||o(x,f(T,b,g,S,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,C))}var M=x.join(v.delimiter),O=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?O+="utf8=%26%2310003%3B&":O+="utf8=%E2%9C%93&"),M.length>0?O+M:""},is}var ns,ko;function kd(){if(ko)return ns;ko=1;var n=Co(),e=Object.prototype.hasOwnProperty,t=Array.isArray,i={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:n.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictNullHandling:!1,throwOnLimitExceeded:!1},r=function(h){return h.replace(/&#(\d+);/g,function(f,_){return String.fromCharCode(parseInt(_,10))})},s=function(h,f,_){if(h&&typeof h=="string"&&f.comma&&h.indexOf(",")>-1)return h.split(",");if(f.throwOnLimitExceeded&&_>=f.arrayLimit)throw new RangeError("Array limit exceeded. Only "+f.arrayLimit+" element"+(f.arrayLimit===1?"":"s")+" allowed in an array.");return h},a="utf8=%26%2310003%3B",o="utf8=%E2%9C%93",u=function(f,_){var k={__proto__:null},w=_.ignoreQueryPrefix?f.replace(/^\?/,""):f;w=w.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var y=_.parameterLimit===1/0?void 0:_.parameterLimit,v=w.split(_.delimiter,_.throwOnLimitExceeded?y+1:y);if(_.throwOnLimitExceeded&&v.length>y)throw new RangeError("Parameter limit exceeded. Only "+y+" parameter"+(y===1?"":"s")+" allowed.");var R=-1,m,x=_.charset;if(_.charsetSentinel)for(m=0;m<v.length;++m)v[m].indexOf("utf8=")===0&&(v[m]===o?x="utf-8":v[m]===a&&(x="iso-8859-1"),R=m,m=v.length);for(m=0;m<v.length;++m)if(m!==R){var g=v[m],S=g.indexOf("]="),C=S===-1?g.indexOf("="):S+1,E,b;C===-1?(E=_.decoder(g,i.decoder,x,"key"),b=_.strictNullHandling?null:""):(E=_.decoder(g.slice(0,C),i.decoder,x,"key"),b=n.maybeMap(s(g.slice(C+1),_,t(k[E])?k[E].length:0),function(M){return _.decoder(M,i.decoder,x,"value")})),b&&_.interpretNumericEntities&&x==="iso-8859-1"&&(b=r(String(b))),g.indexOf("[]=")>-1&&(b=t(b)?[b]:b);var T=e.call(k,E);T&&_.duplicates==="combine"?k[E]=n.combine(k[E],b):(!T||_.duplicates==="last")&&(k[E]=b)}return k},c=function(h,f,_,k){var w=0;if(h.length>0&&h[h.length-1]==="[]"){var y=h.slice(0,-1).join("");w=Array.isArray(f)&&f[y]?f[y].length:0}for(var v=k?f:s(f,_,w),R=h.length-1;R>=0;--R){var m,x=h[R];if(x==="[]"&&_.parseArrays)m=_.allowEmptyArrays&&(v===""||_.strictNullHandling&&v===null)?[]:n.combine([],v);else{m=_.plainObjects?{__proto__:null}:{};var g=x.charAt(0)==="["&&x.charAt(x.length-1)==="]"?x.slice(1,-1):x,S=_.decodeDotInKeys?g.replace(/%2E/g,"."):g,C=parseInt(S,10);!_.parseArrays&&S===""?m={0:v}:!isNaN(C)&&x!==S&&String(C)===S&&C>=0&&_.parseArrays&&C<=_.arrayLimit?(m=[],m[C]=v):S!=="__proto__"&&(m[S]=v)}v=m}return v},d=function(f,_,k,w){if(f){var y=k.allowDots?f.replace(/\.([^.[]+)/g,"[$1]"):f,v=/(\[[^[\]]*])/,R=/(\[[^[\]]*])/g,m=k.depth>0&&v.exec(y),x=m?y.slice(0,m.index):y,g=[];if(x){if(!k.plainObjects&&e.call(Object.prototype,x)&&!k.allowPrototypes)return;g.push(x)}for(var S=0;k.depth>0&&(m=R.exec(y))!==null&&S<k.depth;){if(S+=1,!k.plainObjects&&e.call(Object.prototype,m[1].slice(1,-1))&&!k.allowPrototypes)return;g.push(m[1])}if(m){if(k.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+k.depth+" and strictDepth is true");g.push("["+y.slice(m.index)+"]")}return c(g,_,k,w)}},p=function(f){if(!f)return i;if(typeof f.allowEmptyArrays<"u"&&typeof f.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof f.decodeDotInKeys<"u"&&typeof f.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(f.decoder!==null&&typeof f.decoder<"u"&&typeof f.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof f.charset<"u"&&f.charset!=="utf-8"&&f.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof f.throwOnLimitExceeded<"u"&&typeof f.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var _=typeof f.charset>"u"?i.charset:f.charset,k=typeof f.duplicates>"u"?i.duplicates:f.duplicates;if(k!=="combine"&&k!=="first"&&k!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var w=typeof f.allowDots>"u"?f.decodeDotInKeys===!0?!0:i.allowDots:!!f.allowDots;return{allowDots:w,allowEmptyArrays:typeof f.allowEmptyArrays=="boolean"?!!f.allowEmptyArrays:i.allowEmptyArrays,allowPrototypes:typeof f.allowPrototypes=="boolean"?f.allowPrototypes:i.allowPrototypes,allowSparse:typeof f.allowSparse=="boolean"?f.allowSparse:i.allowSparse,arrayLimit:typeof f.arrayLimit=="number"?f.arrayLimit:i.arrayLimit,charset:_,charsetSentinel:typeof f.charsetSentinel=="boolean"?f.charsetSentinel:i.charsetSentinel,comma:typeof f.comma=="boolean"?f.comma:i.comma,decodeDotInKeys:typeof f.decodeDotInKeys=="boolean"?f.decodeDotInKeys:i.decodeDotInKeys,decoder:typeof f.decoder=="function"?f.decoder:i.decoder,delimiter:typeof f.delimiter=="string"||n.isRegExp(f.delimiter)?f.delimiter:i.delimiter,depth:typeof f.depth=="number"||f.depth===!1?+f.depth:i.depth,duplicates:k,ignoreQueryPrefix:f.ignoreQueryPrefix===!0,interpretNumericEntities:typeof f.interpretNumericEntities=="boolean"?f.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof f.parameterLimit=="number"?f.parameterLimit:i.parameterLimit,parseArrays:f.parseArrays!==!1,plainObjects:typeof f.plainObjects=="boolean"?f.plainObjects:i.plainObjects,strictDepth:typeof f.strictDepth=="boolean"?!!f.strictDepth:i.strictDepth,strictNullHandling:typeof f.strictNullHandling=="boolean"?f.strictNullHandling:i.strictNullHandling,throwOnLimitExceeded:typeof f.throwOnLimitExceeded=="boolean"?f.throwOnLimitExceeded:!1}};return ns=function(h,f){var _=p(f);if(h===""||h===null||typeof h>"u")return _.plainObjects?{__proto__:null}:{};for(var k=typeof h=="string"?u(h,_):h,w=_.plainObjects?{__proto__:null}:{},y=Object.keys(k),v=0;v<y.length;++v){var R=y[v],m=d(R,k[R],_,typeof h=="string");w=n.merge(w,m,_)}return _.allowSparse===!0?w:n.compact(w)},ns}var rs,So;function Sd(){if(So)return rs;So=1;var n=Ed(),e=kd(),t=es();return rs={formats:t,parse:e,stringify:n},rs}var xd=Sd();const xo=ka(xd),_d=["action"],Md=["value"],Rd=["name","value"],Td=["value"],Dd=["disabled"],Od=Ve(l.defineComponent({__name:"ExportComponent",props:{type:{},action:{},filters:{},buttonText:{},csrfToken:{}},setup(n){const e=n,t=l.ref(),i=l.ref([]),r=l.computed(()=>e.csrfToken),s=async()=>{t.value&&t.value.submit()},a=()=>{if(!e.filters)return!1;if(typeof e.filters=="string")return o(),!0;c()},o=()=>{i.value=[];const d=/^.*\?/gm,p=e.filters.replace(d,""),h=xo.parse(p);i.value=u(h)},u=d=>xo.stringify(d,{encode:!1}).split("&").map(p=>{const h=p.split("=");return{key:h[0],value:h[1]}}).filter(({key:p,value:h})=>p.length&&h.length),c=()=>{if(i.value=[],!e.filters)return!1;i.value=u(e.filters)};return l.watch(()=>e.filters,()=>{a()},{deep:!1}),l.onMounted(()=>{a()}),(d,p)=>(l.openBlock(),l.createElementBlock("form",{target:"_blank",action:d.action,method:"POST",ref_key:"reportForm",ref:t},[d.type?(l.openBlock(),l.createElementBlock("input",{key:0,type:"hidden",name:"type",value:d.type},null,8,Md)):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,h=>(l.openBlock(),l.createElementBlock("input",{key:h.key,type:"hidden",name:h.key,value:h.value},null,8,Rd))),128)),l.createElementVNode("input",{type:"hidden",name:"_token",value:r.value},null,8,Td),l.createElementVNode("button",{type:"button",class:l.normalizeClass(["col-auto export-button",{disabled:!d.action}]),onClick:s,disabled:!d.action},[l.createTextVNode(l.toDisplayString(d.buttonText)+" ",1),p[0]||(p[0]=l.createElementVNode("i",{class:"ps-2 bi bi-file-earmark-arrow-down-fill"},null,-1))],10,Dd)],8,_d))}}),[["__scopeId","data-v-db74d2e3"]]);var vn={exports:{}};/*!
|
|
2
5
|
* dist/inputmask
|
|
3
6
|
* https://github.com/RobinHerbots/Inputmask
|
|
4
7
|
* Copyright (c) 2010 - 2024 Robin Herbots
|
|
5
8
|
* Licensed under the MIT license
|
|
6
9
|
* Version: 5.0.9
|
|
7
|
-
*/var
|
|
8
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function C(k,_){(_==null||_>k.length)&&(_=k.length);for(var p=0,w=new Array(_);p<_;p++)w[p]=k[p];return w}function F(k){return k&&k.__esModule?k:{default:k}}var x=u.default.document;function R(k){return k instanceof Element}var M=o.Event=void 0;typeof u.default.CustomEvent=="function"?o.Event=M=u.default.CustomEvent:u.default.Event&&x&&x.createEvent?(o.Event=M=function(k,_){_=_||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var p=x.createEvent("CustomEvent");return p.initCustomEvent(k,_.bubbles,_.cancelable,_.detail),p},M.prototype=u.default.Event.prototype):typeof Event<"u"&&(o.Event=M=Event)},600:function(a,o){function l(u){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(h){return typeof h}:function(h){return h&&typeof Symbol=="function"&&h.constructor===Symbol&&h!==Symbol.prototype?"symbol":typeof h},l(u)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=function u(){var h,m,v,C,F,x,R=arguments[0]||{},M=1,k=arguments.length,_=!1;for(typeof R=="boolean"&&(_=R,R=arguments[M]||{},M++),l(R)!=="object"&&typeof R!="function"&&(R={});M<k;M++)if((h=arguments[M])!=null)for(m in h)v=R[m],R!==(C=h[m])&&(_&&C&&(Object.prototype.toString.call(C)==="[object Object]"||(F=Array.isArray(C)))?(F?(F=!1,x=v&&Array.isArray(v)?v:[]):x=v&&Object.prototype.toString.call(v)==="[object Object]"?v:{},R[m]=u(_,x,C)):C!==void 0&&(R[m]=C));return R}},4963:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=C(l(9380)),h=C(l(253)),m=l(3776),v=C(l(600));function C(R){return R&&R.__esModule?R:{default:R}}var F=u.default.document;function x(R){return R instanceof x?R:this instanceof x?void(R!=null&&R!==u.default&&(this[0]=R.nodeName?R:R[0]!==void 0&&R[0].nodeName?R[0]:F.querySelector(R),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new x(R)}x.prototype={on:m.on,off:m.off,trigger:m.trigger},x.extend=v.default,x.data=h.default,x.Event=m.Event,o.default=x},9845:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.mobile=o.iphone=o.ie=void 0;var u,h=(u=l(9380))&&u.__esModule?u:{default:u},m=h.default.navigator&&h.default.navigator.userAgent||"";o.ie=m.indexOf("MSIE ")>0||m.indexOf("Trident/")>0,o.mobile=h.default.navigator&&h.default.navigator.userAgentData&&h.default.navigator.userAgentData.mobile||h.default.navigator&&h.default.navigator.maxTouchPoints||"ontouchstart"in h.default,o.iphone=/iphone/i.test(m)},7184:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u){return u.replace(l,"\\$1")};var l=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(a,o,l){function u(b){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},u(b)}Object.defineProperty(o,"__esModule",{value:!0}),o.EventHandlers=void 0;var h,m=l(9845),v=(h=l(9380))&&h.__esModule?h:{default:h},C=l(7760),F=l(2839),x=l(8711),R=l(7215),M=l(4713);function k(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */k=function(){return f};var b,f={},E=Object.prototype,S=E.hasOwnProperty,D=Object.defineProperty||function(se,G,Z){se[G]=Z.value},A=typeof Symbol=="function"?Symbol:{},N=A.iterator||"@@iterator",V=A.asyncIterator||"@@asyncIterator",B=A.toStringTag||"@@toStringTag";function j(se,G,Z){return Object.defineProperty(se,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}),se[G]}try{j({},"")}catch{j=function(G,Z,re){return G[Z]=re}}function $(se,G,Z,re){var te=G&&G.prototype instanceof Q?G:Q,pe=Object.create(te.prototype),Me=new Le(re||[]);return D(pe,"_invoke",{value:me(se,Z,Me)}),pe}function T(se,G,Z){try{return{type:"normal",arg:se.call(G,Z)}}catch(re){return{type:"throw",arg:re}}}f.wrap=$;var P="suspendedStart",W="suspendedYield",z="executing",U="completed",K={};function Q(){}function ie(){}function Y(){}var H={};j(H,N,(function(){return this}));var ee=Object.getPrototypeOf,X=ee&&ee(ee(Ne([])));X&&X!==E&&S.call(X,N)&&(H=X);var q=Y.prototype=Q.prototype=Object.create(H);function oe(se){["next","throw","return"].forEach((function(G){j(se,G,(function(Z){return this._invoke(G,Z)}))}))}function ne(se,G){function Z(te,pe,Me,ve){var we=T(se[te],se,pe);if(we.type!=="throw"){var Pe=we.arg,ct=Pe.value;return ct&&u(ct)=="object"&&S.call(ct,"__await")?G.resolve(ct.__await).then((function(ze){Z("next",ze,Me,ve)}),(function(ze){Z("throw",ze,Me,ve)})):G.resolve(ct).then((function(ze){Pe.value=ze,Me(Pe)}),(function(ze){return Z("throw",ze,Me,ve)}))}ve(we.arg)}var re;D(this,"_invoke",{value:function(te,pe){function Me(){return new G((function(ve,we){Z(te,pe,ve,we)}))}return re=re?re.then(Me,Me):Me()}})}function me(se,G,Z){var re=P;return function(te,pe){if(re===z)throw new Error("Generator is already running");if(re===U){if(te==="throw")throw pe;return{value:b,done:!0}}for(Z.method=te,Z.arg=pe;;){var Me=Z.delegate;if(Me){var ve=be(Me,Z);if(ve){if(ve===K)continue;return ve}}if(Z.method==="next")Z.sent=Z._sent=Z.arg;else if(Z.method==="throw"){if(re===P)throw re=U,Z.arg;Z.dispatchException(Z.arg)}else Z.method==="return"&&Z.abrupt("return",Z.arg);re=z;var we=T(se,G,Z);if(we.type==="normal"){if(re=Z.done?U:W,we.arg===K)continue;return{value:we.arg,done:Z.done}}we.type==="throw"&&(re=U,Z.method="throw",Z.arg=we.arg)}}}function be(se,G){var Z=G.method,re=se.iterator[Z];if(re===b)return G.delegate=null,Z==="throw"&&se.iterator.return&&(G.method="return",G.arg=b,be(se,G),G.method==="throw")||Z!=="return"&&(G.method="throw",G.arg=new TypeError("The iterator does not provide a '"+Z+"' method")),K;var te=T(re,se.iterator,G.arg);if(te.type==="throw")return G.method="throw",G.arg=te.arg,G.delegate=null,K;var pe=te.arg;return pe?pe.done?(G[se.resultName]=pe.value,G.next=se.nextLoc,G.method!=="return"&&(G.method="next",G.arg=b),G.delegate=null,K):pe:(G.method="throw",G.arg=new TypeError("iterator result is not an object"),G.delegate=null,K)}function xe(se){var G={tryLoc:se[0]};1 in se&&(G.catchLoc=se[1]),2 in se&&(G.finallyLoc=se[2],G.afterLoc=se[3]),this.tryEntries.push(G)}function je(se){var G=se.completion||{};G.type="normal",delete G.arg,se.completion=G}function Le(se){this.tryEntries=[{tryLoc:"root"}],se.forEach(xe,this),this.reset(!0)}function Ne(se){if(se||se===""){var G=se[N];if(G)return G.call(se);if(typeof se.next=="function")return se;if(!isNaN(se.length)){var Z=-1,re=function te(){for(;++Z<se.length;)if(S.call(se,Z))return te.value=se[Z],te.done=!1,te;return te.value=b,te.done=!0,te};return re.next=re}}throw new TypeError(u(se)+" is not iterable")}return ie.prototype=Y,D(q,"constructor",{value:Y,configurable:!0}),D(Y,"constructor",{value:ie,configurable:!0}),ie.displayName=j(Y,B,"GeneratorFunction"),f.isGeneratorFunction=function(se){var G=typeof se=="function"&&se.constructor;return!!G&&(G===ie||(G.displayName||G.name)==="GeneratorFunction")},f.mark=function(se){return Object.setPrototypeOf?Object.setPrototypeOf(se,Y):(se.__proto__=Y,j(se,B,"GeneratorFunction")),se.prototype=Object.create(q),se},f.awrap=function(se){return{__await:se}},oe(ne.prototype),j(ne.prototype,V,(function(){return this})),f.AsyncIterator=ne,f.async=function(se,G,Z,re,te){te===void 0&&(te=Promise);var pe=new ne($(se,G,Z,re),te);return f.isGeneratorFunction(G)?pe:pe.next().then((function(Me){return Me.done?Me.value:pe.next()}))},oe(q),j(q,B,"Generator"),j(q,N,(function(){return this})),j(q,"toString",(function(){return"[object Generator]"})),f.keys=function(se){var G=Object(se),Z=[];for(var re in G)Z.push(re);return Z.reverse(),function te(){for(;Z.length;){var pe=Z.pop();if(pe in G)return te.value=pe,te.done=!1,te}return te.done=!0,te}},f.values=Ne,Le.prototype={constructor:Le,reset:function(se){if(this.prev=0,this.next=0,this.sent=this._sent=b,this.done=!1,this.delegate=null,this.method="next",this.arg=b,this.tryEntries.forEach(je),!se)for(var G in this)G.charAt(0)==="t"&&S.call(this,G)&&!isNaN(+G.slice(1))&&(this[G]=b)},stop:function(){this.done=!0;var se=this.tryEntries[0].completion;if(se.type==="throw")throw se.arg;return this.rval},dispatchException:function(se){if(this.done)throw se;var G=this;function Z(we,Pe){return pe.type="throw",pe.arg=se,G.next=we,Pe&&(G.method="next",G.arg=b),!!Pe}for(var re=this.tryEntries.length-1;re>=0;--re){var te=this.tryEntries[re],pe=te.completion;if(te.tryLoc==="root")return Z("end");if(te.tryLoc<=this.prev){var Me=S.call(te,"catchLoc"),ve=S.call(te,"finallyLoc");if(Me&&ve){if(this.prev<te.catchLoc)return Z(te.catchLoc,!0);if(this.prev<te.finallyLoc)return Z(te.finallyLoc)}else if(Me){if(this.prev<te.catchLoc)return Z(te.catchLoc,!0)}else{if(!ve)throw new Error("try statement without catch or finally");if(this.prev<te.finallyLoc)return Z(te.finallyLoc)}}}},abrupt:function(se,G){for(var Z=this.tryEntries.length-1;Z>=0;--Z){var re=this.tryEntries[Z];if(re.tryLoc<=this.prev&&S.call(re,"finallyLoc")&&this.prev<re.finallyLoc){var te=re;break}}te&&(se==="break"||se==="continue")&&te.tryLoc<=G&&G<=te.finallyLoc&&(te=null);var pe=te?te.completion:{};return pe.type=se,pe.arg=G,te?(this.method="next",this.next=te.finallyLoc,K):this.complete(pe)},complete:function(se,G){if(se.type==="throw")throw se.arg;return se.type==="break"||se.type==="continue"?this.next=se.arg:se.type==="return"?(this.rval=this.arg=se.arg,this.method="return",this.next="end"):se.type==="normal"&&G&&(this.next=G),K},finish:function(se){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.finallyLoc===se)return this.complete(Z.completion,Z.afterLoc),je(Z),K}},catch:function(se){for(var G=this.tryEntries.length-1;G>=0;--G){var Z=this.tryEntries[G];if(Z.tryLoc===se){var re=Z.completion;if(re.type==="throw"){var te=re.arg;je(Z)}return te}}throw new Error("illegal catch attempt")},delegateYield:function(se,G,Z){return this.delegate={iterator:Ne(se),resultName:G,nextLoc:Z},this.method==="next"&&(this.arg=b),K}},f}function _(b,f){var E=typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(!E){if(Array.isArray(b)||(E=(function(B,j){if(B){if(typeof B=="string")return p(B,j);var $=Object.prototype.toString.call(B).slice(8,-1);if($==="Object"&&B.constructor&&($=B.constructor.name),$==="Map"||$==="Set")return Array.from(B);if($==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test($))return p(B,j)}})(b))||f){E&&(b=E);var S=0,D=function(){};return{s:D,n:function(){return S>=b.length?{done:!0}:{done:!1,value:b[S++]}},e:function(B){throw B},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var A,N=!0,V=!1;return{s:function(){E=E.call(b)},n:function(){var B=E.next();return N=B.done,B},e:function(B){V=!0,A=B},f:function(){try{N||E.return==null||E.return()}finally{if(V)throw A}}}}function p(b,f){(f==null||f>b.length)&&(f=b.length);for(var E=0,S=new Array(f);E<f;E++)S[E]=b[E];return S}function w(b,f,E,S,D,A,N){try{var V=b[A](N),B=V.value}catch(j){return void E(j)}V.done?f(B):Promise.resolve(B).then(S,D)}var c,y,g=o.EventHandlers={keyEvent:function(b,f,E,S,D){var A=this.inputmask,N=A.opts,V=A.dependencyLib,B=A.maskset,j=this,$=V(j),T=b.key,P=x.caret.call(A,j),W=N.onKeyDown.call(this,b,x.getBuffer.call(A),P,N);if(W!==void 0)return W;if(T===F.keys.Backspace||T===F.keys.Delete||m.iphone&&T===F.keys.BACKSPACE_SAFARI||b.ctrlKey&&T===F.keys.x&&!("oncut"in j))b.preventDefault(),R.handleRemove.call(A,j,T,P),(0,C.writeBuffer)(j,x.getBuffer.call(A,!0),B.p,b,j.inputmask._valueGet()!==x.getBuffer.call(A).join(""));else if(T===F.keys.End||T===F.keys.PageDown){b.preventDefault();var z=x.seekNext.call(A,x.getLastValidPosition.call(A));x.caret.call(A,j,b.shiftKey?P.begin:z,z,!0)}else T===F.keys.Home&&!b.shiftKey||T===F.keys.PageUp?(b.preventDefault(),x.caret.call(A,j,0,b.shiftKey?P.begin:0,!0)):N.undoOnEscape&&T===F.keys.Escape&&b.altKey!==!0?((0,C.checkVal)(j,!0,!1,A.undoValue.split("")),$.trigger("click")):T!==F.keys.Insert||b.shiftKey||b.ctrlKey||A.userOptions.insertMode!==void 0?N.tabThrough===!0&&T===F.keys.Tab?b.shiftKey===!0?(P.end=x.seekPrevious.call(A,P.end,!0),M.getTest.call(A,P.end-1).match.static===!0&&P.end--,P.begin=x.seekPrevious.call(A,P.end,!0),P.begin>=0&&P.end>0&&(b.preventDefault(),x.caret.call(A,j,P.begin,P.end))):(P.begin=x.seekNext.call(A,P.begin,!0),P.end=x.seekNext.call(A,P.begin,!0),P.end<B.maskLength&&P.end--,P.begin<=B.maskLength&&(b.preventDefault(),x.caret.call(A,j,P.begin,P.end))):b.shiftKey||(N.insertModeVisual&&N.insertMode===!1?T===F.keys.ArrowRight?setTimeout((function(){var U=x.caret.call(A,j);x.caret.call(A,j,U.begin)}),0):T===F.keys.ArrowLeft&&setTimeout((function(){var U=x.translatePosition.call(A,j.inputmask.caretPos.begin);x.translatePosition.call(A,j.inputmask.caretPos.end),A.isRTL?x.caret.call(A,j,U+(U===B.maskLength?0:1)):x.caret.call(A,j,U-(U===0?0:1))}),0):A.keyEventHook===void 0||A.keyEventHook(b)):R.isSelection.call(A,P)?N.insertMode=!N.insertMode:(N.insertMode=!N.insertMode,x.caret.call(A,j,P.begin,P.begin));return A.isComposing=T==F.keys.Process||T==F.keys.Unidentified,A.ignorable=T.length>1&&!(j.tagName.toLowerCase()==="textarea"&&T==F.keys.Enter),g.keypressEvent.call(this,b,f,E,S,D)},keypressEvent:function(b,f,E,S,D){var A=this.inputmask||this,N=A.opts,V=A.dependencyLib,B=A.maskset,j=A.el,$=V(j),T=b.key;if(f===!0||b.ctrlKey&&b.altKey&&!A.ignorable||!(b.ctrlKey||b.metaKey||A.ignorable)){if(T){var P,W=f?{begin:D,end:D}:x.caret.call(A,j);f||(T=N.substitutes[T]||T),B.writeOutBuffer=!0;var z=R.isValid.call(A,W,T,S,void 0,void 0,void 0,f);if(z!==!1&&(x.resetMaskSet.call(A,!0),P=z.caret!==void 0?z.caret:x.seekNext.call(A,z.pos.begin?z.pos.begin:z.pos),B.p=P),P=N.numericInput&&z.caret===void 0?x.seekPrevious.call(A,P):P,E!==!1&&(setTimeout((function(){N.onKeyValidation.call(j,T,z)}),0),B.writeOutBuffer&&z!==!1)){var U=x.getBuffer.call(A);(0,C.writeBuffer)(j,U,P,b,f!==!0)}if(b.preventDefault(),f)return z!==!1&&(z.forwardPosition=P),z}}else T===F.keys.Enter&&A.undoValue!==A._valueGet(!0)&&(A.undoValue=A._valueGet(!0),setTimeout((function(){$.trigger("change")}),0))},pasteEvent:(c=k().mark((function b(f){var E,S,D,A,N,V;return k().wrap((function(B){for(;;)switch(B.prev=B.next){case 0:E=function(j,$,T,P,W){var z=x.caret.call(j,$,void 0,void 0,!0),U=T.substr(0,z.begin),K=T.substr(z.end,T.length);if(U==(j.isRTL?x.getBufferTemplate.call(j).slice().reverse():x.getBufferTemplate.call(j)).slice(0,z.begin).join("")&&(U=""),K==(j.isRTL?x.getBufferTemplate.call(j).slice().reverse():x.getBufferTemplate.call(j)).slice(z.end).join("")&&(K=""),P=U+P+K,j.isRTL&&A.numericInput!==!0){P=P.split("");var Q,ie=_(x.getBufferTemplate.call(j));try{for(ie.s();!(Q=ie.n()).done;){var Y=Q.value;P[0]===Y&&P.shift()}}catch(ee){ie.e(ee)}finally{ie.f()}P=P.reverse().join("")}var H=P;if(typeof W=="function"){if((H=W.call(j,H,A))===!1)return!1;H||(H=T)}(0,C.checkVal)($,!0,!1,H.toString().split(""),f)},S=this,D=this.inputmask,A=D.opts,N=D._valueGet(!0),D.skipInputEvent=!0,f.clipboardData&&f.clipboardData.getData?V=f.clipboardData.getData("text/plain"):v.default.clipboardData&&v.default.clipboardData.getData&&(V=v.default.clipboardData.getData("Text")),E(D,S,N,V,A.onBeforePaste),f.preventDefault();case 7:case"end":return B.stop()}}),b,this)})),y=function(){var b=this,f=arguments;return new Promise((function(E,S){var D=c.apply(b,f);function A(V){w(D,E,S,A,N,"next",V)}function N(V){w(D,E,S,A,N,"throw",V)}A(void 0)}))},function(b){return y.apply(this,arguments)}),inputFallBackEvent:function(b){var f=this.inputmask,E=f.opts,S=f.dependencyLib,D,A=this,N=A.inputmask._valueGet(!0),V=(f.isRTL?x.getBuffer.call(f).slice().reverse():x.getBuffer.call(f)).join(""),B=x.caret.call(f,A,void 0,void 0,!0);if(V!==N){if(D=(function($,T,P){for(var W,z,U,K=$.substr(0,P.begin).split(""),Q=$.substr(P.begin).split(""),ie=T.substr(0,P.begin).split(""),Y=T.substr(P.begin).split(""),H=K.length>=ie.length?K.length:ie.length,ee=Q.length>=Y.length?Q.length:Y.length,X="",q=[],oe="~";K.length<H;)K.push(oe);for(;ie.length<H;)ie.push(oe);for(;Q.length<ee;)Q.unshift(oe);for(;Y.length<ee;)Y.unshift(oe);var ne=K.concat(Q),me=ie.concat(Y);for(z=0,W=ne.length;z<W;z++)switch(U=M.getPlaceholder.call(f,x.translatePosition.call(f,z)),X){case"insertText":me[z-1]===ne[z]&&P.begin==ne.length-1&&q.push(ne[z]),z=W;break;case"insertReplacementText":case"deleteContentBackward":ne[z]===oe?P.end++:z=W;break;default:ne[z]!==me[z]&&(ne[z+1]!==oe&&ne[z+1]!==U&&ne[z+1]!==void 0||(me[z]!==U||me[z+1]!==oe)&&me[z]!==oe?me[z+1]===oe&&me[z]===ne[z+1]?(X="insertText",q.push(ne[z]),P.begin--,P.end--):ne[z]!==U&&ne[z]!==oe&&(ne[z+1]===oe||me[z]!==ne[z]&&me[z+1]===ne[z+1])?(X="insertReplacementText",q.push(ne[z]),P.begin--):ne[z]===oe?(X="deleteContentBackward",(x.isMask.call(f,x.translatePosition.call(f,z),!0)||me[z]===E.radixPoint)&&P.end++):z=W:(X="insertText",q.push(ne[z]),P.begin--,P.end--))}return{action:X,data:q,caret:P}})(N,V,B),(A.inputmask.shadowRoot||A.ownerDocument).activeElement!==A&&A.focus(),(0,C.writeBuffer)(A,x.getBuffer.call(f)),x.caret.call(f,A,B.begin,B.end,!0),!m.mobile&&f.skipNextInsert&&b.inputType==="insertText"&&D.action==="insertText"&&f.isComposing)return!1;switch(b.inputType==="insertCompositionText"&&D.action==="insertText"&&f.isComposing?f.skipNextInsert=!0:f.skipNextInsert=!1,D.action){case"insertText":case"insertReplacementText":D.data.forEach((function($,T){var P=new S.Event("keypress");P.key=$,f.ignorable=!1,g.keypressEvent.call(A,P)})),setTimeout((function(){f.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var j=new S.Event("keydown");j.key=F.keys.Backspace,g.keyEvent.call(A,j);break;default:(0,C.applyInputValue)(A,N),x.caret.call(f,A,B.begin,B.end,!0)}b.preventDefault()}},setValueEvent:function(b){var f=this.inputmask,E=f.dependencyLib,S=this,D=b&&b.detail?b.detail[0]:arguments[1];D===void 0&&(D=S.inputmask._valueGet(!0)),(0,C.applyInputValue)(S,D,new E.Event("input")),(b.detail&&b.detail[1]!==void 0||arguments[2]!==void 0)&&x.caret.call(f,S,b.detail?b.detail[1]:arguments[2])},focusEvent:function(b){var f=this.inputmask,E=f.opts,S=f&&f._valueGet();E.showMaskOnFocus&&S!==x.getBuffer.call(f).join("")&&(0,C.writeBuffer)(this,x.getBuffer.call(f),x.seekNext.call(f,x.getLastValidPosition.call(f))),E.positionCaretOnTab!==!0||f.mouseEnter!==!1||R.isComplete.call(f,x.getBuffer.call(f))&&x.getLastValidPosition.call(f)!==-1||g.clickEvent.apply(this,[b,!0]),f.undoValue=f&&f._valueGet(!0)},invalidEvent:function(b){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var b=this.inputmask,f=b.opts,E=this;b.mouseEnter=!1,f.clearMaskOnLostFocus&&(E.inputmask.shadowRoot||E.ownerDocument).activeElement!==E&&(0,C.HandleNativePlaceholder)(E,b.originalPlaceholder)},clickEvent:function(b,f){var E=this.inputmask;E.clicked++;var S=this;if((S.inputmask.shadowRoot||S.ownerDocument).activeElement===S){var D=x.determineNewCaretPosition.call(E,x.caret.call(E,S),f);D!==void 0&&x.caret.call(E,S,D)}},cutEvent:function(b){var f=this.inputmask,E=f.maskset,S=this,D=x.caret.call(f,S),A=f.isRTL?x.getBuffer.call(f).slice(D.end,D.begin):x.getBuffer.call(f).slice(D.begin,D.end),N=f.isRTL?A.reverse().join(""):A.join("");v.default.navigator&&v.default.navigator.clipboard?v.default.navigator.clipboard.writeText(N):v.default.clipboardData&&v.default.clipboardData.getData&&v.default.clipboardData.setData("Text",N),R.handleRemove.call(f,S,F.keys.Delete,D),(0,C.writeBuffer)(S,x.getBuffer.call(f),E.p,b,f.undoValue!==f._valueGet(!0))},blurEvent:function(b){var f=this.inputmask,E=f.opts,S=f.dependencyLib;f.clicked=0;var D=S(this),A=this;if(A.inputmask){(0,C.HandleNativePlaceholder)(A,f.originalPlaceholder);var N=A.inputmask._valueGet(),V=x.getBuffer.call(f).slice();N!==""&&(E.clearMaskOnLostFocus&&(x.getLastValidPosition.call(f)===-1&&N===x.getBufferTemplate.call(f).join("")?V=[]:C.clearOptionalTail.call(f,V)),R.isComplete.call(f,V)===!1&&(setTimeout((function(){D.trigger("incomplete")}),0),E.clearIncomplete&&(x.resetMaskSet.call(f,!1),V=E.clearMaskOnLostFocus?[]:x.getBufferTemplate.call(f).slice())),(0,C.writeBuffer)(A,V,void 0,b)),N=f._valueGet(!0),f.undoValue!==N&&(N!=""||f.undoValue!=x.getBufferTemplate.call(f).join("")||f.undoValue==x.getBufferTemplate.call(f).join("")&&f.maskset.validPositions.length>0)&&(f.undoValue=N,D.trigger("change"))}},mouseenterEvent:function(){var b=this.inputmask,f=b.opts.showMaskOnHover,E=this;if(b.mouseEnter=!0,(E.inputmask.shadowRoot||E.ownerDocument).activeElement!==E){var S=(b.isRTL?x.getBufferTemplate.call(b).slice().reverse():x.getBufferTemplate.call(b)).join("");f&&(0,C.HandleNativePlaceholder)(E,S)}},submitEvent:function(){var b=this.inputmask,f=b.opts;b.undoValue!==b._valueGet(!0)&&b.$el.trigger("change"),x.getLastValidPosition.call(b)===-1&&b._valueGet&&b._valueGet()===x.getBufferTemplate.call(b).join("")&&b._valueSet(""),f.clearIncomplete&&R.isComplete.call(b,x.getBuffer.call(b))===!1&&b._valueSet(""),f.removeMaskOnSubmit&&(b._valueSet(b.unmaskedvalue(),!0),setTimeout((function(){(0,C.writeBuffer)(b.el,x.getBuffer.call(b))}),0))},resetEvent:function(){var b=this.inputmask;b.refreshValue=!0,setTimeout((function(){(0,C.applyInputValue)(b.el,b._valueGet(!0))}),0)}}},9716:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.EventRuler=void 0;var u,h=l(7760),m=(u=l(2394))&&u.__esModule?u:{default:u},v=l(2839),C=l(8711);o.EventRuler={on:function(F,x,R){var M=F.inputmask.dependencyLib,k=function(_){_.originalEvent&&(_=_.originalEvent||_,arguments[0]=_);var p,w=this,c=w.inputmask,y=c?c.opts:void 0;if(c===void 0&&this.nodeName!=="FORM"){var g=M.data(w,"_inputmask_opts");M(w).off(),g&&new m.default(g).mask(w)}else{if(["submit","reset","setvalue"].includes(_.type)||this.nodeName==="FORM"||!(w.disabled||w.readOnly&&!(_.type==="keydown"&&_.ctrlKey&&_.key===v.keys.c||y.tabThrough===!1&&_.key===v.keys.Tab))){switch(_.type){case"input":if(c.skipInputEvent===!0)return c.skipInputEvent=!1,_.preventDefault();break;case"click":case"focus":return c.validationEvent?(c.validationEvent=!1,F.blur(),(0,h.HandleNativePlaceholder)(F,(c.isRTL?C.getBufferTemplate.call(c).slice().reverse():C.getBufferTemplate.call(c)).join("")),setTimeout((function(){F.focus()}),y.validationEventTimeOut),!1):(p=arguments,void setTimeout((function(){F.inputmask&&R.apply(w,p)}),0))}var b=R.apply(w,arguments);return b===!1&&(_.preventDefault(),_.stopPropagation()),b}_.preventDefault()}};["submit","reset"].includes(x)?(k=k.bind(F),F.form!==null&&M(F.form).on(x,k)):M(F).on(x,k),F.inputmask.events[x]=F.inputmask.events[x]||[],F.inputmask.events[x].push(k)},off:function(F,x){if(F.inputmask&&F.inputmask.events){var R=F.inputmask.dependencyLib,M=F.inputmask.events;for(var k in x&&((M=[])[x]=F.inputmask.events[x]),M){for(var _=M[k];_.length>0;){var p=_.pop();["submit","reset"].includes(k)?F.form!==null&&R(F.form).off(k,p):R(F).off(k,p)}delete F.inputmask.events[k]}}}}},219:function(a,o,l){var u=k(l(7184)),h=k(l(2394)),m=l(2839),v=l(8711),C=l(4713);function F(T,P){return(function(W){if(Array.isArray(W))return W})(T)||(function(W,z){var U=W==null?null:typeof Symbol<"u"&&W[Symbol.iterator]||W["@@iterator"];if(U!=null){var K,Q,ie,Y,H=[],ee=!0,X=!1;try{if(ie=(U=U.call(W)).next,z!==0)for(;!(ee=(K=ie.call(U)).done)&&(H.push(K.value),H.length!==z);ee=!0);}catch(q){X=!0,Q=q}finally{try{if(!ee&&U.return!=null&&(Y=U.return(),Object(Y)!==Y))return}finally{if(X)throw Q}}return H}})(T,P)||(function(W,z){if(W){if(typeof W=="string")return x(W,z);var U=Object.prototype.toString.call(W).slice(8,-1);if(U==="Object"&&W.constructor&&(U=W.constructor.name),U==="Map"||U==="Set")return Array.from(W);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return x(W,z)}})(T,P)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function x(T,P){(P==null||P>T.length)&&(P=T.length);for(var W=0,z=new Array(P);W<P;W++)z[W]=T[W];return z}function R(T){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},R(T)}function M(T,P){for(var W=0;W<P.length;W++){var z=P[W];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(T,(U=z.key,K=void 0,K=(function(Q,ie){if(R(Q)!=="object"||Q===null)return Q;var Y=Q[Symbol.toPrimitive];if(Y!==void 0){var H=Y.call(Q,ie);if(R(H)!=="object")return H;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ie==="string"?String:Number)(Q)})(U,"string"),R(K)==="symbol"?K:String(K)),z)}var U,K}function k(T){return T&&T.__esModule?T:{default:T}}l(1313);var _=h.default.dependencyLib,p=(function(){function T(z,U,K,Q){(function(ie,Y){if(!(ie instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,T),this.mask=z,this.format=U,this.opts=K,this.inputmask=Q,this._date=new Date(1,0,1),this.initDateObject(z,this.opts,this.inputmask)}var P,W;return P=T,(W=[{key:"date",get:function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date}},{key:"initDateObject",value:function(z,U,K){var Q;for(D(U).lastIndex=0;Q=D(U).exec(this.format);){var ie=/\d+$/.exec(Q[0]),Y=ie?Q[0][0]+"x":Q[0],H=void 0;if(z!==void 0){if(ie){var ee=D(U).lastIndex,X=$.call(K,Q.index,U,K&&K.maskset);D(U).lastIndex=ee,H=z.slice(0,z.indexOf(X.nextMatch[0]))}else{for(var q=Q[0][0],oe=Q.index;K&&(U.placeholder[C.getTest.call(K,oe).match.placeholder]||C.getTest.call(K,oe).match.placeholder)===q;)oe++;var ne=oe-Q.index;H=z.slice(0,ne||g[Y]&&g[Y][4]||Y.length)}z=z.slice(H.length)}Object.prototype.hasOwnProperty.call(g,Y)&&this.setValue(this,H,Y,g[Y][2],g[Y][1])}}},{key:"setValue",value:function(z,U,K,Q,ie){if(U!==void 0)switch(Q){case"ampm":z[Q]=U,z["raw"+Q]=U.replace(/\s/g,"_");break;case"month":if(K==="mmm"||K==="mmmm"){z[Q]=V(K==="mmm"?c.monthNames.slice(0,12).findIndex((function(H){return U.toLowerCase()===H.toLowerCase()}))+1:c.monthNames.slice(12,24).findIndex((function(H){return U.toLowerCase()===H.toLowerCase()}))+1,2),z[Q]=z[Q]==="00"?"":z[Q].toString(),z["raw"+Q]=z[Q];break}default:z[Q]=U.replace(/[^0-9]/g,"0"),z["raw"+Q]=U.replace(/\s/g,"_")}if(ie!==void 0){var Y=z[Q];(Q==="day"&&parseInt(Y)===29||Q==="month"&&parseInt(Y)===2)&&(parseInt(z.day)!==29||parseInt(z.month)!==2||z.year!==""&&z.year!==void 0||z._date.setFullYear(2012,1,29)),Q==="day"&&(y=!0,parseInt(Y)===0&&(Y=1)),Q==="month"&&(y=!0),Q==="year"&&(y=!0,Y.length<g[K][4]&&(Y=V(Y,g[K][4],!0))),(Y!==""&&!isNaN(Y)||Q==="ampm")&&ie.call(z._date,Y)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&M(P.prototype,W),Object.defineProperty(P,"prototype",{writable:!1}),T})(),w=new Date().getFullYear(),c=h.default.prototype.i18n,y=!1,g={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return V(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(T){var P=T?parseInt(T):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(T){var P=T?parseInt(T):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return V(Date.prototype.getMonth.call(this)+1,2)}],mmm:[c.monthNames.slice(0,12).join("|"),function(T){var P=c.monthNames.slice(0,12).findIndex((function(W){return T.toLowerCase()===W.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return c.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],mmmm:[c.monthNames.slice(12,24).join("|"),function(T){var P=c.monthNames.slice(12,24).findIndex((function(W){return T.toLowerCase()===W.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return c.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:["[0-9]{2}",function(T){var P=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,"".concat(P).concat(T))},"year",function(){return V(Date.prototype.getFullYear.call(this),2)},2],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return V(Date.prototype.getFullYear.call(this),4)},4],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return V(Date.prototype.getHours.call(this),2)}],hx:[function(T){return"[0-9]{".concat(T,"}")},Date.prototype.setHours,"hours",function(T){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return V(Date.prototype.getHours.call(this),2)}],Hx:[function(T){return"[0-9]{".concat(T,"}")},Date.prototype.setHours,"hours",function(T){return function(){return V(Date.prototype.getHours.call(this),T)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return V(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return V(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return V(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return V(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",f,"ampm",E,1],tt:["[ap]m",f,"ampm",E,2],T:["[AP]",f,"ampm",E,1],TT:["[AP]M",f,"ampm",E,2],Z:[".*",void 0,"Z",function(){var T=this.toString().match(/\((.+)\)/)[1];return T.includes(" ")&&(T=(T=T.replace("-"," ").toUpperCase()).split(" ").map((function(P){return F(P,1)[0]})).join("")),T}],o:[""],S:[""]},b={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function f(T){var P=this.getHours();T.toLowerCase().includes("p")?this.setHours(P+12):T.toLowerCase().includes("a")&&P>=12&&this.setHours(P-12)}function E(){var T=this.getHours();return(T=T||12)>=12?"PM":"AM"}function S(T){var P=/\d+$/.exec(T[0]);if(P&&P[0]!==void 0){var W=g[T[0][0]+"x"].slice("");return W[0]=W[0](P[0]),W[3]=W[3](P[0]),W}if(g[T[0]])return g[T[0]]}function D(T){if(!T.tokenizer){var P=[],W=[];for(var z in g)if(/\.*x$/.test(z)){var U=z[0]+"\\d+";W.indexOf(U)===-1&&W.push(U)}else P.indexOf(z[0])===-1&&P.push(z[0]);T.tokenizer="("+(W.length>0?W.join("|")+"|":"")+P.join("+|")+")+?|.",T.tokenizer=new RegExp(T.tokenizer,"g")}return T.tokenizer}function A(T,P,W){if(!y)return!0;if(T.rawday===void 0||!isFinite(T.rawday)&&new Date(T.date.getFullYear(),isFinite(T.rawmonth)?T.month:T.date.getMonth()+1,0).getDate()>=T.day||T.day=="29"&&(!isFinite(T.rawyear)||T.rawyear===void 0||T.rawyear==="")||new Date(T.date.getFullYear(),isFinite(T.rawmonth)?T.month:T.date.getMonth()+1,0).getDate()>=T.day)return P;if(T.day=="29"){var z=$.call(this,P.pos,W,this.maskset);if(z.targetMatch&&z.targetMatch[0]==="yyyy"&&P.pos-z.targetMatchIndex==2)return P.remove=P.pos+1,P}else if(T.date.getMonth()==2&&T.day=="30"&&P.c!==void 0)return T.day="03",T.date.setDate(3),T.date.setMonth(1),P.insert=[{pos:P.pos,c:"0"},{pos:P.pos+1,c:P.c}],P.caret=v.seekNext.call(this,P.pos+1),P;return!1}function N(T,P,W,z){var U,K,Q="",ie=0,Y={};for(D(W).lastIndex=0;U=D(W).exec(T);){if(P===void 0)if(K=S(U))Q+="("+K[0]+")",W.placeholder&&W.placeholder!==""?(Y[ie]=W.placeholder[U.index%W.placeholder.length],Y[W.placeholder[U.index%W.placeholder.length]]=U[0].charAt(0)):Y[ie]=U[0].charAt(0);else switch(U[0]){case"[":Q+="(";break;case"]":Q+=")?";break;default:Q+=(0,u.default)(U[0]),Y[ie]=U[0].charAt(0)}else(K=S(U))?z!==!0&&K[3]?Q+=K[3].call(P.date):K[2]?Q+=P["raw"+K[2]]:Q+=U[0]:Q+=U[0];ie++}return P===void 0&&(W.placeholder=Y),Q}function V(T,P,W){for(T=String(T),P=P||2;T.length<P;)T=W?T+"0":"0"+T;return T}function B(T,P,W){return typeof T=="string"?new p(T,P,W,this):T&&R(T)==="object"&&Object.prototype.hasOwnProperty.call(T,"date")?T:void 0}function j(T,P){return N(P.inputFormat,{date:T},P)}function $(T,P,W){var z,U,K=this,Q=W&&W.tests[T]?P.placeholder[W.tests[T][0].match.placeholder]||W.tests[T][0].match.placeholder:"",ie=0,Y=0;for(D(P).lastIndex=0;U=D(P).exec(P.inputFormat);){var H=/\d+$/.exec(U[0]);if(H)Y=parseInt(H[0]);else{for(var ee=U[0][0],X=ie;K&&(P.placeholder[C.getTest.call(K,X).match.placeholder]||C.getTest.call(K,X).match.placeholder)===ee;)X++;(Y=X-ie)===0&&(Y=U[0].length)}if(ie+=Y,U[0].indexOf(Q)!=-1||ie>=T+1){z=U,U=D(P).exec(P.inputFormat);break}}return{targetMatchIndex:ie-Y,nextMatch:U,targetMatch:z}}h.default.extendAliases({datetime:{mask:function(T){return T.numericInput=!1,g.S=c.ordinalSuffix.join("|"),T.inputFormat=b[T.inputFormat]||T.inputFormat,T.displayFormat=b[T.displayFormat]||T.displayFormat||T.inputFormat,T.outputFormat=b[T.outputFormat]||T.outputFormat||T.inputFormat,T.regex=N(T.inputFormat,void 0,T),T.min=B(T.min,T.inputFormat,T),T.max=B(T.max,T.inputFormat,T),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",preValidation:function(T,P,W,z,U,K,Q,ie){if(ie)return!0;if(isNaN(W)&&T[P]!==W){var Y=$.call(this,P,U,K);if(Y.nextMatch&&Y.nextMatch[0]===W&&Y.targetMatch[0].length>1){var H=S(Y.targetMatch)[0];if(new RegExp(H).test("0"+T[P-1]))return T[P]=T[P-1],T[P-1]="0",{fuzzy:!0,buffer:T,refreshFromBuffer:{start:P-1,end:P+1},pos:P+1}}}return!0},postValidation:function(T,P,W,z,U,K,Q,ie){var Y,H,ee=this;if(Q)return!0;if(z===!1&&(((Y=$.call(ee,P+1,U,K)).targetMatch&&Y.targetMatchIndex===P&&Y.targetMatch[0].length>1&&g[Y.targetMatch[0]]!==void 0||(Y=$.call(ee,P+2,U,K)).targetMatch&&Y.targetMatchIndex===P+1&&Y.targetMatch[0].length>1&&g[Y.targetMatch[0]]!==void 0)&&(H=S(Y.targetMatch)[0]),H!==void 0&&(K.validPositions[P+1]!==void 0&&new RegExp(H).test(W+"0")?(T[P]=W,T[P+1]="0",z={pos:P+2,caret:P}):new RegExp(H).test("0"+W)&&(T[P]="0",T[P+1]=W,z={pos:P+2})),z===!1))return z;if(z.fuzzy&&(T=z.buffer,P=z.pos),(Y=$.call(ee,P,U,K)).targetMatch&&Y.targetMatch[0]&&g[Y.targetMatch[0]]!==void 0){var X=S(Y.targetMatch);H=X[0];var q=T.slice(Y.targetMatchIndex,Y.targetMatchIndex+Y.targetMatch[0].length);if(new RegExp(H).test(q.join(""))===!1&&Y.targetMatch[0].length===2&&K.validPositions[Y.targetMatchIndex]&&K.validPositions[Y.targetMatchIndex+1]&&(K.validPositions[Y.targetMatchIndex+1].input="0"),X[2]=="year")for(var oe=C.getMaskTemplate.call(ee,!1,1,void 0,!0),ne=P+1;ne<T.length;ne++)T[ne]=oe[ne],K.validPositions.splice(P+1,1)}var me=z,be=B.call(ee,T.join(""),U.inputFormat,U);return me&&!isNaN(be.date.getTime())&&(U.prefillYear&&(me=(function(xe,je,Le){if(xe.year!==xe.rawyear){var Ne=w.toString(),se=xe.rawyear.replace(/[^0-9]/g,""),G=Ne.slice(0,se.length),Z=Ne.slice(se.length);if(se.length===2&&se===G){var re=new Date(w,xe.month-1,xe.day);xe.day==re.getDate()&&(!Le.max||Le.max.date.getTime()>=re.getTime())&&(xe.date.setFullYear(w),xe.year=Ne,je.insert=[{pos:je.pos+1,c:Z[0]},{pos:je.pos+2,c:Z[1]}])}}return je})(be,me,U)),me=(function(xe,je,Le,Ne,se){if(!je)return je;if(je&&Le.min&&!isNaN(Le.min.date.getTime())){var G;for(xe.reset(),D(Le).lastIndex=0;G=D(Le).exec(Le.inputFormat);){var Z;if((Z=S(G))&&Z[3]){for(var re=Z[1],te=xe[Z[2]],pe=Le.min[Z[2]],Me=Le.max?Le.max[Z[2]]:pe+1,ve=[],we=!1,Pe=0;Pe<pe.length;Pe++)Ne.validPositions[Pe+G.index]!==void 0||we?(ve[Pe]=te[Pe],we=we||te[Pe]>pe[Pe]):(Pe+G.index==0&&te[Pe]<pe[Pe]?(ve[Pe]=te[Pe],we=!0):ve[Pe]=pe[Pe],Z[2]==="year"&&te.length-1==Pe&&pe!=Me&&(ve=(parseInt(ve.join(""))+1).toString().split("")),Z[2]==="ampm"&&pe!=Me&&Le.min.date.getTime()>xe.date.getTime()&&(ve[Pe]=Me[Pe]));re.call(xe._date,ve.join(""))}}je=Le.min.date.getTime()<=xe.date.getTime(),xe.reInit()}return je&&Le.max&&(isNaN(Le.max.date.getTime())||(je=Le.max.date.getTime()>=xe.date.getTime())),je})(be,me=A.call(ee,be,me,U),U,K)),P!==void 0&&me&&z.pos!==P?{buffer:N(U.inputFormat,be,U).split(""),refreshFromBuffer:{start:P,end:z.pos},pos:z.caret||z.pos}:me},onKeyDown:function(T,P,W,z){T.ctrlKey&&T.key===m.keys.ArrowRight&&(this.inputmask._valueSet(j(new Date,z)),_(this).trigger("setvalue"))},onUnMask:function(T,P,W){return P&&N(W.outputFormat,B.call(this,T,W.inputFormat,W),W,!0)},casing:function(T,P,W,z){if(P.nativeDef.indexOf("[ap]")==0)return T.toLowerCase();if(P.nativeDef.indexOf("[AP]")==0)return T.toUpperCase();var U=C.getTest.call(this,[W-1]);return U.match.def.indexOf("[AP]")==0||W===0||U&&U.input===String.fromCharCode(m.keyCode.Space)||U&&U.match.def===String.fromCharCode(m.keyCode.Space)?T.toUpperCase():T.toLowerCase()},onBeforeMask:function(T,P){return Object.prototype.toString.call(T)==="[object Date]"&&(T=j(T,P)),T},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},1313:function(a,o,l){var u,h=(u=l(2394))&&u.__esModule?u:{default:u};h.default.dependencyLib.extend(!0,h.default.prototype.i18n,{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]})},3851:function(a,o,l){var u,h=(u=l(2394))&&u.__esModule?u:{default:u},m=l(8711),v=l(4713);function C(M){return(function(k){if(Array.isArray(k))return F(k)})(M)||(function(k){if(typeof Symbol<"u"&&k[Symbol.iterator]!=null||k["@@iterator"]!=null)return Array.from(k)})(M)||(function(k,_){if(k){if(typeof k=="string")return F(k,_);var p=Object.prototype.toString.call(k).slice(8,-1);if(p==="Object"&&k.constructor&&(p=k.constructor.name),p==="Map"||p==="Set")return Array.from(k);if(p==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p))return F(k,_)}})(M)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
11
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function F(M,k){(k==null||k>M.length)&&(k=M.length);for(var _=0,p=new Array(k);_<k;_++)p[_]=M[_];return p}h.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var x=/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/;function R(M,k,_,p,w){if(_-1>-1&&k.buffer[_-1]!=="."?(M=k.buffer[_-1]+M,M=_-2>-1&&k.buffer[_-2]!=="."?k.buffer[_-2]+M:"0"+M):M="00"+M,w.greedy&&parseInt(M)>255&&x.test("00"+M.charAt(2))){var c=[].concat(C(k.buffer.slice(0,_)),[".",M.charAt(2)]);if(c.join("").match(/\./g).length<4)return{refreshFromBuffer:!0,buffer:c,caret:_+2}}return x.test(M)}h.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:R},j:{validator:R},k:{validator:R},l:{validator:R}},onUnMask:function(M,k,_){return M},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(M){var k=M.separator,_=M.quantifier,p="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",w=p;if(k)for(var c=0;c<_;c++)w+="[".concat(k).concat(p,"]");return w},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(M,k){return(M=M.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(M,k,_){return M},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(M,k,_,p,w,c,y){var g=v.getMaskTemplate.call(this,!0,m.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(g.join(""))}}})},207:function(a,o,l){var u=C(l(7184)),h=C(l(2394)),m=l(2839),v=l(8711);function C(p){return p&&p.__esModule?p:{default:p}}var F=h.default.dependencyLib;function x(p,w){for(var c="",y=0;y<p.length;y++)h.default.prototype.definitions[p.charAt(y)]||w.definitions[p.charAt(y)]||w.optionalmarker[0]===p.charAt(y)||w.optionalmarker[1]===p.charAt(y)||w.quantifiermarker[0]===p.charAt(y)||w.quantifiermarker[1]===p.charAt(y)||w.groupmarker[0]===p.charAt(y)||w.groupmarker[1]===p.charAt(y)||w.alternatormarker===p.charAt(y)?c+="\\"+p.charAt(y):c+=p.charAt(y);return c}function R(p,w,c,y){if(p.length>0&&w>0&&(!c.digitsOptional||y)){var g=p.indexOf(c.radixPoint),b=!1;c.negationSymbol.back===p[p.length-1]&&(b=!0,p.length--),g===-1&&(p.push(c.radixPoint),g=p.length-1);for(var f=1;f<=w;f++)isFinite(p[g+f])||(p[g+f]="0")}return b&&p.push(c.negationSymbol.back),p}function M(p,w){var c=0;for(var y in p==="+"&&(c=v.seekNext.call(this,w.validPositions.length-1)),w.tests)if((y=parseInt(y))>=c){for(var g=0,b=w.tests[y].length;g<b;g++)if((w.validPositions[y]===void 0||p==="-")&&w.tests[y][g].match.def===p)return y+(w.validPositions[y]!==void 0&&p!=="-"?1:0)}return c}function k(p,w){for(var c=-1,y=0,g=w.validPositions.length;y<g;y++){var b=w.validPositions[y];if(b&&b.match.def===p){c=y;break}}return c}function _(p,w,c,y,g){var b=w.buffer?w.buffer.indexOf(g.radixPoint):-1,f=(b!==-1||y&&g.jitMasking)&&new RegExp(g.definitions[9].validator).test(p);return!y&&g._radixDance&&b!==-1&&f&&w.validPositions[b]==null?{insert:{pos:b===c?b+1:b,c:g.radixPoint},pos:c}:f}h.default.extendAliases({numeric:{mask:function(p){p.repeat=0,p.groupSeparator===p.radixPoint&&p.digits&&p.digits!=="0"&&(p.radixPoint==="."?p.groupSeparator=",":p.radixPoint===","?p.groupSeparator=".":p.groupSeparator=""),p.groupSeparator===" "&&(p.skipOptionalPartCharacter=void 0),p.placeholder.length>1&&(p.placeholder=p.placeholder.charAt(0)),p.positionCaretOnClick==="radixFocus"&&p.placeholder===""&&(p.positionCaretOnClick="lvp");var w="0",c=p.radixPoint;p.numericInput===!0&&p.__financeInput===void 0?(w="1",p.positionCaretOnClick=p.positionCaretOnClick==="radixFocus"?"lvp":p.positionCaretOnClick,p.digitsOptional=!1,isNaN(p.digits)&&(p.digits=2),p._radixDance=!1,c=p.radixPoint===","?"?":"!",p.radixPoint!==""&&p.definitions[c]===void 0&&(p.definitions[c]={},p.definitions[c].validator="["+p.radixPoint+"]",p.definitions[c].placeholder=p.radixPoint,p.definitions[c].static=!0,p.definitions[c].generated=!0)):(p.__financeInput=!1,p.numericInput=!0);var y,g="[+]";if(g+=x(p.prefix,p),p.groupSeparator!==""?(p.definitions[p.groupSeparator]===void 0&&(p.definitions[p.groupSeparator]={},p.definitions[p.groupSeparator].validator="["+p.groupSeparator+"]",p.definitions[p.groupSeparator].placeholder=p.groupSeparator,p.definitions[p.groupSeparator].static=!0,p.definitions[p.groupSeparator].generated=!0),g+=p._mask(p)):g+="9{+}",p.digits!==void 0&&p.digits!==0){var b=p.digits.toString().split(",");isFinite(b[0])&&b[1]&&isFinite(b[1])?g+=c+w+"{"+p.digits+"}":(isNaN(p.digits)||parseInt(p.digits)>0)&&(p.digitsOptional||p.jitMasking?(y=g+c+w+"{0,"+p.digits+"}",p.keepStatic=!0):g+=c+w+"{"+p.digits+"}")}else p.inputmode="numeric";return g+=x(p.suffix,p),g+="[-]",y&&(g=[y+x(p.suffix,p)+"[-]",g]),p.greedy=!1,(function(f){f.parseMinMaxOptions===void 0&&(f.min!==null&&(f.min=f.min.toString().replace(new RegExp((0,u.default)(f.groupSeparator),"g"),""),f.radixPoint===","&&(f.min=f.min.replace(f.radixPoint,".")),f.min=isFinite(f.min)?parseFloat(f.min):NaN,isNaN(f.min)&&(f.min=Number.MIN_VALUE)),f.max!==null&&(f.max=f.max.toString().replace(new RegExp((0,u.default)(f.groupSeparator),"g"),""),f.radixPoint===","&&(f.max=f.max.replace(f.radixPoint,".")),f.max=isFinite(f.max)?parseFloat(f.max):NaN,isNaN(f.max)&&(f.max=Number.MAX_VALUE)),f.parseMinMaxOptions="done")})(p),p.radixPoint!==""&&p.substituteRadixPoint&&(p.substitutes[p.radixPoint=="."?",":"."]=p.radixPoint),g},_mask:function(p){return"("+p.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:_},1:{validator:_,definitionSymbol:"9"},9:{validator:"[0-90-9٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(p,w,c,y,g){return g.allowMinus&&(p==="-"||p===g.negationSymbol.front)}},"-":{validator:function(p,w,c,y,g){return g.allowMinus&&p===g.negationSymbol.back}}},preValidation:function(p,w,c,y,g,b,f,E){var S=this;if(g.__financeInput!==!1&&c===g.radixPoint)return!1;var D=p.indexOf(g.radixPoint),A=w;if(w=(function($,T,P,W,z){return z._radixDance&&z.numericInput&&T!==z.negationSymbol.back&&$<=P&&(P>0||T==z.radixPoint)&&(W.validPositions[$-1]===void 0||W.validPositions[$-1].input!==z.negationSymbol.back)&&($-=1),$})(w,c,D,b,g),c==="-"||c===g.negationSymbol.front){if(g.allowMinus!==!0)return!1;var N=!1,V=k("+",b),B=k("-",b);return V!==-1&&(N=[V],B!==-1&&N.push(B)),N!==!1?{remove:N,caret:A-g.negationSymbol.back.length}:{insert:[{pos:M.call(S,"+",b),c:g.negationSymbol.front,fromIsValid:!0},{pos:M.call(S,"-",b),c:g.negationSymbol.back,fromIsValid:void 0}],caret:A+g.negationSymbol.back.length}}if(c===g.groupSeparator)return{caret:A};if(E)return!0;if(D!==-1&&g._radixDance===!0&&y===!1&&c===g.radixPoint&&g.digits!==void 0&&(isNaN(g.digits)||parseInt(g.digits)>0)&&D!==w){var j=M.call(S,g.radixPoint,b);return b.validPositions[j]&&(b.validPositions[j].generatedInput=b.validPositions[j].generated||!1),{caret:g._radixDance&&w===D-1?D+1:D}}if(g.__financeInput===!1){if(y){if(g.digitsOptional)return{rewritePosition:f.end};if(!g.digitsOptional){if(f.begin>D&&f.end<=D)return c===g.radixPoint?{insert:{pos:D+1,c:"0",fromIsValid:!0},rewritePosition:D}:{rewritePosition:D+1};if(f.begin<D)return{rewritePosition:f.begin-1}}}else if(!g.showMaskOnHover&&!g.showMaskOnFocus&&!g.digitsOptional&&g.digits>0&&this.__valueGet.call(this.el)==="")return{rewritePosition:D}}return{rewritePosition:w}},postValidation:function(p,w,c,y,g,b,f){if(y===!1)return y;if(f)return!0;if(g.min!==null||g.max!==null){var E=g.onUnMask(p.slice().reverse().join(""),void 0,F.extend({},g,{unmaskAsNumber:!0}));if(g.min!==null&&E<g.min&&(E.toString().length>g.min.toString().length||E<0))return!1;if(g.max!==null&&E>g.max)return!!g.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:R(g.max.toString().replace(".",g.radixPoint).split(""),g.digits,g).reverse()}}return y},onUnMask:function(p,w,c){if(w===""&&c.nullable===!0)return w;var y=p.replace(c.prefix,"");return y=(y=y.replace(c.suffix,"")).replace(new RegExp((0,u.default)(c.groupSeparator),"g"),""),c.placeholder.charAt(0)!==""&&(y=y.replace(new RegExp(c.placeholder.charAt(0),"g"),"0")),c.unmaskAsNumber?(c.radixPoint!==""&&y.indexOf(c.radixPoint)!==-1&&(y=y.replace(u.default.call(this,c.radixPoint),".")),y=(y=y.replace(new RegExp("^"+(0,u.default)(c.negationSymbol.front)),"-")).replace(new RegExp((0,u.default)(c.negationSymbol.back)+"$"),""),Number(y)):y},isComplete:function(p,w){var c=(w.numericInput?p.slice().reverse():p).join("");return c=(c=(c=(c=(c=c.replace(new RegExp("^"+(0,u.default)(w.negationSymbol.front)),"-")).replace(new RegExp((0,u.default)(w.negationSymbol.back)+"$"),"")).replace(w.prefix,"")).replace(w.suffix,"")).replace(new RegExp((0,u.default)(w.groupSeparator)+"([0-9]{3})","g"),"$1"),w.radixPoint===","&&(c=c.replace((0,u.default)(w.radixPoint),".")),isFinite(c)},onBeforeMask:function(p,w){var c;p=(c=p)!==null&&c!==void 0?c:"";var y=w.radixPoint||",";isFinite(w.digits)&&(w.digits=parseInt(w.digits)),typeof p!="number"&&w.inputType!=="number"||y===""||(p=p.toString().replace(".",y));var g=p.charAt(0)==="-"||p.charAt(0)===w.negationSymbol.front,b=p.split(y),f=b[0].replace(/[^\-0-9]/g,""),E=b.length>1?b[1].replace(/[^0-9]/g,""):"",S=b.length>1;p=f+(E!==""?y+E:E);var D=0;if(y!==""&&(D=w.digitsOptional?w.digits<E.length?w.digits:E.length:w.digits,E!==""||!w.digitsOptional)){var A=Math.pow(10,D||1);p=p.replace((0,u.default)(y),"."),isNaN(parseFloat(p))||(p=(w.roundingFN(parseFloat(p)*A)/A).toFixed(D)),p=p.toString().replace(".",y)}if(w.digits===0&&p.indexOf(y)!==-1&&(p=p.substring(0,p.indexOf(y))),w.min!==null||w.max!==null){var N=p.toString().replace(y,".");w.min!==null&&N<w.min?p=w.min.toString().replace(".",y):w.max!==null&&N>w.max&&(p=w.max.toString().replace(".",y))}return g&&p.charAt(0)!=="-"&&(p="-"+p),R(p.toString().split(""),D,w,S).join("")},onBeforeWrite:function(p,w,c,y){function g(B,j){if(y.__financeInput!==!1||j){var $=B.indexOf(y.radixPoint);$!==-1&&B.splice($,1)}if(y.groupSeparator!=="")for(;($=B.indexOf(y.groupSeparator))!==-1;)B.splice($,1);return B}var b,f;if(y.stripLeadingZeroes&&(f=(function(B,j){var $=new RegExp("(^"+(j.negationSymbol.front!==""?(0,u.default)(j.negationSymbol.front)+"?":"")+(0,u.default)(j.prefix)+")(.*)("+(0,u.default)(j.suffix)+(j.negationSymbol.back!=""?(0,u.default)(j.negationSymbol.back)+"?":"")+"$)").exec(B.slice().reverse().join("")),T=$?$[2]:"",P=!1;return T&&(T=T.split(j.radixPoint.charAt(0))[0],P=new RegExp("^[0"+j.groupSeparator+"]*").exec(T)),!(!P||!(P[0].length>1||P[0].length>0&&P[0].length<T.length))&&P})(w,y)))for(var E=w.join("").lastIndexOf(f[0].split("").reverse().join(""))-(f[0]==f.input?0:1),S=f[0]==f.input?1:0,D=f[0].length-S;D>0;D--)this.maskset.validPositions.splice(E+D,1),delete w[E+D];if(p)switch(p.type){case"blur":case"checkval":if(y.min!==null){var A=y.onUnMask(w.slice().reverse().join(""),void 0,F.extend({},y,{unmaskAsNumber:!0}));if(y.min!==null&&A<y.min)return{refreshFromBuffer:!0,buffer:R(y.min.toString().replace(".",y.radixPoint).split(""),y.digits,y).reverse()}}if(w[w.length-1]===y.negationSymbol.front){var N=new RegExp("(^"+(y.negationSymbol.front!=""?(0,u.default)(y.negationSymbol.front)+"?":"")+(0,u.default)(y.prefix)+")(.*)("+(0,u.default)(y.suffix)+(y.negationSymbol.back!=""?(0,u.default)(y.negationSymbol.back)+"?":"")+"$)").exec(g(w.slice(),!0).reverse().join(""));(N?N[2]:"")==0&&(b={refreshFromBuffer:!0,buffer:[0]})}else y.radixPoint!==""&&w.indexOf(y.radixPoint)===y.suffix.length&&(b&&b.buffer?b.buffer.splice(0,1+y.suffix.length):(w.splice(0,1+y.suffix.length),b={refreshFromBuffer:!0,buffer:g(w)}));if(y.enforceDigitsOnBlur){var V=(b=b||{})&&b.buffer||w.slice().reverse();b.refreshFromBuffer=!0,b.buffer=R(V,y.digits,y,!0).reverse()}}return b},onKeyDown:function(p,w,c,y){var g,b=F(this);if(p.location!=3){var f,E=p.key;if((f=y.shortcuts&&y.shortcuts[E])&&f.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(f)),b.trigger("setvalue"),!1}if(p.ctrlKey)switch(p.key){case m.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(y.step)),b.trigger("setvalue"),!1;case m.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(y.step)),b.trigger("setvalue"),!1}if(!p.shiftKey&&(p.key===m.keys.Delete||p.key===m.keys.Backspace||p.key===m.keys.BACKSPACE_SAFARI)&&c.begin!==w.length){if(w[p.key===m.keys.Delete?c.begin-1:c.end]===y.negationSymbol.front)return g=w.slice().reverse(),y.negationSymbol.front!==""&&g.shift(),y.negationSymbol.back!==""&&g.pop(),b.trigger("setvalue",[g.join(""),c.begin]),!1;if(y._radixDance===!0){var S,D=w.indexOf(y.radixPoint);if(y.digitsOptional){if(D===0)return(g=w.slice().reverse()).pop(),b.trigger("setvalue",[g.join(""),c.begin>=g.length?g.length:c.begin]),!1}else if(D!==-1&&(c.begin<D||c.end<D||p.key===m.keys.Delete&&(c.begin===D||c.begin-1===D)))return c.begin===c.end&&(p.key===m.keys.Backspace||p.key===m.keys.BACKSPACE_SAFARI?c.begin++:p.key===m.keys.Delete&&c.begin-1===D&&(S=F.extend({},c),c.begin--,c.end--)),(g=w.slice().reverse()).splice(g.length-c.begin,c.begin-c.end+1),g=R(g,y.digits,y).join(""),S&&(c=S),b.trigger("setvalue",[g,c.begin>=g.length?D+1:c.begin]),!1}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(p){return"("+p.groupSeparator+"99){*|1}("+p.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var l=!(typeof window>"u"||!window.document||!window.document.createElement);o.default=l?window:{}},7760:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.HandleNativePlaceholder=function(_,p){var w=_?_.inputmask:this;if(u.ie){if(_.inputmask._valueGet()!==p&&(_.placeholder!==p||_.placeholder==="")){var c=v.getBuffer.call(w).slice(),y=_.inputmask._valueGet();if(y!==p){var g=v.getLastValidPosition.call(w);g===-1&&y===v.getBufferTemplate.call(w).join("")?c=[]:g!==-1&&R.call(w,c),k(_,c)}}}else _.placeholder!==p&&(_.placeholder=p,_.placeholder===""&&_.removeAttribute("placeholder"))},o.applyInputValue=x,o.checkVal=M,o.clearOptionalTail=R,o.unmaskedvalue=function(_){var p=_?_.inputmask:this,w=p.opts,c=p.maskset;if(_){if(_.inputmask===void 0)return _.value;_.inputmask&&_.inputmask.refreshValue&&x(_,_.inputmask._valueGet(!0))}for(var y=[],g=c.validPositions,b=0,f=g.length;b<f;b++)g[b]&&g[b].match&&(g[b].match.static!=1||Array.isArray(c.metadata)&&g[b].generatedInput!==!0)&&y.push(g[b].input);var E=y.length===0?"":(p.isRTL?y.reverse():y).join("");if(typeof w.onUnMask=="function"){var S=(p.isRTL?v.getBuffer.call(p).slice().reverse():v.getBuffer.call(p)).join("");E=w.onUnMask.call(p,S,E,w)}return E},o.writeBuffer=k;var u=l(9845),h=l(6030),m=l(2839),v=l(8711),C=l(7215),F=l(4713);function x(_,p,w){var c=_?_.inputmask:this,y=c.opts;_.inputmask.refreshValue=!1,typeof y.onBeforeMask=="function"&&(p=y.onBeforeMask.call(c,p,y)||p),M(_,!0,!1,p=(p||"").toString().split(""),w),c.undoValue=c._valueGet(!0),(y.clearMaskOnLostFocus||y.clearIncomplete)&&_.inputmask._valueGet()===v.getBufferTemplate.call(c).join("")&&v.getLastValidPosition.call(c)===-1&&_.inputmask._valueSet("")}function R(_){_.length=0;for(var p,w=F.getMaskTemplate.call(this,!0,0,!0,void 0,!0);(p=w.shift())!==void 0;)_.push(p);return _}function M(_,p,w,c,y){var g,b=_?_.inputmask:this,f=b.maskset,E=b.opts,S=b.dependencyLib,D=c.slice(),A="",N=-1,V=E.skipOptionalPartCharacter;E.skipOptionalPartCharacter="",v.resetMaskSet.call(b,!1),b.clicked=0,N=E.radixPoint?v.determineNewCaretPosition.call(b,{begin:0,end:0},!1,E.__financeInput===!1?"radixFocus":void 0).begin:0,f.p=N,b.caretPos={begin:N};var B=[],j=b.caretPos;if(D.forEach((function(U,K){if(U!==void 0){var Q=new S.Event("_checkval");Q.key=U,A+=U;var ie=v.getLastValidPosition.call(b,void 0,!0);(function(Y,H){for(var ee=F.getMaskTemplate.call(b,!0,0).slice(Y,v.seekNext.call(b,Y,!1,!1)).join("").replace(/'/g,""),X=ee.indexOf(H);X>0&&ee[X-1]===" ";)X--;var q=X===0&&!v.isMask.call(b,Y)&&(F.getTest.call(b,Y).match.nativeDef===H.charAt(0)||F.getTest.call(b,Y).match.static===!0&&F.getTest.call(b,Y).match.nativeDef==="'"+H.charAt(0)||F.getTest.call(b,Y).match.nativeDef===" "&&(F.getTest.call(b,Y+1).match.nativeDef===H.charAt(0)||F.getTest.call(b,Y+1).match.static===!0&&F.getTest.call(b,Y+1).match.nativeDef==="'"+H.charAt(0)));if(!q&&X>0&&!v.isMask.call(b,Y,!1,!0)){var oe=v.seekNext.call(b,Y);b.caretPos.begin<oe&&(b.caretPos={begin:oe})}return q})(N,A)?g=h.EventHandlers.keypressEvent.call(b,Q,!0,!1,w,ie+1):(g=h.EventHandlers.keypressEvent.call(b,Q,!0,!1,w,b.caretPos.begin))&&(N=b.caretPos.begin+1,A=""),g?(g.pos!==void 0&&f.validPositions[g.pos]&&f.validPositions[g.pos].match.static===!0&&f.validPositions[g.pos].alternation===void 0&&(B.push(g.pos),b.isRTL||(g.forwardPosition=g.pos+1)),k.call(b,void 0,v.getBuffer.call(b),g.forwardPosition,Q,!1),b.caretPos={begin:g.forwardPosition,end:g.forwardPosition},j=b.caretPos):f.validPositions[K]===void 0&&D[K]===F.getPlaceholder.call(b,K)&&v.isMask.call(b,K,!0)?b.caretPos.begin++:b.caretPos=j}})),B.length>0){var $,T,P=v.seekNext.call(b,-1,void 0,!1);if(!C.isComplete.call(b,v.getBuffer.call(b))&&B.length<=P||C.isComplete.call(b,v.getBuffer.call(b))&&B.length>0&&B.length!==P&&B[0]===0){for(var W=P;($=B.shift())!==void 0;)if($<W){var z=new S.Event("_checkval");if((T=f.validPositions[$]).generatedInput=!0,z.key=T.input,(g=h.EventHandlers.keypressEvent.call(b,z,!0,!1,w,W))&&g.pos!==void 0&&g.pos!==$&&f.validPositions[g.pos]&&f.validPositions[g.pos].match.static===!0)B.push(g.pos);else if(!g)break;W++}}}p&&k.call(b,_,v.getBuffer.call(b),g?g.forwardPosition:b.caretPos.begin,y||new S.Event("checkval"),y&&(y.type==="input"&&b.undoValue!==v.getBuffer.call(b).join("")||y.type==="paste")),E.skipOptionalPartCharacter=V}function k(_,p,w,c,y){var g=_?_.inputmask:this,b=g.opts,f=g.dependencyLib;if(c&&typeof b.onBeforeWrite=="function"){var E=b.onBeforeWrite.call(g,c,p,w,b);if(E){if(E.refreshFromBuffer){var S=E.refreshFromBuffer;C.refreshFromBuffer.call(g,S===!0?S:S.start,S.end,E.buffer||p),p=v.getBuffer.call(g,!0)}w!==void 0&&(w=E.caret!==void 0?E.caret:w)}}if(_!==void 0&&(_.inputmask._valueSet(p.join("")),w===void 0||c!==void 0&&c.type==="blur"||v.caret.call(g,_,w,void 0,void 0,c!==void 0&&c.type==="keydown"&&(c.key===m.keys.Delete||c.key===m.keys.Backspace)),_.inputmask.writeBufferHook===void 0||_.inputmask.writeBufferHook(w),y===!0)){var D=f(_),A=_.inputmask._valueGet();_.inputmask.skipInputEvent=!0,D.trigger("input"),setTimeout((function(){A===v.getBufferTemplate.call(g).join("")?D.trigger("cleared"):C.isComplete.call(g,p)===!0&&D.trigger("complete")}),0)}}},2394:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=w(l(3976)),h=w(l(7392)),m=w(l(4963)),v=l(9716),C=w(l(9380)),F=l(7760),x=l(157),R=l(2391),M=l(8711),k=l(7215),_=l(4713);function p(f){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(f)}function w(f){return f&&f.__esModule?f:{default:f}}var c=C.default.document,y="_inputmask_opts";function g(f,E,S){if(!(this instanceof g))return new g(f,E,S);this.dependencyLib=m.default,this.el=void 0,this.events={},this.maskset=void 0,S!==!0&&(Object.prototype.toString.call(f)==="[object Object]"?E=f:(E=E||{},f&&(E.alias=f)),this.opts=m.default.extend(!0,{},this.defaults,E),this.noMasksCache=E&&E.definitions!==void 0,this.userOptions=E||{},b(this.opts.alias,E,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}function b(f,E,S){var D=g.prototype.aliases[f];return D?(D.alias&&b(D.alias,void 0,S),m.default.extend(!0,S,D),m.default.extend(!0,S,E),!0):(S.mask===null&&(S.mask=f),!1)}g.prototype={dataAttribute:"data-inputmask",defaults:u.default,definitions:h.default,aliases:{},masksCache:{},i18n:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(f){var E=this;return typeof f=="string"&&(f=c.getElementById(f)||c.querySelectorAll(f)),(f=f.nodeName?[f]:Array.isArray(f)?f:[].slice.call(f)).forEach((function(S,D){var A=m.default.extend(!0,{},E.opts);if((function(V,B,j,$){function T(Q,ie){var Y=$===""?Q:$+"-"+Q;(ie=ie!==void 0?ie:V.getAttribute(Y))!==null&&(typeof ie=="string"&&(Q.indexOf("on")===0?ie=C.default[ie]:ie==="false"?ie=!1:ie==="true"&&(ie=!0)),j[Q]=ie)}if(B.importDataAttributes===!0){var P,W,z,U,K=V.getAttribute($);if(K&&K!==""&&(K=K.replace(/'/g,'"'),W=JSON.parse("{"+K+"}")),W){for(U in z=void 0,W)if(U.toLowerCase()==="alias"){z=W[U];break}}for(P in T("alias",z),j.alias&&b(j.alias,j,B),B){if(W){for(U in z=void 0,W)if(U.toLowerCase()===P.toLowerCase()){z=W[U];break}}T(P,z)}}return m.default.extend(!0,B,j),(V.dir==="rtl"||B.rightAlign)&&(V.style.textAlign="right"),(V.dir==="rtl"||B.numericInput)&&(V.dir="ltr",V.removeAttribute("dir"),B.isRTL=!0),Object.keys(j).length})(S,A,m.default.extend(!0,{},E.userOptions),E.dataAttribute)){var N=(0,R.generateMaskSet)(A,E.noMasksCache);N!==void 0&&(S.inputmask!==void 0&&(S.inputmask.opts.autoUnmask=!0,S.inputmask.remove()),S.inputmask=new g(void 0,void 0,!0),S.inputmask.opts=A,S.inputmask.noMasksCache=E.noMasksCache,S.inputmask.userOptions=m.default.extend(!0,{},E.userOptions),S.inputmask.el=S,S.inputmask.$el=(0,m.default)(S),S.inputmask.maskset=N,m.default.data(S,y,E.userOptions),x.mask.call(S.inputmask))}})),f&&f[0]&&f[0].inputmask||this},option:function(f,E){return typeof f=="string"?this.opts[f]:p(f)==="object"?(m.default.extend(this.userOptions,f),this.el&&E!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(f){if(this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),this.el===void 0||f!==void 0){var E=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,f,this.opts)||f).split("");F.checkVal.call(this,void 0,!1,!1,E),typeof this.opts.onBeforeWrite=="function"&&this.opts.onBeforeWrite.call(this,void 0,M.getBuffer.call(this),0,this.opts)}return F.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){m.default.data(this.el,y,null);var f=this.opts.autoUnmask?(0,F.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);f!==M.getBufferTemplate.call(this).join("")?this._valueSet(f,this.opts.autoUnmask):this._valueSet(""),v.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):c.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?M.getBufferTemplate.call(this).reverse():M.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),k.isComplete.call(this,M.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var f=_.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(E){return E.mask!==f||(f=E,!1)})),f}return this.maskset.metadata},isValid:function(f){if(this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache),f){var E=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,f,this.opts)||f).split("");F.checkVal.call(this,void 0,!0,!1,E)}else f=this.isRTL?M.getBuffer.call(this).slice().reverse().join(""):M.getBuffer.call(this).join("");for(var S=M.getBuffer.call(this),D=M.determineLastRequiredPosition.call(this),A=S.length-1;A>D&&!M.isMask.call(this,A);A--);return S.splice(D,A+1-D),k.isComplete.call(this,S)&&f===(this.isRTL?M.getBuffer.call(this).slice().reverse().join(""):M.getBuffer.call(this).join(""))},format:function(f,E){this.maskset=this.maskset||(0,R.generateMaskSet)(this.opts,this.noMasksCache);var S=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,f,this.opts)||f).split("");F.checkVal.call(this,void 0,!0,!1,S);var D=this.isRTL?M.getBuffer.call(this).slice().reverse().join(""):M.getBuffer.call(this).join("");return E?{value:D,metadata:this.getmetadata()}:D},setValue:function(f){this.el&&(0,m.default)(this.el).trigger("setvalue",[f])},analyseMask:R.analyseMask},g.extendDefaults=function(f){m.default.extend(!0,g.prototype.defaults,f)},g.extendDefinitions=function(f){m.default.extend(!0,g.prototype.definitions,f)},g.extendAliases=function(f){m.default.extend(!0,g.prototype.aliases,f)},g.format=function(f,E,S){return g(E).format(f,S)},g.unmask=function(f,E){return g(E).unmaskedvalue(f)},g.isValid=function(f,E){return g(E).isValid(f)},g.remove=function(f){typeof f=="string"&&(f=c.getElementById(f)||c.querySelectorAll(f)),(f=f.nodeName?[f]:f).forEach((function(E){E.inputmask&&E.inputmask.remove()}))},g.setValue=function(f,E){typeof f=="string"&&(f=c.getElementById(f)||c.querySelectorAll(f)),(f=f.nodeName?[f]:f).forEach((function(S){S.inputmask?S.inputmask.setValue(E):(0,m.default)(S).trigger("setvalue",[E])}))},g.dependencyLib=m.default,C.default.Inputmask=g,o.default=g},5296:function(a,o,l){function u(c){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},u(c)}var h=_(l(9380)),m=_(l(2394));function v(c,y){for(var g=0;g<y.length;g++){var b=y[g];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(c,(f=b.key,E=void 0,E=(function(S,D){if(u(S)!=="object"||S===null)return S;var A=S[Symbol.toPrimitive];if(A!==void 0){var N=A.call(S,D);if(u(N)!=="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(S)})(f,"string"),u(E)==="symbol"?E:String(E)),b)}var f,E}function C(c){var y=R();return function(){var g,b=k(c);if(y){var f=k(this).constructor;g=Reflect.construct(b,arguments,f)}else g=b.apply(this,arguments);return(function(E,S){if(S&&(u(S)==="object"||typeof S=="function"))return S;if(S!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(D){if(D===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return D})(E)})(this,g)}}function F(c){var y=typeof Map=="function"?new Map:void 0;return F=function(g){if(g===null||!(function(f){try{return Function.toString.call(f).indexOf("[native code]")!==-1}catch{return typeof f=="function"}})(g))return g;if(typeof g!="function")throw new TypeError("Super expression must either be null or a function");if(y!==void 0){if(y.has(g))return y.get(g);y.set(g,b)}function b(){return x(g,arguments,k(this).constructor)}return b.prototype=Object.create(g.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}),M(b,g)},F(c)}function x(c,y,g){return x=R()?Reflect.construct.bind():function(b,f,E){var S=[null];S.push.apply(S,f);var D=new(Function.bind.apply(b,S));return E&&M(D,E.prototype),D},x.apply(null,arguments)}function R(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function M(c,y){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,b){return g.__proto__=b,g},M(c,y)}function k(c){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y)},k(c)}function _(c){return c&&c.__esModule?c:{default:c}}var p=h.default.document;if(p&&p.head&&p.head.attachShadow&&h.default.customElements&&h.default.customElements.get("input-mask")===void 0){var w=(function(c){(function(E,S){if(typeof S!="function"&&S!==null)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(S&&S.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),Object.defineProperty(E,"prototype",{writable:!1}),S&&M(E,S)})(f,c);var y,g,b=C(f);function f(){var E;(function(V,B){if(!(V instanceof B))throw new TypeError("Cannot call a class as a function")})(this,f);var S=(E=b.call(this)).getAttributeNames(),D=E.attachShadow({mode:"closed"});for(var A in E.input=p.createElement("input"),E.input.type="text",D.appendChild(E.input),S)Object.prototype.hasOwnProperty.call(S,A)&&E.input.setAttribute(S[A],E.getAttribute(S[A]));var N=new m.default;return N.dataAttribute="",N.mask(E.input),E.input.inputmask.shadowRoot=D,E}return y=f,(g=[{key:"attributeChangedCallback",value:function(E,S,D){this.input.setAttribute(E,D)}},{key:"value",get:function(){return this.input.value},set:function(E){this.input.value=E}}])&&v(y.prototype,g),Object.defineProperty(y,"prototype",{writable:!1}),f})(F(HTMLElement));h.default.customElements.define("input-mask",w)}},2839:function(a,o){function l(x){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(R){return typeof R}:function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},l(x)}function u(x,R){return(function(M){if(Array.isArray(M))return M})(x)||(function(M,k){var _=M==null?null:typeof Symbol<"u"&&M[Symbol.iterator]||M["@@iterator"];if(_!=null){var p,w,c,y,g=[],b=!0,f=!1;try{if(c=(_=_.call(M)).next,k!==0)for(;!(b=(p=c.call(_)).done)&&(g.push(p.value),g.length!==k);b=!0);}catch(E){f=!0,w=E}finally{try{if(!b&&_.return!=null&&(y=_.return(),Object(y)!==y))return}finally{if(f)throw w}}return g}})(x,R)||(function(M,k){if(M){if(typeof M=="string")return h(M,k);var _=Object.prototype.toString.call(M).slice(8,-1);if(_==="Object"&&M.constructor&&(_=M.constructor.name),_==="Map"||_==="Set")return Array.from(M);if(_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_))return h(M,k)}})(x,R)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
12
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function
|
|
13
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(V.split("["),2),$=j[0],T=j[1];T=T.replace("]",""),c=c.replace(new RegExp("".concat((0,h.default)($),"\\[").concat((0,h.default)(T),"\\]")),$.charAt(0)===T.charAt(0)?"(".concat($,"|").concat($).concat(T,")"):"".concat($,"[").concat(T,"]"))}))}return c}function p(c,y,g){var b,f,E=!1;return c!==null&&c!==""||((E=g.regex!==null)?c=(c=g.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(E=!0,c=".*")),c.length===1&&g.greedy===!1&&g.repeat!==0&&(g.placeholder=""),c=_(c,g),f=E?"regex_"+g.regex:g.numericInput?c.split("").reverse().join(""):c,g.keepStatic!==null&&(f="ks_"+g.keepStatic+f),C(g.placeholder)==="object"&&(f="ph_"+JSON.stringify(g.placeholder)+f),m.default.prototype.masksCache[f]===void 0||M===!0?(b={mask:c,maskToken:m.default.prototype.analyseMask(c,E,g),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:y,maskLength:void 0,jitOffset:{}},M!==!0&&(m.default.prototype.masksCache[f]=b,b=u.default.extend(!0,{},m.default.prototype.masksCache[f]))):b=u.default.extend(!0,{},m.default.prototype.masksCache[f]),b}if(typeof R.mask=="function"&&(R.mask=R.mask(R)),Array.isArray(R.mask)){if(R.mask.length>1){R.keepStatic===null&&(R.keepStatic=!0);var w=R.groupmarker[0];return(R.isRTL?R.mask.reverse():R.mask).forEach((function(c){w.length>1&&(w+=R.alternatormarker),c.mask!==void 0&&typeof c.mask!="function"?w+=c.mask:w+=c})),p(w+=R.groupmarker[1],R.mask,R)}R.mask=R.mask.pop()}return k=R.mask&&R.mask.mask!==void 0&&typeof R.mask.mask!="function"?p(R.mask.mask,R.mask,R):p(R.mask,R.mask,R),R.keepStatic===null&&(R.keepStatic=!1),k};var u=x(l(4963)),h=x(l(7184)),m=x(l(2394)),v=x(l(9695));function C(R){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(M){return typeof M}:function(M){return M&&typeof Symbol=="function"&&M.constructor===Symbol&&M!==Symbol.prototype?"symbol":typeof M},C(R)}function F(R,M){(M==null||M>R.length)&&(M=R.length);for(var k=0,_=new Array(M);k<M;k++)_[k]=R[k];return _}function x(R){return R&&R.__esModule?R:{default:R}}},157:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.mask=function(){var x=this,R=this.opts,M=this.el,k=this.dependencyLib;m.EventRuler.off(M);var _=(function(c,y){var g=c.getAttribute("type"),b=c.tagName.toLowerCase()==="input"&&y.supportsInputType.includes(g)||c.isContentEditable||c.tagName.toLowerCase()==="textarea";if(!b)if(c.tagName.toLowerCase()==="input"){var f=document.createElement("input");f.setAttribute("type",g),b=f.type==="text",f=null}else b="partial";return b!==!1?(function(E){var S,D;function A(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():C.getLastValidPosition.call(x)!==-1||y.nullable!==!0?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&y.clearMaskOnLostFocus?(x.isRTL?v.clearOptionalTail.call(x,C.getBuffer.call(x).slice()).reverse():v.clearOptionalTail.call(x,C.getBuffer.call(x).slice())).join(""):S.call(this):"":S.call(this)}function N(B){D.call(this,B),this.inputmask&&(0,v.applyInputValue)(this,B)}if(!E.inputmask.__valueGet){if(y.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){var V=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(E),"value"):void 0;V&&V.get&&V.set?(S=V.get,D=V.set,Object.defineProperty(E,"value",{get:A,set:N,configurable:!0})):E.tagName.toLowerCase()!=="input"&&(S=function(){return this.textContent},D=function(B){this.textContent=B},Object.defineProperty(E,"value",{get:A,set:N,configurable:!0}))}else document.__lookupGetter__&&E.__lookupGetter__("value")&&(S=E.__lookupGetter__("value"),D=E.__lookupSetter__("value"),E.__defineGetter__("value",A),E.__defineSetter__("value",N));E.inputmask.__valueGet=S,E.inputmask.__valueSet=D}E.inputmask._valueGet=function(B){return x.isRTL&&B!==!0?S.call(this.el).split("").reverse().join(""):S.call(this.el)},E.inputmask._valueSet=function(B,j){D.call(this.el,B==null?"":j!==!0&&x.isRTL?B.split("").reverse().join(""):B)},S===void 0&&(S=function(){return this.value},D=function(B){this.value=B},(function(B){if(k.valHooks&&(k.valHooks[B]===void 0||k.valHooks[B].inputmaskpatch!==!0)){var j=k.valHooks[B]&&k.valHooks[B].get?k.valHooks[B].get:function(T){return T.value},$=k.valHooks[B]&&k.valHooks[B].set?k.valHooks[B].set:function(T,P){return T.value=P,T};k.valHooks[B]={get:function(T){if(T.inputmask){if(T.inputmask.opts.autoUnmask)return T.inputmask.unmaskedvalue();var P=j(T);return C.getLastValidPosition.call(x,void 0,void 0,T.inputmask.maskset.validPositions)!==-1||y.nullable!==!0?P:""}return j(T)},set:function(T,P){var W=$(T,P);return T.inputmask&&(0,v.applyInputValue)(T,P),W},inputmaskpatch:!0}}})(E.type),(function(B){m.EventRuler.on(B,"mouseenter",(function(){var j=this,$=j.inputmask._valueGet(!0);$!=(j.inputmask.isRTL?C.getBuffer.call(j.inputmask).slice().reverse():C.getBuffer.call(j.inputmask)).join("")&&(0,v.applyInputValue)(j,$)}))})(E))}})(c):c.inputmask=void 0,b})(M,R);if(_!==!1){x.originalPlaceholder=M.placeholder,x.maxLength=M!==void 0?M.maxLength:void 0,x.maxLength===-1&&(x.maxLength=void 0),"inputMode"in M&&M.getAttribute("inputmode")===null&&(M.inputMode=R.inputmode,M.setAttribute("inputmode",R.inputmode)),_===!0&&(R.showMaskOnFocus=R.showMaskOnFocus&&["cc-number","cc-exp"].indexOf(M.autocomplete)===-1,u.iphone&&(R.insertModeVisual=!1,M.setAttribute("autocorrect","off")),m.EventRuler.on(M,"submit",h.EventHandlers.submitEvent),m.EventRuler.on(M,"reset",h.EventHandlers.resetEvent),m.EventRuler.on(M,"blur",h.EventHandlers.blurEvent),m.EventRuler.on(M,"focus",h.EventHandlers.focusEvent),m.EventRuler.on(M,"invalid",h.EventHandlers.invalidEvent),m.EventRuler.on(M,"click",h.EventHandlers.clickEvent),m.EventRuler.on(M,"mouseleave",h.EventHandlers.mouseleaveEvent),m.EventRuler.on(M,"mouseenter",h.EventHandlers.mouseenterEvent),m.EventRuler.on(M,"paste",h.EventHandlers.pasteEvent),m.EventRuler.on(M,"cut",h.EventHandlers.cutEvent),m.EventRuler.on(M,"complete",R.oncomplete),m.EventRuler.on(M,"incomplete",R.onincomplete),m.EventRuler.on(M,"cleared",R.oncleared),R.inputEventOnly!==!0&&m.EventRuler.on(M,"keydown",h.EventHandlers.keyEvent),(u.mobile||R.inputEventOnly)&&M.removeAttribute("maxLength"),m.EventRuler.on(M,"input",h.EventHandlers.inputFallBackEvent)),m.EventRuler.on(M,"setvalue",h.EventHandlers.setValueEvent),x.applyMaskHook===void 0||x.applyMaskHook(),C.getBufferTemplate.call(x).join(""),x.undoValue=x._valueGet(!0);var p=(M.inputmask.shadowRoot||M.ownerDocument).activeElement;if(M.inputmask._valueGet(!0)!==""||R.clearMaskOnLostFocus===!1||p===M){(0,v.applyInputValue)(M,M.inputmask._valueGet(!0),R);var w=C.getBuffer.call(x).slice();F.isComplete.call(x,w)===!1&&R.clearIncomplete&&C.resetMaskSet.call(x,!1),R.clearMaskOnLostFocus&&p!==M&&(C.getLastValidPosition.call(x)===-1?w=[]:v.clearOptionalTail.call(x,w)),(R.clearMaskOnLostFocus===!1||R.showMaskOnFocus&&p===M||M.inputmask._valueGet(!0)!=="")&&(0,v.writeBuffer)(M,w),p===M&&C.caret.call(x,M,C.seekNext.call(x,C.getLastValidPosition.call(x)))}}};var u=l(9845),h=l(6030),m=l(9716),v=l(7760),C=l(8711),F=l(7215)},9695:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(l,u,h,m){this.matches=[],this.openGroup=l||!1,this.alternatorGroup=!1,this.isGroup=l||!1,this.isOptional=u||!1,this.isQuantifier=h||!1,this.isAlternator=m||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(a,o){if(this==null)throw new TypeError('"this" is null or not defined');var l=Object(this),u=l.length>>>0;if(u===0)return!1;for(var h=0|o,m=Math.max(h>=0?h:u-Math.abs(h),0);m<u;){if(l[m]===a)return!0;m++}return!1}})},9302:function(){var a=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),l=Function.bind.call(Function.call,Array.prototype.concat),u=Object.keys;Object.entries||(Object.entries=function(h){return a(u(h),(function(m,v){return l(m,typeof v=="string"&&o(h,v)?[[v,h[v]]]:[])}),[])})},7149:function(){function a(o){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},a(o)}typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=a("test".__proto__)==="object"?function(o){return o.__proto__}:function(o){return o.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(a,o){return typeof o!="number"&&(o=0),!(o+a.length>this.length)&&this.indexOf(a,o)!==-1})},8711:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.caret=function(k,_,p,w,c){var y,g=this,b=this.opts;if(_===void 0)return"selectionStart"in k&&"selectionEnd"in k?(_=k.selectionStart,p=k.selectionEnd):h.default.getSelection?(y=h.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==k&&y.commonAncestorContainer!==k||(_=y.startOffset,p=y.endOffset):document.selection&&document.selection.createRange&&(p=(_=0-(y=document.selection.createRange()).duplicate().moveStart("character",-k.inputmask._valueGet().length))+y.text.length),{begin:w?_:M.call(g,_),end:w?p:M.call(g,p)};if(Array.isArray(_)&&(p=g.isRTL?_[0]:_[1],_=g.isRTL?_[1]:_[0]),_.begin!==void 0&&(p=g.isRTL?_.begin:_.end,_=g.isRTL?_.end:_.begin),typeof _=="number"){_=w?_:M.call(g,_),p=typeof(p=w?p:M.call(g,p))=="number"?p:_;var f=parseInt(((k.ownerDocument.defaultView||h.default).getComputedStyle?(k.ownerDocument.defaultView||h.default).getComputedStyle(k,null):k.currentStyle).fontSize)*p;if(k.scrollLeft=f>k.scrollWidth?f:0,k.inputmask.caretPos={begin:_,end:p},b.insertModeVisual&&b.insertMode===!1&&_===p&&(c||p++),k===(k.inputmask.shadowRoot||k.ownerDocument).activeElement){if("setSelectionRange"in k)k.setSelectionRange(_,p);else if(h.default.getSelection){if(y=document.createRange(),k.firstChild===void 0||k.firstChild===null){var E=document.createTextNode("");k.appendChild(E)}y.setStart(k.firstChild,_<k.inputmask._valueGet().length?_:k.inputmask._valueGet().length),y.setEnd(k.firstChild,p<k.inputmask._valueGet().length?p:k.inputmask._valueGet().length),y.collapse(!0);var S=h.default.getSelection();S.removeAllRanges(),S.addRange(y)}else k.createTextRange&&((y=k.createTextRange()).collapse(!0),y.moveEnd("character",p),y.moveStart("character",_),y.select());k.inputmask.caretHook===void 0||k.inputmask.caretHook.call(g,{begin:_,end:p})}}},o.determineLastRequiredPosition=function(k){var _,p,w=this,c=w.maskset,y=w.dependencyLib,g=F.call(w),b={},f=c.validPositions[g],E=v.getMaskTemplate.call(w,!0,F.call(w),!0,!0),S=E.length,D=f!==void 0?f.locator.slice():void 0;for(_=g+1;_<E.length;_++)D=(p=v.getTestTemplate.call(w,_,D,_-1)).locator.slice(),b[_]=y.extend(!0,{},p);var A=f&&f.alternation!==void 0?f.locator[f.alternation]:void 0;for(_=S-1;_>g&&((p=b[_]).match.optionality||p.match.optionalQuantifier&&p.match.newBlockMarker||A&&(A!==b[_].locator[f.alternation]&&p.match.static!==!0||p.match.static===!0&&p.locator[f.alternation]&&m.checkAlternationMatch.call(w,p.locator[f.alternation].toString().split(","),A.toString().split(","))&&v.getTests.call(w,_)[0].def!==""))&&E[_]===v.getPlaceholder.call(w,_,p.match);_--)S--;return k?{l:S,def:b[S]?b[S].match:void 0}:S},o.determineNewCaretPosition=function(k,_,p){var w,c,y,g=this,b=g.maskset,f=g.opts;if(_&&(g.isRTL?k.end=k.begin:k.begin=k.end),k.begin===k.end){switch(p=p||f.positionCaretOnClick){case"none":break;case"select":k={begin:0,end:C.call(g).length};break;case"ignore":k.end=k.begin=R.call(g,F.call(g));break;case"radixFocus":if(g.clicked>1&&b.validPositions.length===0)break;if((function(V){if(f.radixPoint!==""&&f.digits!==0){var B=b.validPositions;if(B[V]===void 0||B[V].input===void 0){if(V<R.call(g,-1))return!0;var j=C.call(g).indexOf(f.radixPoint);if(j!==-1){for(var $=0,T=B.length;$<T;$++)if(B[$]&&j<$&&B[$].input!==v.getPlaceholder.call(g,$))return!1;return!0}}}return!1})(k.begin)){var E=C.call(g).join("").indexOf(f.radixPoint);k.end=k.begin=f.numericInput?R.call(g,E):E;break}default:if(w=k.begin,c=F.call(g,w,!0),w<=(y=R.call(g,c!==-1||x.call(g,0)?c:-1)))k.end=k.begin=x.call(g,w,!1,!0)?w:R.call(g,w);else{var S=b.validPositions[c],D=v.getTestTemplate.call(g,y,S?S.match.locator:void 0,S),A=v.getPlaceholder.call(g,y,D.match);if(A!==""&&C.call(g)[y]!==A&&D.match.optionalQuantifier!==!0&&D.match.newBlockMarker!==!0||!x.call(g,y,f.keepStatic,!0)&&D.match.def===A){var N=R.call(g,y);(w>=N||w===y)&&(y=N)}k.end=k.begin=y}}return k}},o.getBuffer=C,o.getBufferTemplate=function(){var k=this.maskset;return k._buffer===void 0&&(k._buffer=v.getMaskTemplate.call(this,!1,1),k.buffer===void 0&&(k.buffer=k._buffer.slice())),k._buffer},o.getLastValidPosition=F,o.isMask=x,o.resetMaskSet=function(k){var _=this.maskset;_.buffer=void 0,k!==!0&&(_.validPositions=[],_.p=0),k===!1&&(_.tests={},_.jitOffset={})},o.seekNext=R,o.seekPrevious=function(k,_){var p=this,w=k-1;if(k<=0)return 0;for(;w>0&&(_===!0&&(v.getTest.call(p,w).match.newBlockMarker!==!0||!x.call(p,w,void 0,!0))||_!==!0&&!x.call(p,w,void 0,!0));)w--;return w},o.translatePosition=M;var u,h=(u=l(9380))&&u.__esModule?u:{default:u},m=l(7215),v=l(4713);function C(k){var _=this,p=_.maskset;return p.buffer!==void 0&&k!==!0||(p.buffer=v.getMaskTemplate.call(_,!0,F.call(_),!0),p._buffer===void 0&&(p._buffer=p.buffer.slice())),p.buffer}function F(k,_,p){var w=this.maskset,c=-1,y=-1,g=p||w.validPositions;k===void 0&&(k=-1);for(var b=0,f=g.length;b<f;b++)g[b]&&(_||g[b].generatedInput!==!0)&&(b<=k&&(c=b),b>=k&&(y=b));return c===-1||c===k?y:y===-1||k-c<y-k?c:y}function x(k,_,p){var w=this,c=this.maskset,y=v.getTestTemplate.call(w,k).match;if(y.def===""&&(y=v.getTest.call(w,k).match),y.static!==!0)return y.fn;if(p===!0&&c.validPositions[k]!==void 0&&c.validPositions[k].generatedInput!==!0)return!0;if(_!==!0&&k>-1){if(p){var g=v.getTests.call(w,k);return g.length>1+(g[g.length-1].match.def===""?1:0)}var b=v.determineTestTemplate.call(w,k,v.getTests.call(w,k)),f=v.getPlaceholder.call(w,k,b.match);return b.match.def!==f}return!1}function R(k,_,p){var w=this;p===void 0&&(p=!0);for(var c=k+1;v.getTest.call(w,c).match.def!==""&&(_===!0&&(v.getTest.call(w,c).match.newBlockMarker!==!0||!x.call(w,c,void 0,!0))||_!==!0&&!x.call(w,c,void 0,p));)c++;return c}function M(k){var _=this.opts,p=this.el;return!this.isRTL||typeof k!="number"||_.greedy&&_.placeholder===""||!p||(k=this._valueGet().length-k)<0&&(k=0),k}},4713:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.determineTestTemplate=M,o.getDecisionTaker=F,o.getMaskTemplate=function(w,c,y,g,b){var f=this,E=this.opts,S=this.maskset,D=E.greedy;b&&E.greedy&&(E.greedy=!1,f.maskset.tests={}),c=c||0;var A,N,V,B,j=[],$=0;do{if(w===!0&&S.validPositions[$])N=(V=b&&S.validPositions[$].match.optionality&&S.validPositions[$+1]===void 0&&(S.validPositions[$].generatedInput===!0||S.validPositions[$].input==E.skipOptionalPartCharacter&&$>0)?M.call(f,$,p.call(f,$,A,$-1)):S.validPositions[$]).match,A=V.locator.slice(),j.push(y===!0?V.input:y===!1?N.nativeDef:x.call(f,$,N));else{N=(V=R.call(f,$,A,$-1)).match,A=V.locator.slice();var T=g!==!0&&(E.jitMasking!==!1?E.jitMasking:N.jit);(B=(B||S.validPositions[$-1])&&N.static&&N.def!==E.groupSeparator&&N.fn===null)||T===!1||T===void 0||typeof T=="number"&&isFinite(T)&&T>$?j.push(y===!1?N.nativeDef:x.call(f,j.length,N)):B=!1}$++}while(N.static!==!0||N.def!==""||c>$);return j[j.length-1]===""&&j.pop(),y===!1&&S.maskLength!==void 0||(S.maskLength=$-1),E.greedy=D,j},o.getPlaceholder=x,o.getTest=k,o.getTestTemplate=R,o.getTests=p,o.isSubsetOf=_;var u,h=(u=l(2394))&&u.__esModule?u:{default:u},m=l(8711);function v(w){return v=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(c){return typeof c}:function(c){return c&&typeof Symbol=="function"&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},v(w)}function C(w,c){var y=(w.alternation!=null?w.mloc[F(w)]:w.locator).join("");if(y!=="")for(y=y.split(":")[0];y.length<c;)y+="0";return y}function F(w){var c=w.locator[w.alternation];return typeof c=="string"&&c.length>0&&(c=c.split(",")[0]),c!==void 0?c.toString():""}function x(w,c,y){var g=this,b=this.opts,f=this.maskset;if((c=c||k.call(g,w).match).placeholder!==void 0||y===!0){if(c.placeholder!==""&&c.static===!0&&c.generated!==!0){var E=m.getLastValidPosition.call(g,w),S=m.seekNext.call(g,E);return(y?w<=S:w<S)?b.staticDefinitionSymbol&&c.static?c.nativeDef:c.def:typeof c.placeholder=="function"?c.placeholder(b):c.placeholder}return typeof c.placeholder=="function"?c.placeholder(b):c.placeholder}if(c.static===!0){if(w>-1&&f.validPositions[w]===void 0){var D,A=p.call(g,w),N=[];if(typeof b.placeholder=="string"&&A.length>1+(A[A.length-1].match.def===""?1:0)){for(var V=0;V<A.length;V++)if(A[V].match.def!==""&&A[V].match.optionality!==!0&&A[V].match.optionalQuantifier!==!0&&(A[V].match.static===!0||D===void 0||A[V].match.fn.test(D.match.def,f,w,!0,b)!==!1)&&(N.push(A[V]),A[V].match.static===!0&&(D=A[V]),N.length>1&&/[0-9a-bA-Z]/.test(N[0].match.def)))return b.placeholder.charAt(w%b.placeholder.length)}}return c.def}return v(b.placeholder)==="object"?c.def:b.placeholder.charAt(w%b.placeholder.length)}function R(w,c,y){return this.maskset.validPositions[w]||M.call(this,w,p.call(this,w,c&&c.slice(),y))}function M(w,c){var y=this.opts,g=0,b=(function(B,j){var $=0,T=!1;return j.forEach((function(P){P.match.optionality&&($!==0&&$!==P.match.optionality&&(T=!0),($===0||$>P.match.optionality)&&($=P.match.optionality))})),$&&(B==0||j.length==1?$=0:T||($=0)),$})(w,c);w=w>0?w-1:0;var f,E,S,D=C(k.call(this,w));y.greedy&&c.length>1&&c[c.length-1].match.def===""&&(g=1);for(var A=0;A<c.length-g;A++){var N=c[A];f=C(N,D.length);var V=Math.abs(f-D);(N.unMatchedAlternationStopped!==!0||c.filter((function(B){return B.unMatchedAlternationStopped!==!0})).length<=1)&&(E===void 0||f!==""&&V<E||S&&!y.greedy&&S.match.optionality&&S.match.optionality-b>0&&S.match.newBlockMarker==="master"&&(!N.match.optionality||N.match.optionality-b<1||!N.match.newBlockMarker)||S&&!y.greedy&&S.match.optionalQuantifier&&!N.match.optionalQuantifier)&&(E=V,S=N)}return S}function k(w,c){var y=this.maskset;return y.validPositions[w]?y.validPositions[w]:(c||p.call(this,w))[0]}function _(w,c,y){function g(b){for(var f,E=[],S=-1,D=0,A=b.length;D<A;D++)if(b.charAt(D)==="-")for(f=b.charCodeAt(D+1);++S<f;)E.push(String.fromCharCode(S));else S=b.charCodeAt(D),E.push(b.charAt(D));return E.join("")}return w.match.def===c.match.nativeDef||!(!(y.regex||w.match.fn instanceof RegExp&&c.match.fn instanceof RegExp)||w.match.static===!0||c.match.static===!0)&&(c.match.fn.source==="."||g(c.match.fn.source.replace(/[[\]/]/g,"")).indexOf(g(w.match.fn.source.replace(/[[\]/]/g,"")))!==-1)}function p(w,c,y){var g,b,f=this,E=this.dependencyLib,S=this.maskset,D=this.opts,A=this.el,N=S.maskToken,V=c?y:0,B=c?c.slice():[0],j=[],$=!1,T=c?c.join(""):"",P=!1;function W(ie,Y,H,ee){function X(ne,me,be){function xe(G,Z){var re=Z.matches.indexOf(G)===0;return re||Z.matches.every((function(te,pe){return te.isQuantifier===!0?re=xe(G,Z.matches[pe-1]):Object.prototype.hasOwnProperty.call(te,"matches")&&(re=xe(G,te)),!re})),re}function je(G,Z,re){var te,pe;if((S.tests[G]||S.validPositions[G])&&(S.validPositions[G]?[S.validPositions[G]]:S.tests[G]).every((function(we,Pe){if(we.mloc[Z])return te=we,!1;var ct=re!==void 0?re:we.alternation,ze=we.locator[ct]!==void 0?we.locator[ct].toString().indexOf(Z):-1;return(pe===void 0||ze<pe)&&ze!==-1&&(te=we,pe=ze),!0})),te){var Me=te.locator[te.alternation],ve=te.mloc[Z]||te.mloc[Me]||te.locator;return ve[ve.length-1].toString().indexOf(":")!==-1&&ve.pop(),ve.slice((re!==void 0?re:te.alternation)+1)}return re!==void 0?je(G,Z):void 0}function Le(G,Z){return G.match.static===!0&&Z.match.static!==!0&&Z.match.fn.test(G.match.def,S,w,!1,D,!1)}function Ne(G,Z){var re=G.alternation,te=Z===void 0||re<=Z.alternation&&G.locator[re].toString().indexOf(Z.locator[re])===-1;if(!te&&re>Z.alternation){for(var pe=0;pe<re;pe++)if(G.locator[pe]!==Z.locator[pe]){re=pe,te=!0;break}}return!!te&&(function(Me){G.mloc=G.mloc||{};var ve=G.locator[Me];if(ve!==void 0){if(typeof ve=="string"&&(ve=ve.split(",")[0]),G.mloc[ve]===void 0&&(G.mloc[ve]=G.locator.slice(),G.mloc[ve].push(":".concat(G.alternation))),Z!==void 0){for(var we in Z.mloc)typeof we=="string"&&(we=parseInt(we.split(",")[0])),G.mloc[we+0]=Z.mloc[we];G.locator[Me]=Object.keys(G.mloc).join(",")}return G.alternation>Me&&(G.alternation=Me),!0}return G.alternation=void 0,!1})(re)}function se(G,Z){if(G.locator.length!==Z.locator.length)return!1;for(var re=G.alternation+1;re<G.locator.length;re++)if(G.locator[re]!==Z.locator[re])return!1;return!0}if(V>w+D._maxTestPos)throw new Error("Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ".concat(S.mask));if(V===w&&ne.matches===void 0){if(j.push({match:ne,locator:me.reverse(),cd:T,mloc:{}}),!ne.optionality||be!==void 0||!(D.definitions&&D.definitions[ne.nativeDef]&&D.definitions[ne.nativeDef].optional||h.default.prototype.definitions[ne.nativeDef]&&h.default.prototype.definitions[ne.nativeDef].optional))return!0;$=!0,V=w}else if(ne.matches!==void 0){if(ne.isGroup&&be!==ne)return(function(){if(ne=X(ie.matches[ie.matches.indexOf(ne)+1],me,be))return!0})();if(ne.isOptional)return(function(){var G=ne,Z=j.length;if(ne=W(ne,Y,me,be),j.length>0){if(j.forEach((function(re,te){te>=Z&&(re.match.optionality=re.match.optionality?re.match.optionality+1:1)})),g=j[j.length-1].match,be!==void 0||!xe(g,G))return ne;$=!0,V=w}})();if(ne.isAlternator)return(function(){function G(O){for(var L,I=O.matches[0].matches?O.matches[0].matches.length:1,J=0;J<O.matches.length&&I===(L=O.matches[J].matches?O.matches[J].matches.length:1);J++);return I!==L}f.hasAlternator=!0;var Z,re=ne,te=[],pe=j.slice(),Me=me.length,ve=Y.length>0?Y.shift():-1;if(ve===-1||typeof ve=="string"){var we,Pe=V,ct=Y.slice(),ze=[];if(typeof ve=="string")ze=ve.split(",");else for(we=0;we<re.matches.length;we++)ze.push(we.toString());if(S.excludes[w]!==void 0){for(var Xn=ze.slice(),is=0,We=S.excludes[w].length;is<We;is++){var Ri=S.excludes[w][is].toString().split(":");me.length==Ri[1]&&ze.splice(ze.indexOf(Ri[0]),1)}ze.length===0&&(delete S.excludes[w],ze=Xn)}(D.keepStatic===!0||isFinite(parseInt(D.keepStatic))&&Pe>=D.keepStatic)&&(ze=ze.slice(0,1));for(var Jt=0;Jt<ze.length;Jt++){we=parseInt(ze[Jt]),j=[],Y=typeof ve=="string"&&je(V,we,Me)||ct.slice();var ai=re.matches[we];if(ai&&X(ai,[we].concat(me),be))ne=!0;else if(Jt===0&&(P=G(re)),ai&&ai.matches&&ai.matches.length>re.matches[0].matches.length)break;Z=j.slice(),V=Pe,j=[];for(var Xt=0;Xt<Z.length;Xt++){var $e=Z[Xt],ot=!1;$e.alternation=$e.alternation||Me,Ne($e);for(var ss=0;ss<te.length;ss++){var tt=te[ss];if(typeof ve!="string"||$e.alternation!==void 0&&ze.includes($e.locator[$e.alternation].toString())){if($e.match.nativeDef===tt.match.nativeDef){ot=!0,Ne(tt,$e);break}if(_($e,tt,D)){Ne($e,tt)&&(ot=!0,te.splice(te.indexOf(tt),0,$e));break}if(_(tt,$e,D)){Ne(tt,$e);break}if(Le($e,tt)){se($e,tt)||A.inputmask.userOptions.keepStatic!==void 0?Ne($e,tt)&&(ot=!0,te.splice(te.indexOf(tt),0,$e)):D.keepStatic=!0;break}if(Le(tt,$e)){Ne(tt,$e);break}}}ot||te.push($e)}}j=pe.concat(te),V=w,$=j.length>0&&P,ne=te.length>0&&!P,P&&$&&!ne&&j.forEach((function(O,L){O.unMatchedAlternationStopped=!0})),Y=ct.slice()}else ne=X(re.matches[ve]||ie.matches[ve],[ve].concat(me),be);if(ne)return!0})();if(ne.isQuantifier&&be!==ie.matches[ie.matches.indexOf(ne)-1])return(function(){for(var G=ne,Z=!1,re=Y.length>0?Y.shift():0;re<(isNaN(G.quantifier.max)?re+1:G.quantifier.max)&&V<=w;re++){var te=ie.matches[ie.matches.indexOf(G)-1];if(ne=X(te,[re].concat(me),te)){if(j.forEach((function(pe,Me){(g=z(te,pe.match)?pe.match:j[j.length-1].match).optionalQuantifier=re>=G.quantifier.min,g.jit=(re+1)*(te.matches.indexOf(g)+1)>G.quantifier.jit,g.optionalQuantifier&&xe(g,te)&&($=!0,V=w,D.greedy&&S.validPositions[w-1]==null&&re>G.quantifier.min&&["*","+"].indexOf(G.quantifier.max)!=-1&&(j.pop(),T=void 0),Z=!0,ne=!1),!Z&&g.jit&&(S.jitOffset[w]=te.matches.length-te.matches.indexOf(g))})),Z)break;return!0}}})();if(ne=W(ne,Y,me,be))return!0}else V++}for(var q=Y.length>0?Y.shift():0;q<ie.matches.length;q++)if(ie.matches[q].isQuantifier!==!0){var oe=X(ie.matches[q],[q].concat(H),ee);if(oe&&V===w)return oe;if(V>w)break}}function z(ie,Y){var H=ie.matches.indexOf(Y)!=-1;return H||ie.matches.forEach((function(ee,X){ee.matches===void 0||H||(H=z(ee,Y))})),H}if(w>-1){if(c===void 0){for(var U,K=w-1;(U=S.validPositions[K]||S.tests[K])===void 0&&K>-1;)K--;U!==void 0&&K>-1&&(B=(function(ie,Y){var H,ee=[];return Array.isArray(Y)||(Y=[Y]),Y.length>0&&(Y[0].alternation===void 0||D.keepStatic===!0?(ee=M.call(f,ie,Y.slice()).locator.slice()).length===0&&(ee=Y[0].locator.slice()):Y.forEach((function(X){X.def!==""&&(ee.length===0?(H=X.alternation,ee=X.locator.slice()):X.locator[H]&&ee[H].toString().indexOf(X.locator[H])===-1&&(ee[H]+=","+X.locator[H]))}))),ee})(K,U),T=B.join(""),V=K)}if(S.tests[w]&&S.tests[w][0].cd===T)return S.tests[w];for(var Q=B.shift();Q<N.length&&!(W(N[Q],B,[Q])&&V===w||V>w);Q++);}return(j.length===0||$)&&j.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:P&&j.filter((function(ie){return ie.unMatchedAlternationStopped!==!0})).length===0?[0]:[],mloc:{},cd:T}),c!==void 0&&S.tests[w]?b=E.extend(!0,[],j):(S.tests[w]=E.extend(!0,[],j),b=S.tests[w]),j.forEach((function(ie){ie.match.optionality=ie.match.defOptionality||!1})),b}},7215:function(a,o,l){Object.defineProperty(o,"__esModule",{value:!0}),o.alternate=C,o.checkAlternationMatch=function(c,y,g){for(var b,f=this.opts.greedy?y:y.slice(0,1),E=!1,S=g!==void 0?g.split(","):[],D=0;D<S.length;D++)(b=c.indexOf(S[D]))!==-1&&c.splice(b,1);for(var A=0;A<c.length;A++)if(f.includes(c[A])){E=!0;break}return E},o.handleRemove=function(c,y,g,b,f){var E=this,S=this.maskset,D=this.opts;if((D.numericInput||E.isRTL)&&(y===h.keys.Backspace?y=h.keys.Delete:y===h.keys.Delete&&(y=h.keys.Backspace),E.isRTL)){var A=g.end;g.end=g.begin,g.begin=A}var N,V=m.getLastValidPosition.call(E,void 0,!0);g.end>=m.getBuffer.call(E).length&&V>=g.end&&(g.end=V+1),y===h.keys.Backspace?g.end-g.begin<1&&(g.begin=m.seekPrevious.call(E,g.begin)):y===h.keys.Delete&&g.begin===g.end&&(g.end=m.isMask.call(E,g.end,!0,!0)?g.end+1:m.seekNext.call(E,g.end)+1),(N=w.call(E,g))!==!1&&((b!==!0&&D.keepStatic!==!1||D.regex!==null&&v.getTest.call(E,g.begin).match.def.indexOf("|")!==-1)&&C.call(E,!0),b!==!0&&(S.p=y===h.keys.Delete?g.begin+N:g.begin,S.p=m.determineNewCaretPosition.call(E,{begin:S.p,end:S.p},!1,D.insertMode===!1&&y===h.keys.Backspace?"none":void 0).begin))},o.isComplete=x,o.isSelection=R,o.isValid=M,o.refreshFromBuffer=_,o.revalidateMask=w;var u=l(6030),h=l(2839),m=l(8711),v=l(4713);function C(c,y,g,b,f,E){var S=this,D=this.dependencyLib,A=this.opts,N=S.maskset;if(!S.hasAlternator)return!1;var V,B,j,$,T,P,W,z,U,K,Q,ie=D.extend(!0,[],N.validPositions),Y=D.extend(!0,{},N.tests),H=!1,ee=!1,X=f!==void 0?f:m.getLastValidPosition.call(S);if(E&&(K=E.begin,Q=E.end,E.begin>E.end&&(K=E.end,Q=E.begin)),X===-1&&f===void 0)V=0,B=($=v.getTest.call(S,V)).alternation;else for(;X>=0;X--)if((j=N.validPositions[X])&&j.alternation!==void 0){if(X<=(c||0)&&$&&$.locator[j.alternation]!==j.locator[j.alternation])break;V=X,B=N.validPositions[V].alternation,$=j}if(B!==void 0){W=parseInt(V),N.excludes[W]=N.excludes[W]||[],c!==!0&&N.excludes[W].push((0,v.getDecisionTaker)($)+":"+$.alternation);var q=[],oe=-1;for(T=W;W<m.getLastValidPosition.call(S,void 0,!0)+1;T++)oe===-1&&c<=T&&y!==void 0&&(q.push(y),oe=q.length-1),(P=N.validPositions[W])&&P.generatedInput!==!0&&(E===void 0||T<K||T>=Q)&&q.push(P.input),N.validPositions.splice(W,1);for(oe===-1&&y!==void 0&&(q.push(y),oe=q.length-1);N.excludes[W]!==void 0&&N.excludes[W].length<10;){for(N.tests={},m.resetMaskSet.call(S,!0),H=!0,T=0;T<q.length&&(z=H.caret||A.insertMode==0&&z!=null?m.seekNext.call(S,z):m.getLastValidPosition.call(S,void 0,!0)+1,U=q[T],H=M.call(S,z,U,!1,b,!0));T++)T===oe&&(ee=H),c==1&&H&&(ee={caretPos:T});if(H)break;if(m.resetMaskSet.call(S),$=v.getTest.call(S,W),N.validPositions=D.extend(!0,[],ie),N.tests=D.extend(!0,{},Y),!N.excludes[W]){ee=C.call(S,c,y,g,b,W-1,E);break}if($.alternation!=null){var ne=(0,v.getDecisionTaker)($);if(N.excludes[W].indexOf(ne+":"+$.alternation)!==-1){ee=C.call(S,c,y,g,b,W-1,E);break}for(N.excludes[W].push(ne+":"+$.alternation),T=W;T<m.getLastValidPosition.call(S,void 0,!0)+1;T++)N.validPositions.splice(W)}else delete N.excludes[W]}}return ee&&A.keepStatic===!1||delete N.excludes[W],ee}function F(c,y,g){var b=this.opts,f=this.maskset;switch(b.casing||y.casing){case"upper":c=c.toUpperCase();break;case"lower":c=c.toLowerCase();break;case"title":var E=f.validPositions[g-1];c=g===0||E&&E.input===String.fromCharCode(h.keyCode.Space)?c.toUpperCase():c.toLowerCase();break;default:if(typeof b.casing=="function"){var S=Array.prototype.slice.call(arguments);S.push(f.validPositions),c=b.casing.apply(this,S)}}return c}function x(c){var y=this,g=this.opts,b=this.maskset;if(typeof g.isComplete=="function")return g.isComplete(c,g);if(g.repeat!=="*"){var f=!1,E=m.determineLastRequiredPosition.call(y,!0),S=E.l;if(E.def===void 0||E.def.newBlockMarker||E.def.optionality||E.def.optionalQuantifier){f=!0;for(var D=0;D<=S;D++){var A=v.getTestTemplate.call(y,D).match;if(A.static!==!0&&b.validPositions[D]===void 0&&(A.optionality===!1||A.optionality===void 0||A.optionality&&A.newBlockMarker==0)&&(A.optionalQuantifier===!1||A.optionalQuantifier===void 0)||A.static===!0&&A.def!=""&&c[D]!==v.getPlaceholder.call(y,D,A)){f=!1;break}}}return f}}function R(c){var y=this.opts.insertMode?0:1;return this.isRTL?c.begin-c.end>y:c.end-c.begin>y}function M(c,y,g,b,f,E,S){var D=this,A=this.dependencyLib,N=this.opts,V=D.maskset;g=g===!0;var B=c;function j(H){if(H!==void 0){if(H.remove!==void 0&&(Array.isArray(H.remove)||(H.remove=[H.remove]),H.remove.sort((function(X,q){return D.isRTL?X.pos-q.pos:q.pos-X.pos})).forEach((function(X){w.call(D,{begin:X,end:X+1})})),H.remove=void 0),H.insert!==void 0&&(Array.isArray(H.insert)||(H.insert=[H.insert]),H.insert.sort((function(X,q){return D.isRTL?q.pos-X.pos:X.pos-q.pos})).forEach((function(X){X.c!==""&&M.call(D,X.pos,X.c,X.strict===void 0||X.strict,X.fromIsValid!==void 0?X.fromIsValid:b)})),H.insert=void 0),H.refreshFromBuffer&&H.buffer){var ee=H.refreshFromBuffer;_.call(D,ee===!0?ee:ee.start,ee.end,H.buffer),H.refreshFromBuffer=void 0}H.rewritePosition!==void 0&&(B=H.rewritePosition,H=!0)}return H}function $(H,ee,X){var q=!1;return v.getTests.call(D,H).every((function(oe,ne){var me=oe.match;if(m.getBuffer.call(D,!0),(q=(!me.jit||V.validPositions[m.seekPrevious.call(D,H)]!==void 0)&&(me.fn!=null?me.fn.test(ee,V,H,X,N,R.call(D,c)):(ee===me.def||ee===N.skipOptionalPartCharacter)&&me.def!==""&&{c:v.getPlaceholder.call(D,H,me,!0)||me.def,pos:H}))!==!1){var be=q.c!==void 0?q.c:ee,xe=H;return be=be===N.skipOptionalPartCharacter&&me.static===!0?v.getPlaceholder.call(D,H,me,!0)||me.def:be,(q=j(q))!==!0&&q.pos!==void 0&&q.pos!==H&&(xe=q.pos),q!==!0&&q.pos===void 0&&q.c===void 0||w.call(D,c,A.extend({},oe,{input:F.call(D,be,me,xe)}),b,xe)===!1&&(q=!1),!1}return!0})),q}c.begin!==void 0&&(B=D.isRTL?c.end:c.begin);var T=!0,P=A.extend(!0,[],V.validPositions);if(N.keepStatic===!1&&V.excludes[B]!==void 0&&f!==!0&&b!==!0)for(var W=B;W<(D.isRTL?c.begin:c.end);W++)V.excludes[W]!==void 0&&(V.excludes[W]=void 0,delete V.tests[W]);if(typeof N.preValidation=="function"&&b!==!0&&E!==!0&&(T=j(T=N.preValidation.call(D,m.getBuffer.call(D),B,y,R.call(D,c),N,V,c,g||f))),T===!0){if(T=$(B,y,g),(!g||b===!0)&&T===!1&&E!==!0){var z=V.validPositions[B];if(!z||z.match.static!==!0||z.match.def!==y&&y!==N.skipOptionalPartCharacter){if(N.insertMode||V.validPositions[m.seekNext.call(D,B)]===void 0||c.end>B){var U=!1;if(V.jitOffset[B]&&V.validPositions[m.seekNext.call(D,B)]===void 0&&(T=M.call(D,B+V.jitOffset[B],y,!0,!0))!==!1&&(f!==!0&&(T.caret=B),U=!0),c.end>B&&(V.validPositions[B]=void 0),!U&&!m.isMask.call(D,B,N.keepStatic&&B===0)){for(var K=B+1,Q=m.seekNext.call(D,B,!1,B!==0);K<=Q;K++)if((T=$(K,y,g))!==!1){T=p.call(D,B,T.pos!==void 0?T.pos:K)||T,B=K;break}}}}else T={caret:m.seekNext.call(D,B)}}D.hasAlternator&&f!==!0&&!g&&(f=!0,T===!1&&N.keepStatic&&(x.call(D,m.getBuffer.call(D))||B===0)?T=C.call(D,B,y,g,b,void 0,c):(R.call(D,c)&&V.tests[B]&&V.tests[B].length>1&&N.keepStatic||T==1&&N.numericInput!==!0&&V.tests[B]&&V.tests[B].length>1&&m.getLastValidPosition.call(D,void 0,!0)>B)&&(T=C.call(D,!0))),T===!0&&(T={pos:B})}if(typeof N.postValidation=="function"&&b!==!0&&E!==!0){var ie=N.postValidation.call(D,m.getBuffer.call(D,!0),c.begin!==void 0?D.isRTL?c.end:c.begin:c,y,T,N,V,g,S);ie!==void 0&&(T=ie===!0?T:ie)}T&&T.pos===void 0&&(T.pos=B),T===!1||E===!0?(m.resetMaskSet.call(D,!0),V.validPositions=A.extend(!0,[],P)):p.call(D,void 0,B,!0);var Y=j(T);return D.maxLength!==void 0&&m.getBuffer.call(D).length>D.maxLength&&!b&&(m.resetMaskSet.call(D,!0),V.validPositions=A.extend(!0,[],P),Y=!1),Y}function k(c,y,g){for(var b=this.maskset,f=!1,E=v.getTests.call(this,c),S=0;S<E.length;S++){if(E[S].match&&(E[S].match.nativeDef===y.match[g.shiftPositions?"def":"nativeDef"]&&(!g.shiftPositions||!y.match.static)||E[S].match.nativeDef===y.match.nativeDef||g.regex&&!E[S].match.static&&E[S].match.fn.test(y.input,b,c,!1,g))){f=!0;break}if(E[S].match&&E[S].match.def===y.match.nativeDef){f=void 0;break}}return f===!1&&b.jitOffset[c]!==void 0&&(f=k.call(this,c+b.jitOffset[c],y,g)),f}function _(c,y,g){var b,f,E=this,S=this.maskset,D=this.opts,A=this.dependencyLib,N=D.skipOptionalPartCharacter,V=E.isRTL?g.slice().reverse():g;if(D.skipOptionalPartCharacter="",c===!0)m.resetMaskSet.call(E,!1),c=0,y=g.length,f=m.determineNewCaretPosition.call(E,{begin:0,end:0},!1).begin;else{for(b=c;b<y;b++)S.validPositions.splice(c,0);f=c}var B=new A.Event("keypress");for(b=c;b<y;b++){B.key=V[b].toString(),E.ignorable=!1;var j=u.EventHandlers.keypressEvent.call(E,B,!0,!1,!1,f);j!==!1&&j!==void 0&&(f=j.forwardPosition)}D.skipOptionalPartCharacter=N}function p(c,y,g){var b=this,f=this.maskset,E=this.dependencyLib;if(c===void 0)for(c=y-1;c>0&&!f.validPositions[c];c--);for(var S=c;S<y;S++)if(f.validPositions[S]===void 0&&!m.isMask.call(b,S,!1)&&(S==0?v.getTest.call(b,S):f.validPositions[S-1])){var D=v.getTests.call(b,S).slice();D[D.length-1].match.def===""&&D.pop();var A,N=v.determineTestTemplate.call(b,S,D);if(N&&(N.match.jit!==!0||N.match.newBlockMarker==="master"&&(A=f.validPositions[S+1])&&A.match.optionalQuantifier===!0)&&((N=E.extend({},N,{input:v.getPlaceholder.call(b,S,N.match,!0)||N.match.def})).generatedInput=!0,w.call(b,S,N,!0),g!==!0)){var V=f.validPositions[y].input;return f.validPositions[y]=void 0,M.call(b,y,V,!0,!0)}}}function w(c,y,g,b){var f=this,E=this.maskset,S=this.opts,D=this.dependencyLib;function A(Y,H,ee){var X=H[Y];if(X!==void 0&&X.match.static===!0&&X.match.optionality!==!0&&(H[0]===void 0||H[0].alternation===void 0)){var q=ee.begin<=Y-1?H[Y-1]&&H[Y-1].match.static===!0&&H[Y-1]:H[Y-1],oe=ee.end>Y+1?H[Y+1]&&H[Y+1].match.static===!0&&H[Y+1]:H[Y+1];return q&&oe}return!1}var N=0,V=c.begin!==void 0?c.begin:c,B=c.end!==void 0?c.end:c,j=!0;if(c.begin>c.end&&(V=c.end,B=c.begin),b=b!==void 0?b:V,g===void 0&&(V!==B||S.insertMode&&E.validPositions[b]!==void 0||y===void 0||y.match.optionalQuantifier||y.match.optionality)){var $,T=D.extend(!0,[],E.validPositions),P=m.getLastValidPosition.call(f,void 0,!0);E.p=V;var W=R.call(f,c)?V:b;for($=P;$>=W;$--)E.validPositions.splice($,1),y===void 0&&delete E.tests[$+1];var z,U,K=b,Q=K;for(y&&(E.validPositions[b]=D.extend(!0,{},y),Q++,K++),T[B]==null&&E.jitOffset[B]&&(B+=E.jitOffset[B]+1),$=y?B:B-1;$<=P;$++){if((z=T[$])!==void 0&&z.generatedInput!==!0&&($>=B||$>=V&&A($,T,{begin:V,end:B}))){for(;v.getTest.call(f,Q).match.def!=="";){if((U=k.call(f,Q,z,S))!==!1||z.match.def==="+"){z.match.def==="+"&&m.getBuffer.call(f,!0);var ie=M.call(f,Q,z.input,z.match.def!=="+",!0);if(j=ie!==!1,K=(ie.pos||Q)+1,!j&&U)break}else j=!1;if(j){y===void 0&&z.match.static&&$===c.begin&&N++;break}if(!j&&m.getBuffer.call(f),Q>E.maskLength)break;Q++}v.getTest.call(f,Q).match.def==""&&(j=!1),Q=K}if(!j)break}if(!j)return E.validPositions=D.extend(!0,[],T),m.resetMaskSet.call(f,!0),!1}else y&&v.getTest.call(f,b).match.cd===y.match.cd&&(E.validPositions[b]=D.extend(!0,{},y));return m.resetMaskSet.call(f,!0),N}}},i={};function n(a){var o=i[a];if(o!==void 0)return o.exports;var l=i[a]={exports:{}};return t[a](l,l.exports,n),l.exports}var r={};return(function(){var a=r;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,n(7149),n(3194),n(9302),n(4013),n(3851),n(219),n(207),n(5296);var o,l=(o=n(2394))&&o.__esModule?o:{default:o};a.default=l.default})(),r})()}))})(rs)),rs.exports}var Ka=Ua();const qa=Ga(Ka);//! moment.js
|
|
10
|
+
*/var Ld=vn.exports,_o;function Pd(){return _o||(_o=1,(function(n,e){(function(t,i){n.exports=i()})(typeof self<"u"?self:Ld,(function(){return(function(){var t={3976:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={_maxTestPos:500,placeholder:"_",optionalmarker:["[","]"],quantifiermarker:["{","}"],groupmarker:["(",")"],alternatormarker:"|",escapeChar:"\\",mask:null,regex:null,oncomplete:function(){},onincomplete:function(){},oncleared:function(){},repeat:0,greedy:!1,autoUnmask:!1,removeMaskOnSubmit:!1,clearMaskOnLostFocus:!0,insertMode:!0,insertModeVisual:!0,clearIncomplete:!1,alias:null,onKeyDown:function(){},onBeforeMask:null,onBeforePaste:function(u,c){return typeof c.onBeforeMask=="function"?c.onBeforeMask.call(this,u,c):u},onBeforeWrite:null,onUnMask:null,showMaskOnFocus:!0,showMaskOnHover:!0,onKeyValidation:function(){},skipOptionalPartCharacter:" ",numericInput:!1,rightAlign:!1,undoOnEscape:!0,radixPoint:"",_radixDance:!1,groupSeparator:"",keepStatic:null,positionCaretOnTab:!0,tabThrough:!1,supportsInputType:["text","tel","url","password","search"],isComplete:null,preValidation:null,postValidation:null,staticDefinitionSymbol:void 0,jitMasking:!1,nullable:!0,inputEventOnly:!1,noValuePatching:!1,positionCaretOnClick:"lvp",casing:null,inputmode:"text",importDataAttributes:!0,shiftPositions:!0,usePrototypeDefinitions:!0,validationEventTimeOut:3e3,substitutes:{}}},7392:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,o.default={9:{validator:"[0-90-9]",definitionSymbol:"*"},a:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",definitionSymbol:"*"},"*":{validator:"[0-90-9A-Za-zА-яЁёÀ-ÿµ]"}}},253:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u,c,d){if(d===void 0)return u.__data?u.__data[c]:null;u.__data=u.__data||{},u.__data[c]=d}},3776:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.Event=void 0,o.off=function(v,R){var m,x;return w(this[0])&&v&&(m=this[0].eventRegistry,x=this[0],v.split(" ").forEach((function(g){var S=h(g.split("."),2);(function(C,E){var b,T,M=[];if(C.length>0)if(R===void 0)for(b=0,T=m[C][E].length;b<T;b++)M.push({ev:C,namespace:E&&E.length>0?E:"global",handler:m[C][E][b]});else M.push({ev:C,namespace:E&&E.length>0?E:"global",handler:R});else if(E.length>0){for(var O in m)for(var F in m[O])if(F===E)if(R===void 0)for(b=0,T=m[O][F].length;b<T;b++)M.push({ev:O,namespace:F,handler:m[O][F][b]});else M.push({ev:O,namespace:F,handler:R})}return M})(S[0],S[1]).forEach((function(C){var E=C.ev,b=C.handler;(function(T,M,O){if(T in m==1)if(x.removeEventListener?x.removeEventListener(T,O,!1):x.detachEvent&&x.detachEvent("on".concat(T),O),M==="global")for(var F in m[T])m[T][F].splice(m[T][F].indexOf(O),1);else m[T][M].splice(m[T][M].indexOf(O),1)})(E,C.namespace,b)}))}))),this},o.on=function(v,R){if(w(this[0])){var m=this[0].eventRegistry,x=this[0];v.split(" ").forEach((function(g){var S=h(g.split("."),2),C=S[0],E=S[1];(function(b,T){x.addEventListener?x.addEventListener(b,R,!1):x.attachEvent&&x.attachEvent("on".concat(b),R),m[b]=m[b]||{},m[b][T]=m[b][T]||[],m[b][T].push(R)})(C,E===void 0?"global":E)}))}return this},o.trigger=function(v){var R=arguments;if(w(this[0]))for(var m=this[0].eventRegistry,x=this[0],g=typeof v=="string"?v.split(" "):[v.type],S=0;S<g.length;S++){var C=g[S].split("."),E=C[0],b=C[1]||"global";if(k!==void 0&&b==="global"){var T,M={bubbles:!0,cancelable:!0,composed:!0,detail:arguments[1]};if(k.createEvent){try{E==="input"?(M.inputType="insertText",T=new InputEvent(E,M)):T=new CustomEvent(E,M)}catch{(T=k.createEvent("CustomEvent")).initCustomEvent(E,M.bubbles,M.cancelable,M.detail)}v.type&&(0,d.default)(T,v),x.dispatchEvent(T)}else(T=k.createEventObject()).eventType=E,T.detail=arguments[1],v.type&&(0,d.default)(T,v),x.fireEvent("on"+T.eventType,T)}else if(m[E]!==void 0){arguments[0]=arguments[0].type?arguments[0]:p.default.Event(arguments[0]),arguments[0].detail=arguments.slice(1);var O=m[E];(b==="global"?Object.values(O).flat():O[b]).forEach((function(F){return F.apply(x,R)}))}}return this};var c=_(u(9380)),d=_(u(600)),p=_(u(4963));function h(v,R){return(function(m){if(Array.isArray(m))return m})(v)||(function(m,x){var g=m==null?null:typeof Symbol<"u"&&m[Symbol.iterator]||m["@@iterator"];if(g!=null){var S,C,E,b,T=[],M=!0,O=!1;try{if(E=(g=g.call(m)).next,x!==0)for(;!(M=(S=E.call(g)).done)&&(T.push(S.value),T.length!==x);M=!0);}catch(F){O=!0,C=F}finally{try{if(!M&&g.return!=null&&(b=g.return(),Object(b)!==b))return}finally{if(O)throw C}}return T}})(v,R)||(function(m,x){if(m){if(typeof m=="string")return f(m,x);var g=Object.prototype.toString.call(m).slice(8,-1);if(g==="Object"&&m.constructor&&(g=m.constructor.name),g==="Map"||g==="Set")return Array.from(m);if(g==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(g))return f(m,x)}})(v,R)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function f(v,R){(R==null||R>v.length)&&(R=v.length);for(var m=0,x=new Array(R);m<R;m++)x[m]=v[m];return x}function _(v){return v&&v.__esModule?v:{default:v}}var k=c.default.document;function w(v){return v instanceof Element}var y=o.Event=void 0;typeof c.default.CustomEvent=="function"?o.Event=y=c.default.CustomEvent:c.default.Event&&k&&k.createEvent?(o.Event=y=function(v,R){R=R||{bubbles:!1,cancelable:!1,composed:!0,detail:void 0};var m=k.createEvent("CustomEvent");return m.initCustomEvent(v,R.bubbles,R.cancelable,R.detail),m},y.prototype=c.default.Event.prototype):typeof Event<"u"&&(o.Event=y=Event)},600:function(a,o){function u(c){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(d){return typeof d}:function(d){return d&&typeof Symbol=="function"&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},u(c)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=function c(){var d,p,h,f,_,k,w=arguments[0]||{},y=1,v=arguments.length,R=!1;for(typeof w=="boolean"&&(R=w,w=arguments[y]||{},y++),u(w)!=="object"&&typeof w!="function"&&(w={});y<v;y++)if((d=arguments[y])!=null)for(p in d)h=w[p],w!==(f=d[p])&&(R&&f&&(Object.prototype.toString.call(f)==="[object Object]"||(_=Array.isArray(f)))?(_?(_=!1,k=h&&Array.isArray(h)?h:[]):k=h&&Object.prototype.toString.call(h)==="[object Object]"?h:{},w[p]=c(R,k,f)):f!==void 0&&(w[p]=f));return w}},4963:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=f(u(9380)),d=f(u(253)),p=u(3776),h=f(u(600));function f(w){return w&&w.__esModule?w:{default:w}}var _=c.default.document;function k(w){return w instanceof k?w:this instanceof k?void(w!=null&&w!==c.default&&(this[0]=w.nodeName?w:w[0]!==void 0&&w[0].nodeName?w[0]:_.querySelector(w),this[0]!==void 0&&this[0]!==null&&(this[0].eventRegistry=this[0].eventRegistry||{}))):new k(w)}k.prototype={on:p.on,off:p.off,trigger:p.trigger},k.extend=h.default,k.data=d.default,k.Event=p.Event,o.default=k},9845:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.mobile=o.iphone=o.ie=void 0;var c,d=(c=u(9380))&&c.__esModule?c:{default:c},p=d.default.navigator&&d.default.navigator.userAgent||"";o.ie=p.indexOf("MSIE ")>0||p.indexOf("Trident/")>0,o.mobile=d.default.navigator&&d.default.navigator.userAgentData&&d.default.navigator.userAgentData.mobile||d.default.navigator&&d.default.navigator.maxTouchPoints||"ontouchstart"in d.default,o.iphone=/iphone/i.test(p)},7184:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(c){return c.replace(u,"\\$1")};var u=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^"].join("|\\")+")","gim")},6030:function(a,o,u){function c(E){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(b){return typeof b}:function(b){return b&&typeof Symbol=="function"&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},c(E)}Object.defineProperty(o,"__esModule",{value:!0}),o.EventHandlers=void 0;var d,p=u(9845),h=(d=u(9380))&&d.__esModule?d:{default:d},f=u(7760),_=u(2839),k=u(8711),w=u(7215),y=u(4713);function v(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */v=function(){return b};var E,b={},T=Object.prototype,M=T.hasOwnProperty,O=Object.defineProperty||function(re,K,ie){re[K]=ie.value},F=typeof Symbol=="function"?Symbol:{},z=F.iterator||"@@iterator",$=F.asyncIterator||"@@asyncIterator",H=F.toStringTag||"@@toStringTag";function V(re,K,ie){return Object.defineProperty(re,K,{value:ie,enumerable:!0,configurable:!0,writable:!0}),re[K]}try{V({},"")}catch{V=function(K,ie,le){return K[ie]=le}}function Y(re,K,ie,le){var ae=K&&K.prototype instanceof j?K:j,ve=Object.create(ae.prototype),Re=new Fe(le||[]);return O(ve,"_invoke",{value:pe(re,ie,Re)}),ve}function D(re,K,ie){try{return{type:"normal",arg:re.call(K,ie)}}catch(le){return{type:"throw",arg:le}}}b.wrap=Y;var P="suspendedStart",I="suspendedYield",N="executing",U="completed",Z={};function j(){}function ne(){}function G(){}var B={};V(B,z,(function(){return this}));var Q=Object.getPrototypeOf,X=Q&&Q(Q(Ne([])));X&&X!==T&&M.call(X,z)&&(B=X);var q=G.prototype=j.prototype=Object.create(B);function oe(re){["next","throw","return"].forEach((function(K){V(re,K,(function(ie){return this._invoke(K,ie)}))}))}function se(re,K){function ie(ae,ve,Re,Se){var _e=D(re[ae],re,ve);if(_e.type!=="throw"){var ue=_e.arg,Le=ue.value;return Le&&c(Le)=="object"&&M.call(Le,"__await")?K.resolve(Le.__await).then((function(ze){ie("next",ze,Re,Se)}),(function(ze){ie("throw",ze,Re,Se)})):K.resolve(Le).then((function(ze){ue.value=ze,Re(ue)}),(function(ze){return ie("throw",ze,Re,Se)}))}Se(_e.arg)}var le;O(this,"_invoke",{value:function(ae,ve){function Re(){return new K((function(Se,_e){ie(ae,ve,Se,_e)}))}return le=le?le.then(Re,Re):Re()}})}function pe(re,K,ie){var le=P;return function(ae,ve){if(le===N)throw new Error("Generator is already running");if(le===U){if(ae==="throw")throw ve;return{value:E,done:!0}}for(ie.method=ae,ie.arg=ve;;){var Re=ie.delegate;if(Re){var Se=me(Re,ie);if(Se){if(Se===Z)continue;return Se}}if(ie.method==="next")ie.sent=ie._sent=ie.arg;else if(ie.method==="throw"){if(le===P)throw le=U,ie.arg;ie.dispatchException(ie.arg)}else ie.method==="return"&&ie.abrupt("return",ie.arg);le=N;var _e=D(re,K,ie);if(_e.type==="normal"){if(le=ie.done?U:I,_e.arg===Z)continue;return{value:_e.arg,done:ie.done}}_e.type==="throw"&&(le=U,ie.method="throw",ie.arg=_e.arg)}}}function me(re,K){var ie=K.method,le=re.iterator[ie];if(le===E)return K.delegate=null,ie==="throw"&&re.iterator.return&&(K.method="return",K.arg=E,me(re,K),K.method==="throw")||ie!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+ie+"' method")),Z;var ae=D(le,re.iterator,K.arg);if(ae.type==="throw")return K.method="throw",K.arg=ae.arg,K.delegate=null,Z;var ve=ae.arg;return ve?ve.done?(K[re.resultName]=ve.value,K.next=re.nextLoc,K.method!=="return"&&(K.method="next",K.arg=E),K.delegate=null,Z):ve:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,Z)}function we(re){var K={tryLoc:re[0]};1 in re&&(K.catchLoc=re[1]),2 in re&&(K.finallyLoc=re[2],K.afterLoc=re[3]),this.tryEntries.push(K)}function Ae(re){var K=re.completion||{};K.type="normal",delete K.arg,re.completion=K}function Fe(re){this.tryEntries=[{tryLoc:"root"}],re.forEach(we,this),this.reset(!0)}function Ne(re){if(re||re===""){var K=re[z];if(K)return K.call(re);if(typeof re.next=="function")return re;if(!isNaN(re.length)){var ie=-1,le=function ae(){for(;++ie<re.length;)if(M.call(re,ie))return ae.value=re[ie],ae.done=!1,ae;return ae.value=E,ae.done=!0,ae};return le.next=le}}throw new TypeError(c(re)+" is not iterable")}return ne.prototype=G,O(q,"constructor",{value:G,configurable:!0}),O(G,"constructor",{value:ne,configurable:!0}),ne.displayName=V(G,H,"GeneratorFunction"),b.isGeneratorFunction=function(re){var K=typeof re=="function"&&re.constructor;return!!K&&(K===ne||(K.displayName||K.name)==="GeneratorFunction")},b.mark=function(re){return Object.setPrototypeOf?Object.setPrototypeOf(re,G):(re.__proto__=G,V(re,H,"GeneratorFunction")),re.prototype=Object.create(q),re},b.awrap=function(re){return{__await:re}},oe(se.prototype),V(se.prototype,$,(function(){return this})),b.AsyncIterator=se,b.async=function(re,K,ie,le,ae){ae===void 0&&(ae=Promise);var ve=new se(Y(re,K,ie,le),ae);return b.isGeneratorFunction(K)?ve:ve.next().then((function(Re){return Re.done?Re.value:ve.next()}))},oe(q),V(q,H,"Generator"),V(q,z,(function(){return this})),V(q,"toString",(function(){return"[object Generator]"})),b.keys=function(re){var K=Object(re),ie=[];for(var le in K)ie.push(le);return ie.reverse(),function ae(){for(;ie.length;){var ve=ie.pop();if(ve in K)return ae.value=ve,ae.done=!1,ae}return ae.done=!0,ae}},b.values=Ne,Fe.prototype={constructor:Fe,reset:function(re){if(this.prev=0,this.next=0,this.sent=this._sent=E,this.done=!1,this.delegate=null,this.method="next",this.arg=E,this.tryEntries.forEach(Ae),!re)for(var K in this)K.charAt(0)==="t"&&M.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=E)},stop:function(){this.done=!0;var re=this.tryEntries[0].completion;if(re.type==="throw")throw re.arg;return this.rval},dispatchException:function(re){if(this.done)throw re;var K=this;function ie(_e,ue){return ve.type="throw",ve.arg=re,K.next=_e,ue&&(K.method="next",K.arg=E),!!ue}for(var le=this.tryEntries.length-1;le>=0;--le){var ae=this.tryEntries[le],ve=ae.completion;if(ae.tryLoc==="root")return ie("end");if(ae.tryLoc<=this.prev){var Re=M.call(ae,"catchLoc"),Se=M.call(ae,"finallyLoc");if(Re&&Se){if(this.prev<ae.catchLoc)return ie(ae.catchLoc,!0);if(this.prev<ae.finallyLoc)return ie(ae.finallyLoc)}else if(Re){if(this.prev<ae.catchLoc)return ie(ae.catchLoc,!0)}else{if(!Se)throw new Error("try statement without catch or finally");if(this.prev<ae.finallyLoc)return ie(ae.finallyLoc)}}}},abrupt:function(re,K){for(var ie=this.tryEntries.length-1;ie>=0;--ie){var le=this.tryEntries[ie];if(le.tryLoc<=this.prev&&M.call(le,"finallyLoc")&&this.prev<le.finallyLoc){var ae=le;break}}ae&&(re==="break"||re==="continue")&&ae.tryLoc<=K&&K<=ae.finallyLoc&&(ae=null);var ve=ae?ae.completion:{};return ve.type=re,ve.arg=K,ae?(this.method="next",this.next=ae.finallyLoc,Z):this.complete(ve)},complete:function(re,K){if(re.type==="throw")throw re.arg;return re.type==="break"||re.type==="continue"?this.next=re.arg:re.type==="return"?(this.rval=this.arg=re.arg,this.method="return",this.next="end"):re.type==="normal"&&K&&(this.next=K),Z},finish:function(re){for(var K=this.tryEntries.length-1;K>=0;--K){var ie=this.tryEntries[K];if(ie.finallyLoc===re)return this.complete(ie.completion,ie.afterLoc),Ae(ie),Z}},catch:function(re){for(var K=this.tryEntries.length-1;K>=0;--K){var ie=this.tryEntries[K];if(ie.tryLoc===re){var le=ie.completion;if(le.type==="throw"){var ae=le.arg;Ae(ie)}return ae}}throw new Error("illegal catch attempt")},delegateYield:function(re,K,ie){return this.delegate={iterator:Ne(re),resultName:K,nextLoc:ie},this.method==="next"&&(this.arg=E),Z}},b}function R(E,b){var T=typeof Symbol<"u"&&E[Symbol.iterator]||E["@@iterator"];if(!T){if(Array.isArray(E)||(T=(function(H,V){if(H){if(typeof H=="string")return m(H,V);var Y=Object.prototype.toString.call(H).slice(8,-1);if(Y==="Object"&&H.constructor&&(Y=H.constructor.name),Y==="Map"||Y==="Set")return Array.from(H);if(Y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y))return m(H,V)}})(E))||b){T&&(E=T);var M=0,O=function(){};return{s:O,n:function(){return M>=E.length?{done:!0}:{done:!1,value:E[M++]}},e:function(H){throw H},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
12
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F,z=!0,$=!1;return{s:function(){T=T.call(E)},n:function(){var H=T.next();return z=H.done,H},e:function(H){$=!0,F=H},f:function(){try{z||T.return==null||T.return()}finally{if($)throw F}}}}function m(E,b){(b==null||b>E.length)&&(b=E.length);for(var T=0,M=new Array(b);T<b;T++)M[T]=E[T];return M}function x(E,b,T,M,O,F,z){try{var $=E[F](z),H=$.value}catch(V){return void T(V)}$.done?b(H):Promise.resolve(H).then(M,O)}var g,S,C=o.EventHandlers={keyEvent:function(E,b,T,M,O){var F=this.inputmask,z=F.opts,$=F.dependencyLib,H=F.maskset,V=this,Y=$(V),D=E.key,P=k.caret.call(F,V),I=z.onKeyDown.call(this,E,k.getBuffer.call(F),P,z);if(I!==void 0)return I;if(D===_.keys.Backspace||D===_.keys.Delete||p.iphone&&D===_.keys.BACKSPACE_SAFARI||E.ctrlKey&&D===_.keys.x&&!("oncut"in V))E.preventDefault(),w.handleRemove.call(F,V,D,P),(0,f.writeBuffer)(V,k.getBuffer.call(F,!0),H.p,E,V.inputmask._valueGet()!==k.getBuffer.call(F).join(""));else if(D===_.keys.End||D===_.keys.PageDown){E.preventDefault();var N=k.seekNext.call(F,k.getLastValidPosition.call(F));k.caret.call(F,V,E.shiftKey?P.begin:N,N,!0)}else D===_.keys.Home&&!E.shiftKey||D===_.keys.PageUp?(E.preventDefault(),k.caret.call(F,V,0,E.shiftKey?P.begin:0,!0)):z.undoOnEscape&&D===_.keys.Escape&&E.altKey!==!0?((0,f.checkVal)(V,!0,!1,F.undoValue.split("")),Y.trigger("click")):D!==_.keys.Insert||E.shiftKey||E.ctrlKey||F.userOptions.insertMode!==void 0?z.tabThrough===!0&&D===_.keys.Tab?E.shiftKey===!0?(P.end=k.seekPrevious.call(F,P.end,!0),y.getTest.call(F,P.end-1).match.static===!0&&P.end--,P.begin=k.seekPrevious.call(F,P.end,!0),P.begin>=0&&P.end>0&&(E.preventDefault(),k.caret.call(F,V,P.begin,P.end))):(P.begin=k.seekNext.call(F,P.begin,!0),P.end=k.seekNext.call(F,P.begin,!0),P.end<H.maskLength&&P.end--,P.begin<=H.maskLength&&(E.preventDefault(),k.caret.call(F,V,P.begin,P.end))):E.shiftKey||(z.insertModeVisual&&z.insertMode===!1?D===_.keys.ArrowRight?setTimeout((function(){var U=k.caret.call(F,V);k.caret.call(F,V,U.begin)}),0):D===_.keys.ArrowLeft&&setTimeout((function(){var U=k.translatePosition.call(F,V.inputmask.caretPos.begin);k.translatePosition.call(F,V.inputmask.caretPos.end),F.isRTL?k.caret.call(F,V,U+(U===H.maskLength?0:1)):k.caret.call(F,V,U-(U===0?0:1))}),0):F.keyEventHook===void 0||F.keyEventHook(E)):w.isSelection.call(F,P)?z.insertMode=!z.insertMode:(z.insertMode=!z.insertMode,k.caret.call(F,V,P.begin,P.begin));return F.isComposing=D==_.keys.Process||D==_.keys.Unidentified,F.ignorable=D.length>1&&!(V.tagName.toLowerCase()==="textarea"&&D==_.keys.Enter),C.keypressEvent.call(this,E,b,T,M,O)},keypressEvent:function(E,b,T,M,O){var F=this.inputmask||this,z=F.opts,$=F.dependencyLib,H=F.maskset,V=F.el,Y=$(V),D=E.key;if(b===!0||E.ctrlKey&&E.altKey&&!F.ignorable||!(E.ctrlKey||E.metaKey||F.ignorable)){if(D){var P,I=b?{begin:O,end:O}:k.caret.call(F,V);b||(D=z.substitutes[D]||D),H.writeOutBuffer=!0;var N=w.isValid.call(F,I,D,M,void 0,void 0,void 0,b);if(N!==!1&&(k.resetMaskSet.call(F,!0),P=N.caret!==void 0?N.caret:k.seekNext.call(F,N.pos.begin?N.pos.begin:N.pos),H.p=P),P=z.numericInput&&N.caret===void 0?k.seekPrevious.call(F,P):P,T!==!1&&(setTimeout((function(){z.onKeyValidation.call(V,D,N)}),0),H.writeOutBuffer&&N!==!1)){var U=k.getBuffer.call(F);(0,f.writeBuffer)(V,U,P,E,b!==!0)}if(E.preventDefault(),b)return N!==!1&&(N.forwardPosition=P),N}}else D===_.keys.Enter&&F.undoValue!==F._valueGet(!0)&&(F.undoValue=F._valueGet(!0),setTimeout((function(){Y.trigger("change")}),0))},pasteEvent:(g=v().mark((function E(b){var T,M,O,F,z,$;return v().wrap((function(H){for(;;)switch(H.prev=H.next){case 0:T=function(V,Y,D,P,I){var N=k.caret.call(V,Y,void 0,void 0,!0),U=D.substr(0,N.begin),Z=D.substr(N.end,D.length);if(U==(V.isRTL?k.getBufferTemplate.call(V).slice().reverse():k.getBufferTemplate.call(V)).slice(0,N.begin).join("")&&(U=""),Z==(V.isRTL?k.getBufferTemplate.call(V).slice().reverse():k.getBufferTemplate.call(V)).slice(N.end).join("")&&(Z=""),P=U+P+Z,V.isRTL&&F.numericInput!==!0){P=P.split("");var j,ne=R(k.getBufferTemplate.call(V));try{for(ne.s();!(j=ne.n()).done;){var G=j.value;P[0]===G&&P.shift()}}catch(Q){ne.e(Q)}finally{ne.f()}P=P.reverse().join("")}var B=P;if(typeof I=="function"){if((B=I.call(V,B,F))===!1)return!1;B||(B=D)}(0,f.checkVal)(Y,!0,!1,B.toString().split(""),b)},M=this,O=this.inputmask,F=O.opts,z=O._valueGet(!0),O.skipInputEvent=!0,b.clipboardData&&b.clipboardData.getData?$=b.clipboardData.getData("text/plain"):h.default.clipboardData&&h.default.clipboardData.getData&&($=h.default.clipboardData.getData("Text")),T(O,M,z,$,F.onBeforePaste),b.preventDefault();case 7:case"end":return H.stop()}}),E,this)})),S=function(){var E=this,b=arguments;return new Promise((function(T,M){var O=g.apply(E,b);function F($){x(O,T,M,F,z,"next",$)}function z($){x(O,T,M,F,z,"throw",$)}F(void 0)}))},function(E){return S.apply(this,arguments)}),inputFallBackEvent:function(E){var b=this.inputmask,T=b.opts,M=b.dependencyLib,O,F=this,z=F.inputmask._valueGet(!0),$=(b.isRTL?k.getBuffer.call(b).slice().reverse():k.getBuffer.call(b)).join(""),H=k.caret.call(b,F,void 0,void 0,!0);if($!==z){if(O=(function(Y,D,P){for(var I,N,U,Z=Y.substr(0,P.begin).split(""),j=Y.substr(P.begin).split(""),ne=D.substr(0,P.begin).split(""),G=D.substr(P.begin).split(""),B=Z.length>=ne.length?Z.length:ne.length,Q=j.length>=G.length?j.length:G.length,X="",q=[],oe="~";Z.length<B;)Z.push(oe);for(;ne.length<B;)ne.push(oe);for(;j.length<Q;)j.unshift(oe);for(;G.length<Q;)G.unshift(oe);var se=Z.concat(j),pe=ne.concat(G);for(N=0,I=se.length;N<I;N++)switch(U=y.getPlaceholder.call(b,k.translatePosition.call(b,N)),X){case"insertText":pe[N-1]===se[N]&&P.begin==se.length-1&&q.push(se[N]),N=I;break;case"insertReplacementText":case"deleteContentBackward":se[N]===oe?P.end++:N=I;break;default:se[N]!==pe[N]&&(se[N+1]!==oe&&se[N+1]!==U&&se[N+1]!==void 0||(pe[N]!==U||pe[N+1]!==oe)&&pe[N]!==oe?pe[N+1]===oe&&pe[N]===se[N+1]?(X="insertText",q.push(se[N]),P.begin--,P.end--):se[N]!==U&&se[N]!==oe&&(se[N+1]===oe||pe[N]!==se[N]&&pe[N+1]===se[N+1])?(X="insertReplacementText",q.push(se[N]),P.begin--):se[N]===oe?(X="deleteContentBackward",(k.isMask.call(b,k.translatePosition.call(b,N),!0)||pe[N]===T.radixPoint)&&P.end++):N=I:(X="insertText",q.push(se[N]),P.begin--,P.end--))}return{action:X,data:q,caret:P}})(z,$,H),(F.inputmask.shadowRoot||F.ownerDocument).activeElement!==F&&F.focus(),(0,f.writeBuffer)(F,k.getBuffer.call(b)),k.caret.call(b,F,H.begin,H.end,!0),!p.mobile&&b.skipNextInsert&&E.inputType==="insertText"&&O.action==="insertText"&&b.isComposing)return!1;switch(E.inputType==="insertCompositionText"&&O.action==="insertText"&&b.isComposing?b.skipNextInsert=!0:b.skipNextInsert=!1,O.action){case"insertText":case"insertReplacementText":O.data.forEach((function(Y,D){var P=new M.Event("keypress");P.key=Y,b.ignorable=!1,C.keypressEvent.call(F,P)})),setTimeout((function(){b.$el.trigger("keyup")}),0);break;case"deleteContentBackward":var V=new M.Event("keydown");V.key=_.keys.Backspace,C.keyEvent.call(F,V);break;default:(0,f.applyInputValue)(F,z),k.caret.call(b,F,H.begin,H.end,!0)}E.preventDefault()}},setValueEvent:function(E){var b=this.inputmask,T=b.dependencyLib,M=this,O=E&&E.detail?E.detail[0]:arguments[1];O===void 0&&(O=M.inputmask._valueGet(!0)),(0,f.applyInputValue)(M,O,new T.Event("input")),(E.detail&&E.detail[1]!==void 0||arguments[2]!==void 0)&&k.caret.call(b,M,E.detail?E.detail[1]:arguments[2])},focusEvent:function(E){var b=this.inputmask,T=b.opts,M=b&&b._valueGet();T.showMaskOnFocus&&M!==k.getBuffer.call(b).join("")&&(0,f.writeBuffer)(this,k.getBuffer.call(b),k.seekNext.call(b,k.getLastValidPosition.call(b))),T.positionCaretOnTab!==!0||b.mouseEnter!==!1||w.isComplete.call(b,k.getBuffer.call(b))&&k.getLastValidPosition.call(b)!==-1||C.clickEvent.apply(this,[E,!0]),b.undoValue=b&&b._valueGet(!0)},invalidEvent:function(E){this.inputmask.validationEvent=!0},mouseleaveEvent:function(){var E=this.inputmask,b=E.opts,T=this;E.mouseEnter=!1,b.clearMaskOnLostFocus&&(T.inputmask.shadowRoot||T.ownerDocument).activeElement!==T&&(0,f.HandleNativePlaceholder)(T,E.originalPlaceholder)},clickEvent:function(E,b){var T=this.inputmask;T.clicked++;var M=this;if((M.inputmask.shadowRoot||M.ownerDocument).activeElement===M){var O=k.determineNewCaretPosition.call(T,k.caret.call(T,M),b);O!==void 0&&k.caret.call(T,M,O)}},cutEvent:function(E){var b=this.inputmask,T=b.maskset,M=this,O=k.caret.call(b,M),F=b.isRTL?k.getBuffer.call(b).slice(O.end,O.begin):k.getBuffer.call(b).slice(O.begin,O.end),z=b.isRTL?F.reverse().join(""):F.join("");h.default.navigator&&h.default.navigator.clipboard?h.default.navigator.clipboard.writeText(z):h.default.clipboardData&&h.default.clipboardData.getData&&h.default.clipboardData.setData("Text",z),w.handleRemove.call(b,M,_.keys.Delete,O),(0,f.writeBuffer)(M,k.getBuffer.call(b),T.p,E,b.undoValue!==b._valueGet(!0))},blurEvent:function(E){var b=this.inputmask,T=b.opts,M=b.dependencyLib;b.clicked=0;var O=M(this),F=this;if(F.inputmask){(0,f.HandleNativePlaceholder)(F,b.originalPlaceholder);var z=F.inputmask._valueGet(),$=k.getBuffer.call(b).slice();z!==""&&(T.clearMaskOnLostFocus&&(k.getLastValidPosition.call(b)===-1&&z===k.getBufferTemplate.call(b).join("")?$=[]:f.clearOptionalTail.call(b,$)),w.isComplete.call(b,$)===!1&&(setTimeout((function(){O.trigger("incomplete")}),0),T.clearIncomplete&&(k.resetMaskSet.call(b,!1),$=T.clearMaskOnLostFocus?[]:k.getBufferTemplate.call(b).slice())),(0,f.writeBuffer)(F,$,void 0,E)),z=b._valueGet(!0),b.undoValue!==z&&(z!=""||b.undoValue!=k.getBufferTemplate.call(b).join("")||b.undoValue==k.getBufferTemplate.call(b).join("")&&b.maskset.validPositions.length>0)&&(b.undoValue=z,O.trigger("change"))}},mouseenterEvent:function(){var E=this.inputmask,b=E.opts.showMaskOnHover,T=this;if(E.mouseEnter=!0,(T.inputmask.shadowRoot||T.ownerDocument).activeElement!==T){var M=(E.isRTL?k.getBufferTemplate.call(E).slice().reverse():k.getBufferTemplate.call(E)).join("");b&&(0,f.HandleNativePlaceholder)(T,M)}},submitEvent:function(){var E=this.inputmask,b=E.opts;E.undoValue!==E._valueGet(!0)&&E.$el.trigger("change"),k.getLastValidPosition.call(E)===-1&&E._valueGet&&E._valueGet()===k.getBufferTemplate.call(E).join("")&&E._valueSet(""),b.clearIncomplete&&w.isComplete.call(E,k.getBuffer.call(E))===!1&&E._valueSet(""),b.removeMaskOnSubmit&&(E._valueSet(E.unmaskedvalue(),!0),setTimeout((function(){(0,f.writeBuffer)(E.el,k.getBuffer.call(E))}),0))},resetEvent:function(){var E=this.inputmask;E.refreshValue=!0,setTimeout((function(){(0,f.applyInputValue)(E.el,E._valueGet(!0))}),0)}}},9716:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.EventRuler=void 0;var c,d=u(7760),p=(c=u(2394))&&c.__esModule?c:{default:c},h=u(2839),f=u(8711);o.EventRuler={on:function(_,k,w){var y=_.inputmask.dependencyLib,v=function(R){R.originalEvent&&(R=R.originalEvent||R,arguments[0]=R);var m,x=this,g=x.inputmask,S=g?g.opts:void 0;if(g===void 0&&this.nodeName!=="FORM"){var C=y.data(x,"_inputmask_opts");y(x).off(),C&&new p.default(C).mask(x)}else{if(["submit","reset","setvalue"].includes(R.type)||this.nodeName==="FORM"||!(x.disabled||x.readOnly&&!(R.type==="keydown"&&R.ctrlKey&&R.key===h.keys.c||S.tabThrough===!1&&R.key===h.keys.Tab))){switch(R.type){case"input":if(g.skipInputEvent===!0)return g.skipInputEvent=!1,R.preventDefault();break;case"click":case"focus":return g.validationEvent?(g.validationEvent=!1,_.blur(),(0,d.HandleNativePlaceholder)(_,(g.isRTL?f.getBufferTemplate.call(g).slice().reverse():f.getBufferTemplate.call(g)).join("")),setTimeout((function(){_.focus()}),S.validationEventTimeOut),!1):(m=arguments,void setTimeout((function(){_.inputmask&&w.apply(x,m)}),0))}var E=w.apply(x,arguments);return E===!1&&(R.preventDefault(),R.stopPropagation()),E}R.preventDefault()}};["submit","reset"].includes(k)?(v=v.bind(_),_.form!==null&&y(_.form).on(k,v)):y(_).on(k,v),_.inputmask.events[k]=_.inputmask.events[k]||[],_.inputmask.events[k].push(v)},off:function(_,k){if(_.inputmask&&_.inputmask.events){var w=_.inputmask.dependencyLib,y=_.inputmask.events;for(var v in k&&((y=[])[k]=_.inputmask.events[k]),y){for(var R=y[v];R.length>0;){var m=R.pop();["submit","reset"].includes(v)?_.form!==null&&w(_.form).off(v,m):w(_).off(v,m)}delete _.inputmask.events[v]}}}}},219:function(a,o,u){var c=v(u(7184)),d=v(u(2394)),p=u(2839),h=u(8711),f=u(4713);function _(D,P){return(function(I){if(Array.isArray(I))return I})(D)||(function(I,N){var U=I==null?null:typeof Symbol<"u"&&I[Symbol.iterator]||I["@@iterator"];if(U!=null){var Z,j,ne,G,B=[],Q=!0,X=!1;try{if(ne=(U=U.call(I)).next,N!==0)for(;!(Q=(Z=ne.call(U)).done)&&(B.push(Z.value),B.length!==N);Q=!0);}catch(q){X=!0,j=q}finally{try{if(!Q&&U.return!=null&&(G=U.return(),Object(G)!==G))return}finally{if(X)throw j}}return B}})(D,P)||(function(I,N){if(I){if(typeof I=="string")return k(I,N);var U=Object.prototype.toString.call(I).slice(8,-1);if(U==="Object"&&I.constructor&&(U=I.constructor.name),U==="Map"||U==="Set")return Array.from(I);if(U==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(U))return k(I,N)}})(D,P)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function k(D,P){(P==null||P>D.length)&&(P=D.length);for(var I=0,N=new Array(P);I<P;I++)N[I]=D[I];return N}function w(D){return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(P){return typeof P}:function(P){return P&&typeof Symbol=="function"&&P.constructor===Symbol&&P!==Symbol.prototype?"symbol":typeof P},w(D)}function y(D,P){for(var I=0;I<P.length;I++){var N=P[I];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(D,(U=N.key,Z=void 0,Z=(function(j,ne){if(w(j)!=="object"||j===null)return j;var G=j[Symbol.toPrimitive];if(G!==void 0){var B=G.call(j,ne);if(w(B)!=="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(ne==="string"?String:Number)(j)})(U,"string"),w(Z)==="symbol"?Z:String(Z)),N)}var U,Z}function v(D){return D&&D.__esModule?D:{default:D}}u(1313);var R=d.default.dependencyLib,m=(function(){function D(N,U,Z,j){(function(ne,G){if(!(ne instanceof G))throw new TypeError("Cannot call a class as a function")})(this,D),this.mask=N,this.format=U,this.opts=Z,this.inputmask=j,this._date=new Date(1,0,1),this.initDateObject(N,this.opts,this.inputmask)}var P,I;return P=D,(I=[{key:"date",get:function(){return this._date===void 0&&(this._date=new Date(1,0,1),this.initDateObject(void 0,this.opts,this.inputmask)),this._date}},{key:"initDateObject",value:function(N,U,Z){var j;for(O(U).lastIndex=0;j=O(U).exec(this.format);){var ne=/\d+$/.exec(j[0]),G=ne?j[0][0]+"x":j[0],B=void 0;if(N!==void 0){if(ne){var Q=O(U).lastIndex,X=Y.call(Z,j.index,U,Z&&Z.maskset);O(U).lastIndex=Q,B=N.slice(0,N.indexOf(X.nextMatch[0]))}else{for(var q=j[0][0],oe=j.index;Z&&(U.placeholder[f.getTest.call(Z,oe).match.placeholder]||f.getTest.call(Z,oe).match.placeholder)===q;)oe++;var se=oe-j.index;B=N.slice(0,se||C[G]&&C[G][4]||G.length)}N=N.slice(B.length)}Object.prototype.hasOwnProperty.call(C,G)&&this.setValue(this,B,G,C[G][2],C[G][1])}}},{key:"setValue",value:function(N,U,Z,j,ne){if(U!==void 0)switch(j){case"ampm":N[j]=U,N["raw"+j]=U.replace(/\s/g,"_");break;case"month":if(Z==="mmm"||Z==="mmmm"){N[j]=$(Z==="mmm"?g.monthNames.slice(0,12).findIndex((function(B){return U.toLowerCase()===B.toLowerCase()}))+1:g.monthNames.slice(12,24).findIndex((function(B){return U.toLowerCase()===B.toLowerCase()}))+1,2),N[j]=N[j]==="00"?"":N[j].toString(),N["raw"+j]=N[j];break}default:N[j]=U.replace(/[^0-9]/g,"0"),N["raw"+j]=U.replace(/\s/g,"_")}if(ne!==void 0){var G=N[j];(j==="day"&&parseInt(G)===29||j==="month"&&parseInt(G)===2)&&(parseInt(N.day)!==29||parseInt(N.month)!==2||N.year!==""&&N.year!==void 0||N._date.setFullYear(2012,1,29)),j==="day"&&(S=!0,parseInt(G)===0&&(G=1)),j==="month"&&(S=!0),j==="year"&&(S=!0,G.length<C[Z][4]&&(G=$(G,C[Z][4],!0))),(G!==""&&!isNaN(G)||j==="ampm")&&ne.call(N._date,G)}}},{key:"reset",value:function(){this._date=new Date(1,0,1)}},{key:"reInit",value:function(){this._date=void 0,this.date}}])&&y(P.prototype,I),Object.defineProperty(P,"prototype",{writable:!1}),D})(),x=new Date().getFullYear(),g=d.default.prototype.i18n,S=!1,C={d:["[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",Date.prototype.getDate],dd:["0[1-9]|[12][0-9]|3[01]",Date.prototype.setDate,"day",function(){return $(Date.prototype.getDate.call(this),2)}],ddd:[""],dddd:[""],m:["[1-9]|1[012]",function(D){var P=D?parseInt(D):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return Date.prototype.getMonth.call(this)+1}],mm:["0[1-9]|1[012]",function(D){var P=D?parseInt(D):0;return P>0&&P--,Date.prototype.setMonth.call(this,P)},"month",function(){return $(Date.prototype.getMonth.call(this)+1,2)}],mmm:[g.monthNames.slice(0,12).join("|"),function(D){var P=g.monthNames.slice(0,12).findIndex((function(I){return D.toLowerCase()===I.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return g.monthNames.slice(0,12)[Date.prototype.getMonth.call(this)]}],mmmm:[g.monthNames.slice(12,24).join("|"),function(D){var P=g.monthNames.slice(12,24).findIndex((function(I){return D.toLowerCase()===I.toLowerCase()}));return P!==-1&&Date.prototype.setMonth.call(this,P)},"month",function(){return g.monthNames.slice(12,24)[Date.prototype.getMonth.call(this)]}],yy:["[0-9]{2}",function(D){var P=new Date().getFullYear().toString().slice(0,2);Date.prototype.setFullYear.call(this,"".concat(P).concat(D))},"year",function(){return $(Date.prototype.getFullYear.call(this),2)},2],yyyy:["[0-9]{4}",Date.prototype.setFullYear,"year",function(){return $(Date.prototype.getFullYear.call(this),4)},4],h:["[1-9]|1[0-2]",Date.prototype.setHours,"hours",Date.prototype.getHours],hh:["0[1-9]|1[0-2]",Date.prototype.setHours,"hours",function(){return $(Date.prototype.getHours.call(this),2)}],hx:[function(D){return"[0-9]{".concat(D,"}")},Date.prototype.setHours,"hours",function(D){return Date.prototype.getHours}],H:["1?[0-9]|2[0-3]",Date.prototype.setHours,"hours",Date.prototype.getHours],HH:["0[0-9]|1[0-9]|2[0-3]",Date.prototype.setHours,"hours",function(){return $(Date.prototype.getHours.call(this),2)}],Hx:[function(D){return"[0-9]{".concat(D,"}")},Date.prototype.setHours,"hours",function(D){return function(){return $(Date.prototype.getHours.call(this),D)}}],M:["[1-5]?[0-9]",Date.prototype.setMinutes,"minutes",Date.prototype.getMinutes],MM:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setMinutes,"minutes",function(){return $(Date.prototype.getMinutes.call(this),2)}],s:["[1-5]?[0-9]",Date.prototype.setSeconds,"seconds",Date.prototype.getSeconds],ss:["0[0-9]|1[0-9]|2[0-9]|3[0-9]|4[0-9]|5[0-9]",Date.prototype.setSeconds,"seconds",function(){return $(Date.prototype.getSeconds.call(this),2)}],l:["[0-9]{3}",Date.prototype.setMilliseconds,"milliseconds",function(){return $(Date.prototype.getMilliseconds.call(this),3)},3],L:["[0-9]{2}",Date.prototype.setMilliseconds,"milliseconds",function(){return $(Date.prototype.getMilliseconds.call(this),2)},2],t:["[ap]",b,"ampm",T,1],tt:["[ap]m",b,"ampm",T,2],T:["[AP]",b,"ampm",T,1],TT:["[AP]M",b,"ampm",T,2],Z:[".*",void 0,"Z",function(){var D=this.toString().match(/\((.+)\)/)[1];return D.includes(" ")&&(D=(D=D.replace("-"," ").toUpperCase()).split(" ").map((function(P){return _(P,1)[0]})).join("")),D}],o:[""],S:[""]},E={isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"};function b(D){var P=this.getHours();D.toLowerCase().includes("p")?this.setHours(P+12):D.toLowerCase().includes("a")&&P>=12&&this.setHours(P-12)}function T(){var D=this.getHours();return(D=D||12)>=12?"PM":"AM"}function M(D){var P=/\d+$/.exec(D[0]);if(P&&P[0]!==void 0){var I=C[D[0][0]+"x"].slice("");return I[0]=I[0](P[0]),I[3]=I[3](P[0]),I}if(C[D[0]])return C[D[0]]}function O(D){if(!D.tokenizer){var P=[],I=[];for(var N in C)if(/\.*x$/.test(N)){var U=N[0]+"\\d+";I.indexOf(U)===-1&&I.push(U)}else P.indexOf(N[0])===-1&&P.push(N[0]);D.tokenizer="("+(I.length>0?I.join("|")+"|":"")+P.join("+|")+")+?|.",D.tokenizer=new RegExp(D.tokenizer,"g")}return D.tokenizer}function F(D,P,I){if(!S)return!0;if(D.rawday===void 0||!isFinite(D.rawday)&&new Date(D.date.getFullYear(),isFinite(D.rawmonth)?D.month:D.date.getMonth()+1,0).getDate()>=D.day||D.day=="29"&&(!isFinite(D.rawyear)||D.rawyear===void 0||D.rawyear==="")||new Date(D.date.getFullYear(),isFinite(D.rawmonth)?D.month:D.date.getMonth()+1,0).getDate()>=D.day)return P;if(D.day=="29"){var N=Y.call(this,P.pos,I,this.maskset);if(N.targetMatch&&N.targetMatch[0]==="yyyy"&&P.pos-N.targetMatchIndex==2)return P.remove=P.pos+1,P}else if(D.date.getMonth()==2&&D.day=="30"&&P.c!==void 0)return D.day="03",D.date.setDate(3),D.date.setMonth(1),P.insert=[{pos:P.pos,c:"0"},{pos:P.pos+1,c:P.c}],P.caret=h.seekNext.call(this,P.pos+1),P;return!1}function z(D,P,I,N){var U,Z,j="",ne=0,G={};for(O(I).lastIndex=0;U=O(I).exec(D);){if(P===void 0)if(Z=M(U))j+="("+Z[0]+")",I.placeholder&&I.placeholder!==""?(G[ne]=I.placeholder[U.index%I.placeholder.length],G[I.placeholder[U.index%I.placeholder.length]]=U[0].charAt(0)):G[ne]=U[0].charAt(0);else switch(U[0]){case"[":j+="(";break;case"]":j+=")?";break;default:j+=(0,c.default)(U[0]),G[ne]=U[0].charAt(0)}else(Z=M(U))?N!==!0&&Z[3]?j+=Z[3].call(P.date):Z[2]?j+=P["raw"+Z[2]]:j+=U[0]:j+=U[0];ne++}return P===void 0&&(I.placeholder=G),j}function $(D,P,I){for(D=String(D),P=P||2;D.length<P;)D=I?D+"0":"0"+D;return D}function H(D,P,I){return typeof D=="string"?new m(D,P,I,this):D&&w(D)==="object"&&Object.prototype.hasOwnProperty.call(D,"date")?D:void 0}function V(D,P){return z(P.inputFormat,{date:D},P)}function Y(D,P,I){var N,U,Z=this,j=I&&I.tests[D]?P.placeholder[I.tests[D][0].match.placeholder]||I.tests[D][0].match.placeholder:"",ne=0,G=0;for(O(P).lastIndex=0;U=O(P).exec(P.inputFormat);){var B=/\d+$/.exec(U[0]);if(B)G=parseInt(B[0]);else{for(var Q=U[0][0],X=ne;Z&&(P.placeholder[f.getTest.call(Z,X).match.placeholder]||f.getTest.call(Z,X).match.placeholder)===Q;)X++;(G=X-ne)===0&&(G=U[0].length)}if(ne+=G,U[0].indexOf(j)!=-1||ne>=D+1){N=U,U=O(P).exec(P.inputFormat);break}}return{targetMatchIndex:ne-G,nextMatch:U,targetMatch:N}}d.default.extendAliases({datetime:{mask:function(D){return D.numericInput=!1,C.S=g.ordinalSuffix.join("|"),D.inputFormat=E[D.inputFormat]||D.inputFormat,D.displayFormat=E[D.displayFormat]||D.displayFormat||D.inputFormat,D.outputFormat=E[D.outputFormat]||D.outputFormat||D.inputFormat,D.regex=z(D.inputFormat,void 0,D),D.min=H(D.min,D.inputFormat,D),D.max=H(D.max,D.inputFormat,D),null},placeholder:"",inputFormat:"isoDateTime",displayFormat:null,outputFormat:null,min:null,max:null,skipOptionalPartCharacter:"",preValidation:function(D,P,I,N,U,Z,j,ne){if(ne)return!0;if(isNaN(I)&&D[P]!==I){var G=Y.call(this,P,U,Z);if(G.nextMatch&&G.nextMatch[0]===I&&G.targetMatch[0].length>1){var B=M(G.targetMatch)[0];if(new RegExp(B).test("0"+D[P-1]))return D[P]=D[P-1],D[P-1]="0",{fuzzy:!0,buffer:D,refreshFromBuffer:{start:P-1,end:P+1},pos:P+1}}}return!0},postValidation:function(D,P,I,N,U,Z,j,ne){var G,B,Q=this;if(j)return!0;if(N===!1&&(((G=Y.call(Q,P+1,U,Z)).targetMatch&&G.targetMatchIndex===P&&G.targetMatch[0].length>1&&C[G.targetMatch[0]]!==void 0||(G=Y.call(Q,P+2,U,Z)).targetMatch&&G.targetMatchIndex===P+1&&G.targetMatch[0].length>1&&C[G.targetMatch[0]]!==void 0)&&(B=M(G.targetMatch)[0]),B!==void 0&&(Z.validPositions[P+1]!==void 0&&new RegExp(B).test(I+"0")?(D[P]=I,D[P+1]="0",N={pos:P+2,caret:P}):new RegExp(B).test("0"+I)&&(D[P]="0",D[P+1]=I,N={pos:P+2})),N===!1))return N;if(N.fuzzy&&(D=N.buffer,P=N.pos),(G=Y.call(Q,P,U,Z)).targetMatch&&G.targetMatch[0]&&C[G.targetMatch[0]]!==void 0){var X=M(G.targetMatch);B=X[0];var q=D.slice(G.targetMatchIndex,G.targetMatchIndex+G.targetMatch[0].length);if(new RegExp(B).test(q.join(""))===!1&&G.targetMatch[0].length===2&&Z.validPositions[G.targetMatchIndex]&&Z.validPositions[G.targetMatchIndex+1]&&(Z.validPositions[G.targetMatchIndex+1].input="0"),X[2]=="year")for(var oe=f.getMaskTemplate.call(Q,!1,1,void 0,!0),se=P+1;se<D.length;se++)D[se]=oe[se],Z.validPositions.splice(P+1,1)}var pe=N,me=H.call(Q,D.join(""),U.inputFormat,U);return pe&&!isNaN(me.date.getTime())&&(U.prefillYear&&(pe=(function(we,Ae,Fe){if(we.year!==we.rawyear){var Ne=x.toString(),re=we.rawyear.replace(/[^0-9]/g,""),K=Ne.slice(0,re.length),ie=Ne.slice(re.length);if(re.length===2&&re===K){var le=new Date(x,we.month-1,we.day);we.day==le.getDate()&&(!Fe.max||Fe.max.date.getTime()>=le.getTime())&&(we.date.setFullYear(x),we.year=Ne,Ae.insert=[{pos:Ae.pos+1,c:ie[0]},{pos:Ae.pos+2,c:ie[1]}])}}return Ae})(me,pe,U)),pe=(function(we,Ae,Fe,Ne,re){if(!Ae)return Ae;if(Ae&&Fe.min&&!isNaN(Fe.min.date.getTime())){var K;for(we.reset(),O(Fe).lastIndex=0;K=O(Fe).exec(Fe.inputFormat);){var ie;if((ie=M(K))&&ie[3]){for(var le=ie[1],ae=we[ie[2]],ve=Fe.min[ie[2]],Re=Fe.max?Fe.max[ie[2]]:ve+1,Se=[],_e=!1,ue=0;ue<ve.length;ue++)Ne.validPositions[ue+K.index]!==void 0||_e?(Se[ue]=ae[ue],_e=_e||ae[ue]>ve[ue]):(ue+K.index==0&&ae[ue]<ve[ue]?(Se[ue]=ae[ue],_e=!0):Se[ue]=ve[ue],ie[2]==="year"&&ae.length-1==ue&&ve!=Re&&(Se=(parseInt(Se.join(""))+1).toString().split("")),ie[2]==="ampm"&&ve!=Re&&Fe.min.date.getTime()>we.date.getTime()&&(Se[ue]=Re[ue]));le.call(we._date,Se.join(""))}}Ae=Fe.min.date.getTime()<=we.date.getTime(),we.reInit()}return Ae&&Fe.max&&(isNaN(Fe.max.date.getTime())||(Ae=Fe.max.date.getTime()>=we.date.getTime())),Ae})(me,pe=F.call(Q,me,pe,U),U,Z)),P!==void 0&&pe&&N.pos!==P?{buffer:z(U.inputFormat,me,U).split(""),refreshFromBuffer:{start:P,end:N.pos},pos:N.caret||N.pos}:pe},onKeyDown:function(D,P,I,N){D.ctrlKey&&D.key===p.keys.ArrowRight&&(this.inputmask._valueSet(V(new Date,N)),R(this).trigger("setvalue"))},onUnMask:function(D,P,I){return P&&z(I.outputFormat,H.call(this,D,I.inputFormat,I),I,!0)},casing:function(D,P,I,N){if(P.nativeDef.indexOf("[ap]")==0)return D.toLowerCase();if(P.nativeDef.indexOf("[AP]")==0)return D.toUpperCase();var U=f.getTest.call(this,[I-1]);return U.match.def.indexOf("[AP]")==0||I===0||U&&U.input===String.fromCharCode(p.keyCode.Space)||U&&U.match.def===String.fromCharCode(p.keyCode.Space)?D.toUpperCase():D.toLowerCase()},onBeforeMask:function(D,P){return Object.prototype.toString.call(D)==="[object Date]"&&(D=V(D,P)),D},insertMode:!1,insertModeVisual:!1,shiftPositions:!1,keepStatic:!1,inputmode:"numeric",prefillYear:!0}})},1313:function(a,o,u){var c,d=(c=u(2394))&&c.__esModule?c:{default:c};d.default.dependencyLib.extend(!0,d.default.prototype.i18n,{dayNames:["Mon","Tue","Wed","Thu","Fri","Sat","Sun","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],ordinalSuffix:["st","nd","rd","th"]})},3851:function(a,o,u){var c,d=(c=u(2394))&&c.__esModule?c:{default:c},p=u(8711),h=u(4713);function f(y){return(function(v){if(Array.isArray(v))return _(v)})(y)||(function(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)})(y)||(function(v,R){if(v){if(typeof v=="string")return _(v,R);var m=Object.prototype.toString.call(v).slice(8,-1);if(m==="Object"&&v.constructor&&(m=v.constructor.name),m==="Map"||m==="Set")return Array.from(v);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return _(v,R)}})(y)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function _(y,v){(v==null||v>y.length)&&(v=y.length);for(var R=0,m=new Array(v);R<v;R++)m[R]=y[R];return m}d.default.extendDefinitions({A:{validator:"[A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"&":{validator:"[0-9A-Za-zА-яЁёÀ-ÿµ]",casing:"upper"},"#":{validator:"[0-9A-Fa-f]",casing:"upper"}});var k=/25[0-5]|2[0-4][0-9]|[01][0-9][0-9]/;function w(y,v,R,m,x){if(R-1>-1&&v.buffer[R-1]!=="."?(y=v.buffer[R-1]+y,y=R-2>-1&&v.buffer[R-2]!=="."?v.buffer[R-2]+y:"0"+y):y="00"+y,x.greedy&&parseInt(y)>255&&k.test("00"+y.charAt(2))){var g=[].concat(f(v.buffer.slice(0,R)),[".",y.charAt(2)]);if(g.join("").match(/\./g).length<4)return{refreshFromBuffer:!0,buffer:g,caret:R+2}}return k.test(y)}d.default.extendAliases({cssunit:{regex:"[+-]?[0-9]+\\.?([0-9]+)?(px|em|rem|ex|%|in|cm|mm|pt|pc)"},url:{regex:"(https?|ftp)://.*",autoUnmask:!1,keepStatic:!1,tabThrough:!0},ip:{mask:"i{1,3}.j{1,3}.k{1,3}.l{1,3}",definitions:{i:{validator:w},j:{validator:w},k:{validator:w},l:{validator:w}},onUnMask:function(y,v,R){return y},inputmode:"decimal",substitutes:{",":"."}},email:{mask:function(y){var v=y.separator,R=y.quantifier,m="*{1,64}[.*{1,64}][.*{1,64}][.*{1,63}]@-{1,63}.-{1,63}[.-{1,63}][.-{1,63}]",x=m;if(v)for(var g=0;g<R;g++)x+="[".concat(v).concat(m,"]");return x},greedy:!1,casing:"lower",separator:null,quantifier:5,skipOptionalPartCharacter:"",onBeforePaste:function(y,v){return(y=y.toLowerCase()).replace("mailto:","")},definitions:{"*":{validator:"[0-91-9A-Za-zА-яЁёÀ-ÿµ!#$%&'*+/=?^_`{|}~-]"},"-":{validator:"[0-9A-Za-z-]"}},onUnMask:function(y,v,R){return y},inputmode:"email"},mac:{mask:"##:##:##:##:##:##"},vin:{mask:"V{13}9{4}",definitions:{V:{validator:"[A-HJ-NPR-Za-hj-npr-z\\d]",casing:"upper"}},clearIncomplete:!0,autoUnmask:!0},ssn:{mask:"999-99-9999",postValidation:function(y,v,R,m,x,g,S){var C=h.getMaskTemplate.call(this,!0,p.getLastValidPosition.call(this),!0,!0);return/^(?!219-09-9999|078-05-1120)(?!666|000|9.{2}).{3}-(?!00).{2}-(?!0{4}).{4}$/.test(C.join(""))}}})},207:function(a,o,u){var c=f(u(7184)),d=f(u(2394)),p=u(2839),h=u(8711);function f(m){return m&&m.__esModule?m:{default:m}}var _=d.default.dependencyLib;function k(m,x){for(var g="",S=0;S<m.length;S++)d.default.prototype.definitions[m.charAt(S)]||x.definitions[m.charAt(S)]||x.optionalmarker[0]===m.charAt(S)||x.optionalmarker[1]===m.charAt(S)||x.quantifiermarker[0]===m.charAt(S)||x.quantifiermarker[1]===m.charAt(S)||x.groupmarker[0]===m.charAt(S)||x.groupmarker[1]===m.charAt(S)||x.alternatormarker===m.charAt(S)?g+="\\"+m.charAt(S):g+=m.charAt(S);return g}function w(m,x,g,S){if(m.length>0&&x>0&&(!g.digitsOptional||S)){var C=m.indexOf(g.radixPoint),E=!1;g.negationSymbol.back===m[m.length-1]&&(E=!0,m.length--),C===-1&&(m.push(g.radixPoint),C=m.length-1);for(var b=1;b<=x;b++)isFinite(m[C+b])||(m[C+b]="0")}return E&&m.push(g.negationSymbol.back),m}function y(m,x){var g=0;for(var S in m==="+"&&(g=h.seekNext.call(this,x.validPositions.length-1)),x.tests)if((S=parseInt(S))>=g){for(var C=0,E=x.tests[S].length;C<E;C++)if((x.validPositions[S]===void 0||m==="-")&&x.tests[S][C].match.def===m)return S+(x.validPositions[S]!==void 0&&m!=="-"?1:0)}return g}function v(m,x){for(var g=-1,S=0,C=x.validPositions.length;S<C;S++){var E=x.validPositions[S];if(E&&E.match.def===m){g=S;break}}return g}function R(m,x,g,S,C){var E=x.buffer?x.buffer.indexOf(C.radixPoint):-1,b=(E!==-1||S&&C.jitMasking)&&new RegExp(C.definitions[9].validator).test(m);return!S&&C._radixDance&&E!==-1&&b&&x.validPositions[E]==null?{insert:{pos:E===g?E+1:E,c:C.radixPoint},pos:g}:b}d.default.extendAliases({numeric:{mask:function(m){m.repeat=0,m.groupSeparator===m.radixPoint&&m.digits&&m.digits!=="0"&&(m.radixPoint==="."?m.groupSeparator=",":m.radixPoint===","?m.groupSeparator=".":m.groupSeparator=""),m.groupSeparator===" "&&(m.skipOptionalPartCharacter=void 0),m.placeholder.length>1&&(m.placeholder=m.placeholder.charAt(0)),m.positionCaretOnClick==="radixFocus"&&m.placeholder===""&&(m.positionCaretOnClick="lvp");var x="0",g=m.radixPoint;m.numericInput===!0&&m.__financeInput===void 0?(x="1",m.positionCaretOnClick=m.positionCaretOnClick==="radixFocus"?"lvp":m.positionCaretOnClick,m.digitsOptional=!1,isNaN(m.digits)&&(m.digits=2),m._radixDance=!1,g=m.radixPoint===","?"?":"!",m.radixPoint!==""&&m.definitions[g]===void 0&&(m.definitions[g]={},m.definitions[g].validator="["+m.radixPoint+"]",m.definitions[g].placeholder=m.radixPoint,m.definitions[g].static=!0,m.definitions[g].generated=!0)):(m.__financeInput=!1,m.numericInput=!0);var S,C="[+]";if(C+=k(m.prefix,m),m.groupSeparator!==""?(m.definitions[m.groupSeparator]===void 0&&(m.definitions[m.groupSeparator]={},m.definitions[m.groupSeparator].validator="["+m.groupSeparator+"]",m.definitions[m.groupSeparator].placeholder=m.groupSeparator,m.definitions[m.groupSeparator].static=!0,m.definitions[m.groupSeparator].generated=!0),C+=m._mask(m)):C+="9{+}",m.digits!==void 0&&m.digits!==0){var E=m.digits.toString().split(",");isFinite(E[0])&&E[1]&&isFinite(E[1])?C+=g+x+"{"+m.digits+"}":(isNaN(m.digits)||parseInt(m.digits)>0)&&(m.digitsOptional||m.jitMasking?(S=C+g+x+"{0,"+m.digits+"}",m.keepStatic=!0):C+=g+x+"{"+m.digits+"}")}else m.inputmode="numeric";return C+=k(m.suffix,m),C+="[-]",S&&(C=[S+k(m.suffix,m)+"[-]",C]),m.greedy=!1,(function(b){b.parseMinMaxOptions===void 0&&(b.min!==null&&(b.min=b.min.toString().replace(new RegExp((0,c.default)(b.groupSeparator),"g"),""),b.radixPoint===","&&(b.min=b.min.replace(b.radixPoint,".")),b.min=isFinite(b.min)?parseFloat(b.min):NaN,isNaN(b.min)&&(b.min=Number.MIN_VALUE)),b.max!==null&&(b.max=b.max.toString().replace(new RegExp((0,c.default)(b.groupSeparator),"g"),""),b.radixPoint===","&&(b.max=b.max.replace(b.radixPoint,".")),b.max=isFinite(b.max)?parseFloat(b.max):NaN,isNaN(b.max)&&(b.max=Number.MAX_VALUE)),b.parseMinMaxOptions="done")})(m),m.radixPoint!==""&&m.substituteRadixPoint&&(m.substitutes[m.radixPoint=="."?",":"."]=m.radixPoint),C},_mask:function(m){return"("+m.groupSeparator+"999){+|1}"},digits:"*",digitsOptional:!0,enforceDigitsOnBlur:!1,radixPoint:".",positionCaretOnClick:"radixFocus",_radixDance:!0,groupSeparator:"",allowMinus:!0,negationSymbol:{front:"-",back:""},prefix:"",suffix:"",min:null,max:null,SetMaxOnOverflow:!1,step:1,inputType:"text",unmaskAsNumber:!1,roundingFN:Math.round,inputmode:"decimal",shortcuts:{k:"1000",m:"1000000"},placeholder:"0",greedy:!1,rightAlign:!0,insertMode:!0,autoUnmask:!1,skipOptionalPartCharacter:"",usePrototypeDefinitions:!1,stripLeadingZeroes:!0,substituteRadixPoint:!0,definitions:{0:{validator:R},1:{validator:R,definitionSymbol:"9"},9:{validator:"[0-90-9٠-٩۰-۹]",definitionSymbol:"*"},"+":{validator:function(m,x,g,S,C){return C.allowMinus&&(m==="-"||m===C.negationSymbol.front)}},"-":{validator:function(m,x,g,S,C){return C.allowMinus&&m===C.negationSymbol.back}}},preValidation:function(m,x,g,S,C,E,b,T){var M=this;if(C.__financeInput!==!1&&g===C.radixPoint)return!1;var O=m.indexOf(C.radixPoint),F=x;if(x=(function(Y,D,P,I,N){return N._radixDance&&N.numericInput&&D!==N.negationSymbol.back&&Y<=P&&(P>0||D==N.radixPoint)&&(I.validPositions[Y-1]===void 0||I.validPositions[Y-1].input!==N.negationSymbol.back)&&(Y-=1),Y})(x,g,O,E,C),g==="-"||g===C.negationSymbol.front){if(C.allowMinus!==!0)return!1;var z=!1,$=v("+",E),H=v("-",E);return $!==-1&&(z=[$],H!==-1&&z.push(H)),z!==!1?{remove:z,caret:F-C.negationSymbol.back.length}:{insert:[{pos:y.call(M,"+",E),c:C.negationSymbol.front,fromIsValid:!0},{pos:y.call(M,"-",E),c:C.negationSymbol.back,fromIsValid:void 0}],caret:F+C.negationSymbol.back.length}}if(g===C.groupSeparator)return{caret:F};if(T)return!0;if(O!==-1&&C._radixDance===!0&&S===!1&&g===C.radixPoint&&C.digits!==void 0&&(isNaN(C.digits)||parseInt(C.digits)>0)&&O!==x){var V=y.call(M,C.radixPoint,E);return E.validPositions[V]&&(E.validPositions[V].generatedInput=E.validPositions[V].generated||!1),{caret:C._radixDance&&x===O-1?O+1:O}}if(C.__financeInput===!1){if(S){if(C.digitsOptional)return{rewritePosition:b.end};if(!C.digitsOptional){if(b.begin>O&&b.end<=O)return g===C.radixPoint?{insert:{pos:O+1,c:"0",fromIsValid:!0},rewritePosition:O}:{rewritePosition:O+1};if(b.begin<O)return{rewritePosition:b.begin-1}}}else if(!C.showMaskOnHover&&!C.showMaskOnFocus&&!C.digitsOptional&&C.digits>0&&this.__valueGet.call(this.el)==="")return{rewritePosition:O}}return{rewritePosition:x}},postValidation:function(m,x,g,S,C,E,b){if(S===!1)return S;if(b)return!0;if(C.min!==null||C.max!==null){var T=C.onUnMask(m.slice().reverse().join(""),void 0,_.extend({},C,{unmaskAsNumber:!0}));if(C.min!==null&&T<C.min&&(T.toString().length>C.min.toString().length||T<0))return!1;if(C.max!==null&&T>C.max)return!!C.SetMaxOnOverflow&&{refreshFromBuffer:!0,buffer:w(C.max.toString().replace(".",C.radixPoint).split(""),C.digits,C).reverse()}}return S},onUnMask:function(m,x,g){if(x===""&&g.nullable===!0)return x;var S=m.replace(g.prefix,"");return S=(S=S.replace(g.suffix,"")).replace(new RegExp((0,c.default)(g.groupSeparator),"g"),""),g.placeholder.charAt(0)!==""&&(S=S.replace(new RegExp(g.placeholder.charAt(0),"g"),"0")),g.unmaskAsNumber?(g.radixPoint!==""&&S.indexOf(g.radixPoint)!==-1&&(S=S.replace(c.default.call(this,g.radixPoint),".")),S=(S=S.replace(new RegExp("^"+(0,c.default)(g.negationSymbol.front)),"-")).replace(new RegExp((0,c.default)(g.negationSymbol.back)+"$"),""),Number(S)):S},isComplete:function(m,x){var g=(x.numericInput?m.slice().reverse():m).join("");return g=(g=(g=(g=(g=g.replace(new RegExp("^"+(0,c.default)(x.negationSymbol.front)),"-")).replace(new RegExp((0,c.default)(x.negationSymbol.back)+"$"),"")).replace(x.prefix,"")).replace(x.suffix,"")).replace(new RegExp((0,c.default)(x.groupSeparator)+"([0-9]{3})","g"),"$1"),x.radixPoint===","&&(g=g.replace((0,c.default)(x.radixPoint),".")),isFinite(g)},onBeforeMask:function(m,x){var g;m=(g=m)!==null&&g!==void 0?g:"";var S=x.radixPoint||",";isFinite(x.digits)&&(x.digits=parseInt(x.digits)),typeof m!="number"&&x.inputType!=="number"||S===""||(m=m.toString().replace(".",S));var C=m.charAt(0)==="-"||m.charAt(0)===x.negationSymbol.front,E=m.split(S),b=E[0].replace(/[^\-0-9]/g,""),T=E.length>1?E[1].replace(/[^0-9]/g,""):"",M=E.length>1;m=b+(T!==""?S+T:T);var O=0;if(S!==""&&(O=x.digitsOptional?x.digits<T.length?x.digits:T.length:x.digits,T!==""||!x.digitsOptional)){var F=Math.pow(10,O||1);m=m.replace((0,c.default)(S),"."),isNaN(parseFloat(m))||(m=(x.roundingFN(parseFloat(m)*F)/F).toFixed(O)),m=m.toString().replace(".",S)}if(x.digits===0&&m.indexOf(S)!==-1&&(m=m.substring(0,m.indexOf(S))),x.min!==null||x.max!==null){var z=m.toString().replace(S,".");x.min!==null&&z<x.min?m=x.min.toString().replace(".",S):x.max!==null&&z>x.max&&(m=x.max.toString().replace(".",S))}return C&&m.charAt(0)!=="-"&&(m="-"+m),w(m.toString().split(""),O,x,M).join("")},onBeforeWrite:function(m,x,g,S){function C(H,V){if(S.__financeInput!==!1||V){var Y=H.indexOf(S.radixPoint);Y!==-1&&H.splice(Y,1)}if(S.groupSeparator!=="")for(;(Y=H.indexOf(S.groupSeparator))!==-1;)H.splice(Y,1);return H}var E,b;if(S.stripLeadingZeroes&&(b=(function(H,V){var Y=new RegExp("(^"+(V.negationSymbol.front!==""?(0,c.default)(V.negationSymbol.front)+"?":"")+(0,c.default)(V.prefix)+")(.*)("+(0,c.default)(V.suffix)+(V.negationSymbol.back!=""?(0,c.default)(V.negationSymbol.back)+"?":"")+"$)").exec(H.slice().reverse().join("")),D=Y?Y[2]:"",P=!1;return D&&(D=D.split(V.radixPoint.charAt(0))[0],P=new RegExp("^[0"+V.groupSeparator+"]*").exec(D)),!(!P||!(P[0].length>1||P[0].length>0&&P[0].length<D.length))&&P})(x,S)))for(var T=x.join("").lastIndexOf(b[0].split("").reverse().join(""))-(b[0]==b.input?0:1),M=b[0]==b.input?1:0,O=b[0].length-M;O>0;O--)this.maskset.validPositions.splice(T+O,1),delete x[T+O];if(m)switch(m.type){case"blur":case"checkval":if(S.min!==null){var F=S.onUnMask(x.slice().reverse().join(""),void 0,_.extend({},S,{unmaskAsNumber:!0}));if(S.min!==null&&F<S.min)return{refreshFromBuffer:!0,buffer:w(S.min.toString().replace(".",S.radixPoint).split(""),S.digits,S).reverse()}}if(x[x.length-1]===S.negationSymbol.front){var z=new RegExp("(^"+(S.negationSymbol.front!=""?(0,c.default)(S.negationSymbol.front)+"?":"")+(0,c.default)(S.prefix)+")(.*)("+(0,c.default)(S.suffix)+(S.negationSymbol.back!=""?(0,c.default)(S.negationSymbol.back)+"?":"")+"$)").exec(C(x.slice(),!0).reverse().join(""));(z?z[2]:"")==0&&(E={refreshFromBuffer:!0,buffer:[0]})}else S.radixPoint!==""&&x.indexOf(S.radixPoint)===S.suffix.length&&(E&&E.buffer?E.buffer.splice(0,1+S.suffix.length):(x.splice(0,1+S.suffix.length),E={refreshFromBuffer:!0,buffer:C(x)}));if(S.enforceDigitsOnBlur){var $=(E=E||{})&&E.buffer||x.slice().reverse();E.refreshFromBuffer=!0,E.buffer=w($,S.digits,S,!0).reverse()}}return E},onKeyDown:function(m,x,g,S){var C,E=_(this);if(m.location!=3){var b,T=m.key;if((b=S.shortcuts&&S.shortcuts[T])&&b.length>1)return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())*parseInt(b)),E.trigger("setvalue"),!1}if(m.ctrlKey)switch(m.key){case p.keys.ArrowUp:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())+parseInt(S.step)),E.trigger("setvalue"),!1;case p.keys.ArrowDown:return this.inputmask.__valueSet.call(this,parseFloat(this.inputmask.unmaskedvalue())-parseInt(S.step)),E.trigger("setvalue"),!1}if(!m.shiftKey&&(m.key===p.keys.Delete||m.key===p.keys.Backspace||m.key===p.keys.BACKSPACE_SAFARI)&&g.begin!==x.length){if(x[m.key===p.keys.Delete?g.begin-1:g.end]===S.negationSymbol.front)return C=x.slice().reverse(),S.negationSymbol.front!==""&&C.shift(),S.negationSymbol.back!==""&&C.pop(),E.trigger("setvalue",[C.join(""),g.begin]),!1;if(S._radixDance===!0){var M,O=x.indexOf(S.radixPoint);if(S.digitsOptional){if(O===0)return(C=x.slice().reverse()).pop(),E.trigger("setvalue",[C.join(""),g.begin>=C.length?C.length:g.begin]),!1}else if(O!==-1&&(g.begin<O||g.end<O||m.key===p.keys.Delete&&(g.begin===O||g.begin-1===O)))return g.begin===g.end&&(m.key===p.keys.Backspace||m.key===p.keys.BACKSPACE_SAFARI?g.begin++:m.key===p.keys.Delete&&g.begin-1===O&&(M=_.extend({},g),g.begin--,g.end--)),(C=x.slice().reverse()).splice(C.length-g.begin,g.begin-g.end+1),C=w(C,S.digits,S).join(""),M&&(g=M),E.trigger("setvalue",[C,g.begin>=C.length?O+1:g.begin]),!1}}}},currency:{prefix:"",groupSeparator:",",alias:"numeric",digits:2,digitsOptional:!1},decimal:{alias:"numeric"},integer:{alias:"numeric",inputmode:"numeric",digits:0},percentage:{alias:"numeric",min:0,max:100,suffix:" %",digits:0,allowMinus:!1},indianns:{alias:"numeric",_mask:function(m){return"("+m.groupSeparator+"99){*|1}("+m.groupSeparator+"999){1|1}"},groupSeparator:",",radixPoint:".",placeholder:"0",digits:2,digitsOptional:!1}})},9380:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var u=!(typeof window>"u"||!window.document||!window.document.createElement);o.default=u?window:{}},7760:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.HandleNativePlaceholder=function(R,m){var x=R?R.inputmask:this;if(c.ie){if(R.inputmask._valueGet()!==m&&(R.placeholder!==m||R.placeholder==="")){var g=h.getBuffer.call(x).slice(),S=R.inputmask._valueGet();if(S!==m){var C=h.getLastValidPosition.call(x);C===-1&&S===h.getBufferTemplate.call(x).join("")?g=[]:C!==-1&&w.call(x,g),v(R,g)}}}else R.placeholder!==m&&(R.placeholder=m,R.placeholder===""&&R.removeAttribute("placeholder"))},o.applyInputValue=k,o.checkVal=y,o.clearOptionalTail=w,o.unmaskedvalue=function(R){var m=R?R.inputmask:this,x=m.opts,g=m.maskset;if(R){if(R.inputmask===void 0)return R.value;R.inputmask&&R.inputmask.refreshValue&&k(R,R.inputmask._valueGet(!0))}for(var S=[],C=g.validPositions,E=0,b=C.length;E<b;E++)C[E]&&C[E].match&&(C[E].match.static!=1||Array.isArray(g.metadata)&&C[E].generatedInput!==!0)&&S.push(C[E].input);var T=S.length===0?"":(m.isRTL?S.reverse():S).join("");if(typeof x.onUnMask=="function"){var M=(m.isRTL?h.getBuffer.call(m).slice().reverse():h.getBuffer.call(m)).join("");T=x.onUnMask.call(m,M,T,x)}return T},o.writeBuffer=v;var c=u(9845),d=u(6030),p=u(2839),h=u(8711),f=u(7215),_=u(4713);function k(R,m,x){var g=R?R.inputmask:this,S=g.opts;R.inputmask.refreshValue=!1,typeof S.onBeforeMask=="function"&&(m=S.onBeforeMask.call(g,m,S)||m),y(R,!0,!1,m=(m||"").toString().split(""),x),g.undoValue=g._valueGet(!0),(S.clearMaskOnLostFocus||S.clearIncomplete)&&R.inputmask._valueGet()===h.getBufferTemplate.call(g).join("")&&h.getLastValidPosition.call(g)===-1&&R.inputmask._valueSet("")}function w(R){R.length=0;for(var m,x=_.getMaskTemplate.call(this,!0,0,!0,void 0,!0);(m=x.shift())!==void 0;)R.push(m);return R}function y(R,m,x,g,S){var C,E=R?R.inputmask:this,b=E.maskset,T=E.opts,M=E.dependencyLib,O=g.slice(),F="",z=-1,$=T.skipOptionalPartCharacter;T.skipOptionalPartCharacter="",h.resetMaskSet.call(E,!1),E.clicked=0,z=T.radixPoint?h.determineNewCaretPosition.call(E,{begin:0,end:0},!1,T.__financeInput===!1?"radixFocus":void 0).begin:0,b.p=z,E.caretPos={begin:z};var H=[],V=E.caretPos;if(O.forEach((function(U,Z){if(U!==void 0){var j=new M.Event("_checkval");j.key=U,F+=U;var ne=h.getLastValidPosition.call(E,void 0,!0);(function(G,B){for(var Q=_.getMaskTemplate.call(E,!0,0).slice(G,h.seekNext.call(E,G,!1,!1)).join("").replace(/'/g,""),X=Q.indexOf(B);X>0&&Q[X-1]===" ";)X--;var q=X===0&&!h.isMask.call(E,G)&&(_.getTest.call(E,G).match.nativeDef===B.charAt(0)||_.getTest.call(E,G).match.static===!0&&_.getTest.call(E,G).match.nativeDef==="'"+B.charAt(0)||_.getTest.call(E,G).match.nativeDef===" "&&(_.getTest.call(E,G+1).match.nativeDef===B.charAt(0)||_.getTest.call(E,G+1).match.static===!0&&_.getTest.call(E,G+1).match.nativeDef==="'"+B.charAt(0)));if(!q&&X>0&&!h.isMask.call(E,G,!1,!0)){var oe=h.seekNext.call(E,G);E.caretPos.begin<oe&&(E.caretPos={begin:oe})}return q})(z,F)?C=d.EventHandlers.keypressEvent.call(E,j,!0,!1,x,ne+1):(C=d.EventHandlers.keypressEvent.call(E,j,!0,!1,x,E.caretPos.begin))&&(z=E.caretPos.begin+1,F=""),C?(C.pos!==void 0&&b.validPositions[C.pos]&&b.validPositions[C.pos].match.static===!0&&b.validPositions[C.pos].alternation===void 0&&(H.push(C.pos),E.isRTL||(C.forwardPosition=C.pos+1)),v.call(E,void 0,h.getBuffer.call(E),C.forwardPosition,j,!1),E.caretPos={begin:C.forwardPosition,end:C.forwardPosition},V=E.caretPos):b.validPositions[Z]===void 0&&O[Z]===_.getPlaceholder.call(E,Z)&&h.isMask.call(E,Z,!0)?E.caretPos.begin++:E.caretPos=V}})),H.length>0){var Y,D,P=h.seekNext.call(E,-1,void 0,!1);if(!f.isComplete.call(E,h.getBuffer.call(E))&&H.length<=P||f.isComplete.call(E,h.getBuffer.call(E))&&H.length>0&&H.length!==P&&H[0]===0){for(var I=P;(Y=H.shift())!==void 0;)if(Y<I){var N=new M.Event("_checkval");if((D=b.validPositions[Y]).generatedInput=!0,N.key=D.input,(C=d.EventHandlers.keypressEvent.call(E,N,!0,!1,x,I))&&C.pos!==void 0&&C.pos!==Y&&b.validPositions[C.pos]&&b.validPositions[C.pos].match.static===!0)H.push(C.pos);else if(!C)break;I++}}}m&&v.call(E,R,h.getBuffer.call(E),C?C.forwardPosition:E.caretPos.begin,S||new M.Event("checkval"),S&&(S.type==="input"&&E.undoValue!==h.getBuffer.call(E).join("")||S.type==="paste")),T.skipOptionalPartCharacter=$}function v(R,m,x,g,S){var C=R?R.inputmask:this,E=C.opts,b=C.dependencyLib;if(g&&typeof E.onBeforeWrite=="function"){var T=E.onBeforeWrite.call(C,g,m,x,E);if(T){if(T.refreshFromBuffer){var M=T.refreshFromBuffer;f.refreshFromBuffer.call(C,M===!0?M:M.start,M.end,T.buffer||m),m=h.getBuffer.call(C,!0)}x!==void 0&&(x=T.caret!==void 0?T.caret:x)}}if(R!==void 0&&(R.inputmask._valueSet(m.join("")),x===void 0||g!==void 0&&g.type==="blur"||h.caret.call(C,R,x,void 0,void 0,g!==void 0&&g.type==="keydown"&&(g.key===p.keys.Delete||g.key===p.keys.Backspace)),R.inputmask.writeBufferHook===void 0||R.inputmask.writeBufferHook(x),S===!0)){var O=b(R),F=R.inputmask._valueGet();R.inputmask.skipInputEvent=!0,O.trigger("input"),setTimeout((function(){F===h.getBufferTemplate.call(C).join("")?O.trigger("cleared"):f.isComplete.call(C,m)===!0&&O.trigger("complete")}),0)}}},2394:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var c=x(u(3976)),d=x(u(7392)),p=x(u(4963)),h=u(9716),f=x(u(9380)),_=u(7760),k=u(157),w=u(2391),y=u(8711),v=u(7215),R=u(4713);function m(b){return m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(T){return typeof T}:function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},m(b)}function x(b){return b&&b.__esModule?b:{default:b}}var g=f.default.document,S="_inputmask_opts";function C(b,T,M){if(!(this instanceof C))return new C(b,T,M);this.dependencyLib=p.default,this.el=void 0,this.events={},this.maskset=void 0,M!==!0&&(Object.prototype.toString.call(b)==="[object Object]"?T=b:(T=T||{},b&&(T.alias=b)),this.opts=p.default.extend(!0,{},this.defaults,T),this.noMasksCache=T&&T.definitions!==void 0,this.userOptions=T||{},E(this.opts.alias,T,this.opts)),this.refreshValue=!1,this.undoValue=void 0,this.$el=void 0,this.skipInputEvent=!1,this.validationEvent=!1,this.ignorable=!1,this.maxLength,this.mouseEnter=!1,this.clicked=0,this.originalPlaceholder=void 0,this.isComposing=!1,this.hasAlternator=!1}function E(b,T,M){var O=C.prototype.aliases[b];return O?(O.alias&&E(O.alias,void 0,M),p.default.extend(!0,M,O),p.default.extend(!0,M,T),!0):(M.mask===null&&(M.mask=b),!1)}C.prototype={dataAttribute:"data-inputmask",defaults:c.default,definitions:d.default,aliases:{},masksCache:{},i18n:{},get isRTL(){return this.opts.isRTL||this.opts.numericInput},mask:function(b){var T=this;return typeof b=="string"&&(b=g.getElementById(b)||g.querySelectorAll(b)),(b=b.nodeName?[b]:Array.isArray(b)?b:[].slice.call(b)).forEach((function(M,O){var F=p.default.extend(!0,{},T.opts);if((function($,H,V,Y){function D(j,ne){var G=Y===""?j:Y+"-"+j;(ne=ne!==void 0?ne:$.getAttribute(G))!==null&&(typeof ne=="string"&&(j.indexOf("on")===0?ne=f.default[ne]:ne==="false"?ne=!1:ne==="true"&&(ne=!0)),V[j]=ne)}if(H.importDataAttributes===!0){var P,I,N,U,Z=$.getAttribute(Y);if(Z&&Z!==""&&(Z=Z.replace(/'/g,'"'),I=JSON.parse("{"+Z+"}")),I){for(U in N=void 0,I)if(U.toLowerCase()==="alias"){N=I[U];break}}for(P in D("alias",N),V.alias&&E(V.alias,V,H),H){if(I){for(U in N=void 0,I)if(U.toLowerCase()===P.toLowerCase()){N=I[U];break}}D(P,N)}}return p.default.extend(!0,H,V),($.dir==="rtl"||H.rightAlign)&&($.style.textAlign="right"),($.dir==="rtl"||H.numericInput)&&($.dir="ltr",$.removeAttribute("dir"),H.isRTL=!0),Object.keys(V).length})(M,F,p.default.extend(!0,{},T.userOptions),T.dataAttribute)){var z=(0,w.generateMaskSet)(F,T.noMasksCache);z!==void 0&&(M.inputmask!==void 0&&(M.inputmask.opts.autoUnmask=!0,M.inputmask.remove()),M.inputmask=new C(void 0,void 0,!0),M.inputmask.opts=F,M.inputmask.noMasksCache=T.noMasksCache,M.inputmask.userOptions=p.default.extend(!0,{},T.userOptions),M.inputmask.el=M,M.inputmask.$el=(0,p.default)(M),M.inputmask.maskset=z,p.default.data(M,S,T.userOptions),k.mask.call(M.inputmask))}})),b&&b[0]&&b[0].inputmask||this},option:function(b,T){return typeof b=="string"?this.opts[b]:m(b)==="object"?(p.default.extend(this.userOptions,b),this.el&&T!==!0&&this.mask(this.el),this):void 0},unmaskedvalue:function(b){if(this.maskset=this.maskset||(0,w.generateMaskSet)(this.opts,this.noMasksCache),this.el===void 0||b!==void 0){var T=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,b,this.opts)||b).split("");_.checkVal.call(this,void 0,!1,!1,T),typeof this.opts.onBeforeWrite=="function"&&this.opts.onBeforeWrite.call(this,void 0,y.getBuffer.call(this),0,this.opts)}return _.unmaskedvalue.call(this,this.el)},remove:function(){if(this.el){p.default.data(this.el,S,null);var b=this.opts.autoUnmask?(0,_.unmaskedvalue)(this.el):this._valueGet(this.opts.autoUnmask);b!==y.getBufferTemplate.call(this).join("")?this._valueSet(b,this.opts.autoUnmask):this._valueSet(""),h.EventRuler.off(this.el),Object.getOwnPropertyDescriptor&&Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(this.el),"value")&&this.__valueGet&&Object.defineProperty(this.el,"value",{get:this.__valueGet,set:this.__valueSet,configurable:!0}):g.__lookupGetter__&&this.el.__lookupGetter__("value")&&this.__valueGet&&(this.el.__defineGetter__("value",this.__valueGet),this.el.__defineSetter__("value",this.__valueSet)),this.el.inputmask=void 0}return this.el},getemptymask:function(){return this.maskset=this.maskset||(0,w.generateMaskSet)(this.opts,this.noMasksCache),(this.isRTL?y.getBufferTemplate.call(this).reverse():y.getBufferTemplate.call(this)).join("")},hasMaskedValue:function(){return!this.opts.autoUnmask},isComplete:function(){return this.maskset=this.maskset||(0,w.generateMaskSet)(this.opts,this.noMasksCache),v.isComplete.call(this,y.getBuffer.call(this))},getmetadata:function(){if(this.maskset=this.maskset||(0,w.generateMaskSet)(this.opts,this.noMasksCache),Array.isArray(this.maskset.metadata)){var b=R.getMaskTemplate.call(this,!0,0,!1).join("");return this.maskset.metadata.forEach((function(T){return T.mask!==b||(b=T,!1)})),b}return this.maskset.metadata},isValid:function(b){if(this.maskset=this.maskset||(0,w.generateMaskSet)(this.opts,this.noMasksCache),b){var T=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,b,this.opts)||b).split("");_.checkVal.call(this,void 0,!0,!1,T)}else b=this.isRTL?y.getBuffer.call(this).slice().reverse().join(""):y.getBuffer.call(this).join("");for(var M=y.getBuffer.call(this),O=y.determineLastRequiredPosition.call(this),F=M.length-1;F>O&&!y.isMask.call(this,F);F--);return M.splice(O,F+1-O),v.isComplete.call(this,M)&&b===(this.isRTL?y.getBuffer.call(this).slice().reverse().join(""):y.getBuffer.call(this).join(""))},format:function(b,T){this.maskset=this.maskset||(0,w.generateMaskSet)(this.opts,this.noMasksCache);var M=(typeof this.opts.onBeforeMask=="function"&&this.opts.onBeforeMask.call(this,b,this.opts)||b).split("");_.checkVal.call(this,void 0,!0,!1,M);var O=this.isRTL?y.getBuffer.call(this).slice().reverse().join(""):y.getBuffer.call(this).join("");return T?{value:O,metadata:this.getmetadata()}:O},setValue:function(b){this.el&&(0,p.default)(this.el).trigger("setvalue",[b])},analyseMask:w.analyseMask},C.extendDefaults=function(b){p.default.extend(!0,C.prototype.defaults,b)},C.extendDefinitions=function(b){p.default.extend(!0,C.prototype.definitions,b)},C.extendAliases=function(b){p.default.extend(!0,C.prototype.aliases,b)},C.format=function(b,T,M){return C(T).format(b,M)},C.unmask=function(b,T){return C(T).unmaskedvalue(b)},C.isValid=function(b,T){return C(T).isValid(b)},C.remove=function(b){typeof b=="string"&&(b=g.getElementById(b)||g.querySelectorAll(b)),(b=b.nodeName?[b]:b).forEach((function(T){T.inputmask&&T.inputmask.remove()}))},C.setValue=function(b,T){typeof b=="string"&&(b=g.getElementById(b)||g.querySelectorAll(b)),(b=b.nodeName?[b]:b).forEach((function(M){M.inputmask?M.inputmask.setValue(T):(0,p.default)(M).trigger("setvalue",[T])}))},C.dependencyLib=p.default,f.default.Inputmask=C,o.default=C},5296:function(a,o,u){function c(g){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},c(g)}var d=R(u(9380)),p=R(u(2394));function h(g,S){for(var C=0;C<S.length;C++){var E=S[C];E.enumerable=E.enumerable||!1,E.configurable=!0,"value"in E&&(E.writable=!0),Object.defineProperty(g,(b=E.key,T=void 0,T=(function(M,O){if(c(M)!=="object"||M===null)return M;var F=M[Symbol.toPrimitive];if(F!==void 0){var z=F.call(M,O);if(c(z)!=="object")return z;throw new TypeError("@@toPrimitive must return a primitive value.")}return(O==="string"?String:Number)(M)})(b,"string"),c(T)==="symbol"?T:String(T)),E)}var b,T}function f(g){var S=w();return function(){var C,E=v(g);if(S){var b=v(this).constructor;C=Reflect.construct(E,arguments,b)}else C=E.apply(this,arguments);return(function(T,M){if(M&&(c(M)==="object"||typeof M=="function"))return M;if(M!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O})(T)})(this,C)}}function _(g){var S=typeof Map=="function"?new Map:void 0;return _=function(C){if(C===null||!(function(b){try{return Function.toString.call(b).indexOf("[native code]")!==-1}catch{return typeof b=="function"}})(C))return C;if(typeof C!="function")throw new TypeError("Super expression must either be null or a function");if(S!==void 0){if(S.has(C))return S.get(C);S.set(C,E)}function E(){return k(C,arguments,v(this).constructor)}return E.prototype=Object.create(C.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),y(E,C)},_(g)}function k(g,S,C){return k=w()?Reflect.construct.bind():function(E,b,T){var M=[null];M.push.apply(M,b);var O=new(Function.bind.apply(E,M));return T&&y(O,T.prototype),O},k.apply(null,arguments)}function w(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function y(g,S){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(C,E){return C.__proto__=E,C},y(g,S)}function v(g){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},v(g)}function R(g){return g&&g.__esModule?g:{default:g}}var m=d.default.document;if(m&&m.head&&m.head.attachShadow&&d.default.customElements&&d.default.customElements.get("input-mask")===void 0){var x=(function(g){(function(T,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function");T.prototype=Object.create(M&&M.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),Object.defineProperty(T,"prototype",{writable:!1}),M&&y(T,M)})(b,g);var S,C,E=f(b);function b(){var T;(function($,H){if(!($ instanceof H))throw new TypeError("Cannot call a class as a function")})(this,b);var M=(T=E.call(this)).getAttributeNames(),O=T.attachShadow({mode:"closed"});for(var F in T.input=m.createElement("input"),T.input.type="text",O.appendChild(T.input),M)Object.prototype.hasOwnProperty.call(M,F)&&T.input.setAttribute(M[F],T.getAttribute(M[F]));var z=new p.default;return z.dataAttribute="",z.mask(T.input),T.input.inputmask.shadowRoot=O,T}return S=b,(C=[{key:"attributeChangedCallback",value:function(T,M,O){this.input.setAttribute(T,O)}},{key:"value",get:function(){return this.input.value},set:function(T){this.input.value=T}}])&&h(S.prototype,C),Object.defineProperty(S,"prototype",{writable:!1}),b})(_(HTMLElement));d.default.customElements.define("input-mask",x)}},2839:function(a,o){function u(k){return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(w){return typeof w}:function(w){return w&&typeof Symbol=="function"&&w.constructor===Symbol&&w!==Symbol.prototype?"symbol":typeof w},u(k)}function c(k,w){return(function(y){if(Array.isArray(y))return y})(k)||(function(y,v){var R=y==null?null:typeof Symbol<"u"&&y[Symbol.iterator]||y["@@iterator"];if(R!=null){var m,x,g,S,C=[],E=!0,b=!1;try{if(g=(R=R.call(y)).next,v!==0)for(;!(E=(m=g.call(R)).done)&&(C.push(m.value),C.length!==v);E=!0);}catch(T){b=!0,x=T}finally{try{if(!E&&R.return!=null&&(S=R.return(),Object(S)!==S))return}finally{if(b)throw x}}return C}})(k,w)||(function(y,v){if(y){if(typeof y=="string")return d(y,v);var R=Object.prototype.toString.call(y).slice(8,-1);if(R==="Object"&&y.constructor&&(R=y.constructor.name),R==="Map"||R==="Set")return Array.from(y);if(R==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(R))return d(y,v)}})(k,w)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function d(k,w){(w==null||w>k.length)&&(w=k.length);for(var y=0,v=new Array(w);y<w;y++)v[y]=k[y];return v}function p(k,w){var y=Object.keys(k);if(Object.getOwnPropertySymbols){var v=Object.getOwnPropertySymbols(k);w&&(v=v.filter((function(R){return Object.getOwnPropertyDescriptor(k,R).enumerable}))),y.push.apply(y,v)}return y}function h(k,w,y){return(w=(function(v){var R=(function(m,x){if(u(m)!=="object"||m===null)return m;var g=m[Symbol.toPrimitive];if(g!==void 0){var S=g.call(m,x);if(u(S)!=="object")return S;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(m)})(v,"string");return u(R)==="symbol"?R:String(R)})(w))in k?Object.defineProperty(k,w,{value:y,enumerable:!0,configurable:!0,writable:!0}):k[w]=y,k}Object.defineProperty(o,"__esModule",{value:!0}),o.keys=o.keyCode=void 0,o.toKey=function(k,w){return _[k]||(w?String.fromCharCode(k):String.fromCharCode(k).toLowerCase())},o.toKeyCode=function(k){return f[k]};var f=o.keyCode=(function(k){for(var w=1;w<arguments.length;w++){var y=arguments[w]!=null?arguments[w]:{};w%2?p(Object(y),!0).forEach((function(v){h(k,v,y[v])})):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(y)):p(Object(y)).forEach((function(v){Object.defineProperty(k,v,Object.getOwnPropertyDescriptor(y,v))}))}return k})({c:67,x:88,z:90,BACKSPACE_SAFARI:127,Enter:13,Meta_LEFT:91,Meta_RIGHT:92,Space:32},{Alt:18,AltGraph:18,ArrowDown:40,ArrowLeft:37,ArrowRight:39,ArrowUp:38,Backspace:8,CapsLock:20,Control:17,ContextMenu:93,Dead:221,Delete:46,End:35,Escape:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,Home:36,Insert:45,NumLock:144,PageDown:34,PageUp:33,Pause:19,PrintScreen:44,Process:229,Shift:16,ScrollLock:145,Tab:9,Unidentified:229}),_=Object.entries(f).reduce((function(k,w){var y=c(w,2),v=y[0],R=y[1];return k[R]=k[R]===void 0?v:k[R],k}),{});o.keys=Object.entries(f).reduce((function(k,w){var y=c(w,2),v=y[0];return y[1],k[v]=v==="Space"?" ":v,k}),{})},2391:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.analyseMask=function(w,y,v){var R,m,x,g,S,C,E=/(?:[?*+]|\{[0-9+*]+(?:,[0-9+*]*)?(?:\|[0-9+*]*)?\})|[^.?*+^${[]()|\\]+|./g,b=/\[\^?]?(?:[^\\\]]+|\\[\S\s]?)*]?|\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\S\s]?)|\((?:\?[:=!]?)?|(?:[?*+]|\{[0-9]+(?:,[0-9]*)?\})\??|[^.?*+^${[()|\\]+|./g,T=!1,M=new h.default,O=[],F=[],z=!1;function $(X,q,oe){oe=oe!==void 0?oe:X.matches.length;var se=X.matches[oe-1];if(y){if(q.indexOf("[")===0||T&&/\\d|\\s|\\w|\\p/i.test(q)||q==="."){var pe=v.casing?"i":"";/\\p\{.*}/i.test(q)&&(pe+="u"),X.matches.splice(oe++,0,{fn:new RegExp(q,pe),static:!1,optionality:!1,newBlockMarker:se===void 0?"master":se.def!==q,casing:null,def:q,placeholder:f(v.placeholder)==="object"?v.placeholder[M.matches.length]:void 0,nativeDef:q})}else T&&(q=q[q.length-1]),q.split("").forEach((function(we,Ae){se=X.matches[oe-1],X.matches.splice(oe++,0,{fn:/[a-z]/i.test(v.staticDefinitionSymbol||we)?new RegExp("["+(v.staticDefinitionSymbol||we)+"]",v.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:se===void 0?"master":se.def!==we&&se.static!==!0,casing:null,def:v.staticDefinitionSymbol||we,placeholder:v.staticDefinitionSymbol!==void 0?we:f(v.placeholder)==="object"?v.placeholder[M.matches.length]:void 0,nativeDef:(T?"'":"")+we})}));T=!1}else{var me=v.definitions&&v.definitions[q]||v.usePrototypeDefinitions&&p.default.prototype.definitions[q];me&&!T?X.matches.splice(oe++,0,{fn:me.validator?typeof me.validator=="string"?new RegExp(me.validator,v.casing?"i":""):new function(){this.test=me.validator}:/./,static:me.static||!1,optionality:me.optional||!1,defOptionality:me.optional||!1,newBlockMarker:se===void 0||me.optional?"master":se.def!==(me.definitionSymbol||q),casing:me.casing,def:me.definitionSymbol||q,placeholder:me.placeholder,nativeDef:q,generated:me.generated}):(X.matches.splice(oe++,0,{fn:/[a-z]/i.test(v.staticDefinitionSymbol||q)?new RegExp("["+(v.staticDefinitionSymbol||q)+"]",v.casing?"i":""):null,static:!0,optionality:!1,newBlockMarker:se===void 0?"master":se.def!==q&&se.static!==!0,casing:null,def:v.staticDefinitionSymbol||q,placeholder:v.staticDefinitionSymbol!==void 0?q:void 0,nativeDef:(T?"'":"")+q}),T=!1)}}function H(){if(O.length>0){if($(g=O[O.length-1],m),g.isAlternator){S=O.pop();for(var X=0;X<S.matches.length;X++)S.matches[X].isGroup&&(S.matches[X].isGroup=!1);O.length>0?(g=O[O.length-1]).matches.push(S):M.matches.push(S)}}else $(M,m)}function V(X){var q=new h.default(!0);return q.openGroup=!1,q.matches=X,q}function Y(){if((x=O.pop()).openGroup=!1,x!==void 0)if(O.length>0){if((g=O[O.length-1]).matches.push(x),g.isAlternator){S=O.pop();for(var X=0;X<S.matches.length;X++)S.matches[X].isGroup=!1,S.matches[X].alternatorGroup=!1;O.length>0?(g=O[O.length-1]).matches.push(S):M.matches.push(S)}}else M.matches.push(x);else H()}function D(X){var q=X.pop();return q.isQuantifier&&(q=V([X.pop(),q])),q}for(y&&(v.optionalmarker[0]=void 0,v.optionalmarker[1]=void 0);R=y?b.exec(w):E.exec(w);){if(m=R[0],y){switch(m.charAt(0)){case"?":m="{0,1}";break;case"+":case"*":m="{"+m+"}";break;case"|":if(O.length===0){var P=V(M.matches);P.openGroup=!0,O.push(P),M.matches=[],z=!0}}switch(m){case"\\d":m="[0-9]";break;case"\\p":m+=b.exec(w)[0],m+=b.exec(w)[0]}}if(T)H();else switch(m.charAt(0)){case"$":case"^":y||H();break;case v.escapeChar:T=!0,y&&H();break;case v.optionalmarker[1]:case v.groupmarker[1]:Y();break;case v.optionalmarker[0]:O.push(new h.default(!1,!0));break;case v.groupmarker[0]:O.push(new h.default(!0));break;case v.quantifiermarker[0]:var I=new h.default(!1,!1,!0),N=(m=m.replace(/[{}?]/g,"")).split("|"),U=N[0].split(","),Z=isNaN(U[0])?U[0]:parseInt(U[0]),j=U.length===1?Z:isNaN(U[1])?U[1]:parseInt(U[1]),ne=isNaN(N[1])?N[1]:parseInt(N[1]);Z!=="*"&&Z!=="+"||(Z=j==="*"?0:1),I.quantifier={min:Z,max:j,jit:ne};var G=O.length>0?O[O.length-1].matches:M.matches;(R=G.pop()).isGroup||(R=V([R])),G.push(R),G.push(I);break;case v.alternatormarker:if(O.length>0){var B=(g=O[O.length-1]).matches[g.matches.length-1];C=g.openGroup&&(B.matches===void 0||B.isGroup===!1&&B.isAlternator===!1)?O.pop():D(g.matches)}else C=D(M.matches);if(C.isAlternator)O.push(C);else if(C.alternatorGroup?(S=O.pop(),C.alternatorGroup=!1):S=new h.default(!1,!1,!1,!0),S.matches.push(C),O.push(S),C.openGroup){C.openGroup=!1;var Q=new h.default(!0);Q.alternatorGroup=!0,O.push(Q)}break;default:H()}}for(z&&Y();O.length>0;)x=O.pop(),M.matches.push(x);return M.matches.length>0&&((function X(q){q&&q.matches&&q.matches.forEach((function(oe,se){var pe=q.matches[se+1];(pe===void 0||pe.matches===void 0||pe.isQuantifier===!1)&&oe&&oe.isGroup&&(oe.isGroup=!1,y||($(oe,v.groupmarker[0],0),oe.openGroup!==!0&&$(oe,v.groupmarker[1]))),X(oe)}))})(M),F.push(M)),(v.numericInput||v.isRTL)&&(function X(q){for(var oe in q.matches=q.matches.reverse(),q.matches)if(Object.prototype.hasOwnProperty.call(q.matches,oe)){var se=parseInt(oe);if(q.matches[oe].isQuantifier&&q.matches[se+1]&&q.matches[se+1].isGroup){var pe=q.matches[oe];q.matches.splice(oe,1),q.matches.splice(se+1,0,pe)}q.matches[oe].matches!==void 0?q.matches[oe]=X(q.matches[oe]):q.matches[oe]=((me=q.matches[oe])===v.optionalmarker[0]?me=v.optionalmarker[1]:me===v.optionalmarker[1]?me=v.optionalmarker[0]:me===v.groupmarker[0]?me=v.groupmarker[1]:me===v.groupmarker[1]&&(me=v.groupmarker[0]),me)}var me;return q})(F[0]),F},o.generateMaskSet=function(w,y){var v;function R(g,S){var C=S.repeat,E=S.groupmarker,b=S.quantifiermarker,T=S.keepStatic;if(C>0||C==="*"||C==="+"){var M=C==="*"?0:C==="+"?1:C;if(M!=C)g=E[0]+g+E[1]+b[0]+M+","+C+b[1];else for(var O=g,F=1;F<M;F++)g+=O}if(T===!0){var z=g.match(new RegExp("(.)\\[([^\\]]*)\\]","g"));z&&z.forEach((function($,H){var V=(function(P,I){return(function(N){if(Array.isArray(N))return N})(P)||(function(N,U){var Z=N==null?null:typeof Symbol<"u"&&N[Symbol.iterator]||N["@@iterator"];if(Z!=null){var j,ne,G,B,Q=[],X=!0,q=!1;try{if(G=(Z=Z.call(N)).next,U!==0)for(;!(X=(j=G.call(Z)).done)&&(Q.push(j.value),Q.length!==U);X=!0);}catch(oe){q=!0,ne=oe}finally{try{if(!X&&Z.return!=null&&(B=Z.return(),Object(B)!==B))return}finally{if(q)throw ne}}return Q}})(P,I)||(function(N,U){if(N){if(typeof N=="string")return _(N,U);var Z=Object.prototype.toString.call(N).slice(8,-1);if(Z==="Object"&&N.constructor&&(Z=N.constructor.name),Z==="Map"||Z==="Set")return Array.from(N);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return _(N,U)}})(P,I)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})($.split("["),2),Y=V[0],D=V[1];D=D.replace("]",""),g=g.replace(new RegExp("".concat((0,d.default)(Y),"\\[").concat((0,d.default)(D),"\\]")),Y.charAt(0)===D.charAt(0)?"(".concat(Y,"|").concat(Y).concat(D,")"):"".concat(Y,"[").concat(D,"]"))}))}return g}function m(g,S,C){var E,b,T=!1;return g!==null&&g!==""||((T=C.regex!==null)?g=(g=C.regex).replace(/^(\^)(.*)(\$)$/,"$2"):(T=!0,g=".*")),g.length===1&&C.greedy===!1&&C.repeat!==0&&(C.placeholder=""),g=R(g,C),b=T?"regex_"+C.regex:C.numericInput?g.split("").reverse().join(""):g,C.keepStatic!==null&&(b="ks_"+C.keepStatic+b),f(C.placeholder)==="object"&&(b="ph_"+JSON.stringify(C.placeholder)+b),p.default.prototype.masksCache[b]===void 0||y===!0?(E={mask:g,maskToken:p.default.prototype.analyseMask(g,T,C),validPositions:[],_buffer:void 0,buffer:void 0,tests:{},excludes:{},metadata:S,maskLength:void 0,jitOffset:{}},y!==!0&&(p.default.prototype.masksCache[b]=E,E=c.default.extend(!0,{},p.default.prototype.masksCache[b]))):E=c.default.extend(!0,{},p.default.prototype.masksCache[b]),E}if(typeof w.mask=="function"&&(w.mask=w.mask(w)),Array.isArray(w.mask)){if(w.mask.length>1){w.keepStatic===null&&(w.keepStatic=!0);var x=w.groupmarker[0];return(w.isRTL?w.mask.reverse():w.mask).forEach((function(g){x.length>1&&(x+=w.alternatormarker),g.mask!==void 0&&typeof g.mask!="function"?x+=g.mask:x+=g})),m(x+=w.groupmarker[1],w.mask,w)}w.mask=w.mask.pop()}return v=w.mask&&w.mask.mask!==void 0&&typeof w.mask.mask!="function"?m(w.mask.mask,w.mask,w):m(w.mask,w.mask,w),w.keepStatic===null&&(w.keepStatic=!1),v};var c=k(u(4963)),d=k(u(7184)),p=k(u(2394)),h=k(u(9695));function f(w){return f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},f(w)}function _(w,y){(y==null||y>w.length)&&(y=w.length);for(var v=0,R=new Array(y);v<y;v++)R[v]=w[v];return R}function k(w){return w&&w.__esModule?w:{default:w}}},157:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.mask=function(){var k=this,w=this.opts,y=this.el,v=this.dependencyLib;p.EventRuler.off(y);var R=(function(g,S){var C=g.getAttribute("type"),E=g.tagName.toLowerCase()==="input"&&S.supportsInputType.includes(C)||g.isContentEditable||g.tagName.toLowerCase()==="textarea";if(!E)if(g.tagName.toLowerCase()==="input"){var b=document.createElement("input");b.setAttribute("type",C),E=b.type==="text",b=null}else E="partial";return E!==!1?(function(T){var M,O;function F(){return this.inputmask?this.inputmask.opts.autoUnmask?this.inputmask.unmaskedvalue():f.getLastValidPosition.call(k)!==-1||S.nullable!==!0?(this.inputmask.shadowRoot||this.ownerDocument).activeElement===this&&S.clearMaskOnLostFocus?(k.isRTL?h.clearOptionalTail.call(k,f.getBuffer.call(k).slice()).reverse():h.clearOptionalTail.call(k,f.getBuffer.call(k).slice())).join(""):M.call(this):"":M.call(this)}function z(H){O.call(this,H),this.inputmask&&(0,h.applyInputValue)(this,H)}if(!T.inputmask.__valueGet){if(S.noValuePatching!==!0){if(Object.getOwnPropertyDescriptor){var $=Object.getPrototypeOf?Object.getOwnPropertyDescriptor(Object.getPrototypeOf(T),"value"):void 0;$&&$.get&&$.set?(M=$.get,O=$.set,Object.defineProperty(T,"value",{get:F,set:z,configurable:!0})):T.tagName.toLowerCase()!=="input"&&(M=function(){return this.textContent},O=function(H){this.textContent=H},Object.defineProperty(T,"value",{get:F,set:z,configurable:!0}))}else document.__lookupGetter__&&T.__lookupGetter__("value")&&(M=T.__lookupGetter__("value"),O=T.__lookupSetter__("value"),T.__defineGetter__("value",F),T.__defineSetter__("value",z));T.inputmask.__valueGet=M,T.inputmask.__valueSet=O}T.inputmask._valueGet=function(H){return k.isRTL&&H!==!0?M.call(this.el).split("").reverse().join(""):M.call(this.el)},T.inputmask._valueSet=function(H,V){O.call(this.el,H==null?"":V!==!0&&k.isRTL?H.split("").reverse().join(""):H)},M===void 0&&(M=function(){return this.value},O=function(H){this.value=H},(function(H){if(v.valHooks&&(v.valHooks[H]===void 0||v.valHooks[H].inputmaskpatch!==!0)){var V=v.valHooks[H]&&v.valHooks[H].get?v.valHooks[H].get:function(D){return D.value},Y=v.valHooks[H]&&v.valHooks[H].set?v.valHooks[H].set:function(D,P){return D.value=P,D};v.valHooks[H]={get:function(D){if(D.inputmask){if(D.inputmask.opts.autoUnmask)return D.inputmask.unmaskedvalue();var P=V(D);return f.getLastValidPosition.call(k,void 0,void 0,D.inputmask.maskset.validPositions)!==-1||S.nullable!==!0?P:""}return V(D)},set:function(D,P){var I=Y(D,P);return D.inputmask&&(0,h.applyInputValue)(D,P),I},inputmaskpatch:!0}}})(T.type),(function(H){p.EventRuler.on(H,"mouseenter",(function(){var V=this,Y=V.inputmask._valueGet(!0);Y!=(V.inputmask.isRTL?f.getBuffer.call(V.inputmask).slice().reverse():f.getBuffer.call(V.inputmask)).join("")&&(0,h.applyInputValue)(V,Y)}))})(T))}})(g):g.inputmask=void 0,E})(y,w);if(R!==!1){k.originalPlaceholder=y.placeholder,k.maxLength=y!==void 0?y.maxLength:void 0,k.maxLength===-1&&(k.maxLength=void 0),"inputMode"in y&&y.getAttribute("inputmode")===null&&(y.inputMode=w.inputmode,y.setAttribute("inputmode",w.inputmode)),R===!0&&(w.showMaskOnFocus=w.showMaskOnFocus&&["cc-number","cc-exp"].indexOf(y.autocomplete)===-1,c.iphone&&(w.insertModeVisual=!1,y.setAttribute("autocorrect","off")),p.EventRuler.on(y,"submit",d.EventHandlers.submitEvent),p.EventRuler.on(y,"reset",d.EventHandlers.resetEvent),p.EventRuler.on(y,"blur",d.EventHandlers.blurEvent),p.EventRuler.on(y,"focus",d.EventHandlers.focusEvent),p.EventRuler.on(y,"invalid",d.EventHandlers.invalidEvent),p.EventRuler.on(y,"click",d.EventHandlers.clickEvent),p.EventRuler.on(y,"mouseleave",d.EventHandlers.mouseleaveEvent),p.EventRuler.on(y,"mouseenter",d.EventHandlers.mouseenterEvent),p.EventRuler.on(y,"paste",d.EventHandlers.pasteEvent),p.EventRuler.on(y,"cut",d.EventHandlers.cutEvent),p.EventRuler.on(y,"complete",w.oncomplete),p.EventRuler.on(y,"incomplete",w.onincomplete),p.EventRuler.on(y,"cleared",w.oncleared),w.inputEventOnly!==!0&&p.EventRuler.on(y,"keydown",d.EventHandlers.keyEvent),(c.mobile||w.inputEventOnly)&&y.removeAttribute("maxLength"),p.EventRuler.on(y,"input",d.EventHandlers.inputFallBackEvent)),p.EventRuler.on(y,"setvalue",d.EventHandlers.setValueEvent),k.applyMaskHook===void 0||k.applyMaskHook(),f.getBufferTemplate.call(k).join(""),k.undoValue=k._valueGet(!0);var m=(y.inputmask.shadowRoot||y.ownerDocument).activeElement;if(y.inputmask._valueGet(!0)!==""||w.clearMaskOnLostFocus===!1||m===y){(0,h.applyInputValue)(y,y.inputmask._valueGet(!0),w);var x=f.getBuffer.call(k).slice();_.isComplete.call(k,x)===!1&&w.clearIncomplete&&f.resetMaskSet.call(k,!1),w.clearMaskOnLostFocus&&m!==y&&(f.getLastValidPosition.call(k)===-1?x=[]:h.clearOptionalTail.call(k,x)),(w.clearMaskOnLostFocus===!1||w.showMaskOnFocus&&m===y||y.inputmask._valueGet(!0)!=="")&&(0,h.writeBuffer)(y,x),m===y&&f.caret.call(k,y,f.seekNext.call(k,f.getLastValidPosition.call(k)))}}};var c=u(9845),d=u(6030),p=u(9716),h=u(7760),f=u(8711),_=u(7215)},9695:function(a,o){Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(u,c,d,p){this.matches=[],this.openGroup=u||!1,this.alternatorGroup=!1,this.isGroup=u||!1,this.isOptional=c||!1,this.isQuantifier=d||!1,this.isAlternator=p||!1,this.quantifier={min:1,max:1}}},3194:function(){Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(a,o){if(this==null)throw new TypeError('"this" is null or not defined');var u=Object(this),c=u.length>>>0;if(c===0)return!1;for(var d=0|o,p=Math.max(d>=0?d:c-Math.abs(d),0);p<c;){if(u[p]===a)return!0;p++}return!1}})},9302:function(){var a=Function.bind.call(Function.call,Array.prototype.reduce),o=Function.bind.call(Function.call,Object.prototype.propertyIsEnumerable),u=Function.bind.call(Function.call,Array.prototype.concat),c=Object.keys;Object.entries||(Object.entries=function(d){return a(c(d),(function(p,h){return u(p,typeof h=="string"&&o(d,h)?[[h,d[h]]]:[])}),[])})},7149:function(){function a(o){return a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},a(o)}typeof Object.getPrototypeOf!="function"&&(Object.getPrototypeOf=a("test".__proto__)==="object"?function(o){return o.__proto__}:function(o){return o.constructor.prototype})},4013:function(){String.prototype.includes||(String.prototype.includes=function(a,o){return typeof o!="number"&&(o=0),!(o+a.length>this.length)&&this.indexOf(a,o)!==-1})},8711:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.caret=function(v,R,m,x,g){var S,C=this,E=this.opts;if(R===void 0)return"selectionStart"in v&&"selectionEnd"in v?(R=v.selectionStart,m=v.selectionEnd):d.default.getSelection?(S=d.default.getSelection().getRangeAt(0)).commonAncestorContainer.parentNode!==v&&S.commonAncestorContainer!==v||(R=S.startOffset,m=S.endOffset):document.selection&&document.selection.createRange&&(m=(R=0-(S=document.selection.createRange()).duplicate().moveStart("character",-v.inputmask._valueGet().length))+S.text.length),{begin:x?R:y.call(C,R),end:x?m:y.call(C,m)};if(Array.isArray(R)&&(m=C.isRTL?R[0]:R[1],R=C.isRTL?R[1]:R[0]),R.begin!==void 0&&(m=C.isRTL?R.begin:R.end,R=C.isRTL?R.end:R.begin),typeof R=="number"){R=x?R:y.call(C,R),m=typeof(m=x?m:y.call(C,m))=="number"?m:R;var b=parseInt(((v.ownerDocument.defaultView||d.default).getComputedStyle?(v.ownerDocument.defaultView||d.default).getComputedStyle(v,null):v.currentStyle).fontSize)*m;if(v.scrollLeft=b>v.scrollWidth?b:0,v.inputmask.caretPos={begin:R,end:m},E.insertModeVisual&&E.insertMode===!1&&R===m&&(g||m++),v===(v.inputmask.shadowRoot||v.ownerDocument).activeElement){if("setSelectionRange"in v)v.setSelectionRange(R,m);else if(d.default.getSelection){if(S=document.createRange(),v.firstChild===void 0||v.firstChild===null){var T=document.createTextNode("");v.appendChild(T)}S.setStart(v.firstChild,R<v.inputmask._valueGet().length?R:v.inputmask._valueGet().length),S.setEnd(v.firstChild,m<v.inputmask._valueGet().length?m:v.inputmask._valueGet().length),S.collapse(!0);var M=d.default.getSelection();M.removeAllRanges(),M.addRange(S)}else v.createTextRange&&((S=v.createTextRange()).collapse(!0),S.moveEnd("character",m),S.moveStart("character",R),S.select());v.inputmask.caretHook===void 0||v.inputmask.caretHook.call(C,{begin:R,end:m})}}},o.determineLastRequiredPosition=function(v){var R,m,x=this,g=x.maskset,S=x.dependencyLib,C=_.call(x),E={},b=g.validPositions[C],T=h.getMaskTemplate.call(x,!0,_.call(x),!0,!0),M=T.length,O=b!==void 0?b.locator.slice():void 0;for(R=C+1;R<T.length;R++)O=(m=h.getTestTemplate.call(x,R,O,R-1)).locator.slice(),E[R]=S.extend(!0,{},m);var F=b&&b.alternation!==void 0?b.locator[b.alternation]:void 0;for(R=M-1;R>C&&((m=E[R]).match.optionality||m.match.optionalQuantifier&&m.match.newBlockMarker||F&&(F!==E[R].locator[b.alternation]&&m.match.static!==!0||m.match.static===!0&&m.locator[b.alternation]&&p.checkAlternationMatch.call(x,m.locator[b.alternation].toString().split(","),F.toString().split(","))&&h.getTests.call(x,R)[0].def!==""))&&T[R]===h.getPlaceholder.call(x,R,m.match);R--)M--;return v?{l:M,def:E[M]?E[M].match:void 0}:M},o.determineNewCaretPosition=function(v,R,m){var x,g,S,C=this,E=C.maskset,b=C.opts;if(R&&(C.isRTL?v.end=v.begin:v.begin=v.end),v.begin===v.end){switch(m=m||b.positionCaretOnClick){case"none":break;case"select":v={begin:0,end:f.call(C).length};break;case"ignore":v.end=v.begin=w.call(C,_.call(C));break;case"radixFocus":if(C.clicked>1&&E.validPositions.length===0)break;if((function($){if(b.radixPoint!==""&&b.digits!==0){var H=E.validPositions;if(H[$]===void 0||H[$].input===void 0){if($<w.call(C,-1))return!0;var V=f.call(C).indexOf(b.radixPoint);if(V!==-1){for(var Y=0,D=H.length;Y<D;Y++)if(H[Y]&&V<Y&&H[Y].input!==h.getPlaceholder.call(C,Y))return!1;return!0}}}return!1})(v.begin)){var T=f.call(C).join("").indexOf(b.radixPoint);v.end=v.begin=b.numericInput?w.call(C,T):T;break}default:if(x=v.begin,g=_.call(C,x,!0),x<=(S=w.call(C,g!==-1||k.call(C,0)?g:-1)))v.end=v.begin=k.call(C,x,!1,!0)?x:w.call(C,x);else{var M=E.validPositions[g],O=h.getTestTemplate.call(C,S,M?M.match.locator:void 0,M),F=h.getPlaceholder.call(C,S,O.match);if(F!==""&&f.call(C)[S]!==F&&O.match.optionalQuantifier!==!0&&O.match.newBlockMarker!==!0||!k.call(C,S,b.keepStatic,!0)&&O.match.def===F){var z=w.call(C,S);(x>=z||x===S)&&(S=z)}v.end=v.begin=S}}return v}},o.getBuffer=f,o.getBufferTemplate=function(){var v=this.maskset;return v._buffer===void 0&&(v._buffer=h.getMaskTemplate.call(this,!1,1),v.buffer===void 0&&(v.buffer=v._buffer.slice())),v._buffer},o.getLastValidPosition=_,o.isMask=k,o.resetMaskSet=function(v){var R=this.maskset;R.buffer=void 0,v!==!0&&(R.validPositions=[],R.p=0),v===!1&&(R.tests={},R.jitOffset={})},o.seekNext=w,o.seekPrevious=function(v,R){var m=this,x=v-1;if(v<=0)return 0;for(;x>0&&(R===!0&&(h.getTest.call(m,x).match.newBlockMarker!==!0||!k.call(m,x,void 0,!0))||R!==!0&&!k.call(m,x,void 0,!0));)x--;return x},o.translatePosition=y;var c,d=(c=u(9380))&&c.__esModule?c:{default:c},p=u(7215),h=u(4713);function f(v){var R=this,m=R.maskset;return m.buffer!==void 0&&v!==!0||(m.buffer=h.getMaskTemplate.call(R,!0,_.call(R),!0),m._buffer===void 0&&(m._buffer=m.buffer.slice())),m.buffer}function _(v,R,m){var x=this.maskset,g=-1,S=-1,C=m||x.validPositions;v===void 0&&(v=-1);for(var E=0,b=C.length;E<b;E++)C[E]&&(R||C[E].generatedInput!==!0)&&(E<=v&&(g=E),E>=v&&(S=E));return g===-1||g===v?S:S===-1||v-g<S-v?g:S}function k(v,R,m){var x=this,g=this.maskset,S=h.getTestTemplate.call(x,v).match;if(S.def===""&&(S=h.getTest.call(x,v).match),S.static!==!0)return S.fn;if(m===!0&&g.validPositions[v]!==void 0&&g.validPositions[v].generatedInput!==!0)return!0;if(R!==!0&&v>-1){if(m){var C=h.getTests.call(x,v);return C.length>1+(C[C.length-1].match.def===""?1:0)}var E=h.determineTestTemplate.call(x,v,h.getTests.call(x,v)),b=h.getPlaceholder.call(x,v,E.match);return E.match.def!==b}return!1}function w(v,R,m){var x=this;m===void 0&&(m=!0);for(var g=v+1;h.getTest.call(x,g).match.def!==""&&(R===!0&&(h.getTest.call(x,g).match.newBlockMarker!==!0||!k.call(x,g,void 0,!0))||R!==!0&&!k.call(x,g,void 0,m));)g++;return g}function y(v){var R=this.opts,m=this.el;return!this.isRTL||typeof v!="number"||R.greedy&&R.placeholder===""||!m||(v=this._valueGet().length-v)<0&&(v=0),v}},4713:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.determineTestTemplate=y,o.getDecisionTaker=_,o.getMaskTemplate=function(x,g,S,C,E){var b=this,T=this.opts,M=this.maskset,O=T.greedy;E&&T.greedy&&(T.greedy=!1,b.maskset.tests={}),g=g||0;var F,z,$,H,V=[],Y=0;do{if(x===!0&&M.validPositions[Y])z=($=E&&M.validPositions[Y].match.optionality&&M.validPositions[Y+1]===void 0&&(M.validPositions[Y].generatedInput===!0||M.validPositions[Y].input==T.skipOptionalPartCharacter&&Y>0)?y.call(b,Y,m.call(b,Y,F,Y-1)):M.validPositions[Y]).match,F=$.locator.slice(),V.push(S===!0?$.input:S===!1?z.nativeDef:k.call(b,Y,z));else{z=($=w.call(b,Y,F,Y-1)).match,F=$.locator.slice();var D=C!==!0&&(T.jitMasking!==!1?T.jitMasking:z.jit);(H=(H||M.validPositions[Y-1])&&z.static&&z.def!==T.groupSeparator&&z.fn===null)||D===!1||D===void 0||typeof D=="number"&&isFinite(D)&&D>Y?V.push(S===!1?z.nativeDef:k.call(b,V.length,z)):H=!1}Y++}while(z.static!==!0||z.def!==""||g>Y);return V[V.length-1]===""&&V.pop(),S===!1&&M.maskLength!==void 0||(M.maskLength=Y-1),T.greedy=O,V},o.getPlaceholder=k,o.getTest=v,o.getTestTemplate=w,o.getTests=m,o.isSubsetOf=R;var c,d=(c=u(2394))&&c.__esModule?c:{default:c},p=u(8711);function h(x){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(g){return typeof g}:function(g){return g&&typeof Symbol=="function"&&g.constructor===Symbol&&g!==Symbol.prototype?"symbol":typeof g},h(x)}function f(x,g){var S=(x.alternation!=null?x.mloc[_(x)]:x.locator).join("");if(S!=="")for(S=S.split(":")[0];S.length<g;)S+="0";return S}function _(x){var g=x.locator[x.alternation];return typeof g=="string"&&g.length>0&&(g=g.split(",")[0]),g!==void 0?g.toString():""}function k(x,g,S){var C=this,E=this.opts,b=this.maskset;if((g=g||v.call(C,x).match).placeholder!==void 0||S===!0){if(g.placeholder!==""&&g.static===!0&&g.generated!==!0){var T=p.getLastValidPosition.call(C,x),M=p.seekNext.call(C,T);return(S?x<=M:x<M)?E.staticDefinitionSymbol&&g.static?g.nativeDef:g.def:typeof g.placeholder=="function"?g.placeholder(E):g.placeholder}return typeof g.placeholder=="function"?g.placeholder(E):g.placeholder}if(g.static===!0){if(x>-1&&b.validPositions[x]===void 0){var O,F=m.call(C,x),z=[];if(typeof E.placeholder=="string"&&F.length>1+(F[F.length-1].match.def===""?1:0)){for(var $=0;$<F.length;$++)if(F[$].match.def!==""&&F[$].match.optionality!==!0&&F[$].match.optionalQuantifier!==!0&&(F[$].match.static===!0||O===void 0||F[$].match.fn.test(O.match.def,b,x,!0,E)!==!1)&&(z.push(F[$]),F[$].match.static===!0&&(O=F[$]),z.length>1&&/[0-9a-bA-Z]/.test(z[0].match.def)))return E.placeholder.charAt(x%E.placeholder.length)}}return g.def}return h(E.placeholder)==="object"?g.def:E.placeholder.charAt(x%E.placeholder.length)}function w(x,g,S){return this.maskset.validPositions[x]||y.call(this,x,m.call(this,x,g&&g.slice(),S))}function y(x,g){var S=this.opts,C=0,E=(function(H,V){var Y=0,D=!1;return V.forEach((function(P){P.match.optionality&&(Y!==0&&Y!==P.match.optionality&&(D=!0),(Y===0||Y>P.match.optionality)&&(Y=P.match.optionality))})),Y&&(H==0||V.length==1?Y=0:D||(Y=0)),Y})(x,g);x=x>0?x-1:0;var b,T,M,O=f(v.call(this,x));S.greedy&&g.length>1&&g[g.length-1].match.def===""&&(C=1);for(var F=0;F<g.length-C;F++){var z=g[F];b=f(z,O.length);var $=Math.abs(b-O);(z.unMatchedAlternationStopped!==!0||g.filter((function(H){return H.unMatchedAlternationStopped!==!0})).length<=1)&&(T===void 0||b!==""&&$<T||M&&!S.greedy&&M.match.optionality&&M.match.optionality-E>0&&M.match.newBlockMarker==="master"&&(!z.match.optionality||z.match.optionality-E<1||!z.match.newBlockMarker)||M&&!S.greedy&&M.match.optionalQuantifier&&!z.match.optionalQuantifier)&&(T=$,M=z)}return M}function v(x,g){var S=this.maskset;return S.validPositions[x]?S.validPositions[x]:(g||m.call(this,x))[0]}function R(x,g,S){function C(E){for(var b,T=[],M=-1,O=0,F=E.length;O<F;O++)if(E.charAt(O)==="-")for(b=E.charCodeAt(O+1);++M<b;)T.push(String.fromCharCode(M));else M=E.charCodeAt(O),T.push(E.charAt(O));return T.join("")}return x.match.def===g.match.nativeDef||!(!(S.regex||x.match.fn instanceof RegExp&&g.match.fn instanceof RegExp)||x.match.static===!0||g.match.static===!0)&&(g.match.fn.source==="."||C(g.match.fn.source.replace(/[[\]/]/g,"")).indexOf(C(x.match.fn.source.replace(/[[\]/]/g,"")))!==-1)}function m(x,g,S){var C,E,b=this,T=this.dependencyLib,M=this.maskset,O=this.opts,F=this.el,z=M.maskToken,$=g?S:0,H=g?g.slice():[0],V=[],Y=!1,D=g?g.join(""):"",P=!1;function I(ne,G,B,Q){function X(se,pe,me){function we(K,ie){var le=ie.matches.indexOf(K)===0;return le||ie.matches.every((function(ae,ve){return ae.isQuantifier===!0?le=we(K,ie.matches[ve-1]):Object.prototype.hasOwnProperty.call(ae,"matches")&&(le=we(K,ae)),!le})),le}function Ae(K,ie,le){var ae,ve;if((M.tests[K]||M.validPositions[K])&&(M.validPositions[K]?[M.validPositions[K]]:M.tests[K]).every((function(_e,ue){if(_e.mloc[ie])return ae=_e,!1;var Le=le!==void 0?le:_e.alternation,ze=_e.locator[Le]!==void 0?_e.locator[Le].toString().indexOf(ie):-1;return(ve===void 0||ze<ve)&&ze!==-1&&(ae=_e,ve=ze),!0})),ae){var Re=ae.locator[ae.alternation],Se=ae.mloc[ie]||ae.mloc[Re]||ae.locator;return Se[Se.length-1].toString().indexOf(":")!==-1&&Se.pop(),Se.slice((le!==void 0?le:ae.alternation)+1)}return le!==void 0?Ae(K,ie):void 0}function Fe(K,ie){return K.match.static===!0&&ie.match.static!==!0&&ie.match.fn.test(K.match.def,M,x,!1,O,!1)}function Ne(K,ie){var le=K.alternation,ae=ie===void 0||le<=ie.alternation&&K.locator[le].toString().indexOf(ie.locator[le])===-1;if(!ae&&le>ie.alternation){for(var ve=0;ve<le;ve++)if(K.locator[ve]!==ie.locator[ve]){le=ve,ae=!0;break}}return!!ae&&(function(Re){K.mloc=K.mloc||{};var Se=K.locator[Re];if(Se!==void 0){if(typeof Se=="string"&&(Se=Se.split(",")[0]),K.mloc[Se]===void 0&&(K.mloc[Se]=K.locator.slice(),K.mloc[Se].push(":".concat(K.alternation))),ie!==void 0){for(var _e in ie.mloc)typeof _e=="string"&&(_e=parseInt(_e.split(",")[0])),K.mloc[_e+0]=ie.mloc[_e];K.locator[Re]=Object.keys(K.mloc).join(",")}return K.alternation>Re&&(K.alternation=Re),!0}return K.alternation=void 0,!1})(le)}function re(K,ie){if(K.locator.length!==ie.locator.length)return!1;for(var le=K.alternation+1;le<K.locator.length;le++)if(K.locator[le]!==ie.locator[le])return!1;return!0}if($>x+O._maxTestPos)throw new Error("Inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. ".concat(M.mask));if($===x&&se.matches===void 0){if(V.push({match:se,locator:pe.reverse(),cd:D,mloc:{}}),!se.optionality||me!==void 0||!(O.definitions&&O.definitions[se.nativeDef]&&O.definitions[se.nativeDef].optional||d.default.prototype.definitions[se.nativeDef]&&d.default.prototype.definitions[se.nativeDef].optional))return!0;Y=!0,$=x}else if(se.matches!==void 0){if(se.isGroup&&me!==se)return(function(){if(se=X(ne.matches[ne.matches.indexOf(se)+1],pe,me))return!0})();if(se.isOptional)return(function(){var K=se,ie=V.length;if(se=I(se,G,pe,me),V.length>0){if(V.forEach((function(le,ae){ae>=ie&&(le.match.optionality=le.match.optionality?le.match.optionality+1:1)})),C=V[V.length-1].match,me!==void 0||!we(C,K))return se;Y=!0,$=x}})();if(se.isAlternator)return(function(){function K(L){for(var A,W=L.matches[0].matches?L.matches[0].matches.length:1,te=0;te<L.matches.length&&W===(A=L.matches[te].matches?L.matches[te].matches.length:1);te++);return W!==A}b.hasAlternator=!0;var ie,le=se,ae=[],ve=V.slice(),Re=pe.length,Se=G.length>0?G.shift():-1;if(Se===-1||typeof Se=="string"){var _e,ue=$,Le=G.slice(),ze=[];if(typeof Se=="string")ze=Se.split(",");else for(_e=0;_e<le.matches.length;_e++)ze.push(_e.toString());if(M.excludes[x]!==void 0){for(var pn=ze.slice(),Zt=0,Ue=M.excludes[x].length;Zt<Ue;Zt++){var J=M.excludes[x][Zt].toString().split(":");pe.length==J[1]&&ze.splice(ze.indexOf(J[0]),1)}ze.length===0&&(delete M.excludes[x],ze=pn)}(O.keepStatic===!0||isFinite(parseInt(O.keepStatic))&&ue>=O.keepStatic)&&(ze=ze.slice(0,1));for(var ee=0;ee<ze.length;ee++){_e=parseInt(ze[ee]),V=[],G=typeof Se=="string"&&Ae($,_e,Re)||Le.slice();var Be=le.matches[_e];if(Be&&X(Be,[_e].concat(pe),me))se=!0;else if(ee===0&&(P=K(le)),Be&&Be.matches&&Be.matches.length>le.matches[0].matches.length)break;ie=V.slice(),$=ue,V=[];for(var Ie=0;Ie<ie.length;Ie++){var Me=ie[Ie],ke=!1;Me.alternation=Me.alternation||Re,Ne(Me);for(var pt=0;pt<ae.length;pt++){var et=ae[pt];if(typeof Se!="string"||Me.alternation!==void 0&&ze.includes(Me.locator[Me.alternation].toString())){if(Me.match.nativeDef===et.match.nativeDef){ke=!0,Ne(et,Me);break}if(R(Me,et,O)){Ne(Me,et)&&(ke=!0,ae.splice(ae.indexOf(et),0,Me));break}if(R(et,Me,O)){Ne(et,Me);break}if(Fe(Me,et)){re(Me,et)||F.inputmask.userOptions.keepStatic!==void 0?Ne(Me,et)&&(ke=!0,ae.splice(ae.indexOf(et),0,Me)):O.keepStatic=!0;break}if(Fe(et,Me)){Ne(et,Me);break}}}ke||ae.push(Me)}}V=ve.concat(ae),$=x,Y=V.length>0&&P,se=ae.length>0&&!P,P&&Y&&!se&&V.forEach((function(L,A){L.unMatchedAlternationStopped=!0})),G=Le.slice()}else se=X(le.matches[Se]||ne.matches[Se],[Se].concat(pe),me);if(se)return!0})();if(se.isQuantifier&&me!==ne.matches[ne.matches.indexOf(se)-1])return(function(){for(var K=se,ie=!1,le=G.length>0?G.shift():0;le<(isNaN(K.quantifier.max)?le+1:K.quantifier.max)&&$<=x;le++){var ae=ne.matches[ne.matches.indexOf(K)-1];if(se=X(ae,[le].concat(pe),ae)){if(V.forEach((function(ve,Re){(C=N(ae,ve.match)?ve.match:V[V.length-1].match).optionalQuantifier=le>=K.quantifier.min,C.jit=(le+1)*(ae.matches.indexOf(C)+1)>K.quantifier.jit,C.optionalQuantifier&&we(C,ae)&&(Y=!0,$=x,O.greedy&&M.validPositions[x-1]==null&&le>K.quantifier.min&&["*","+"].indexOf(K.quantifier.max)!=-1&&(V.pop(),D=void 0),ie=!0,se=!1),!ie&&C.jit&&(M.jitOffset[x]=ae.matches.length-ae.matches.indexOf(C))})),ie)break;return!0}}})();if(se=I(se,G,pe,me))return!0}else $++}for(var q=G.length>0?G.shift():0;q<ne.matches.length;q++)if(ne.matches[q].isQuantifier!==!0){var oe=X(ne.matches[q],[q].concat(B),Q);if(oe&&$===x)return oe;if($>x)break}}function N(ne,G){var B=ne.matches.indexOf(G)!=-1;return B||ne.matches.forEach((function(Q,X){Q.matches===void 0||B||(B=N(Q,G))})),B}if(x>-1){if(g===void 0){for(var U,Z=x-1;(U=M.validPositions[Z]||M.tests[Z])===void 0&&Z>-1;)Z--;U!==void 0&&Z>-1&&(H=(function(ne,G){var B,Q=[];return Array.isArray(G)||(G=[G]),G.length>0&&(G[0].alternation===void 0||O.keepStatic===!0?(Q=y.call(b,ne,G.slice()).locator.slice()).length===0&&(Q=G[0].locator.slice()):G.forEach((function(X){X.def!==""&&(Q.length===0?(B=X.alternation,Q=X.locator.slice()):X.locator[B]&&Q[B].toString().indexOf(X.locator[B])===-1&&(Q[B]+=","+X.locator[B]))}))),Q})(Z,U),D=H.join(""),$=Z)}if(M.tests[x]&&M.tests[x][0].cd===D)return M.tests[x];for(var j=H.shift();j<z.length&&!(I(z[j],H,[j])&&$===x||$>x);j++);}return(V.length===0||Y)&&V.push({match:{fn:null,static:!0,optionality:!1,casing:null,def:"",placeholder:""},locator:P&&V.filter((function(ne){return ne.unMatchedAlternationStopped!==!0})).length===0?[0]:[],mloc:{},cd:D}),g!==void 0&&M.tests[x]?E=T.extend(!0,[],V):(M.tests[x]=T.extend(!0,[],V),E=M.tests[x]),V.forEach((function(ne){ne.match.optionality=ne.match.defOptionality||!1})),E}},7215:function(a,o,u){Object.defineProperty(o,"__esModule",{value:!0}),o.alternate=f,o.checkAlternationMatch=function(g,S,C){for(var E,b=this.opts.greedy?S:S.slice(0,1),T=!1,M=C!==void 0?C.split(","):[],O=0;O<M.length;O++)(E=g.indexOf(M[O]))!==-1&&g.splice(E,1);for(var F=0;F<g.length;F++)if(b.includes(g[F])){T=!0;break}return T},o.handleRemove=function(g,S,C,E,b){var T=this,M=this.maskset,O=this.opts;if((O.numericInput||T.isRTL)&&(S===d.keys.Backspace?S=d.keys.Delete:S===d.keys.Delete&&(S=d.keys.Backspace),T.isRTL)){var F=C.end;C.end=C.begin,C.begin=F}var z,$=p.getLastValidPosition.call(T,void 0,!0);C.end>=p.getBuffer.call(T).length&&$>=C.end&&(C.end=$+1),S===d.keys.Backspace?C.end-C.begin<1&&(C.begin=p.seekPrevious.call(T,C.begin)):S===d.keys.Delete&&C.begin===C.end&&(C.end=p.isMask.call(T,C.end,!0,!0)?C.end+1:p.seekNext.call(T,C.end)+1),(z=x.call(T,C))!==!1&&((E!==!0&&O.keepStatic!==!1||O.regex!==null&&h.getTest.call(T,C.begin).match.def.indexOf("|")!==-1)&&f.call(T,!0),E!==!0&&(M.p=S===d.keys.Delete?C.begin+z:C.begin,M.p=p.determineNewCaretPosition.call(T,{begin:M.p,end:M.p},!1,O.insertMode===!1&&S===d.keys.Backspace?"none":void 0).begin))},o.isComplete=k,o.isSelection=w,o.isValid=y,o.refreshFromBuffer=R,o.revalidateMask=x;var c=u(6030),d=u(2839),p=u(8711),h=u(4713);function f(g,S,C,E,b,T){var M=this,O=this.dependencyLib,F=this.opts,z=M.maskset;if(!M.hasAlternator)return!1;var $,H,V,Y,D,P,I,N,U,Z,j,ne=O.extend(!0,[],z.validPositions),G=O.extend(!0,{},z.tests),B=!1,Q=!1,X=b!==void 0?b:p.getLastValidPosition.call(M);if(T&&(Z=T.begin,j=T.end,T.begin>T.end&&(Z=T.end,j=T.begin)),X===-1&&b===void 0)$=0,H=(Y=h.getTest.call(M,$)).alternation;else for(;X>=0;X--)if((V=z.validPositions[X])&&V.alternation!==void 0){if(X<=(g||0)&&Y&&Y.locator[V.alternation]!==V.locator[V.alternation])break;$=X,H=z.validPositions[$].alternation,Y=V}if(H!==void 0){I=parseInt($),z.excludes[I]=z.excludes[I]||[],g!==!0&&z.excludes[I].push((0,h.getDecisionTaker)(Y)+":"+Y.alternation);var q=[],oe=-1;for(D=I;I<p.getLastValidPosition.call(M,void 0,!0)+1;D++)oe===-1&&g<=D&&S!==void 0&&(q.push(S),oe=q.length-1),(P=z.validPositions[I])&&P.generatedInput!==!0&&(T===void 0||D<Z||D>=j)&&q.push(P.input),z.validPositions.splice(I,1);for(oe===-1&&S!==void 0&&(q.push(S),oe=q.length-1);z.excludes[I]!==void 0&&z.excludes[I].length<10;){for(z.tests={},p.resetMaskSet.call(M,!0),B=!0,D=0;D<q.length&&(N=B.caret||F.insertMode==0&&N!=null?p.seekNext.call(M,N):p.getLastValidPosition.call(M,void 0,!0)+1,U=q[D],B=y.call(M,N,U,!1,E,!0));D++)D===oe&&(Q=B),g==1&&B&&(Q={caretPos:D});if(B)break;if(p.resetMaskSet.call(M),Y=h.getTest.call(M,I),z.validPositions=O.extend(!0,[],ne),z.tests=O.extend(!0,{},G),!z.excludes[I]){Q=f.call(M,g,S,C,E,I-1,T);break}if(Y.alternation!=null){var se=(0,h.getDecisionTaker)(Y);if(z.excludes[I].indexOf(se+":"+Y.alternation)!==-1){Q=f.call(M,g,S,C,E,I-1,T);break}for(z.excludes[I].push(se+":"+Y.alternation),D=I;D<p.getLastValidPosition.call(M,void 0,!0)+1;D++)z.validPositions.splice(I)}else delete z.excludes[I]}}return Q&&F.keepStatic===!1||delete z.excludes[I],Q}function _(g,S,C){var E=this.opts,b=this.maskset;switch(E.casing||S.casing){case"upper":g=g.toUpperCase();break;case"lower":g=g.toLowerCase();break;case"title":var T=b.validPositions[C-1];g=C===0||T&&T.input===String.fromCharCode(d.keyCode.Space)?g.toUpperCase():g.toLowerCase();break;default:if(typeof E.casing=="function"){var M=Array.prototype.slice.call(arguments);M.push(b.validPositions),g=E.casing.apply(this,M)}}return g}function k(g){var S=this,C=this.opts,E=this.maskset;if(typeof C.isComplete=="function")return C.isComplete(g,C);if(C.repeat!=="*"){var b=!1,T=p.determineLastRequiredPosition.call(S,!0),M=T.l;if(T.def===void 0||T.def.newBlockMarker||T.def.optionality||T.def.optionalQuantifier){b=!0;for(var O=0;O<=M;O++){var F=h.getTestTemplate.call(S,O).match;if(F.static!==!0&&E.validPositions[O]===void 0&&(F.optionality===!1||F.optionality===void 0||F.optionality&&F.newBlockMarker==0)&&(F.optionalQuantifier===!1||F.optionalQuantifier===void 0)||F.static===!0&&F.def!=""&&g[O]!==h.getPlaceholder.call(S,O,F)){b=!1;break}}}return b}}function w(g){var S=this.opts.insertMode?0:1;return this.isRTL?g.begin-g.end>S:g.end-g.begin>S}function y(g,S,C,E,b,T,M){var O=this,F=this.dependencyLib,z=this.opts,$=O.maskset;C=C===!0;var H=g;function V(B){if(B!==void 0){if(B.remove!==void 0&&(Array.isArray(B.remove)||(B.remove=[B.remove]),B.remove.sort((function(X,q){return O.isRTL?X.pos-q.pos:q.pos-X.pos})).forEach((function(X){x.call(O,{begin:X,end:X+1})})),B.remove=void 0),B.insert!==void 0&&(Array.isArray(B.insert)||(B.insert=[B.insert]),B.insert.sort((function(X,q){return O.isRTL?q.pos-X.pos:X.pos-q.pos})).forEach((function(X){X.c!==""&&y.call(O,X.pos,X.c,X.strict===void 0||X.strict,X.fromIsValid!==void 0?X.fromIsValid:E)})),B.insert=void 0),B.refreshFromBuffer&&B.buffer){var Q=B.refreshFromBuffer;R.call(O,Q===!0?Q:Q.start,Q.end,B.buffer),B.refreshFromBuffer=void 0}B.rewritePosition!==void 0&&(H=B.rewritePosition,B=!0)}return B}function Y(B,Q,X){var q=!1;return h.getTests.call(O,B).every((function(oe,se){var pe=oe.match;if(p.getBuffer.call(O,!0),(q=(!pe.jit||$.validPositions[p.seekPrevious.call(O,B)]!==void 0)&&(pe.fn!=null?pe.fn.test(Q,$,B,X,z,w.call(O,g)):(Q===pe.def||Q===z.skipOptionalPartCharacter)&&pe.def!==""&&{c:h.getPlaceholder.call(O,B,pe,!0)||pe.def,pos:B}))!==!1){var me=q.c!==void 0?q.c:Q,we=B;return me=me===z.skipOptionalPartCharacter&&pe.static===!0?h.getPlaceholder.call(O,B,pe,!0)||pe.def:me,(q=V(q))!==!0&&q.pos!==void 0&&q.pos!==B&&(we=q.pos),q!==!0&&q.pos===void 0&&q.c===void 0||x.call(O,g,F.extend({},oe,{input:_.call(O,me,pe,we)}),E,we)===!1&&(q=!1),!1}return!0})),q}g.begin!==void 0&&(H=O.isRTL?g.end:g.begin);var D=!0,P=F.extend(!0,[],$.validPositions);if(z.keepStatic===!1&&$.excludes[H]!==void 0&&b!==!0&&E!==!0)for(var I=H;I<(O.isRTL?g.begin:g.end);I++)$.excludes[I]!==void 0&&($.excludes[I]=void 0,delete $.tests[I]);if(typeof z.preValidation=="function"&&E!==!0&&T!==!0&&(D=V(D=z.preValidation.call(O,p.getBuffer.call(O),H,S,w.call(O,g),z,$,g,C||b))),D===!0){if(D=Y(H,S,C),(!C||E===!0)&&D===!1&&T!==!0){var N=$.validPositions[H];if(!N||N.match.static!==!0||N.match.def!==S&&S!==z.skipOptionalPartCharacter){if(z.insertMode||$.validPositions[p.seekNext.call(O,H)]===void 0||g.end>H){var U=!1;if($.jitOffset[H]&&$.validPositions[p.seekNext.call(O,H)]===void 0&&(D=y.call(O,H+$.jitOffset[H],S,!0,!0))!==!1&&(b!==!0&&(D.caret=H),U=!0),g.end>H&&($.validPositions[H]=void 0),!U&&!p.isMask.call(O,H,z.keepStatic&&H===0)){for(var Z=H+1,j=p.seekNext.call(O,H,!1,H!==0);Z<=j;Z++)if((D=Y(Z,S,C))!==!1){D=m.call(O,H,D.pos!==void 0?D.pos:Z)||D,H=Z;break}}}}else D={caret:p.seekNext.call(O,H)}}O.hasAlternator&&b!==!0&&!C&&(b=!0,D===!1&&z.keepStatic&&(k.call(O,p.getBuffer.call(O))||H===0)?D=f.call(O,H,S,C,E,void 0,g):(w.call(O,g)&&$.tests[H]&&$.tests[H].length>1&&z.keepStatic||D==1&&z.numericInput!==!0&&$.tests[H]&&$.tests[H].length>1&&p.getLastValidPosition.call(O,void 0,!0)>H)&&(D=f.call(O,!0))),D===!0&&(D={pos:H})}if(typeof z.postValidation=="function"&&E!==!0&&T!==!0){var ne=z.postValidation.call(O,p.getBuffer.call(O,!0),g.begin!==void 0?O.isRTL?g.end:g.begin:g,S,D,z,$,C,M);ne!==void 0&&(D=ne===!0?D:ne)}D&&D.pos===void 0&&(D.pos=H),D===!1||T===!0?(p.resetMaskSet.call(O,!0),$.validPositions=F.extend(!0,[],P)):m.call(O,void 0,H,!0);var G=V(D);return O.maxLength!==void 0&&p.getBuffer.call(O).length>O.maxLength&&!E&&(p.resetMaskSet.call(O,!0),$.validPositions=F.extend(!0,[],P),G=!1),G}function v(g,S,C){for(var E=this.maskset,b=!1,T=h.getTests.call(this,g),M=0;M<T.length;M++){if(T[M].match&&(T[M].match.nativeDef===S.match[C.shiftPositions?"def":"nativeDef"]&&(!C.shiftPositions||!S.match.static)||T[M].match.nativeDef===S.match.nativeDef||C.regex&&!T[M].match.static&&T[M].match.fn.test(S.input,E,g,!1,C))){b=!0;break}if(T[M].match&&T[M].match.def===S.match.nativeDef){b=void 0;break}}return b===!1&&E.jitOffset[g]!==void 0&&(b=v.call(this,g+E.jitOffset[g],S,C)),b}function R(g,S,C){var E,b,T=this,M=this.maskset,O=this.opts,F=this.dependencyLib,z=O.skipOptionalPartCharacter,$=T.isRTL?C.slice().reverse():C;if(O.skipOptionalPartCharacter="",g===!0)p.resetMaskSet.call(T,!1),g=0,S=C.length,b=p.determineNewCaretPosition.call(T,{begin:0,end:0},!1).begin;else{for(E=g;E<S;E++)M.validPositions.splice(g,0);b=g}var H=new F.Event("keypress");for(E=g;E<S;E++){H.key=$[E].toString(),T.ignorable=!1;var V=c.EventHandlers.keypressEvent.call(T,H,!0,!1,!1,b);V!==!1&&V!==void 0&&(b=V.forwardPosition)}O.skipOptionalPartCharacter=z}function m(g,S,C){var E=this,b=this.maskset,T=this.dependencyLib;if(g===void 0)for(g=S-1;g>0&&!b.validPositions[g];g--);for(var M=g;M<S;M++)if(b.validPositions[M]===void 0&&!p.isMask.call(E,M,!1)&&(M==0?h.getTest.call(E,M):b.validPositions[M-1])){var O=h.getTests.call(E,M).slice();O[O.length-1].match.def===""&&O.pop();var F,z=h.determineTestTemplate.call(E,M,O);if(z&&(z.match.jit!==!0||z.match.newBlockMarker==="master"&&(F=b.validPositions[M+1])&&F.match.optionalQuantifier===!0)&&((z=T.extend({},z,{input:h.getPlaceholder.call(E,M,z.match,!0)||z.match.def})).generatedInput=!0,x.call(E,M,z,!0),C!==!0)){var $=b.validPositions[S].input;return b.validPositions[S]=void 0,y.call(E,S,$,!0,!0)}}}function x(g,S,C,E){var b=this,T=this.maskset,M=this.opts,O=this.dependencyLib;function F(G,B,Q){var X=B[G];if(X!==void 0&&X.match.static===!0&&X.match.optionality!==!0&&(B[0]===void 0||B[0].alternation===void 0)){var q=Q.begin<=G-1?B[G-1]&&B[G-1].match.static===!0&&B[G-1]:B[G-1],oe=Q.end>G+1?B[G+1]&&B[G+1].match.static===!0&&B[G+1]:B[G+1];return q&&oe}return!1}var z=0,$=g.begin!==void 0?g.begin:g,H=g.end!==void 0?g.end:g,V=!0;if(g.begin>g.end&&($=g.end,H=g.begin),E=E!==void 0?E:$,C===void 0&&($!==H||M.insertMode&&T.validPositions[E]!==void 0||S===void 0||S.match.optionalQuantifier||S.match.optionality)){var Y,D=O.extend(!0,[],T.validPositions),P=p.getLastValidPosition.call(b,void 0,!0);T.p=$;var I=w.call(b,g)?$:E;for(Y=P;Y>=I;Y--)T.validPositions.splice(Y,1),S===void 0&&delete T.tests[Y+1];var N,U,Z=E,j=Z;for(S&&(T.validPositions[E]=O.extend(!0,{},S),j++,Z++),D[H]==null&&T.jitOffset[H]&&(H+=T.jitOffset[H]+1),Y=S?H:H-1;Y<=P;Y++){if((N=D[Y])!==void 0&&N.generatedInput!==!0&&(Y>=H||Y>=$&&F(Y,D,{begin:$,end:H}))){for(;h.getTest.call(b,j).match.def!=="";){if((U=v.call(b,j,N,M))!==!1||N.match.def==="+"){N.match.def==="+"&&p.getBuffer.call(b,!0);var ne=y.call(b,j,N.input,N.match.def!=="+",!0);if(V=ne!==!1,Z=(ne.pos||j)+1,!V&&U)break}else V=!1;if(V){S===void 0&&N.match.static&&Y===g.begin&&z++;break}if(!V&&p.getBuffer.call(b),j>T.maskLength)break;j++}h.getTest.call(b,j).match.def==""&&(V=!1),j=Z}if(!V)break}if(!V)return T.validPositions=O.extend(!0,[],D),p.resetMaskSet.call(b,!0),!1}else S&&h.getTest.call(b,E).match.cd===S.match.cd&&(T.validPositions[E]=O.extend(!0,{},S));return p.resetMaskSet.call(b,!0),z}}},i={};function r(a){var o=i[a];if(o!==void 0)return o.exports;var u=i[a]={exports:{}};return t[a](u,u.exports,r),u.exports}var s={};return(function(){var a=s;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,r(7149),r(3194),r(9302),r(4013),r(3851),r(219),r(207),r(5296);var o,u=(o=r(2394))&&o.__esModule?o:{default:o};a.default=u.default})(),s})()}))})(vn)),vn.exports}var Ad=Pd();const Fd=ka(Ad);//! moment.js
|
|
14
17
|
//! version : 2.30.1
|
|
15
18
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
16
19
|
//! license : MIT
|
|
17
20
|
//! momentjs.com
|
|
18
|
-
var
|
|
19
|
-
[`+
|
|
21
|
+
var Mo;function he(){return Mo.apply(null,arguments)}function Bd(n){Mo=n}function Rt(n){return n instanceof Array||Object.prototype.toString.call(n)==="[object Array]"}function oi(n){return n!=null&&Object.prototype.toString.call(n)==="[object Object]"}function je(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function ss(n){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(n).length===0;var e;for(e in n)if(je(n,e))return!1;return!0}function ct(n){return n===void 0}function It(n){return typeof n=="number"||Object.prototype.toString.call(n)==="[object Number]"}function zi(n){return n instanceof Date||Object.prototype.toString.call(n)==="[object Date]"}function Ro(n,e){var t=[],i,r=n.length;for(i=0;i<r;++i)t.push(e(n[i],i));return t}function Qt(n,e){for(var t in e)je(e,t)&&(n[t]=e[t]);return je(e,"toString")&&(n.toString=e.toString),je(e,"valueOf")&&(n.valueOf=e.valueOf),n}function Lt(n,e,t,i){return tl(n,e,t,i,!0).utc()}function Nd(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function Oe(n){return n._pf==null&&(n._pf=Nd()),n._pf}var as;Array.prototype.some?as=Array.prototype.some:as=function(n){var e=Object(this),t=e.length>>>0,i;for(i=0;i<t;i++)if(i in e&&n.call(this,e[i],i,e))return!0;return!1};function os(n){var e=null,t=!1,i=n._d&&!isNaN(n._d.getTime());if(i&&(e=Oe(n),t=as.call(e.parsedDateParts,function(r){return r!=null}),i=e.overflow<0&&!e.empty&&!e.invalidEra&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&t),n._strict&&(i=i&&e.charsLeftOver===0&&e.unusedTokens.length===0&&e.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(n))n._isValid=i;else return i;return n._isValid}function yn(n){var e=Lt(NaN);return n!=null?Qt(Oe(e),n):Oe(e).userInvalidated=!0,e}var To=he.momentProperties=[],ls=!1;function us(n,e){var t,i,r,s=To.length;if(ct(e._isAMomentObject)||(n._isAMomentObject=e._isAMomentObject),ct(e._i)||(n._i=e._i),ct(e._f)||(n._f=e._f),ct(e._l)||(n._l=e._l),ct(e._strict)||(n._strict=e._strict),ct(e._tzm)||(n._tzm=e._tzm),ct(e._isUTC)||(n._isUTC=e._isUTC),ct(e._offset)||(n._offset=e._offset),ct(e._pf)||(n._pf=Oe(e)),ct(e._locale)||(n._locale=e._locale),s>0)for(t=0;t<s;t++)i=To[t],r=e[i],ct(r)||(n[i]=r);return n}function Ii(n){us(this,n),this._d=new Date(n._d!=null?n._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),ls===!1&&(ls=!0,he.updateOffset(this),ls=!1)}function Tt(n){return n instanceof Ii||n!=null&&n._isAMomentObject!=null}function Do(n){he.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+n)}function wt(n,e){var t=!0;return Qt(function(){if(he.deprecationHandler!=null&&he.deprecationHandler(null,n),t){var i=[],r,s,a,o=arguments.length;for(s=0;s<o;s++){if(r="",typeof arguments[s]=="object"){r+=`
|
|
22
|
+
[`+s+"] ";for(a in arguments[0])je(arguments[0],a)&&(r+=a+": "+arguments[0][a]+", ");r=r.slice(0,-2)}else r=arguments[s];i.push(r)}Do(n+`
|
|
20
23
|
Arguments: `+Array.prototype.slice.call(i).join("")+`
|
|
21
|
-
`+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var rr={};function ar(s,e){ue.deprecationHandler!=null&&ue.deprecationHandler(s,e),rr[s]||(nr(e),rr[s]=!0)}ue.suppressDeprecationWarnings=!1,ue.deprecationHandler=null;function Rt(s){return typeof Function<"u"&&s instanceof Function||Object.prototype.toString.call(s)==="[object Function]"}function Za(s){var e,t;for(t in s)Te(s,t)&&(e=s[t],Rt(e)?this[t]=e:this["_"+t]=e);this._config=s,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function Js(s,e){var t=Gt({},s),i;for(i in e)Te(e,i)&&(Zt(s[i])&&Zt(e[i])?(t[i]={},Gt(t[i],s[i]),Gt(t[i],e[i])):e[i]!=null?t[i]=e[i]:delete t[i]);for(i in s)Te(s,i)&&!Te(e,i)&&Zt(s[i])&&(t[i]=Gt({},t[i]));return t}function Xs(s){s!=null&&this.set(s)}var Zs;Object.keys?Zs=Object.keys:Zs=function(s){var e,t=[];for(e in s)Te(s,e)&&t.push(e);return t};var Qa={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function eo(s,e,t){var i=this._calendar[s]||this._calendar.sameElse;return Rt(i)?i.call(e,t):i}function Dt(s,e,t){var i=""+Math.abs(s),n=e-i.length,r=s>=0;return(r?t?"+":"":"-")+Math.pow(10,Math.max(0,n)).toString().substr(1)+i}var Qs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,os=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,en={},oi={};function ge(s,e,t,i){var n=i;typeof i=="string"&&(n=function(){return this[i]()}),s&&(oi[s]=n),e&&(oi[e[0]]=function(){return Dt(n.apply(this,arguments),e[1],e[2])}),t&&(oi[t]=function(){return this.localeData().ordinal(n.apply(this,arguments),s)})}function to(s){return s.match(/\[[\s\S]/)?s.replace(/^\[|\]$/g,""):s.replace(/\\/g,"")}function io(s){var e=s.match(Qs),t,i;for(t=0,i=e.length;t<i;t++)oi[e[t]]?e[t]=oi[e[t]]:e[t]=to(e[t]);return function(n){var r="",a;for(a=0;a<i;a++)r+=Rt(e[a])?e[a].call(n,s):e[a];return r}}function ls(s,e){return s.isValid()?(e=or(e,s.localeData()),en[e]=en[e]||io(e),en[e](s)):s.localeData().invalidDate()}function or(s,e){var t=5;function i(n){return e.longDateFormat(n)||n}for(os.lastIndex=0;t>=0&&os.test(s);)s=s.replace(os,i),os.lastIndex=0,t-=1;return s}var so={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function no(s){var e=this._longDateFormat[s],t=this._longDateFormat[s.toUpperCase()];return e||!t?e:(this._longDateFormat[s]=t.match(Qs).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[s])}var ro="Invalid date";function ao(){return this._invalidDate}var oo="%d",lo=/\d{1,2}/;function uo(s){return this._ordinal.replace("%d",s)}var ho={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function co(s,e,t,i){var n=this._relativeTime[t];return Rt(n)?n(s,e,t,i):n.replace(/%d/i,s)}function fo(s,e){var t=this._relativeTime[s>0?"future":"past"];return Rt(t)?t(e):t.replace(/%s/i,e)}var lr={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function mt(s){return typeof s=="string"?lr[s]||lr[s.toLowerCase()]:void 0}function tn(s){var e={},t,i;for(i in s)Te(s,i)&&(t=mt(i),t&&(e[t]=s[i]));return e}var po={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function mo(s){var e=[],t;for(t in s)Te(s,t)&&e.push({unit:t,priority:po[t]});return e.sort(function(i,n){return i.priority-n.priority}),e}var ur=/\d/,lt=/\d\d/,hr=/\d{3}/,sn=/\d{4}/,us=/[+-]?\d{6}/,Ie=/\d\d?/,dr=/\d\d\d\d?/,cr=/\d\d\d\d\d\d?/,hs=/\d{1,3}/,nn=/\d{1,4}/,ds=/[+-]?\d{1,6}/,li=/\d+/,cs=/[+-]?\d+/,go=/Z|[+-]\d\d:?\d\d/gi,fs=/Z|[+-]\d\d(?::?\d\d)?/gi,bo=/[+-]?\d+(\.\d{1,3})?/,Oi=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ui=/^[1-9]\d?/,rn=/^([1-9]\d|\d)/,ps;ps={};function de(s,e,t){ps[s]=Rt(e)?e:function(i,n){return i&&t?t:e}}function vo(s,e){return Te(ps,s)?ps[s](e._strict,e._locale):new RegExp(yo(s))}function yo(s){return Ht(s.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,n,r){return t||i||n||r}))}function Ht(s){return s.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function gt(s){return s<0?Math.ceil(s)||0:Math.floor(s)}function Re(s){var e=+s,t=0;return e!==0&&isFinite(e)&&(t=gt(e)),t}var an={};function Ae(s,e){var t,i=e,n;for(typeof s=="string"&&(s=[s]),At(e)&&(i=function(r,a){a[e]=Re(r)}),n=s.length,t=0;t<n;t++)an[s[t]]=i}function Li(s,e){Ae(s,function(t,i,n,r){n._w=n._w||{},e(t,n._w,n,r)})}function wo(s,e,t){e!=null&&Te(an,s)&&an[s](e,t._a,t,s)}function ms(s){return s%4===0&&s%100!==0||s%400===0}var Xe=0,zt=1,Tt=2,qe=3,xt=4,Bt=5,Qt=6,Co=7,Eo=8;ge("Y",0,0,function(){var s=this.year();return s<=9999?Dt(s,4):"+"+s}),ge(0,["YY",2],0,function(){return this.year()%100}),ge(0,["YYYY",4],0,"year"),ge(0,["YYYYY",5],0,"year"),ge(0,["YYYYYY",6,!0],0,"year"),de("Y",cs),de("YY",Ie,lt),de("YYYY",nn,sn),de("YYYYY",ds,us),de("YYYYYY",ds,us),Ae(["YYYYY","YYYYYY"],Xe),Ae("YYYY",function(s,e){e[Xe]=s.length===2?ue.parseTwoDigitYear(s):Re(s)}),Ae("YY",function(s,e){e[Xe]=ue.parseTwoDigitYear(s)}),Ae("Y",function(s,e){e[Xe]=parseInt(s,10)});function Pi(s){return ms(s)?366:365}ue.parseTwoDigitYear=function(s){return Re(s)+(Re(s)>68?1900:2e3)};var fr=hi("FullYear",!0);function ko(){return ms(this.year())}function hi(s,e){return function(t){return t!=null?(pr(this,s,t),ue.updateOffset(this,e),this):Fi(this,s)}}function Fi(s,e){if(!s.isValid())return NaN;var t=s._d,i=s._isUTC;switch(e){case"Milliseconds":return i?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return i?t.getUTCSeconds():t.getSeconds();case"Minutes":return i?t.getUTCMinutes():t.getMinutes();case"Hours":return i?t.getUTCHours():t.getHours();case"Date":return i?t.getUTCDate():t.getDate();case"Day":return i?t.getUTCDay():t.getDay();case"Month":return i?t.getUTCMonth():t.getMonth();case"FullYear":return i?t.getUTCFullYear():t.getFullYear();default:return NaN}}function pr(s,e,t){var i,n,r,a,o;if(!(!s.isValid()||isNaN(t))){switch(i=s._d,n=s._isUTC,e){case"Milliseconds":return void(n?i.setUTCMilliseconds(t):i.setMilliseconds(t));case"Seconds":return void(n?i.setUTCSeconds(t):i.setSeconds(t));case"Minutes":return void(n?i.setUTCMinutes(t):i.setMinutes(t));case"Hours":return void(n?i.setUTCHours(t):i.setHours(t));case"Date":return void(n?i.setUTCDate(t):i.setDate(t));case"FullYear":break;default:return}r=t,a=s.month(),o=s.date(),o=o===29&&a===1&&!ms(r)?28:o,n?i.setUTCFullYear(r,a,o):i.setFullYear(r,a,o)}}function xo(s){return s=mt(s),Rt(this[s])?this[s]():this}function Mo(s,e){if(typeof s=="object"){s=tn(s);var t=mo(s),i,n=t.length;for(i=0;i<n;i++)this[t[i].unit](s[t[i].unit])}else if(s=mt(s),Rt(this[s]))return this[s](e);return this}function So(s,e){return(s%e+e)%e}var Ue;Array.prototype.indexOf?Ue=Array.prototype.indexOf:Ue=function(s){var e;for(e=0;e<this.length;++e)if(this[e]===s)return e;return-1};function on(s,e){if(isNaN(s)||isNaN(e))return NaN;var t=So(e,12);return s+=(e-t)/12,t===1?ms(s)?29:28:31-t%7%2}ge("M",["MM",2],"Mo",function(){return this.month()+1}),ge("MMM",0,0,function(s){return this.localeData().monthsShort(this,s)}),ge("MMMM",0,0,function(s){return this.localeData().months(this,s)}),de("M",Ie,ui),de("MM",Ie,lt),de("MMM",function(s,e){return e.monthsShortRegex(s)}),de("MMMM",function(s,e){return e.monthsRegex(s)}),Ae(["M","MM"],function(s,e){e[zt]=Re(s)-1}),Ae(["MMM","MMMM"],function(s,e,t,i){var n=t._locale.monthsParse(s,i,t._strict);n!=null?e[zt]=n:Ce(t).invalidMonth=s});var Ro="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),mr="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),gr=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Do=Oi,To=Oi;function _o(s,e){return s?Et(this._months)?this._months[s.month()]:this._months[(this._months.isFormat||gr).test(e)?"format":"standalone"][s.month()]:Et(this._months)?this._months:this._months.standalone}function Oo(s,e){return s?Et(this._monthsShort)?this._monthsShort[s.month()]:this._monthsShort[gr.test(e)?"format":"standalone"][s.month()]:Et(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Lo(s,e,t){var i,n,r,a=s.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)r=St([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(r,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(r,"").toLocaleLowerCase();return t?e==="MMM"?(n=Ue.call(this._shortMonthsParse,a),n!==-1?n:null):(n=Ue.call(this._longMonthsParse,a),n!==-1?n:null):e==="MMM"?(n=Ue.call(this._shortMonthsParse,a),n!==-1?n:(n=Ue.call(this._longMonthsParse,a),n!==-1?n:null)):(n=Ue.call(this._longMonthsParse,a),n!==-1?n:(n=Ue.call(this._shortMonthsParse,a),n!==-1?n:null))}function Po(s,e,t){var i,n,r;if(this._monthsParseExact)return Lo.call(this,s,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(n=St([2e3,i]),t&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(n,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(n,"").replace(".","")+"$","i")),!t&&!this._monthsParse[i]&&(r="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[i]=new RegExp(r.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[i].test(s))return i;if(t&&e==="MMM"&&this._shortMonthsParse[i].test(s))return i;if(!t&&this._monthsParse[i].test(s))return i}}function br(s,e){if(!s.isValid())return s;if(typeof e=="string"){if(/^\d+$/.test(e))e=Re(e);else if(e=s.localeData().monthsParse(e),!At(e))return s}var t=e,i=s.date();return i=i<29?i:Math.min(i,on(s.year(),t)),s._isUTC?s._d.setUTCMonth(t,i):s._d.setMonth(t,i),s}function vr(s){return s!=null?(br(this,s),ue.updateOffset(this,!0),this):Fi(this,"Month")}function Fo(){return on(this.year(),this.month())}function Ao(s){return this._monthsParseExact?(Te(this,"_monthsRegex")||yr.call(this),s?this._monthsShortStrictRegex:this._monthsShortRegex):(Te(this,"_monthsShortRegex")||(this._monthsShortRegex=Do),this._monthsShortStrictRegex&&s?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ho(s){return this._monthsParseExact?(Te(this,"_monthsRegex")||yr.call(this),s?this._monthsStrictRegex:this._monthsRegex):(Te(this,"_monthsRegex")||(this._monthsRegex=To),this._monthsStrictRegex&&s?this._monthsStrictRegex:this._monthsRegex)}function yr(){function s(l,u){return u.length-l.length}var e=[],t=[],i=[],n,r,a,o;for(n=0;n<12;n++)r=St([2e3,n]),a=Ht(this.monthsShort(r,"")),o=Ht(this.months(r,"")),e.push(a),t.push(o),i.push(o),i.push(a);e.sort(s),t.sort(s),i.sort(s),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function zo(s,e,t,i,n,r,a){var o;return s<100&&s>=0?(o=new Date(s+400,e,t,i,n,r,a),isFinite(o.getFullYear())&&o.setFullYear(s)):o=new Date(s,e,t,i,n,r,a),o}function Ai(s){var e,t;return s<100&&s>=0?(t=Array.prototype.slice.call(arguments),t[0]=s+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(s)):e=new Date(Date.UTC.apply(null,arguments)),e}function gs(s,e,t){var i=7+e-t,n=(7+Ai(s,0,i).getUTCDay()-e)%7;return-n+i-1}function wr(s,e,t,i,n){var r=(7+t-i)%7,a=gs(s,i,n),o=1+7*(e-1)+r+a,l,u;return o<=0?(l=s-1,u=Pi(l)+o):o>Pi(s)?(l=s+1,u=o-Pi(s)):(l=s,u=o),{year:l,dayOfYear:u}}function Hi(s,e,t){var i=gs(s.year(),e,t),n=Math.floor((s.dayOfYear()-i-1)/7)+1,r,a;return n<1?(a=s.year()-1,r=n+Nt(a,e,t)):n>Nt(s.year(),e,t)?(r=n-Nt(s.year(),e,t),a=s.year()+1):(a=s.year(),r=n),{week:r,year:a}}function Nt(s,e,t){var i=gs(s,e,t),n=gs(s+1,e,t);return(Pi(s)-i+n)/7}ge("w",["ww",2],"wo","week"),ge("W",["WW",2],"Wo","isoWeek"),de("w",Ie,ui),de("ww",Ie,lt),de("W",Ie,ui),de("WW",Ie,lt),Li(["w","ww","W","WW"],function(s,e,t,i){e[i.substr(0,1)]=Re(s)});function Bo(s){return Hi(s,this._week.dow,this._week.doy).week}var No={dow:0,doy:6};function Io(){return this._week.dow}function Vo(){return this._week.doy}function jo(s){var e=this.localeData().week(this);return s==null?e:this.add((s-e)*7,"d")}function Wo(s){var e=Hi(this,1,4).week;return s==null?e:this.add((s-e)*7,"d")}ge("d",0,"do","day"),ge("dd",0,0,function(s){return this.localeData().weekdaysMin(this,s)}),ge("ddd",0,0,function(s){return this.localeData().weekdaysShort(this,s)}),ge("dddd",0,0,function(s){return this.localeData().weekdays(this,s)}),ge("e",0,0,"weekday"),ge("E",0,0,"isoWeekday"),de("d",Ie),de("e",Ie),de("E",Ie),de("dd",function(s,e){return e.weekdaysMinRegex(s)}),de("ddd",function(s,e){return e.weekdaysShortRegex(s)}),de("dddd",function(s,e){return e.weekdaysRegex(s)}),Li(["dd","ddd","dddd"],function(s,e,t,i){var n=t._locale.weekdaysParse(s,i,t._strict);n!=null?e.d=n:Ce(t).invalidWeekday=s}),Li(["d","e","E"],function(s,e,t,i){e[i]=Re(s)});function Yo(s,e){return typeof s!="string"?s:isNaN(s)?(s=e.weekdaysParse(s),typeof s=="number"?s:null):parseInt(s,10)}function Go(s,e){return typeof s=="string"?e.weekdaysParse(s)%7||7:isNaN(s)?null:s}function ln(s,e){return s.slice(e,7).concat(s.slice(0,e))}var $o="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Cr="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Uo="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ko=Oi,qo=Oi,Jo=Oi;function Xo(s,e){var t=Et(this._weekdays)?this._weekdays:this._weekdays[s&&s!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return s===!0?ln(t,this._week.dow):s?t[s.day()]:t}function Zo(s){return s===!0?ln(this._weekdaysShort,this._week.dow):s?this._weekdaysShort[s.day()]:this._weekdaysShort}function Qo(s){return s===!0?ln(this._weekdaysMin,this._week.dow):s?this._weekdaysMin[s.day()]:this._weekdaysMin}function el(s,e,t){var i,n,r,a=s.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)r=St([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(r,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(r,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(r,"").toLocaleLowerCase();return t?e==="dddd"?(n=Ue.call(this._weekdaysParse,a),n!==-1?n:null):e==="ddd"?(n=Ue.call(this._shortWeekdaysParse,a),n!==-1?n:null):(n=Ue.call(this._minWeekdaysParse,a),n!==-1?n:null):e==="dddd"?(n=Ue.call(this._weekdaysParse,a),n!==-1||(n=Ue.call(this._shortWeekdaysParse,a),n!==-1)?n:(n=Ue.call(this._minWeekdaysParse,a),n!==-1?n:null)):e==="ddd"?(n=Ue.call(this._shortWeekdaysParse,a),n!==-1||(n=Ue.call(this._weekdaysParse,a),n!==-1)?n:(n=Ue.call(this._minWeekdaysParse,a),n!==-1?n:null)):(n=Ue.call(this._minWeekdaysParse,a),n!==-1||(n=Ue.call(this._weekdaysParse,a),n!==-1)?n:(n=Ue.call(this._shortWeekdaysParse,a),n!==-1?n:null))}function tl(s,e,t){var i,n,r;if(this._weekdaysParseExact)return el.call(this,s,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(n=St([2e3,1]).day(i),t&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(n,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(n,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(n,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[i]=new RegExp(r.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[i].test(s))return i;if(t&&e==="ddd"&&this._shortWeekdaysParse[i].test(s))return i;if(t&&e==="dd"&&this._minWeekdaysParse[i].test(s))return i;if(!t&&this._weekdaysParse[i].test(s))return i}}function il(s){if(!this.isValid())return s!=null?this:NaN;var e=Fi(this,"Day");return s!=null?(s=Yo(s,this.localeData()),this.add(s-e,"d")):e}function sl(s){if(!this.isValid())return s!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return s==null?e:this.add(s-e,"d")}function nl(s){if(!this.isValid())return s!=null?this:NaN;if(s!=null){var e=Go(s,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function rl(s){return this._weekdaysParseExact?(Te(this,"_weekdaysRegex")||un.call(this),s?this._weekdaysStrictRegex:this._weekdaysRegex):(Te(this,"_weekdaysRegex")||(this._weekdaysRegex=Ko),this._weekdaysStrictRegex&&s?this._weekdaysStrictRegex:this._weekdaysRegex)}function al(s){return this._weekdaysParseExact?(Te(this,"_weekdaysRegex")||un.call(this),s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(Te(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=qo),this._weekdaysShortStrictRegex&&s?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function ol(s){return this._weekdaysParseExact?(Te(this,"_weekdaysRegex")||un.call(this),s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(Te(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Jo),this._weekdaysMinStrictRegex&&s?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function un(){function s(h,m){return m.length-h.length}var e=[],t=[],i=[],n=[],r,a,o,l,u;for(r=0;r<7;r++)a=St([2e3,1]).day(r),o=Ht(this.weekdaysMin(a,"")),l=Ht(this.weekdaysShort(a,"")),u=Ht(this.weekdays(a,"")),e.push(o),t.push(l),i.push(u),n.push(o),n.push(l),n.push(u);e.sort(s),t.sort(s),i.sort(s),n.sort(s),this._weekdaysRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function hn(){return this.hours()%12||12}function ll(){return this.hours()||24}ge("H",["HH",2],0,"hour"),ge("h",["hh",2],0,hn),ge("k",["kk",2],0,ll),ge("hmm",0,0,function(){return""+hn.apply(this)+Dt(this.minutes(),2)}),ge("hmmss",0,0,function(){return""+hn.apply(this)+Dt(this.minutes(),2)+Dt(this.seconds(),2)}),ge("Hmm",0,0,function(){return""+this.hours()+Dt(this.minutes(),2)}),ge("Hmmss",0,0,function(){return""+this.hours()+Dt(this.minutes(),2)+Dt(this.seconds(),2)});function Er(s,e){ge(s,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}Er("a",!0),Er("A",!1);function kr(s,e){return e._meridiemParse}de("a",kr),de("A",kr),de("H",Ie,rn),de("h",Ie,ui),de("k",Ie,ui),de("HH",Ie,lt),de("hh",Ie,lt),de("kk",Ie,lt),de("hmm",dr),de("hmmss",cr),de("Hmm",dr),de("Hmmss",cr),Ae(["H","HH"],qe),Ae(["k","kk"],function(s,e,t){var i=Re(s);e[qe]=i===24?0:i}),Ae(["a","A"],function(s,e,t){t._isPm=t._locale.isPM(s),t._meridiem=s}),Ae(["h","hh"],function(s,e,t){e[qe]=Re(s),Ce(t).bigHour=!0}),Ae("hmm",function(s,e,t){var i=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i)),Ce(t).bigHour=!0}),Ae("hmmss",function(s,e,t){var i=s.length-4,n=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i,2)),e[Bt]=Re(s.substr(n)),Ce(t).bigHour=!0}),Ae("Hmm",function(s,e,t){var i=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i))}),Ae("Hmmss",function(s,e,t){var i=s.length-4,n=s.length-2;e[qe]=Re(s.substr(0,i)),e[xt]=Re(s.substr(i,2)),e[Bt]=Re(s.substr(n))});function ul(s){return(s+"").toLowerCase().charAt(0)==="p"}var hl=/[ap]\.?m?\.?/i,dl=hi("Hours",!0);function cl(s,e,t){return s>11?t?"pm":"PM":t?"am":"AM"}var xr={calendar:Qa,longDateFormat:so,invalidDate:ro,ordinal:oo,dayOfMonthOrdinalParse:lo,relativeTime:ho,months:Ro,monthsShort:mr,week:No,weekdays:$o,weekdaysMin:Uo,weekdaysShort:Cr,meridiemParse:hl},Ye={},zi={},Bi;function fl(s,e){var t,i=Math.min(s.length,e.length);for(t=0;t<i;t+=1)if(s[t]!==e[t])return t;return i}function Mr(s){return s&&s.toLowerCase().replace("_","-")}function pl(s){for(var e=0,t,i,n,r;e<s.length;){for(r=Mr(s[e]).split("-"),t=r.length,i=Mr(s[e+1]),i=i?i.split("-"):null;t>0;){if(n=bs(r.slice(0,t).join("-")),n)return n;if(i&&i.length>=t&&fl(r,i)>=t-1)break;t--}e++}return Bi}function ml(s){return!!(s&&s.match("^[^/\\\\]*$"))}function bs(s){var e=null,t;if(Ye[s]===void 0&&typeof module<"u"&&module&&module.exports&&ml(s))try{e=Bi._abbr,t=require,t("./locale/"+s),$t(e)}catch{Ye[s]=null}return Ye[s]}function $t(s,e){var t;return s&&(st(e)?t=It(s):t=dn(s,e),t?Bi=t:typeof console<"u"&&console.warn&&console.warn("Locale "+s+" not found. Did you forget to load it?")),Bi._abbr}function dn(s,e){if(e!==null){var t,i=xr;if(e.abbr=s,Ye[s]!=null)ar("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Ye[s]._config;else if(e.parentLocale!=null)if(Ye[e.parentLocale]!=null)i=Ye[e.parentLocale]._config;else if(t=bs(e.parentLocale),t!=null)i=t._config;else return zi[e.parentLocale]||(zi[e.parentLocale]=[]),zi[e.parentLocale].push({name:s,config:e}),null;return Ye[s]=new Xs(Js(i,e)),zi[s]&&zi[s].forEach(function(n){dn(n.name,n.config)}),$t(s),Ye[s]}else return delete Ye[s],null}function gl(s,e){if(e!=null){var t,i,n=xr;Ye[s]!=null&&Ye[s].parentLocale!=null?Ye[s].set(Js(Ye[s]._config,e)):(i=bs(s),i!=null&&(n=i._config),e=Js(n,e),i==null&&(e.abbr=s),t=new Xs(e),t.parentLocale=Ye[s],Ye[s]=t),$t(s)}else Ye[s]!=null&&(Ye[s].parentLocale!=null?(Ye[s]=Ye[s].parentLocale,s===$t()&&$t(s)):Ye[s]!=null&&delete Ye[s]);return Ye[s]}function It(s){var e;if(s&&s._locale&&s._locale._abbr&&(s=s._locale._abbr),!s)return Bi;if(!Et(s)){if(e=bs(s),e)return e;s=[s]}return pl(s)}function bl(){return Zs(Ye)}function cn(s){var e,t=s._a;return t&&Ce(s).overflow===-2&&(e=t[zt]<0||t[zt]>11?zt:t[Tt]<1||t[Tt]>on(t[Xe],t[zt])?Tt:t[qe]<0||t[qe]>24||t[qe]===24&&(t[xt]!==0||t[Bt]!==0||t[Qt]!==0)?qe:t[xt]<0||t[xt]>59?xt:t[Bt]<0||t[Bt]>59?Bt:t[Qt]<0||t[Qt]>999?Qt:-1,Ce(s)._overflowDayOfYear&&(e<Xe||e>Tt)&&(e=Tt),Ce(s)._overflowWeeks&&e===-1&&(e=Co),Ce(s)._overflowWeekday&&e===-1&&(e=Eo),Ce(s).overflow=e),s}var vl=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,yl=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,wl=/Z|[+-]\d\d(?::?\d\d)?/,vs=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],fn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Cl=/^\/?Date\((-?\d+)/i,El=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,kl={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Sr(s){var e,t,i=s._i,n=vl.exec(i)||yl.exec(i),r,a,o,l,u=vs.length,h=fn.length;if(n){for(Ce(s).iso=!0,e=0,t=u;e<t;e++)if(vs[e][1].exec(n[1])){a=vs[e][0],r=vs[e][2]!==!1;break}if(a==null){s._isValid=!1;return}if(n[3]){for(e=0,t=h;e<t;e++)if(fn[e][1].exec(n[3])){o=(n[2]||" ")+fn[e][0];break}if(o==null){s._isValid=!1;return}}if(!r&&o!=null){s._isValid=!1;return}if(n[4])if(wl.exec(n[4]))l="Z";else{s._isValid=!1;return}s._f=a+(o||"")+(l||""),mn(s)}else s._isValid=!1}function xl(s,e,t,i,n,r){var a=[Ml(s),mr.indexOf(e),parseInt(t,10),parseInt(i,10),parseInt(n,10)];return r&&a.push(parseInt(r,10)),a}function Ml(s){var e=parseInt(s,10);return e<=49?2e3+e:e<=999?1900+e:e}function Sl(s){return s.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Rl(s,e,t){if(s){var i=Cr.indexOf(s),n=new Date(e[0],e[1],e[2]).getDay();if(i!==n)return Ce(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function Dl(s,e,t){if(s)return kl[s];if(e)return 0;var i=parseInt(t,10),n=i%100,r=(i-n)/100;return r*60+n}function Rr(s){var e=El.exec(Sl(s._i)),t;if(e){if(t=xl(e[4],e[3],e[2],e[5],e[6],e[7]),!Rl(e[1],t,s))return;s._a=t,s._tzm=Dl(e[8],e[9],e[10]),s._d=Ai.apply(null,s._a),s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),Ce(s).rfc2822=!0}else s._isValid=!1}function Tl(s){var e=Cl.exec(s._i);if(e!==null){s._d=new Date(+e[1]);return}if(Sr(s),s._isValid===!1)delete s._isValid;else return;if(Rr(s),s._isValid===!1)delete s._isValid;else return;s._strict?s._isValid=!1:ue.createFromInputFallback(s)}ue.createFromInputFallback=pt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(s){s._d=new Date(s._i+(s._useUTC?" UTC":""))});function di(s,e,t){return s??e??t}function _l(s){var e=new Date(ue.now());return s._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function pn(s){var e,t,i=[],n,r,a;if(!s._d){for(n=_l(s),s._w&&s._a[Tt]==null&&s._a[zt]==null&&Ol(s),s._dayOfYear!=null&&(a=di(s._a[Xe],n[Xe]),(s._dayOfYear>Pi(a)||s._dayOfYear===0)&&(Ce(s)._overflowDayOfYear=!0),t=Ai(a,0,s._dayOfYear),s._a[zt]=t.getUTCMonth(),s._a[Tt]=t.getUTCDate()),e=0;e<3&&s._a[e]==null;++e)s._a[e]=i[e]=n[e];for(;e<7;e++)s._a[e]=i[e]=s._a[e]==null?e===2?1:0:s._a[e];s._a[qe]===24&&s._a[xt]===0&&s._a[Bt]===0&&s._a[Qt]===0&&(s._nextDay=!0,s._a[qe]=0),s._d=(s._useUTC?Ai:zo).apply(null,i),r=s._useUTC?s._d.getUTCDay():s._d.getDay(),s._tzm!=null&&s._d.setUTCMinutes(s._d.getUTCMinutes()-s._tzm),s._nextDay&&(s._a[qe]=24),s._w&&typeof s._w.d<"u"&&s._w.d!==r&&(Ce(s).weekdayMismatch=!0)}}function Ol(s){var e,t,i,n,r,a,o,l,u;e=s._w,e.GG!=null||e.W!=null||e.E!=null?(r=1,a=4,t=di(e.GG,s._a[Xe],Hi(Ve(),1,4).year),i=di(e.W,1),n=di(e.E,1),(n<1||n>7)&&(l=!0)):(r=s._locale._week.dow,a=s._locale._week.doy,u=Hi(Ve(),r,a),t=di(e.gg,s._a[Xe],u.year),i=di(e.w,u.week),e.d!=null?(n=e.d,(n<0||n>6)&&(l=!0)):e.e!=null?(n=e.e+r,(e.e<0||e.e>6)&&(l=!0)):n=r),i<1||i>Nt(t,r,a)?Ce(s)._overflowWeeks=!0:l!=null?Ce(s)._overflowWeekday=!0:(o=wr(t,i,n,r,a),s._a[Xe]=o.year,s._dayOfYear=o.dayOfYear)}ue.ISO_8601=function(){},ue.RFC_2822=function(){};function mn(s){if(s._f===ue.ISO_8601){Sr(s);return}if(s._f===ue.RFC_2822){Rr(s);return}s._a=[],Ce(s).empty=!0;var e=""+s._i,t,i,n,r,a,o=e.length,l=0,u,h;for(n=or(s._f,s._locale).match(Qs)||[],h=n.length,t=0;t<h;t++)r=n[t],i=(e.match(vo(r,s))||[])[0],i&&(a=e.substr(0,e.indexOf(i)),a.length>0&&Ce(s).unusedInput.push(a),e=e.slice(e.indexOf(i)+i.length),l+=i.length),oi[r]?(i?Ce(s).empty=!1:Ce(s).unusedTokens.push(r),wo(r,i,s)):s._strict&&!i&&Ce(s).unusedTokens.push(r);Ce(s).charsLeftOver=o-l,e.length>0&&Ce(s).unusedInput.push(e),s._a[qe]<=12&&Ce(s).bigHour===!0&&s._a[qe]>0&&(Ce(s).bigHour=void 0),Ce(s).parsedDateParts=s._a.slice(0),Ce(s).meridiem=s._meridiem,s._a[qe]=Ll(s._locale,s._a[qe],s._meridiem),u=Ce(s).era,u!==null&&(s._a[Xe]=s._locale.erasConvertYear(u,s._a[Xe])),pn(s),cn(s)}function Ll(s,e,t){var i;return t==null?e:s.meridiemHour!=null?s.meridiemHour(e,t):(s.isPM!=null&&(i=s.isPM(t),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function Pl(s){var e,t,i,n,r,a,o=!1,l=s._f.length;if(l===0){Ce(s).invalidFormat=!0,s._d=new Date(NaN);return}for(n=0;n<l;n++)r=0,a=!1,e=qs({},s),s._useUTC!=null&&(e._useUTC=s._useUTC),e._f=s._f[n],mn(e),Us(e)&&(a=!0),r+=Ce(e).charsLeftOver,r+=Ce(e).unusedTokens.length*10,Ce(e).score=r,o?r<i&&(i=r,t=e):(i==null||r<i||a)&&(i=r,t=e,a&&(o=!0));Gt(s,t||e)}function Fl(s){if(!s._d){var e=tn(s._i),t=e.day===void 0?e.date:e.day;s._a=ir([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),pn(s)}}function Al(s){var e=new _i(cn(Dr(s)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function Dr(s){var e=s._i,t=s._f;return s._locale=s._locale||It(s._l),e===null||t===void 0&&e===""?as({nullInput:!0}):(typeof e=="string"&&(s._i=e=s._locale.preparse(e)),kt(e)?new _i(cn(e)):(Ti(e)?s._d=e:Et(t)?Pl(s):t?mn(s):Hl(s),Us(s)||(s._d=null),s))}function Hl(s){var e=s._i;st(e)?s._d=new Date(ue.now()):Ti(e)?s._d=new Date(e.valueOf()):typeof e=="string"?Tl(s):Et(e)?(s._a=ir(e.slice(0),function(t){return parseInt(t,10)}),pn(s)):Zt(e)?Fl(s):At(e)?s._d=new Date(e):ue.createFromInputFallback(s)}function Tr(s,e,t,i,n){var r={};return(e===!0||e===!1)&&(i=e,e=void 0),(t===!0||t===!1)&&(i=t,t=void 0),(Zt(s)&&Gs(s)||Et(s)&&s.length===0)&&(s=void 0),r._isAMomentObject=!0,r._useUTC=r._isUTC=n,r._l=t,r._i=s,r._f=e,r._strict=i,Al(r)}function Ve(s,e,t,i){return Tr(s,e,t,i,!1)}var zl=pt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=Ve.apply(null,arguments);return this.isValid()&&s.isValid()?s<this?this:s:as()}),Bl=pt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var s=Ve.apply(null,arguments);return this.isValid()&&s.isValid()?s>this?this:s:as()});function _r(s,e){var t,i;if(e.length===1&&Et(e[0])&&(e=e[0]),!e.length)return Ve();for(t=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][s](t))&&(t=e[i]);return t}function Nl(){var s=[].slice.call(arguments,0);return _r("isBefore",s)}function Il(){var s=[].slice.call(arguments,0);return _r("isAfter",s)}var Vl=function(){return Date.now?Date.now():+new Date},Ni=["year","quarter","month","week","day","hour","minute","second","millisecond"];function jl(s){var e,t=!1,i,n=Ni.length;for(e in s)if(Te(s,e)&&!(Ue.call(Ni,e)!==-1&&(s[e]==null||!isNaN(s[e]))))return!1;for(i=0;i<n;++i)if(s[Ni[i]]){if(t)return!1;parseFloat(s[Ni[i]])!==Re(s[Ni[i]])&&(t=!0)}return!0}function Wl(){return this._isValid}function Yl(){return Mt(NaN)}function ys(s){var e=tn(s),t=e.year||0,i=e.quarter||0,n=e.month||0,r=e.week||e.isoWeek||0,a=e.day||0,o=e.hour||0,l=e.minute||0,u=e.second||0,h=e.millisecond||0;this._isValid=jl(e),this._milliseconds=+h+u*1e3+l*6e4+o*1e3*60*60,this._days=+a+r*7,this._months=+n+i*3+t*12,this._data={},this._locale=It(),this._bubble()}function ws(s){return s instanceof ys}function gn(s){return s<0?Math.round(-1*s)*-1:Math.round(s)}function Gl(s,e,t){var i=Math.min(s.length,e.length),n=Math.abs(s.length-e.length),r=0,a;for(a=0;a<i;a++)Re(s[a])!==Re(e[a])&&r++;return r+n}function Or(s,e){ge(s,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+Dt(~~(t/60),2)+e+Dt(~~t%60,2)})}Or("Z",":"),Or("ZZ",""),de("Z",fs),de("ZZ",fs),Ae(["Z","ZZ"],function(s,e,t){t._useUTC=!0,t._tzm=bn(fs,s)});var $l=/([\+\-]|\d\d)/gi;function bn(s,e){var t=(e||"").match(s),i,n,r;return t===null?null:(i=t[t.length-1]||[],n=(i+"").match($l)||["-",0,0],r=+(n[1]*60)+Re(n[2]),r===0?0:n[0]==="+"?r:-r)}function vn(s,e){var t,i;return e._isUTC?(t=e.clone(),i=(kt(s)||Ti(s)?s.valueOf():Ve(s).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+i),ue.updateOffset(t,!1),t):Ve(s).local()}function yn(s){return-Math.round(s._d.getTimezoneOffset())}ue.updateOffset=function(){};function Ul(s,e,t){var i=this._offset||0,n;if(!this.isValid())return s!=null?this:NaN;if(s!=null){if(typeof s=="string"){if(s=bn(fs,s),s===null)return this}else Math.abs(s)<16&&!t&&(s=s*60);return!this._isUTC&&e&&(n=yn(this)),this._offset=s,this._isUTC=!0,n!=null&&this.add(n,"m"),i!==s&&(!e||this._changeInProgress?Ar(this,Mt(s-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ue.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:yn(this)}function Kl(s,e){return s!=null?(typeof s!="string"&&(s=-s),this.utcOffset(s,e),this):-this.utcOffset()}function ql(s){return this.utcOffset(0,s)}function Jl(s){return this._isUTC&&(this.utcOffset(0,s),this._isUTC=!1,s&&this.subtract(yn(this),"m")),this}function Xl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var s=bn(go,this._i);s!=null?this.utcOffset(s):this.utcOffset(0,!0)}return this}function Zl(s){return this.isValid()?(s=s?Ve(s).utcOffset():0,(this.utcOffset()-s)%60===0):!1}function Ql(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function eu(){if(!st(this._isDSTShifted))return this._isDSTShifted;var s={},e;return qs(s,this),s=Dr(s),s._a?(e=s._isUTC?St(s._a):Ve(s._a),this._isDSTShifted=this.isValid()&&Gl(s._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function tu(){return this.isValid()?!this._isUTC:!1}function iu(){return this.isValid()?this._isUTC:!1}function Lr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var su=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nu=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Mt(s,e){var t=s,i=null,n,r,a;return ws(s)?t={ms:s._milliseconds,d:s._days,M:s._months}:At(s)||!isNaN(+s)?(t={},e?t[e]=+s:t.milliseconds=+s):(i=su.exec(s))?(n=i[1]==="-"?-1:1,t={y:0,d:Re(i[Tt])*n,h:Re(i[qe])*n,m:Re(i[xt])*n,s:Re(i[Bt])*n,ms:Re(gn(i[Qt]*1e3))*n}):(i=nu.exec(s))?(n=i[1]==="-"?-1:1,t={y:ei(i[2],n),M:ei(i[3],n),w:ei(i[4],n),d:ei(i[5],n),h:ei(i[6],n),m:ei(i[7],n),s:ei(i[8],n)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(a=ru(Ve(t.from),Ve(t.to)),t={},t.ms=a.milliseconds,t.M=a.months),r=new ys(t),ws(s)&&Te(s,"_locale")&&(r._locale=s._locale),ws(s)&&Te(s,"_isValid")&&(r._isValid=s._isValid),r}Mt.fn=ys.prototype,Mt.invalid=Yl;function ei(s,e){var t=s&&parseFloat(s.replace(",","."));return(isNaN(t)?0:t)*e}function Pr(s,e){var t={};return t.months=e.month()-s.month()+(e.year()-s.year())*12,s.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+s.clone().add(t.months,"M"),t}function ru(s,e){var t;return s.isValid()&&e.isValid()?(e=vn(e,s),s.isBefore(e)?t=Pr(s,e):(t=Pr(e,s),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function Fr(s,e){return function(t,i){var n,r;return i!==null&&!isNaN(+i)&&(ar(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),r=t,t=i,i=r),n=Mt(t,i),Ar(this,n,s),this}}function Ar(s,e,t,i){var n=e._milliseconds,r=gn(e._days),a=gn(e._months);s.isValid()&&(i=i??!0,a&&br(s,Fi(s,"Month")+a*t),r&&pr(s,"Date",Fi(s,"Date")+r*t),n&&s._d.setTime(s._d.valueOf()+n*t),i&&ue.updateOffset(s,r||a))}var au=Fr(1,"add"),ou=Fr(-1,"subtract");function Hr(s){return typeof s=="string"||s instanceof String}function lu(s){return kt(s)||Ti(s)||Hr(s)||At(s)||hu(s)||uu(s)||s===null||s===void 0}function uu(s){var e=Zt(s)&&!Gs(s),t=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],n,r,a=i.length;for(n=0;n<a;n+=1)r=i[n],t=t||Te(s,r);return e&&t}function hu(s){var e=Et(s),t=!1;return e&&(t=s.filter(function(i){return!At(i)&&Hr(s)}).length===0),e&&t}function du(s){var e=Zt(s)&&!Gs(s),t=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],n,r;for(n=0;n<i.length;n+=1)r=i[n],t=t||Te(s,r);return e&&t}function cu(s,e){var t=s.diff(e,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function fu(s,e){arguments.length===1&&(arguments[0]?lu(arguments[0])?(s=arguments[0],e=void 0):du(arguments[0])&&(e=arguments[0],s=void 0):(s=void 0,e=void 0));var t=s||Ve(),i=vn(t,this).startOf("day"),n=ue.calendarFormat(this,i)||"sameElse",r=e&&(Rt(e[n])?e[n].call(this,t):e[n]);return this.format(r||this.localeData().calendar(n,this,Ve(t)))}function pu(){return new _i(this)}function mu(s,e){var t=kt(s)?s:Ve(s);return this.isValid()&&t.isValid()?(e=mt(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function gu(s,e){var t=kt(s)?s:Ve(s);return this.isValid()&&t.isValid()?(e=mt(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function bu(s,e,t,i){var n=kt(s)?s:Ve(s),r=kt(e)?e:Ve(e);return this.isValid()&&n.isValid()&&r.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(n,t):!this.isBefore(n,t))&&(i[1]===")"?this.isBefore(r,t):!this.isAfter(r,t))):!1}function vu(s,e){var t=kt(s)?s:Ve(s),i;return this.isValid()&&t.isValid()?(e=mt(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(i=t.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function yu(s,e){return this.isSame(s,e)||this.isAfter(s,e)}function wu(s,e){return this.isSame(s,e)||this.isBefore(s,e)}function Cu(s,e,t){var i,n,r;if(!this.isValid())return NaN;if(i=vn(s,this),!i.isValid())return NaN;switch(n=(i.utcOffset()-this.utcOffset())*6e4,e=mt(e),e){case"year":r=Cs(this,i)/12;break;case"month":r=Cs(this,i);break;case"quarter":r=Cs(this,i)/3;break;case"second":r=(this-i)/1e3;break;case"minute":r=(this-i)/6e4;break;case"hour":r=(this-i)/36e5;break;case"day":r=(this-i-n)/864e5;break;case"week":r=(this-i-n)/6048e5;break;default:r=this-i}return t?r:gt(r)}function Cs(s,e){if(s.date()<e.date())return-Cs(e,s);var t=(e.year()-s.year())*12+(e.month()-s.month()),i=s.clone().add(t,"months"),n,r;return e-i<0?(n=s.clone().add(t-1,"months"),r=(e-i)/(i-n)):(n=s.clone().add(t+1,"months"),r=(e-i)/(n-i)),-(t+r)||0}ue.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",ue.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Eu(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ku(s){if(!this.isValid())return null;var e=s!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?ls(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Rt(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",ls(t,"Z")):ls(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function xu(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var s="moment",e="",t,i,n,r;return this.isLocal()||(s=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+s+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=e+'[")]',this.format(t+i+n+r)}function Mu(s){s||(s=this.isUtc()?ue.defaultFormatUtc:ue.defaultFormat);var e=ls(this,s);return this.localeData().postformat(e)}function Su(s,e){return this.isValid()&&(kt(s)&&s.isValid()||Ve(s).isValid())?Mt({to:this,from:s}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Ru(s){return this.from(Ve(),s)}function Du(s,e){return this.isValid()&&(kt(s)&&s.isValid()||Ve(s).isValid())?Mt({from:this,to:s}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function Tu(s){return this.to(Ve(),s)}function zr(s){var e;return s===void 0?this._locale._abbr:(e=It(s),e!=null&&(this._locale=e),this)}var Br=pt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(s){return s===void 0?this.localeData():this.locale(s)});function Nr(){return this._locale}var Es=1e3,ci=60*Es,ks=60*ci,Ir=(365*400+97)*24*ks;function fi(s,e){return(s%e+e)%e}function Vr(s,e,t){return s<100&&s>=0?new Date(s+400,e,t)-Ir:new Date(s,e,t).valueOf()}function jr(s,e,t){return s<100&&s>=0?Date.UTC(s+400,e,t)-Ir:Date.UTC(s,e,t)}function _u(s){var e,t;if(s=mt(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?jr:Vr,s){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=fi(e+(this._isUTC?0:this.utcOffset()*ci),ks);break;case"minute":e=this._d.valueOf(),e-=fi(e,ci);break;case"second":e=this._d.valueOf(),e-=fi(e,Es);break}return this._d.setTime(e),ue.updateOffset(this,!0),this}function Ou(s){var e,t;if(s=mt(s),s===void 0||s==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?jr:Vr,s){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=ks-fi(e+(this._isUTC?0:this.utcOffset()*ci),ks)-1;break;case"minute":e=this._d.valueOf(),e+=ci-fi(e,ci)-1;break;case"second":e=this._d.valueOf(),e+=Es-fi(e,Es)-1;break}return this._d.setTime(e),ue.updateOffset(this,!0),this}function Lu(){return this._d.valueOf()-(this._offset||0)*6e4}function Pu(){return Math.floor(this.valueOf()/1e3)}function Fu(){return new Date(this.valueOf())}function Au(){var s=this;return[s.year(),s.month(),s.date(),s.hour(),s.minute(),s.second(),s.millisecond()]}function Hu(){var s=this;return{years:s.year(),months:s.month(),date:s.date(),hours:s.hours(),minutes:s.minutes(),seconds:s.seconds(),milliseconds:s.milliseconds()}}function zu(){return this.isValid()?this.toISOString():null}function Bu(){return Us(this)}function Nu(){return Gt({},Ce(this))}function Iu(){return Ce(this).overflow}function Vu(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ge("N",0,0,"eraAbbr"),ge("NN",0,0,"eraAbbr"),ge("NNN",0,0,"eraAbbr"),ge("NNNN",0,0,"eraName"),ge("NNNNN",0,0,"eraNarrow"),ge("y",["y",1],"yo","eraYear"),ge("y",["yy",2],0,"eraYear"),ge("y",["yyy",3],0,"eraYear"),ge("y",["yyyy",4],0,"eraYear"),de("N",wn),de("NN",wn),de("NNN",wn),de("NNNN",Zu),de("NNNNN",Qu),Ae(["N","NN","NNN","NNNN","NNNNN"],function(s,e,t,i){var n=t._locale.erasParse(s,i,t._strict);n?Ce(t).era=n:Ce(t).invalidEra=s}),de("y",li),de("yy",li),de("yyy",li),de("yyyy",li),de("yo",eh),Ae(["y","yy","yyy","yyyy"],Xe),Ae(["yo"],function(s,e,t,i){var n;t._locale._eraYearOrdinalRegex&&(n=s.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[Xe]=t._locale.eraYearOrdinalParse(s,n):e[Xe]=parseInt(s,10)});function ju(s,e){var t,i,n,r=this._eras||It("en")._eras;for(t=0,i=r.length;t<i;++t){switch(typeof r[t].since){case"string":n=ue(r[t].since).startOf("day"),r[t].since=n.valueOf();break}switch(typeof r[t].until){case"undefined":r[t].until=1/0;break;case"string":n=ue(r[t].until).startOf("day").valueOf(),r[t].until=n.valueOf();break}}return r}function Wu(s,e,t){var i,n,r=this.eras(),a,o,l;for(s=s.toUpperCase(),i=0,n=r.length;i<n;++i)if(a=r[i].name.toUpperCase(),o=r[i].abbr.toUpperCase(),l=r[i].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(o===s)return r[i];break;case"NNNN":if(a===s)return r[i];break;case"NNNNN":if(l===s)return r[i];break}else if([a,o,l].indexOf(s)>=0)return r[i]}function Yu(s,e){var t=s.since<=s.until?1:-1;return e===void 0?ue(s.since).year():ue(s.since).year()+(e-s.offset)*t}function Gu(){var s,e,t,i=this.localeData().eras();for(s=0,e=i.length;s<e;++s)if(t=this.clone().startOf("day").valueOf(),i[s].since<=t&&t<=i[s].until||i[s].until<=t&&t<=i[s].since)return i[s].name;return""}function $u(){var s,e,t,i=this.localeData().eras();for(s=0,e=i.length;s<e;++s)if(t=this.clone().startOf("day").valueOf(),i[s].since<=t&&t<=i[s].until||i[s].until<=t&&t<=i[s].since)return i[s].narrow;return""}function Uu(){var s,e,t,i=this.localeData().eras();for(s=0,e=i.length;s<e;++s)if(t=this.clone().startOf("day").valueOf(),i[s].since<=t&&t<=i[s].until||i[s].until<=t&&t<=i[s].since)return i[s].abbr;return""}function Ku(){var s,e,t,i,n=this.localeData().eras();for(s=0,e=n.length;s<e;++s)if(t=n[s].since<=n[s].until?1:-1,i=this.clone().startOf("day").valueOf(),n[s].since<=i&&i<=n[s].until||n[s].until<=i&&i<=n[s].since)return(this.year()-ue(n[s].since).year())*t+n[s].offset;return this.year()}function qu(s){return Te(this,"_erasNameRegex")||Cn.call(this),s?this._erasNameRegex:this._erasRegex}function Ju(s){return Te(this,"_erasAbbrRegex")||Cn.call(this),s?this._erasAbbrRegex:this._erasRegex}function Xu(s){return Te(this,"_erasNarrowRegex")||Cn.call(this),s?this._erasNarrowRegex:this._erasRegex}function wn(s,e){return e.erasAbbrRegex(s)}function Zu(s,e){return e.erasNameRegex(s)}function Qu(s,e){return e.erasNarrowRegex(s)}function eh(s,e){return e._eraYearOrdinalRegex||li}function Cn(){var s=[],e=[],t=[],i=[],n,r,a,o,l,u=this.eras();for(n=0,r=u.length;n<r;++n)a=Ht(u[n].name),o=Ht(u[n].abbr),l=Ht(u[n].narrow),e.push(a),s.push(o),t.push(l),i.push(a),i.push(o),i.push(l);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}ge(0,["gg",2],0,function(){return this.weekYear()%100}),ge(0,["GG",2],0,function(){return this.isoWeekYear()%100});function xs(s,e){ge(0,[s,s.length],0,e)}xs("gggg","weekYear"),xs("ggggg","weekYear"),xs("GGGG","isoWeekYear"),xs("GGGGG","isoWeekYear"),de("G",cs),de("g",cs),de("GG",Ie,lt),de("gg",Ie,lt),de("GGGG",nn,sn),de("gggg",nn,sn),de("GGGGG",ds,us),de("ggggg",ds,us),Li(["gggg","ggggg","GGGG","GGGGG"],function(s,e,t,i){e[i.substr(0,2)]=Re(s)}),Li(["gg","GG"],function(s,e,t,i){e[i]=ue.parseTwoDigitYear(s)});function th(s){return Wr.call(this,s,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ih(s){return Wr.call(this,s,this.isoWeek(),this.isoWeekday(),1,4)}function sh(){return Nt(this.year(),1,4)}function nh(){return Nt(this.isoWeekYear(),1,4)}function rh(){var s=this.localeData()._week;return Nt(this.year(),s.dow,s.doy)}function ah(){var s=this.localeData()._week;return Nt(this.weekYear(),s.dow,s.doy)}function Wr(s,e,t,i,n){var r;return s==null?Hi(this,i,n).year:(r=Nt(s,i,n),e>r&&(e=r),oh.call(this,s,e,t,i,n))}function oh(s,e,t,i,n){var r=wr(s,e,t,i,n),a=Ai(r.year,0,r.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}ge("Q",0,"Qo","quarter"),de("Q",ur),Ae("Q",function(s,e){e[zt]=(Re(s)-1)*3});function lh(s){return s==null?Math.ceil((this.month()+1)/3):this.month((s-1)*3+this.month()%3)}ge("D",["DD",2],"Do","date"),de("D",Ie,ui),de("DD",Ie,lt),de("Do",function(s,e){return s?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),Ae(["D","DD"],Tt),Ae("Do",function(s,e){e[Tt]=Re(s.match(Ie)[0])});var Yr=hi("Date",!0);ge("DDD",["DDDD",3],"DDDo","dayOfYear"),de("DDD",hs),de("DDDD",hr),Ae(["DDD","DDDD"],function(s,e,t){t._dayOfYear=Re(s)});function uh(s){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return s==null?e:this.add(s-e,"d")}ge("m",["mm",2],0,"minute"),de("m",Ie,rn),de("mm",Ie,lt),Ae(["m","mm"],xt);var hh=hi("Minutes",!1);ge("s",["ss",2],0,"second"),de("s",Ie,rn),de("ss",Ie,lt),Ae(["s","ss"],Bt);var dh=hi("Seconds",!1);ge("S",0,0,function(){return~~(this.millisecond()/100)}),ge(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ge(0,["SSS",3],0,"millisecond"),ge(0,["SSSS",4],0,function(){return this.millisecond()*10}),ge(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ge(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ge(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ge(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ge(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),de("S",hs,ur),de("SS",hs,lt),de("SSS",hs,hr);var Ut,Gr;for(Ut="SSSS";Ut.length<=9;Ut+="S")de(Ut,li);function ch(s,e){e[Qt]=Re(("0."+s)*1e3)}for(Ut="S";Ut.length<=9;Ut+="S")Ae(Ut,ch);Gr=hi("Milliseconds",!1),ge("z",0,0,"zoneAbbr"),ge("zz",0,0,"zoneName");function fh(){return this._isUTC?"UTC":""}function ph(){return this._isUTC?"Coordinated Universal Time":""}var ae=_i.prototype;ae.add=au,ae.calendar=fu,ae.clone=pu,ae.diff=Cu,ae.endOf=Ou,ae.format=Mu,ae.from=Su,ae.fromNow=Ru,ae.to=Du,ae.toNow=Tu,ae.get=xo,ae.invalidAt=Iu,ae.isAfter=mu,ae.isBefore=gu,ae.isBetween=bu,ae.isSame=vu,ae.isSameOrAfter=yu,ae.isSameOrBefore=wu,ae.isValid=Bu,ae.lang=Br,ae.locale=zr,ae.localeData=Nr,ae.max=Bl,ae.min=zl,ae.parsingFlags=Nu,ae.set=Mo,ae.startOf=_u,ae.subtract=ou,ae.toArray=Au,ae.toObject=Hu,ae.toDate=Fu,ae.toISOString=ku,ae.inspect=xu,typeof Symbol<"u"&&Symbol.for!=null&&(ae[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),ae.toJSON=zu,ae.toString=Eu,ae.unix=Pu,ae.valueOf=Lu,ae.creationData=Vu,ae.eraName=Gu,ae.eraNarrow=$u,ae.eraAbbr=Uu,ae.eraYear=Ku,ae.year=fr,ae.isLeapYear=ko,ae.weekYear=th,ae.isoWeekYear=ih,ae.quarter=ae.quarters=lh,ae.month=vr,ae.daysInMonth=Fo,ae.week=ae.weeks=jo,ae.isoWeek=ae.isoWeeks=Wo,ae.weeksInYear=rh,ae.weeksInWeekYear=ah,ae.isoWeeksInYear=sh,ae.isoWeeksInISOWeekYear=nh,ae.date=Yr,ae.day=ae.days=il,ae.weekday=sl,ae.isoWeekday=nl,ae.dayOfYear=uh,ae.hour=ae.hours=dl,ae.minute=ae.minutes=hh,ae.second=ae.seconds=dh,ae.millisecond=ae.milliseconds=Gr,ae.utcOffset=Ul,ae.utc=ql,ae.local=Jl,ae.parseZone=Xl,ae.hasAlignedHourOffset=Zl,ae.isDST=Ql,ae.isLocal=tu,ae.isUtcOffset=iu,ae.isUtc=Lr,ae.isUTC=Lr,ae.zoneAbbr=fh,ae.zoneName=ph,ae.dates=pt("dates accessor is deprecated. Use date instead.",Yr),ae.months=pt("months accessor is deprecated. Use month instead",vr),ae.years=pt("years accessor is deprecated. Use year instead",fr),ae.zone=pt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Kl),ae.isDSTShifted=pt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",eu);function mh(s){return Ve(s*1e3)}function gh(){return Ve.apply(null,arguments).parseZone()}function $r(s){return s}var _e=Xs.prototype;_e.calendar=eo,_e.longDateFormat=no,_e.invalidDate=ao,_e.ordinal=uo,_e.preparse=$r,_e.postformat=$r,_e.relativeTime=co,_e.pastFuture=fo,_e.set=Za,_e.eras=ju,_e.erasParse=Wu,_e.erasConvertYear=Yu,_e.erasAbbrRegex=Ju,_e.erasNameRegex=qu,_e.erasNarrowRegex=Xu,_e.months=_o,_e.monthsShort=Oo,_e.monthsParse=Po,_e.monthsRegex=Ho,_e.monthsShortRegex=Ao,_e.week=Bo,_e.firstDayOfYear=Vo,_e.firstDayOfWeek=Io,_e.weekdays=Xo,_e.weekdaysMin=Qo,_e.weekdaysShort=Zo,_e.weekdaysParse=tl,_e.weekdaysRegex=rl,_e.weekdaysShortRegex=al,_e.weekdaysMinRegex=ol,_e.isPM=ul,_e.meridiem=cl;function Ms(s,e,t,i){var n=It(),r=St().set(i,e);return n[t](r,s)}function Ur(s,e,t){if(At(s)&&(e=s,s=void 0),s=s||"",e!=null)return Ms(s,e,t,"month");var i,n=[];for(i=0;i<12;i++)n[i]=Ms(s,i,t,"month");return n}function En(s,e,t,i){typeof s=="boolean"?(At(e)&&(t=e,e=void 0),e=e||""):(e=s,t=e,s=!1,At(e)&&(t=e,e=void 0),e=e||"");var n=It(),r=s?n._week.dow:0,a,o=[];if(t!=null)return Ms(e,(t+r)%7,i,"day");for(a=0;a<7;a++)o[a]=Ms(e,(a+r)%7,i,"day");return o}function bh(s,e){return Ur(s,e,"months")}function vh(s,e){return Ur(s,e,"monthsShort")}function yh(s,e,t){return En(s,e,t,"weekdays")}function wh(s,e,t){return En(s,e,t,"weekdaysShort")}function Ch(s,e,t){return En(s,e,t,"weekdaysMin")}$t("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(s){var e=s%10,t=Re(s%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return s+t}}),ue.lang=pt("moment.lang is deprecated. Use moment.locale instead.",$t),ue.langData=pt("moment.langData is deprecated. Use moment.localeData instead.",It);var Vt=Math.abs;function Eh(){var s=this._data;return this._milliseconds=Vt(this._milliseconds),this._days=Vt(this._days),this._months=Vt(this._months),s.milliseconds=Vt(s.milliseconds),s.seconds=Vt(s.seconds),s.minutes=Vt(s.minutes),s.hours=Vt(s.hours),s.months=Vt(s.months),s.years=Vt(s.years),this}function Kr(s,e,t,i){var n=Mt(e,t);return s._milliseconds+=i*n._milliseconds,s._days+=i*n._days,s._months+=i*n._months,s._bubble()}function kh(s,e){return Kr(this,s,e,1)}function xh(s,e){return Kr(this,s,e,-1)}function qr(s){return s<0?Math.floor(s):Math.ceil(s)}function Mh(){var s=this._milliseconds,e=this._days,t=this._months,i=this._data,n,r,a,o,l;return s>=0&&e>=0&&t>=0||s<=0&&e<=0&&t<=0||(s+=qr(kn(t)+e)*864e5,e=0,t=0),i.milliseconds=s%1e3,n=gt(s/1e3),i.seconds=n%60,r=gt(n/60),i.minutes=r%60,a=gt(r/60),i.hours=a%24,e+=gt(a/24),l=gt(Jr(e)),t+=l,e-=qr(kn(l)),o=gt(t/12),t%=12,i.days=e,i.months=t,i.years=o,this}function Jr(s){return s*4800/146097}function kn(s){return s*146097/4800}function Sh(s){if(!this.isValid())return NaN;var e,t,i=this._milliseconds;if(s=mt(s),s==="month"||s==="quarter"||s==="year")switch(e=this._days+i/864e5,t=this._months+Jr(e),s){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(kn(this._months)),s){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+s)}}function jt(s){return function(){return this.as(s)}}var Xr=jt("ms"),Rh=jt("s"),Dh=jt("m"),Th=jt("h"),_h=jt("d"),Oh=jt("w"),Lh=jt("M"),Ph=jt("Q"),Fh=jt("y"),Ah=Xr;function Hh(){return Mt(this)}function zh(s){return s=mt(s),this.isValid()?this[s+"s"]():NaN}function ti(s){return function(){return this.isValid()?this._data[s]:NaN}}var Bh=ti("milliseconds"),Nh=ti("seconds"),Ih=ti("minutes"),Vh=ti("hours"),jh=ti("days"),Wh=ti("months"),Yh=ti("years");function Gh(){return gt(this.days()/7)}var Wt=Math.round,pi={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function $h(s,e,t,i,n){return n.relativeTime(e||1,!!t,s,i)}function Uh(s,e,t,i){var n=Mt(s).abs(),r=Wt(n.as("s")),a=Wt(n.as("m")),o=Wt(n.as("h")),l=Wt(n.as("d")),u=Wt(n.as("M")),h=Wt(n.as("w")),m=Wt(n.as("y")),v=r<=t.ss&&["s",r]||r<t.s&&["ss",r]||a<=1&&["m"]||a<t.m&&["mm",a]||o<=1&&["h"]||o<t.h&&["hh",o]||l<=1&&["d"]||l<t.d&&["dd",l];return t.w!=null&&(v=v||h<=1&&["w"]||h<t.w&&["ww",h]),v=v||u<=1&&["M"]||u<t.M&&["MM",u]||m<=1&&["y"]||["yy",m],v[2]=e,v[3]=+s>0,v[4]=i,$h.apply(null,v)}function Kh(s){return s===void 0?Wt:typeof s=="function"?(Wt=s,!0):!1}function qh(s,e){return pi[s]===void 0?!1:e===void 0?pi[s]:(pi[s]=e,s==="s"&&(pi.ss=e-1),!0)}function Jh(s,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,i=pi,n,r;return typeof s=="object"&&(e=s,s=!1),typeof s=="boolean"&&(t=s),typeof e=="object"&&(i=Object.assign({},pi,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),n=this.localeData(),r=Uh(this,!t,i,n),t&&(r=n.pastFuture(+this,r)),n.postformat(r)}var xn=Math.abs;function mi(s){return(s>0)-(s<0)||+s}function Ss(){if(!this.isValid())return this.localeData().invalidDate();var s=xn(this._milliseconds)/1e3,e=xn(this._days),t=xn(this._months),i,n,r,a,o=this.asSeconds(),l,u,h,m;return o?(i=gt(s/60),n=gt(i/60),s%=60,i%=60,r=gt(t/12),t%=12,a=s?s.toFixed(3).replace(/\.?0+$/,""):"",l=o<0?"-":"",u=mi(this._months)!==mi(o)?"-":"",h=mi(this._days)!==mi(o)?"-":"",m=mi(this._milliseconds)!==mi(o)?"-":"",l+"P"+(r?u+r+"Y":"")+(t?u+t+"M":"")+(e?h+e+"D":"")+(n||i||s?"T":"")+(n?m+n+"H":"")+(i?m+i+"M":"")+(s?m+a+"S":"")):"P0D"}var De=ys.prototype;De.isValid=Wl,De.abs=Eh,De.add=kh,De.subtract=xh,De.as=Sh,De.asMilliseconds=Xr,De.asSeconds=Rh,De.asMinutes=Dh,De.asHours=Th,De.asDays=_h,De.asWeeks=Oh,De.asMonths=Lh,De.asQuarters=Ph,De.asYears=Fh,De.valueOf=Ah,De._bubble=Mh,De.clone=Hh,De.get=zh,De.milliseconds=Bh,De.seconds=Nh,De.minutes=Ih,De.hours=Vh,De.days=jh,De.weeks=Gh,De.months=Wh,De.years=Yh,De.humanize=Jh,De.toISOString=Ss,De.toString=Ss,De.toJSON=Ss,De.locale=zr,De.localeData=Nr,De.toIsoString=pt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Ss),De.lang=Br,ge("X",0,0,"unix"),ge("x",0,0,"valueOf"),de("x",cs),de("X",bo),Ae("X",function(s,e,t){t._d=new Date(parseFloat(s)*1e3)}),Ae("x",function(s,e,t){t._d=new Date(Re(s))});//! moment.js
|
|
22
|
-
ue.version="2.30.1",Ja(Ve),ue.fn=ae,ue.min=Nl,ue.max=Il,ue.now=Vl,ue.utc=St,ue.unix=mh,ue.months=bh,ue.isDate=Ti,ue.locale=$t,ue.invalid=as,ue.duration=Mt,ue.isMoment=kt,ue.weekdays=yh,ue.parseZone=gh,ue.localeData=It,ue.isDuration=ws,ue.monthsShort=vh,ue.weekdaysMin=Ch,ue.defineLocale=dn,ue.updateLocale=gl,ue.locales=bl,ue.weekdaysShort=wh,ue.normalizeUnits=mt,ue.relativeTimeRounding=Kh,ue.relativeTimeThreshold=qh,ue.calendarFormat=cu,ue.prototype=ae,ue.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};function Xh(s,e){let t;return function(...i){t&&clearTimeout(t),t=setTimeout(()=>{s(...i)},e)}}function Zh(s){return s===void 0?s:JSON.parse(JSON.stringify(s))}function Qh(s,e){return JSON.stringify(s)===JSON.stringify(e)}function ed(s,e,t,i=!1){if(i)return d.render(null,s),!0;const n=d.h(e,t);return d.render(n,s),!0}function td(){const s=Date.now(),e=Math.floor(Math.random()*9999);return s+e}const id={class:"lh-1","data-test":"FormError"},Ii={__name:"FormError",props:{errors:{type:Array,default:()=>[]}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",id,[s.errors?.length?(d.openBlock(!0),d.createElementBlock(d.Fragment,{key:0},d.renderList(s.errors,(i,n)=>(d.openBlock(),d.createElementBlock("div",{class:"text-danger small",key:n},d.toDisplayString(i),1))),128)):d.createCommentVNode("",!0)]))}},sd={class:"position-relative"},nd=["value","placeholder","disabled"],rd=it({__name:"CustomInput",props:{modelValue:{type:[String,Number],default:""},titleClass:{type:String,default:""},title:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},inputClass:{type:[String,Object],default:""},error:{type:[String,Array],default:""},maskOptions:{type:Object,default:()=>({})},maxNumber:{type:Number,default:null}},emits:["change","blur","update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=d.ref(null),r=u=>{let h=u.target.value;t.maxNumber!==null&&Number(h)>=t.maxNumber&&(h=t.maxNumber.toString(),u.target.value=h),i("update:modelValue",h)},a=()=>{i("update:modelValue",""),i("change","")},o=()=>{Object.keys(t.maskOptions).length!==0&&n.value&&qa(t.maskOptions).mask(n.value)};d.onMounted(()=>{o()}),d.watch(()=>t.maskOptions,(u,h)=>{Qh(u,h)||o()},{deep:!0});const l=d.computed(()=>Array.isArray(t.error)?t.error.filter(Boolean):typeof t.error=="string"&&t.error?[t.error]:[]);return(u,h)=>(d.openBlock(),d.createElementBlock("div",null,[s.title?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["mb-1 fw-bold",[s.titleClass]])},d.toDisplayString(s.title),3)):d.createCommentVNode("",!0),d.createElementVNode("div",sd,[d.createElementVNode("input",{ref_key:"inputEl",ref:n,type:"text",class:d.normalizeClass(["form-control outline-none",{[s.inputClass]:s.inputClass,"is-invalid":l.value.length>0}]),value:s.modelValue,placeholder:s.placeholder,disabled:s.disabled,onBlur:h[0]||(h[0]=m=>i("blur")),onInput:r},null,42,nd),s.modelValue&&!s.disabled?(d.openBlock(),d.createElementBlock("i",{key:0,class:"bi bi-x-lg remove-button position-absolute",onClick:a})):d.createCommentVNode("",!0)]),d.createVNode(Ii,{errors:l.value},null,8,["errors"])]))}},[["__scopeId","data-v-294d9aac"]]),ad={class:"position-relative"},od=["type","value"],ld=it({__name:"PasswordInput",props:{modelValue:{type:String,default:""},error:{type:[String,Array],default:""},initialVisibility:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s){const e=s,t=d.ref(e.initialVisibility);d.watch(()=>e.initialVisibility,n=>{t.value=n});const i=d.computed(()=>Array.isArray(e.error)?e.error.filter(Boolean):typeof e.error=="string"&&e.error?[e.error]:[]);return(n,r)=>(d.openBlock(),d.createElementBlock("div",null,[d.createElementVNode("div",ad,[d.createElementVNode("input",{class:d.normalizeClass(["form-control password-input outline-none",{"is-invalid":i.value.length>0}]),type:t.value?"text":"password",value:s.modelValue,autocomplete:"new-password",onInput:r[0]||(r[0]=a=>n.$emit("update:modelValue",a.target.value))},null,42,od),d.createElementVNode("div",{class:"toggle-pass",onClick:r[1]||(r[1]=a=>t.value=!t.value)},[d.createElementVNode("i",{class:d.normalizeClass(["bi",[t.value?"bi-eye-slash-fill":"bi-eye-fill"]]),style:{"font-size":"20px"}},null,2)])]),d.createVNode(Ii,{errors:i.value},null,8,["errors"])]))}},[["__scopeId","data-v-7b5f1918"]]),ud={class:"form-check d-flex align-items-center"},hd=["id","name","checked"],dd=["for"],cd={__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},name:{type:String,required:!0},label:{type:String,default:""},id:{type:String,default:()=>`checkbox-${Math.random().toString(36).slice(2,9)}`},size:{type:String,default:"sm",validator:s=>["sm","md","lg"].includes(s)},clickableLabel:{type:Boolean,default:!0},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=d.ref(null),r=d.computed(()=>t.size==="sm"?"5px":t.size==="md"?"10px":t.size==="lg"?"15px":"5px"),a=o=>{i("update:modelValue",o.target.checked)};return d.watch(()=>t.indeterminate,o=>{n.value&&(n.value.indeterminate=o)}),d.onMounted(()=>{n.value&&(n.value.indeterminate=t.indeterminate)}),(o,l)=>(d.openBlock(),d.createElementBlock("div",ud,[d.createElementVNode("input",{ref_key:"inputRef",ref:n,class:"form-check-input mr-2 mt-0",type:"checkbox",id:s.id,name:s.name,style:d.normalizeStyle({padding:r.value}),checked:s.modelValue,onChange:a},null,44,hd),s.label?(d.openBlock(),d.createElementBlock("label",{key:0,class:d.normalizeClass(["form-check-label lh-n",{"cursor-pointer":s.clickableLabel}]),for:s.clickableLabel?s.id:void 0},d.toDisplayString(s.label),11,dd)):d.createCommentVNode("",!0)]))}};var Mn=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],gi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(s){return typeof console<"u"&&console.warn(s)},getWeek:function(s){var e=new Date(s.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Vi={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(s){var e=s%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},nt=function(s,e){return e===void 0&&(e=2),("000"+s).slice(e*-1)},bt=function(s){return s===!0?1:0};function Zr(s,e){var t;return function(){var i=this,n=arguments;clearTimeout(t),t=setTimeout(function(){return s.apply(i,n)},e)}}var Sn=function(s){return s instanceof Array?s:[s]};function et(s,e,t){if(t===!0)return s.classList.add(e);s.classList.remove(e)}function Oe(s,e,t){var i=window.document.createElement(s);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function Rs(s){for(;s.firstChild;)s.removeChild(s.firstChild)}function Qr(s,e){if(e(s))return s;if(s.parentNode)return Qr(s.parentNode,e)}function Ds(s,e){var t=Oe("div","numInputWrapper"),i=Oe("input","numInput "+s),n=Oe("span","arrowUp"),r=Oe("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var a in e)i.setAttribute(a,e[a]);return t.appendChild(i),t.appendChild(n),t.appendChild(r),t}function ut(s){try{if(typeof s.composedPath=="function"){var e=s.composedPath();return e[0]}return s.target}catch{return s.target}}var Rn=function(){},Ts=function(s,e,t){return t.months[e?"shorthand":"longhand"][s]},fd={D:Rn,F:function(s,e,t){s.setMonth(t.months.longhand.indexOf(e))},G:function(s,e){s.setHours((s.getHours()>=12?12:0)+parseFloat(e))},H:function(s,e){s.setHours(parseFloat(e))},J:function(s,e){s.setDate(parseFloat(e))},K:function(s,e,t){s.setHours(s.getHours()%12+12*bt(new RegExp(t.amPM[1],"i").test(e)))},M:function(s,e,t){s.setMonth(t.months.shorthand.indexOf(e))},S:function(s,e){s.setSeconds(parseFloat(e))},U:function(s,e){return new Date(parseFloat(e)*1e3)},W:function(s,e,t){var i=parseInt(e),n=new Date(s.getFullYear(),0,2+(i-1)*7,0,0,0,0);return n.setDate(n.getDate()-n.getDay()+t.firstDayOfWeek),n},Y:function(s,e){s.setFullYear(parseFloat(e))},Z:function(s,e){return new Date(e)},d:function(s,e){s.setDate(parseFloat(e))},h:function(s,e){s.setHours((s.getHours()>=12?12:0)+parseFloat(e))},i:function(s,e){s.setMinutes(parseFloat(e))},j:function(s,e){s.setDate(parseFloat(e))},l:Rn,m:function(s,e){s.setMonth(parseFloat(e)-1)},n:function(s,e){s.setMonth(parseFloat(e)-1)},s:function(s,e){s.setSeconds(parseFloat(e))},u:function(s,e){return new Date(parseFloat(e))},w:Rn,y:function(s,e){s.setFullYear(2e3+parseFloat(e))}},ii={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},ji={Z:function(s){return s.toISOString()},D:function(s,e,t){return e.weekdays.shorthand[ji.w(s,e,t)]},F:function(s,e,t){return Ts(ji.n(s,e,t)-1,!1,e)},G:function(s,e,t){return nt(ji.h(s,e,t))},H:function(s){return nt(s.getHours())},J:function(s,e){return e.ordinal!==void 0?s.getDate()+e.ordinal(s.getDate()):s.getDate()},K:function(s,e){return e.amPM[bt(s.getHours()>11)]},M:function(s,e){return Ts(s.getMonth(),!0,e)},S:function(s){return nt(s.getSeconds())},U:function(s){return s.getTime()/1e3},W:function(s,e,t){return t.getWeek(s)},Y:function(s){return nt(s.getFullYear(),4)},d:function(s){return nt(s.getDate())},h:function(s){return s.getHours()%12?s.getHours()%12:12},i:function(s){return nt(s.getMinutes())},j:function(s){return s.getDate()},l:function(s,e){return e.weekdays.longhand[s.getDay()]},m:function(s){return nt(s.getMonth()+1)},n:function(s){return s.getMonth()+1},s:function(s){return s.getSeconds()},u:function(s){return s.getTime()},w:function(s){return s.getDay()},y:function(s){return String(s.getFullYear()).substring(2)}},ea=function(s){var e=s.config,t=e===void 0?gi:e,i=s.l10n,n=i===void 0?Vi:i,r=s.isMobile,a=r===void 0?!1:r;return function(o,l,u){var h=u||n;return t.formatDate!==void 0&&!a?t.formatDate(o,l,h):l.split("").map(function(m,v,C){return ji[m]&&C[v-1]!=="\\"?ji[m](o,h,t):m!=="\\"?m:""}).join("")}},Dn=function(s){var e=s.config,t=e===void 0?gi:e,i=s.l10n,n=i===void 0?Vi:i;return function(r,a,o,l){if(!(r!==0&&!r)){var u=l||n,h,m=r;if(r instanceof Date)h=new Date(r.getTime());else if(typeof r!="string"&&r.toFixed!==void 0)h=new Date(r);else if(typeof r=="string"){var v=a||(t||gi).dateFormat,C=String(r).trim();if(C==="today")h=new Date,o=!0;else if(t&&t.parseDate)h=t.parseDate(r,v);else if(/Z$/.test(C)||/GMT$/.test(C))h=new Date(r);else{for(var F=void 0,x=[],R=0,M=0,k="";R<v.length;R++){var _=v[R],p=_==="\\",w=v[R-1]==="\\"||p;if(ii[_]&&!w){k+=ii[_];var c=new RegExp(k).exec(r);c&&(F=!0)&&x[_!=="Y"?"push":"unshift"]({fn:fd[_],val:c[++M]})}else p||(k+=".")}h=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),x.forEach(function(y){var g=y.fn,b=y.val;return h=g(h,b,u)||h}),h=F?h:void 0}}if(!(h instanceof Date&&!isNaN(h.getTime()))){t.errorHandler(new Error("Invalid date provided: "+m));return}return o===!0&&h.setHours(0,0,0,0),h}}};function ht(s,e,t){return t===void 0&&(t=!0),t!==!1?new Date(s.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):s.getTime()-e.getTime()}var pd=function(s,e,t){return s>Math.min(e,t)&&s<Math.max(e,t)},Tn=function(s,e,t){return s*3600+e*60+t},md=function(s){var e=Math.floor(s/3600),t=(s-e*3600)/60;return[e,t,s-e*3600-t*60]},gd={DAY:864e5};function _n(s){var e=s.defaultHour,t=s.defaultMinute,i=s.defaultSeconds;if(s.minDate!==void 0){var n=s.minDate.getHours(),r=s.minDate.getMinutes(),a=s.minDate.getSeconds();e<n&&(e=n),e===n&&t<r&&(t=r),e===n&&t===r&&i<a&&(i=s.minDate.getSeconds())}if(s.maxDate!==void 0){var o=s.maxDate.getHours(),l=s.maxDate.getMinutes();e=Math.min(e,o),e===o&&(t=Math.min(l,t)),e===o&&t===l&&(i=s.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(s){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!s)throw TypeError("Cannot convert undefined or null to object");for(var i=function(o){o&&Object.keys(o).forEach(function(l){return s[l]=o[l]})},n=0,r=e;n<r.length;n++){var a=r[n];i(a)}return s});var Ze=function(){return Ze=Object.assign||function(s){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(s[n]=e[n])}return s},Ze.apply(this,arguments)},ta=function(){for(var s=0,e=0,t=arguments.length;e<t;e++)s+=arguments[e].length;for(var i=Array(s),n=0,e=0;e<t;e++)for(var r=arguments[e],a=0,o=r.length;a<o;a++,n++)i[n]=r[a];return i},bd=300;function vd(s,e){var t={config:Ze(Ze({},gi),Ke.defaultConfig),l10n:Vi};t.parseDate=Dn({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=x,t._setHoursFromDate=v,t._positionCalendar=Le,t.changeMonth=P,t.changeYear=ie,t.clear=W,t.close=z,t.onMouseOver=q,t._createElement=Oe,t.createDay=c,t.destroy=U,t.isEnabled=Y,t.jumpToDate=k,t.updateValue=ot,t.open=ne,t.redraw=G,t.set=pe,t.setDate=ve,t.toggle=is;function i(){t.utils={getDaysInMonth:function(O,L){return O===void 0&&(O=t.currentMonth),L===void 0&&(L=t.currentYear),O===1&&(L%4===0&&L%100!==0||L%400===0)?29:t.l10n.daysInMonth[O]}}}function n(){t.element=t.input=s,t.isOpen=!1,be(),je(),ct(),Pe(),i(),t.isMobile||w(),M(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&v(t.config.noCalendar?t.latestSelectedDateObj:void 0),ot(!1)),o();var O=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&O&&Le(),We("onReady")}function r(){var O;return((O=t.calendarContainer)===null||O===void 0?void 0:O.getRootNode()).activeElement||document.activeElement}function a(O){return O.bind(t)}function o(){var O=t.config;O.weekNumbers===!1&&O.showMonths===1||O.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var L=(t.days.offsetWidth+1)*O.showMonths;t.daysContainer.style.width=L+"px",t.calendarContainer.style.width=L+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function l(O){if(t.selectedDates.length===0){var L=t.config.minDate===void 0||ht(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),I=_n(t.config);L.setHours(I.hours,I.minutes,I.seconds,L.getMilliseconds()),t.selectedDates=[L],t.latestSelectedDateObj=L}O!==void 0&&O.type!=="blur"&&tt(O);var J=t._input.value;m(),ot(),t._input.value!==J&&t._debouncedChange()}function u(O,L){return O%12+12*bt(L===t.l10n.amPM[1])}function h(O){switch(O%24){case 0:case 12:return 12;default:return O%12}}function m(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var O=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,L=(parseInt(t.minuteElement.value,10)||0)%60,I=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(O=u(O,t.amPM.textContent));var J=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&ht(t.latestSelectedDateObj,t.config.minDate,!0)===0,le=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&ht(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var he=Tn(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Ee=Tn(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),fe=Tn(O,L,I);if(fe>Ee&&fe<he){var Se=md(he);O=Se[0],L=Se[1],I=Se[2]}}else{if(le){var ce=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;O=Math.min(O,ce.getHours()),O===ce.getHours()&&(L=Math.min(L,ce.getMinutes())),L===ce.getMinutes()&&(I=Math.min(I,ce.getSeconds()))}if(J){var ye=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;O=Math.max(O,ye.getHours()),O===ye.getHours()&&L<ye.getMinutes()&&(L=ye.getMinutes()),L===ye.getMinutes()&&(I=Math.max(I,ye.getSeconds()))}}C(O,L,I)}}function v(O){var L=O||t.latestSelectedDateObj;L&&L instanceof Date&&C(L.getHours(),L.getMinutes(),L.getSeconds())}function C(O,L,I){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(O%24,L,I||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=nt(t.config.time_24hr?O:(12+O)%12+12*bt(O%12===0)),t.minuteElement.value=nt(L),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[bt(O>=12)]),t.secondElement!==void 0&&(t.secondElement.value=nt(I)))}function F(O){var L=ut(O),I=parseInt(L.value)+(O.delta||0);(I/1e3>1||O.key==="Enter"&&!/[^\d]/.test(I.toString()))&&ie(I)}function x(O,L,I,J){if(L instanceof Array)return L.forEach(function(le){return x(O,le,I,J)});if(O instanceof Array)return O.forEach(function(le){return x(le,L,I,J)});O.addEventListener(L,I,J),t._handlers.push({remove:function(){return O.removeEventListener(L,I,J)}})}function R(){We("onChange")}function M(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(I){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+I+"]"),function(J){return x(J,"click",t[I])})}),t.isMobile){Xn();return}var O=Zr(oe,50);if(t._debouncedChange=Zr(R,bd),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&x(t.daysContainer,"mouseover",function(I){t.config.mode==="range"&&q(ut(I))}),x(t._input,"keydown",X),t.calendarContainer!==void 0&&x(t.calendarContainer,"keydown",X),!t.config.inline&&!t.config.static&&x(window,"resize",O),window.ontouchstart!==void 0?x(window.document,"touchstart",Q):x(window.document,"mousedown",Q),x(window.document,"focus",Q,{capture:!0}),t.config.clickOpens===!0&&(x(t._input,"focus",t.open),x(t._input,"click",t.open)),t.daysContainer!==void 0&&(x(t.monthNav,"click",ss),x(t.monthNav,["keyup","increment"],F),x(t.daysContainer,"click",re)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var L=function(I){return ut(I).select()};x(t.timeContainer,["increment"],l),x(t.timeContainer,"blur",l,{capture:!0}),x(t.timeContainer,"click",_),x([t.hourElement,t.minuteElement],["focus","click"],L),t.secondElement!==void 0&&x(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&x(t.amPM,"click",function(I){l(I)})}t.config.allowInput&&x(t._input,"blur",ee)}function k(O,L){var I=O!==void 0?t.parseDate(O):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),J=t.currentYear,le=t.currentMonth;try{I!==void 0&&(t.currentYear=I.getFullYear(),t.currentMonth=I.getMonth())}catch(he){he.message="Invalid date supplied: "+I,t.config.errorHandler(he)}L&&t.currentYear!==J&&(We("onYearChange"),D()),L&&(t.currentYear!==J||t.currentMonth!==le)&&We("onMonthChange"),t.redraw()}function _(O){var L=ut(O);~L.className.indexOf("arrow")&&p(O,L.classList.contains("arrowUp")?1:-1)}function p(O,L,I){var J=O&&ut(O),le=I||J&&J.parentNode&&J.parentNode.firstChild,he=Ri("increment");he.delta=L,le&&le.dispatchEvent(he)}function w(){var O=window.document.createDocumentFragment();if(t.calendarContainer=Oe("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(O.appendChild(V()),t.innerContainer=Oe("div","flatpickr-innerContainer"),t.config.weekNumbers){var L=T(),I=L.weekWrapper,J=L.weekNumbers;t.innerContainer.appendChild(I),t.weekNumbers=J,t.weekWrapper=I}t.rContainer=Oe("div","flatpickr-rContainer"),t.rContainer.appendChild(j()),t.daysContainer||(t.daysContainer=Oe("div","flatpickr-days"),t.daysContainer.tabIndex=-1),S(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),O.appendChild(t.innerContainer)}t.config.enableTime&&O.appendChild(B()),et(t.calendarContainer,"rangeMode",t.config.mode==="range"),et(t.calendarContainer,"animate",t.config.animate===!0),et(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(O);var le=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!le&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var he=Oe("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(he,t.element),he.appendChild(t.element),t.altInput&&he.appendChild(t.altInput),he.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function c(O,L,I,J){var le=Y(L,!0),he=Oe("span",O,L.getDate().toString());return he.dateObj=L,he.$i=J,he.setAttribute("aria-label",t.formatDate(L,t.config.ariaDateFormat)),O.indexOf("hidden")===-1&&ht(L,t.now)===0&&(t.todayDateElem=he,he.classList.add("today"),he.setAttribute("aria-current","date")),le?(he.tabIndex=-1,Jt(L)&&(he.classList.add("selected"),t.selectedDateElem=he,t.config.mode==="range"&&(et(he,"startRange",t.selectedDates[0]&&ht(L,t.selectedDates[0],!0)===0),et(he,"endRange",t.selectedDates[1]&&ht(L,t.selectedDates[1],!0)===0),O==="nextMonthDay"&&he.classList.add("inRange")))):he.classList.add("flatpickr-disabled"),t.config.mode==="range"&&ai(L)&&!Jt(L)&&he.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&O!=="prevMonthDay"&&J%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(L)+"</span>"),We("onDayCreate",he),he}function y(O){O.focus(),t.config.mode==="range"&&q(O)}function g(O){for(var L=O>0?0:t.config.showMonths-1,I=O>0?t.config.showMonths:-1,J=L;J!=I;J+=O)for(var le=t.daysContainer.children[J],he=O>0?0:le.children.length-1,Ee=O>0?le.children.length:-1,fe=he;fe!=Ee;fe+=O){var Se=le.children[fe];if(Se.className.indexOf("hidden")===-1&&Y(Se.dateObj))return Se}}function b(O,L){for(var I=O.className.indexOf("Month")===-1?O.dateObj.getMonth():t.currentMonth,J=L>0?t.config.showMonths:-1,le=L>0?1:-1,he=I-t.currentMonth;he!=J;he+=le)for(var Ee=t.daysContainer.children[he],fe=I-t.currentMonth===he?O.$i+L:L<0?Ee.children.length-1:0,Se=Ee.children.length,ce=fe;ce>=0&&ce<Se&&ce!=(L>0?Se:-1);ce+=le){var ye=Ee.children[ce];if(ye.className.indexOf("hidden")===-1&&Y(ye.dateObj)&&Math.abs(O.$i-ce)>=Math.abs(L))return y(ye)}t.changeMonth(le),f(g(le),0)}function f(O,L){var I=r(),J=H(I||document.body),le=O!==void 0?O:J?I:t.selectedDateElem!==void 0&&H(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&H(t.todayDateElem)?t.todayDateElem:g(L>0?1:-1);le===void 0?t._input.focus():J?b(le,L):y(le)}function E(O,L){for(var I=(new Date(O,L,1).getDay()-t.l10n.firstDayOfWeek+7)%7,J=t.utils.getDaysInMonth((L-1+12)%12,O),le=t.utils.getDaysInMonth(L,O),he=window.document.createDocumentFragment(),Ee=t.config.showMonths>1,fe=Ee?"prevMonthDay hidden":"prevMonthDay",Se=Ee?"nextMonthDay hidden":"nextMonthDay",ce=J+1-I,ye=0;ce<=J;ce++,ye++)he.appendChild(c("flatpickr-day "+fe,new Date(O,L-1,ce),ce,ye));for(ce=1;ce<=le;ce++,ye++)he.appendChild(c("flatpickr-day",new Date(O,L,ce),ce,ye));for(var Be=le+1;Be<=42-I&&(t.config.showMonths===1||ye%7!==0);Be++,ye++)he.appendChild(c("flatpickr-day "+Se,new Date(O,L+1,Be%le),Be,ye));var Ft=Oe("div","dayContainer");return Ft.appendChild(he),Ft}function S(){if(t.daysContainer!==void 0){Rs(t.daysContainer),t.weekNumbers&&Rs(t.weekNumbers);for(var O=document.createDocumentFragment(),L=0;L<t.config.showMonths;L++){var I=new Date(t.currentYear,t.currentMonth,1);I.setMonth(t.currentMonth+L),O.appendChild(E(I.getFullYear(),I.getMonth()))}t.daysContainer.appendChild(O),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&q()}}function D(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var O=function(J){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&J<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&J>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var L=0;L<12;L++)if(O(L)){var I=Oe("option","flatpickr-monthDropdown-month");I.value=new Date(t.currentYear,L).getMonth().toString(),I.textContent=Ts(L,t.config.shorthandCurrentMonth,t.l10n),I.tabIndex=-1,t.currentMonth===L&&(I.selected=!0),t.monthsDropdownContainer.appendChild(I)}}}function A(){var O=Oe("div","flatpickr-month"),L=window.document.createDocumentFragment(),I;t.config.showMonths>1||t.config.monthSelectorType==="static"?I=Oe("span","cur-month"):(t.monthsDropdownContainer=Oe("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),x(t.monthsDropdownContainer,"change",function(Ee){var fe=ut(Ee),Se=parseInt(fe.value,10);t.changeMonth(Se-t.currentMonth),We("onMonthChange")}),D(),I=t.monthsDropdownContainer);var J=Ds("cur-year",{tabindex:"-1"}),le=J.getElementsByTagName("input")[0];le.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&le.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(le.setAttribute("max",t.config.maxDate.getFullYear().toString()),le.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var he=Oe("div","flatpickr-current-month");return he.appendChild(I),he.appendChild(J),L.appendChild(he),O.appendChild(L),{container:O,yearElement:le,monthElement:I}}function N(){Rs(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var O=t.config.showMonths;O--;){var L=A();t.yearElements.push(L.yearElement),t.monthElements.push(L.monthElement),t.monthNav.appendChild(L.container)}t.monthNav.appendChild(t.nextMonthNav)}function V(){return t.monthNav=Oe("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=Oe("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=Oe("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,N(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(O){t.__hidePrevMonthArrow!==O&&(et(t.prevMonthNav,"flatpickr-disabled",O),t.__hidePrevMonthArrow=O)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(O){t.__hideNextMonthArrow!==O&&(et(t.nextMonthNav,"flatpickr-disabled",O),t.__hideNextMonthArrow=O)}}),t.currentYearElement=t.yearElements[0],Xt(),t.monthNav}function B(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var O=_n(t.config);t.timeContainer=Oe("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var L=Oe("span","flatpickr-time-separator",":"),I=Ds("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=I.getElementsByTagName("input")[0];var J=Ds("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=J.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=nt(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?O.hours:h(O.hours)),t.minuteElement.value=nt(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():O.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(I),t.timeContainer.appendChild(L),t.timeContainer.appendChild(J),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var le=Ds("flatpickr-second");t.secondElement=le.getElementsByTagName("input")[0],t.secondElement.value=nt(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():O.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Oe("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(le)}return t.config.time_24hr||(t.amPM=Oe("span","flatpickr-am-pm",t.l10n.amPM[bt((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function j(){t.weekdayContainer?Rs(t.weekdayContainer):t.weekdayContainer=Oe("div","flatpickr-weekdays");for(var O=t.config.showMonths;O--;){var L=Oe("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(L)}return $(),t.weekdayContainer}function $(){if(t.weekdayContainer){var O=t.l10n.firstDayOfWeek,L=ta(t.l10n.weekdays.shorthand);O>0&&O<L.length&&(L=ta(L.splice(O,L.length),L.splice(0,O)));for(var I=t.config.showMonths;I--;)t.weekdayContainer.children[I].innerHTML=`
|
|
24
|
+
`+new Error().stack),t=!1}return e.apply(this,arguments)},e)}var Oo={};function Lo(n,e){he.deprecationHandler!=null&&he.deprecationHandler(n,e),Oo[n]||(Do(e),Oo[n]=!0)}he.suppressDeprecationWarnings=!1,he.deprecationHandler=null;function Pt(n){return typeof Function<"u"&&n instanceof Function||Object.prototype.toString.call(n)==="[object Function]"}function Vd(n){var e,t;for(t in n)je(n,t)&&(e=n[t],Pt(e)?this[t]=e:this["_"+t]=e);this._config=n,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function cs(n,e){var t=Qt({},n),i;for(i in e)je(e,i)&&(oi(n[i])&&oi(e[i])?(t[i]={},Qt(t[i],n[i]),Qt(t[i],e[i])):e[i]!=null?t[i]=e[i]:delete t[i]);for(i in n)je(n,i)&&!je(e,i)&&oi(n[i])&&(t[i]=Qt({},t[i]));return t}function ds(n){n!=null&&this.set(n)}var hs;Object.keys?hs=Object.keys:hs=function(n){var e,t=[];for(e in n)je(n,e)&&t.push(e);return t};var Hd={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function zd(n,e,t){var i=this._calendar[n]||this._calendar.sameElse;return Pt(i)?i.call(e,t):i}function At(n,e,t){var i=""+Math.abs(n),r=e-i.length,s=n>=0;return(s?t?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+i}var fs=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,wn=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ps={},yi={};function Ee(n,e,t,i){var r=i;typeof i=="string"&&(r=function(){return this[i]()}),n&&(yi[n]=r),e&&(yi[e[0]]=function(){return At(r.apply(this,arguments),e[1],e[2])}),t&&(yi[t]=function(){return this.localeData().ordinal(r.apply(this,arguments),n)})}function Id(n){return n.match(/\[[\s\S]/)?n.replace(/^\[|\]$/g,""):n.replace(/\\/g,"")}function $d(n){var e=n.match(fs),t,i;for(t=0,i=e.length;t<i;t++)yi[e[t]]?e[t]=yi[e[t]]:e[t]=Id(e[t]);return function(r){var s="",a;for(a=0;a<i;a++)s+=Pt(e[a])?e[a].call(r,n):e[a];return s}}function Cn(n,e){return n.isValid()?(e=Po(e,n.localeData()),ps[e]=ps[e]||$d(e),ps[e](n)):n.localeData().invalidDate()}function Po(n,e){var t=5;function i(r){return e.longDateFormat(r)||r}for(wn.lastIndex=0;t>=0&&wn.test(n);)n=n.replace(wn,i),wn.lastIndex=0,t-=1;return n}var jd={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function Wd(n){var e=this._longDateFormat[n],t=this._longDateFormat[n.toUpperCase()];return e||!t?e:(this._longDateFormat[n]=t.match(fs).map(function(i){return i==="MMMM"||i==="MM"||i==="DD"||i==="dddd"?i.slice(1):i}).join(""),this._longDateFormat[n])}var Gd="Invalid date";function Yd(){return this._invalidDate}var Ud="%d",qd=/\d{1,2}/;function Kd(n){return this._ordinal.replace("%d",n)}var Jd={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function Xd(n,e,t,i){var r=this._relativeTime[t];return Pt(r)?r(n,e,t,i):r.replace(/%d/i,n)}function Zd(n,e){var t=this._relativeTime[n>0?"future":"past"];return Pt(t)?t(e):t.replace(/%s/i,e)}var Ao={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function Ct(n){return typeof n=="string"?Ao[n]||Ao[n.toLowerCase()]:void 0}function ms(n){var e={},t,i;for(i in n)je(n,i)&&(t=Ct(i),t&&(e[t]=n[i]));return e}var Qd={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function eh(n){var e=[],t;for(t in n)je(n,t)&&e.push({unit:t,priority:Qd[t]});return e.sort(function(i,r){return i.priority-r.priority}),e}var Fo=/\d/,gt=/\d\d/,Bo=/\d{3}/,gs=/\d{4}/,En=/[+-]?\d{6}/,Je=/\d\d?/,No=/\d\d\d\d?/,Vo=/\d\d\d\d\d\d?/,kn=/\d{1,3}/,bs=/\d{1,4}/,Sn=/[+-]?\d{1,6}/,wi=/\d+/,xn=/[+-]?\d+/,th=/Z|[+-]\d\d:?\d\d/gi,_n=/Z|[+-]\d\d(?::?\d\d)?/gi,ih=/[+-]?\d+(\.\d{1,3})?/,$i=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ci=/^[1-9]\d?/,vs=/^([1-9]\d|\d)/,Mn;Mn={};function ge(n,e,t){Mn[n]=Pt(e)?e:function(i,r){return i&&t?t:e}}function nh(n,e){return je(Mn,n)?Mn[n](e._strict,e._locale):new RegExp(rh(n))}function rh(n){return $t(n.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,i,r,s){return t||i||r||s}))}function $t(n){return n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Et(n){return n<0?Math.ceil(n)||0:Math.floor(n)}function He(n){var e=+n,t=0;return e!==0&&isFinite(e)&&(t=Et(e)),t}var ys={};function qe(n,e){var t,i=e,r;for(typeof n=="string"&&(n=[n]),It(e)&&(i=function(s,a){a[e]=He(s)}),r=n.length,t=0;t<r;t++)ys[n[t]]=i}function ji(n,e){qe(n,function(t,i,r,s){r._w=r._w||{},e(t,r._w,r,s)})}function sh(n,e,t){e!=null&&je(ys,n)&&ys[n](e,t._a,t,n)}function Rn(n){return n%4===0&&n%100!==0||n%400===0}var st=0,jt=1,Ft=2,nt=3,Dt=4,Wt=5,li=6,ah=7,oh=8;Ee("Y",0,0,function(){var n=this.year();return n<=9999?At(n,4):"+"+n}),Ee(0,["YY",2],0,function(){return this.year()%100}),Ee(0,["YYYY",4],0,"year"),Ee(0,["YYYYY",5],0,"year"),Ee(0,["YYYYYY",6,!0],0,"year"),ge("Y",xn),ge("YY",Je,gt),ge("YYYY",bs,gs),ge("YYYYY",Sn,En),ge("YYYYYY",Sn,En),qe(["YYYYY","YYYYYY"],st),qe("YYYY",function(n,e){e[st]=n.length===2?he.parseTwoDigitYear(n):He(n)}),qe("YY",function(n,e){e[st]=he.parseTwoDigitYear(n)}),qe("Y",function(n,e){e[st]=parseInt(n,10)});function Wi(n){return Rn(n)?366:365}he.parseTwoDigitYear=function(n){return He(n)+(He(n)>68?1900:2e3)};var Ho=Ei("FullYear",!0);function lh(){return Rn(this.year())}function Ei(n,e){return function(t){return t!=null?(zo(this,n,t),he.updateOffset(this,e),this):Gi(this,n)}}function Gi(n,e){if(!n.isValid())return NaN;var t=n._d,i=n._isUTC;switch(e){case"Milliseconds":return i?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return i?t.getUTCSeconds():t.getSeconds();case"Minutes":return i?t.getUTCMinutes():t.getMinutes();case"Hours":return i?t.getUTCHours():t.getHours();case"Date":return i?t.getUTCDate():t.getDate();case"Day":return i?t.getUTCDay():t.getDay();case"Month":return i?t.getUTCMonth():t.getMonth();case"FullYear":return i?t.getUTCFullYear():t.getFullYear();default:return NaN}}function zo(n,e,t){var i,r,s,a,o;if(!(!n.isValid()||isNaN(t))){switch(i=n._d,r=n._isUTC,e){case"Milliseconds":return void(r?i.setUTCMilliseconds(t):i.setMilliseconds(t));case"Seconds":return void(r?i.setUTCSeconds(t):i.setSeconds(t));case"Minutes":return void(r?i.setUTCMinutes(t):i.setMinutes(t));case"Hours":return void(r?i.setUTCHours(t):i.setHours(t));case"Date":return void(r?i.setUTCDate(t):i.setDate(t));case"FullYear":break;default:return}s=t,a=n.month(),o=n.date(),o=o===29&&a===1&&!Rn(s)?28:o,r?i.setUTCFullYear(s,a,o):i.setFullYear(s,a,o)}}function uh(n){return n=Ct(n),Pt(this[n])?this[n]():this}function ch(n,e){if(typeof n=="object"){n=ms(n);var t=eh(n),i,r=t.length;for(i=0;i<r;i++)this[t[i].unit](n[t[i].unit])}else if(n=Ct(n),Pt(this[n]))return this[n](e);return this}function dh(n,e){return(n%e+e)%e}var tt;Array.prototype.indexOf?tt=Array.prototype.indexOf:tt=function(n){var e;for(e=0;e<this.length;++e)if(this[e]===n)return e;return-1};function ws(n,e){if(isNaN(n)||isNaN(e))return NaN;var t=dh(e,12);return n+=(e-t)/12,t===1?Rn(n)?29:28:31-t%7%2}Ee("M",["MM",2],"Mo",function(){return this.month()+1}),Ee("MMM",0,0,function(n){return this.localeData().monthsShort(this,n)}),Ee("MMMM",0,0,function(n){return this.localeData().months(this,n)}),ge("M",Je,Ci),ge("MM",Je,gt),ge("MMM",function(n,e){return e.monthsShortRegex(n)}),ge("MMMM",function(n,e){return e.monthsRegex(n)}),qe(["M","MM"],function(n,e){e[jt]=He(n)-1}),qe(["MMM","MMMM"],function(n,e,t,i){var r=t._locale.monthsParse(n,i,t._strict);r!=null?e[jt]=r:Oe(t).invalidMonth=n});var hh="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Io="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),$o=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fh=$i,ph=$i;function mh(n,e){return n?Rt(this._months)?this._months[n.month()]:this._months[(this._months.isFormat||$o).test(e)?"format":"standalone"][n.month()]:Rt(this._months)?this._months:this._months.standalone}function gh(n,e){return n?Rt(this._monthsShort)?this._monthsShort[n.month()]:this._monthsShort[$o.test(e)?"format":"standalone"][n.month()]:Rt(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function bh(n,e,t){var i,r,s,a=n.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],i=0;i<12;++i)s=Lt([2e3,i]),this._shortMonthsParse[i]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[i]=this.months(s,"").toLocaleLowerCase();return t?e==="MMM"?(r=tt.call(this._shortMonthsParse,a),r!==-1?r:null):(r=tt.call(this._longMonthsParse,a),r!==-1?r:null):e==="MMM"?(r=tt.call(this._shortMonthsParse,a),r!==-1?r:(r=tt.call(this._longMonthsParse,a),r!==-1?r:null)):(r=tt.call(this._longMonthsParse,a),r!==-1?r:(r=tt.call(this._shortMonthsParse,a),r!==-1?r:null))}function vh(n,e,t){var i,r,s;if(this._monthsParseExact)return bh.call(this,n,e,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),i=0;i<12;i++){if(r=Lt([2e3,i]),t&&!this._longMonthsParse[i]&&(this._longMonthsParse[i]=new RegExp("^"+this.months(r,"").replace(".","")+"$","i"),this._shortMonthsParse[i]=new RegExp("^"+this.monthsShort(r,"").replace(".","")+"$","i")),!t&&!this._monthsParse[i]&&(s="^"+this.months(r,"")+"|^"+this.monthsShort(r,""),this._monthsParse[i]=new RegExp(s.replace(".",""),"i")),t&&e==="MMMM"&&this._longMonthsParse[i].test(n))return i;if(t&&e==="MMM"&&this._shortMonthsParse[i].test(n))return i;if(!t&&this._monthsParse[i].test(n))return i}}function jo(n,e){if(!n.isValid())return n;if(typeof e=="string"){if(/^\d+$/.test(e))e=He(e);else if(e=n.localeData().monthsParse(e),!It(e))return n}var t=e,i=n.date();return i=i<29?i:Math.min(i,ws(n.year(),t)),n._isUTC?n._d.setUTCMonth(t,i):n._d.setMonth(t,i),n}function Wo(n){return n!=null?(jo(this,n),he.updateOffset(this,!0),this):Gi(this,"Month")}function yh(){return ws(this.year(),this.month())}function wh(n){return this._monthsParseExact?(je(this,"_monthsRegex")||Go.call(this),n?this._monthsShortStrictRegex:this._monthsShortRegex):(je(this,"_monthsShortRegex")||(this._monthsShortRegex=fh),this._monthsShortStrictRegex&&n?this._monthsShortStrictRegex:this._monthsShortRegex)}function Ch(n){return this._monthsParseExact?(je(this,"_monthsRegex")||Go.call(this),n?this._monthsStrictRegex:this._monthsRegex):(je(this,"_monthsRegex")||(this._monthsRegex=ph),this._monthsStrictRegex&&n?this._monthsStrictRegex:this._monthsRegex)}function Go(){function n(u,c){return c.length-u.length}var e=[],t=[],i=[],r,s,a,o;for(r=0;r<12;r++)s=Lt([2e3,r]),a=$t(this.monthsShort(s,"")),o=$t(this.months(s,"")),e.push(a),t.push(o),i.push(o),i.push(a);e.sort(n),t.sort(n),i.sort(n),this._monthsRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+e.join("|")+")","i")}function Eh(n,e,t,i,r,s,a){var o;return n<100&&n>=0?(o=new Date(n+400,e,t,i,r,s,a),isFinite(o.getFullYear())&&o.setFullYear(n)):o=new Date(n,e,t,i,r,s,a),o}function Yi(n){var e,t;return n<100&&n>=0?(t=Array.prototype.slice.call(arguments),t[0]=n+400,e=new Date(Date.UTC.apply(null,t)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(n)):e=new Date(Date.UTC.apply(null,arguments)),e}function Tn(n,e,t){var i=7+e-t,r=(7+Yi(n,0,i).getUTCDay()-e)%7;return-r+i-1}function Yo(n,e,t,i,r){var s=(7+t-i)%7,a=Tn(n,i,r),o=1+7*(e-1)+s+a,u,c;return o<=0?(u=n-1,c=Wi(u)+o):o>Wi(n)?(u=n+1,c=o-Wi(n)):(u=n,c=o),{year:u,dayOfYear:c}}function Ui(n,e,t){var i=Tn(n.year(),e,t),r=Math.floor((n.dayOfYear()-i-1)/7)+1,s,a;return r<1?(a=n.year()-1,s=r+Gt(a,e,t)):r>Gt(n.year(),e,t)?(s=r-Gt(n.year(),e,t),a=n.year()+1):(a=n.year(),s=r),{week:s,year:a}}function Gt(n,e,t){var i=Tn(n,e,t),r=Tn(n+1,e,t);return(Wi(n)-i+r)/7}Ee("w",["ww",2],"wo","week"),Ee("W",["WW",2],"Wo","isoWeek"),ge("w",Je,Ci),ge("ww",Je,gt),ge("W",Je,Ci),ge("WW",Je,gt),ji(["w","ww","W","WW"],function(n,e,t,i){e[i.substr(0,1)]=He(n)});function kh(n){return Ui(n,this._week.dow,this._week.doy).week}var Sh={dow:0,doy:6};function xh(){return this._week.dow}function _h(){return this._week.doy}function Mh(n){var e=this.localeData().week(this);return n==null?e:this.add((n-e)*7,"d")}function Rh(n){var e=Ui(this,1,4).week;return n==null?e:this.add((n-e)*7,"d")}Ee("d",0,"do","day"),Ee("dd",0,0,function(n){return this.localeData().weekdaysMin(this,n)}),Ee("ddd",0,0,function(n){return this.localeData().weekdaysShort(this,n)}),Ee("dddd",0,0,function(n){return this.localeData().weekdays(this,n)}),Ee("e",0,0,"weekday"),Ee("E",0,0,"isoWeekday"),ge("d",Je),ge("e",Je),ge("E",Je),ge("dd",function(n,e){return e.weekdaysMinRegex(n)}),ge("ddd",function(n,e){return e.weekdaysShortRegex(n)}),ge("dddd",function(n,e){return e.weekdaysRegex(n)}),ji(["dd","ddd","dddd"],function(n,e,t,i){var r=t._locale.weekdaysParse(n,i,t._strict);r!=null?e.d=r:Oe(t).invalidWeekday=n}),ji(["d","e","E"],function(n,e,t,i){e[i]=He(n)});function Th(n,e){return typeof n!="string"?n:isNaN(n)?(n=e.weekdaysParse(n),typeof n=="number"?n:null):parseInt(n,10)}function Dh(n,e){return typeof n=="string"?e.weekdaysParse(n)%7||7:isNaN(n)?null:n}function Cs(n,e){return n.slice(e,7).concat(n.slice(0,e))}var Oh="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Uo="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Lh="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ph=$i,Ah=$i,Fh=$i;function Bh(n,e){var t=Rt(this._weekdays)?this._weekdays:this._weekdays[n&&n!==!0&&this._weekdays.isFormat.test(e)?"format":"standalone"];return n===!0?Cs(t,this._week.dow):n?t[n.day()]:t}function Nh(n){return n===!0?Cs(this._weekdaysShort,this._week.dow):n?this._weekdaysShort[n.day()]:this._weekdaysShort}function Vh(n){return n===!0?Cs(this._weekdaysMin,this._week.dow):n?this._weekdaysMin[n.day()]:this._weekdaysMin}function Hh(n,e,t){var i,r,s,a=n.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],i=0;i<7;++i)s=Lt([2e3,1]).day(i),this._minWeekdaysParse[i]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[i]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[i]=this.weekdays(s,"").toLocaleLowerCase();return t?e==="dddd"?(r=tt.call(this._weekdaysParse,a),r!==-1?r:null):e==="ddd"?(r=tt.call(this._shortWeekdaysParse,a),r!==-1?r:null):(r=tt.call(this._minWeekdaysParse,a),r!==-1?r:null):e==="dddd"?(r=tt.call(this._weekdaysParse,a),r!==-1||(r=tt.call(this._shortWeekdaysParse,a),r!==-1)?r:(r=tt.call(this._minWeekdaysParse,a),r!==-1?r:null)):e==="ddd"?(r=tt.call(this._shortWeekdaysParse,a),r!==-1||(r=tt.call(this._weekdaysParse,a),r!==-1)?r:(r=tt.call(this._minWeekdaysParse,a),r!==-1?r:null)):(r=tt.call(this._minWeekdaysParse,a),r!==-1||(r=tt.call(this._weekdaysParse,a),r!==-1)?r:(r=tt.call(this._shortWeekdaysParse,a),r!==-1?r:null))}function zh(n,e,t){var i,r,s;if(this._weekdaysParseExact)return Hh.call(this,n,e,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),i=0;i<7;i++){if(r=Lt([2e3,1]).day(i),t&&!this._fullWeekdaysParse[i]&&(this._fullWeekdaysParse[i]=new RegExp("^"+this.weekdays(r,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[i]=new RegExp("^"+this.weekdaysShort(r,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[i]=new RegExp("^"+this.weekdaysMin(r,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[i]||(s="^"+this.weekdays(r,"")+"|^"+this.weekdaysShort(r,"")+"|^"+this.weekdaysMin(r,""),this._weekdaysParse[i]=new RegExp(s.replace(".",""),"i")),t&&e==="dddd"&&this._fullWeekdaysParse[i].test(n))return i;if(t&&e==="ddd"&&this._shortWeekdaysParse[i].test(n))return i;if(t&&e==="dd"&&this._minWeekdaysParse[i].test(n))return i;if(!t&&this._weekdaysParse[i].test(n))return i}}function Ih(n){if(!this.isValid())return n!=null?this:NaN;var e=Gi(this,"Day");return n!=null?(n=Th(n,this.localeData()),this.add(n-e,"d")):e}function $h(n){if(!this.isValid())return n!=null?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return n==null?e:this.add(n-e,"d")}function jh(n){if(!this.isValid())return n!=null?this:NaN;if(n!=null){var e=Dh(n,this.localeData());return this.day(this.day()%7?e:e-7)}else return this.day()||7}function Wh(n){return this._weekdaysParseExact?(je(this,"_weekdaysRegex")||Es.call(this),n?this._weekdaysStrictRegex:this._weekdaysRegex):(je(this,"_weekdaysRegex")||(this._weekdaysRegex=Ph),this._weekdaysStrictRegex&&n?this._weekdaysStrictRegex:this._weekdaysRegex)}function Gh(n){return this._weekdaysParseExact?(je(this,"_weekdaysRegex")||Es.call(this),n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(je(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ah),this._weekdaysShortStrictRegex&&n?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Yh(n){return this._weekdaysParseExact?(je(this,"_weekdaysRegex")||Es.call(this),n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(je(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Fh),this._weekdaysMinStrictRegex&&n?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Es(){function n(d,p){return p.length-d.length}var e=[],t=[],i=[],r=[],s,a,o,u,c;for(s=0;s<7;s++)a=Lt([2e3,1]).day(s),o=$t(this.weekdaysMin(a,"")),u=$t(this.weekdaysShort(a,"")),c=$t(this.weekdays(a,"")),e.push(o),t.push(u),i.push(c),r.push(o),r.push(u),r.push(c);e.sort(n),t.sort(n),i.sort(n),r.sort(n),this._weekdaysRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+e.join("|")+")","i")}function ks(){return this.hours()%12||12}function Uh(){return this.hours()||24}Ee("H",["HH",2],0,"hour"),Ee("h",["hh",2],0,ks),Ee("k",["kk",2],0,Uh),Ee("hmm",0,0,function(){return""+ks.apply(this)+At(this.minutes(),2)}),Ee("hmmss",0,0,function(){return""+ks.apply(this)+At(this.minutes(),2)+At(this.seconds(),2)}),Ee("Hmm",0,0,function(){return""+this.hours()+At(this.minutes(),2)}),Ee("Hmmss",0,0,function(){return""+this.hours()+At(this.minutes(),2)+At(this.seconds(),2)});function qo(n,e){Ee(n,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}qo("a",!0),qo("A",!1);function Ko(n,e){return e._meridiemParse}ge("a",Ko),ge("A",Ko),ge("H",Je,vs),ge("h",Je,Ci),ge("k",Je,Ci),ge("HH",Je,gt),ge("hh",Je,gt),ge("kk",Je,gt),ge("hmm",No),ge("hmmss",Vo),ge("Hmm",No),ge("Hmmss",Vo),qe(["H","HH"],nt),qe(["k","kk"],function(n,e,t){var i=He(n);e[nt]=i===24?0:i}),qe(["a","A"],function(n,e,t){t._isPm=t._locale.isPM(n),t._meridiem=n}),qe(["h","hh"],function(n,e,t){e[nt]=He(n),Oe(t).bigHour=!0}),qe("hmm",function(n,e,t){var i=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i)),Oe(t).bigHour=!0}),qe("hmmss",function(n,e,t){var i=n.length-4,r=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i,2)),e[Wt]=He(n.substr(r)),Oe(t).bigHour=!0}),qe("Hmm",function(n,e,t){var i=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i))}),qe("Hmmss",function(n,e,t){var i=n.length-4,r=n.length-2;e[nt]=He(n.substr(0,i)),e[Dt]=He(n.substr(i,2)),e[Wt]=He(n.substr(r))});function qh(n){return(n+"").toLowerCase().charAt(0)==="p"}var Kh=/[ap]\.?m?\.?/i,Jh=Ei("Hours",!0);function Xh(n,e,t){return n>11?t?"pm":"PM":t?"am":"AM"}var Jo={calendar:Hd,longDateFormat:jd,invalidDate:Gd,ordinal:Ud,dayOfMonthOrdinalParse:qd,relativeTime:Jd,months:hh,monthsShort:Io,week:Sh,weekdays:Oh,weekdaysMin:Lh,weekdaysShort:Uo,meridiemParse:Kh},Ze={},qi={},Ki;function Zh(n,e){var t,i=Math.min(n.length,e.length);for(t=0;t<i;t+=1)if(n[t]!==e[t])return t;return i}function Xo(n){return n&&n.toLowerCase().replace("_","-")}function Qh(n){for(var e=0,t,i,r,s;e<n.length;){for(s=Xo(n[e]).split("-"),t=s.length,i=Xo(n[e+1]),i=i?i.split("-"):null;t>0;){if(r=Dn(s.slice(0,t).join("-")),r)return r;if(i&&i.length>=t&&Zh(s,i)>=t-1)break;t--}e++}return Ki}function ef(n){return!!(n&&n.match("^[^/\\\\]*$"))}function Dn(n){var e=null,t;if(Ze[n]===void 0&&typeof module<"u"&&module&&module.exports&&ef(n))try{e=Ki._abbr,t=require,t("./locale/"+n),ei(e)}catch{Ze[n]=null}return Ze[n]}function ei(n,e){var t;return n&&(ct(e)?t=Yt(n):t=Ss(n,e),t?Ki=t:typeof console<"u"&&console.warn&&console.warn("Locale "+n+" not found. Did you forget to load it?")),Ki._abbr}function Ss(n,e){if(e!==null){var t,i=Jo;if(e.abbr=n,Ze[n]!=null)Lo("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),i=Ze[n]._config;else if(e.parentLocale!=null)if(Ze[e.parentLocale]!=null)i=Ze[e.parentLocale]._config;else if(t=Dn(e.parentLocale),t!=null)i=t._config;else return qi[e.parentLocale]||(qi[e.parentLocale]=[]),qi[e.parentLocale].push({name:n,config:e}),null;return Ze[n]=new ds(cs(i,e)),qi[n]&&qi[n].forEach(function(r){Ss(r.name,r.config)}),ei(n),Ze[n]}else return delete Ze[n],null}function tf(n,e){if(e!=null){var t,i,r=Jo;Ze[n]!=null&&Ze[n].parentLocale!=null?Ze[n].set(cs(Ze[n]._config,e)):(i=Dn(n),i!=null&&(r=i._config),e=cs(r,e),i==null&&(e.abbr=n),t=new ds(e),t.parentLocale=Ze[n],Ze[n]=t),ei(n)}else Ze[n]!=null&&(Ze[n].parentLocale!=null?(Ze[n]=Ze[n].parentLocale,n===ei()&&ei(n)):Ze[n]!=null&&delete Ze[n]);return Ze[n]}function Yt(n){var e;if(n&&n._locale&&n._locale._abbr&&(n=n._locale._abbr),!n)return Ki;if(!Rt(n)){if(e=Dn(n),e)return e;n=[n]}return Qh(n)}function nf(){return hs(Ze)}function xs(n){var e,t=n._a;return t&&Oe(n).overflow===-2&&(e=t[jt]<0||t[jt]>11?jt:t[Ft]<1||t[Ft]>ws(t[st],t[jt])?Ft:t[nt]<0||t[nt]>24||t[nt]===24&&(t[Dt]!==0||t[Wt]!==0||t[li]!==0)?nt:t[Dt]<0||t[Dt]>59?Dt:t[Wt]<0||t[Wt]>59?Wt:t[li]<0||t[li]>999?li:-1,Oe(n)._overflowDayOfYear&&(e<st||e>Ft)&&(e=Ft),Oe(n)._overflowWeeks&&e===-1&&(e=ah),Oe(n)._overflowWeekday&&e===-1&&(e=oh),Oe(n).overflow=e),n}var rf=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,sf=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,af=/Z|[+-]\d\d(?::?\d\d)?/,On=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],_s=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],of=/^\/?Date\((-?\d+)/i,lf=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,uf={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Zo(n){var e,t,i=n._i,r=rf.exec(i)||sf.exec(i),s,a,o,u,c=On.length,d=_s.length;if(r){for(Oe(n).iso=!0,e=0,t=c;e<t;e++)if(On[e][1].exec(r[1])){a=On[e][0],s=On[e][2]!==!1;break}if(a==null){n._isValid=!1;return}if(r[3]){for(e=0,t=d;e<t;e++)if(_s[e][1].exec(r[3])){o=(r[2]||" ")+_s[e][0];break}if(o==null){n._isValid=!1;return}}if(!s&&o!=null){n._isValid=!1;return}if(r[4])if(af.exec(r[4]))u="Z";else{n._isValid=!1;return}n._f=a+(o||"")+(u||""),Rs(n)}else n._isValid=!1}function cf(n,e,t,i,r,s){var a=[df(n),Io.indexOf(e),parseInt(t,10),parseInt(i,10),parseInt(r,10)];return s&&a.push(parseInt(s,10)),a}function df(n){var e=parseInt(n,10);return e<=49?2e3+e:e<=999?1900+e:e}function hf(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function ff(n,e,t){if(n){var i=Uo.indexOf(n),r=new Date(e[0],e[1],e[2]).getDay();if(i!==r)return Oe(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function pf(n,e,t){if(n)return uf[n];if(e)return 0;var i=parseInt(t,10),r=i%100,s=(i-r)/100;return s*60+r}function Qo(n){var e=lf.exec(hf(n._i)),t;if(e){if(t=cf(e[4],e[3],e[2],e[5],e[6],e[7]),!ff(e[1],t,n))return;n._a=t,n._tzm=pf(e[8],e[9],e[10]),n._d=Yi.apply(null,n._a),n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),Oe(n).rfc2822=!0}else n._isValid=!1}function mf(n){var e=of.exec(n._i);if(e!==null){n._d=new Date(+e[1]);return}if(Zo(n),n._isValid===!1)delete n._isValid;else return;if(Qo(n),n._isValid===!1)delete n._isValid;else return;n._strict?n._isValid=!1:he.createFromInputFallback(n)}he.createFromInputFallback=wt("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(n){n._d=new Date(n._i+(n._useUTC?" UTC":""))});function ki(n,e,t){return n??e??t}function gf(n){var e=new Date(he.now());return n._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Ms(n){var e,t,i=[],r,s,a;if(!n._d){for(r=gf(n),n._w&&n._a[Ft]==null&&n._a[jt]==null&&bf(n),n._dayOfYear!=null&&(a=ki(n._a[st],r[st]),(n._dayOfYear>Wi(a)||n._dayOfYear===0)&&(Oe(n)._overflowDayOfYear=!0),t=Yi(a,0,n._dayOfYear),n._a[jt]=t.getUTCMonth(),n._a[Ft]=t.getUTCDate()),e=0;e<3&&n._a[e]==null;++e)n._a[e]=i[e]=r[e];for(;e<7;e++)n._a[e]=i[e]=n._a[e]==null?e===2?1:0:n._a[e];n._a[nt]===24&&n._a[Dt]===0&&n._a[Wt]===0&&n._a[li]===0&&(n._nextDay=!0,n._a[nt]=0),n._d=(n._useUTC?Yi:Eh).apply(null,i),s=n._useUTC?n._d.getUTCDay():n._d.getDay(),n._tzm!=null&&n._d.setUTCMinutes(n._d.getUTCMinutes()-n._tzm),n._nextDay&&(n._a[nt]=24),n._w&&typeof n._w.d<"u"&&n._w.d!==s&&(Oe(n).weekdayMismatch=!0)}}function bf(n){var e,t,i,r,s,a,o,u,c;e=n._w,e.GG!=null||e.W!=null||e.E!=null?(s=1,a=4,t=ki(e.GG,n._a[st],Ui(Xe(),1,4).year),i=ki(e.W,1),r=ki(e.E,1),(r<1||r>7)&&(u=!0)):(s=n._locale._week.dow,a=n._locale._week.doy,c=Ui(Xe(),s,a),t=ki(e.gg,n._a[st],c.year),i=ki(e.w,c.week),e.d!=null?(r=e.d,(r<0||r>6)&&(u=!0)):e.e!=null?(r=e.e+s,(e.e<0||e.e>6)&&(u=!0)):r=s),i<1||i>Gt(t,s,a)?Oe(n)._overflowWeeks=!0:u!=null?Oe(n)._overflowWeekday=!0:(o=Yo(t,i,r,s,a),n._a[st]=o.year,n._dayOfYear=o.dayOfYear)}he.ISO_8601=function(){},he.RFC_2822=function(){};function Rs(n){if(n._f===he.ISO_8601){Zo(n);return}if(n._f===he.RFC_2822){Qo(n);return}n._a=[],Oe(n).empty=!0;var e=""+n._i,t,i,r,s,a,o=e.length,u=0,c,d;for(r=Po(n._f,n._locale).match(fs)||[],d=r.length,t=0;t<d;t++)s=r[t],i=(e.match(nh(s,n))||[])[0],i&&(a=e.substr(0,e.indexOf(i)),a.length>0&&Oe(n).unusedInput.push(a),e=e.slice(e.indexOf(i)+i.length),u+=i.length),yi[s]?(i?Oe(n).empty=!1:Oe(n).unusedTokens.push(s),sh(s,i,n)):n._strict&&!i&&Oe(n).unusedTokens.push(s);Oe(n).charsLeftOver=o-u,e.length>0&&Oe(n).unusedInput.push(e),n._a[nt]<=12&&Oe(n).bigHour===!0&&n._a[nt]>0&&(Oe(n).bigHour=void 0),Oe(n).parsedDateParts=n._a.slice(0),Oe(n).meridiem=n._meridiem,n._a[nt]=vf(n._locale,n._a[nt],n._meridiem),c=Oe(n).era,c!==null&&(n._a[st]=n._locale.erasConvertYear(c,n._a[st])),Ms(n),xs(n)}function vf(n,e,t){var i;return t==null?e:n.meridiemHour!=null?n.meridiemHour(e,t):(n.isPM!=null&&(i=n.isPM(t),i&&e<12&&(e+=12),!i&&e===12&&(e=0)),e)}function yf(n){var e,t,i,r,s,a,o=!1,u=n._f.length;if(u===0){Oe(n).invalidFormat=!0,n._d=new Date(NaN);return}for(r=0;r<u;r++)s=0,a=!1,e=us({},n),n._useUTC!=null&&(e._useUTC=n._useUTC),e._f=n._f[r],Rs(e),os(e)&&(a=!0),s+=Oe(e).charsLeftOver,s+=Oe(e).unusedTokens.length*10,Oe(e).score=s,o?s<i&&(i=s,t=e):(i==null||s<i||a)&&(i=s,t=e,a&&(o=!0));Qt(n,t||e)}function wf(n){if(!n._d){var e=ms(n._i),t=e.day===void 0?e.date:e.day;n._a=Ro([e.year,e.month,t,e.hour,e.minute,e.second,e.millisecond],function(i){return i&&parseInt(i,10)}),Ms(n)}}function Cf(n){var e=new Ii(xs(el(n)));return e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e}function el(n){var e=n._i,t=n._f;return n._locale=n._locale||Yt(n._l),e===null||t===void 0&&e===""?yn({nullInput:!0}):(typeof e=="string"&&(n._i=e=n._locale.preparse(e)),Tt(e)?new Ii(xs(e)):(zi(e)?n._d=e:Rt(t)?yf(n):t?Rs(n):Ef(n),os(n)||(n._d=null),n))}function Ef(n){var e=n._i;ct(e)?n._d=new Date(he.now()):zi(e)?n._d=new Date(e.valueOf()):typeof e=="string"?mf(n):Rt(e)?(n._a=Ro(e.slice(0),function(t){return parseInt(t,10)}),Ms(n)):oi(e)?wf(n):It(e)?n._d=new Date(e):he.createFromInputFallback(n)}function tl(n,e,t,i,r){var s={};return(e===!0||e===!1)&&(i=e,e=void 0),(t===!0||t===!1)&&(i=t,t=void 0),(oi(n)&&ss(n)||Rt(n)&&n.length===0)&&(n=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=r,s._l=t,s._i=n,s._f=e,s._strict=i,Cf(s)}function Xe(n,e,t,i){return tl(n,e,t,i,!1)}var kf=wt("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=Xe.apply(null,arguments);return this.isValid()&&n.isValid()?n<this?this:n:yn()}),Sf=wt("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var n=Xe.apply(null,arguments);return this.isValid()&&n.isValid()?n>this?this:n:yn()});function il(n,e){var t,i;if(e.length===1&&Rt(e[0])&&(e=e[0]),!e.length)return Xe();for(t=e[0],i=1;i<e.length;++i)(!e[i].isValid()||e[i][n](t))&&(t=e[i]);return t}function xf(){var n=[].slice.call(arguments,0);return il("isBefore",n)}function _f(){var n=[].slice.call(arguments,0);return il("isAfter",n)}var Mf=function(){return Date.now?Date.now():+new Date},Ji=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Rf(n){var e,t=!1,i,r=Ji.length;for(e in n)if(je(n,e)&&!(tt.call(Ji,e)!==-1&&(n[e]==null||!isNaN(n[e]))))return!1;for(i=0;i<r;++i)if(n[Ji[i]]){if(t)return!1;parseFloat(n[Ji[i]])!==He(n[Ji[i]])&&(t=!0)}return!0}function Tf(){return this._isValid}function Df(){return Ot(NaN)}function Ln(n){var e=ms(n),t=e.year||0,i=e.quarter||0,r=e.month||0,s=e.week||e.isoWeek||0,a=e.day||0,o=e.hour||0,u=e.minute||0,c=e.second||0,d=e.millisecond||0;this._isValid=Rf(e),this._milliseconds=+d+c*1e3+u*6e4+o*1e3*60*60,this._days=+a+s*7,this._months=+r+i*3+t*12,this._data={},this._locale=Yt(),this._bubble()}function Pn(n){return n instanceof Ln}function Ts(n){return n<0?Math.round(-1*n)*-1:Math.round(n)}function Of(n,e,t){var i=Math.min(n.length,e.length),r=Math.abs(n.length-e.length),s=0,a;for(a=0;a<i;a++)He(n[a])!==He(e[a])&&s++;return s+r}function nl(n,e){Ee(n,0,0,function(){var t=this.utcOffset(),i="+";return t<0&&(t=-t,i="-"),i+At(~~(t/60),2)+e+At(~~t%60,2)})}nl("Z",":"),nl("ZZ",""),ge("Z",_n),ge("ZZ",_n),qe(["Z","ZZ"],function(n,e,t){t._useUTC=!0,t._tzm=Ds(_n,n)});var Lf=/([\+\-]|\d\d)/gi;function Ds(n,e){var t=(e||"").match(n),i,r,s;return t===null?null:(i=t[t.length-1]||[],r=(i+"").match(Lf)||["-",0,0],s=+(r[1]*60)+He(r[2]),s===0?0:r[0]==="+"?s:-s)}function Os(n,e){var t,i;return e._isUTC?(t=e.clone(),i=(Tt(n)||zi(n)?n.valueOf():Xe(n).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+i),he.updateOffset(t,!1),t):Xe(n).local()}function Ls(n){return-Math.round(n._d.getTimezoneOffset())}he.updateOffset=function(){};function Pf(n,e,t){var i=this._offset||0,r;if(!this.isValid())return n!=null?this:NaN;if(n!=null){if(typeof n=="string"){if(n=Ds(_n,n),n===null)return this}else Math.abs(n)<16&&!t&&(n=n*60);return!this._isUTC&&e&&(r=Ls(this)),this._offset=n,this._isUTC=!0,r!=null&&this.add(r,"m"),i!==n&&(!e||this._changeInProgress?ol(this,Ot(n-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,he.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?i:Ls(this)}function Af(n,e){return n!=null?(typeof n!="string"&&(n=-n),this.utcOffset(n,e),this):-this.utcOffset()}function Ff(n){return this.utcOffset(0,n)}function Bf(n){return this._isUTC&&(this.utcOffset(0,n),this._isUTC=!1,n&&this.subtract(Ls(this),"m")),this}function Nf(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var n=Ds(th,this._i);n!=null?this.utcOffset(n):this.utcOffset(0,!0)}return this}function Vf(n){return this.isValid()?(n=n?Xe(n).utcOffset():0,(this.utcOffset()-n)%60===0):!1}function Hf(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zf(){if(!ct(this._isDSTShifted))return this._isDSTShifted;var n={},e;return us(n,this),n=el(n),n._a?(e=n._isUTC?Lt(n._a):Xe(n._a),this._isDSTShifted=this.isValid()&&Of(n._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function If(){return this.isValid()?!this._isUTC:!1}function $f(){return this.isValid()?this._isUTC:!1}function rl(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jf=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Wf=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ot(n,e){var t=n,i=null,r,s,a;return Pn(n)?t={ms:n._milliseconds,d:n._days,M:n._months}:It(n)||!isNaN(+n)?(t={},e?t[e]=+n:t.milliseconds=+n):(i=jf.exec(n))?(r=i[1]==="-"?-1:1,t={y:0,d:He(i[Ft])*r,h:He(i[nt])*r,m:He(i[Dt])*r,s:He(i[Wt])*r,ms:He(Ts(i[li]*1e3))*r}):(i=Wf.exec(n))?(r=i[1]==="-"?-1:1,t={y:ui(i[2],r),M:ui(i[3],r),w:ui(i[4],r),d:ui(i[5],r),h:ui(i[6],r),m:ui(i[7],r),s:ui(i[8],r)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(a=Gf(Xe(t.from),Xe(t.to)),t={},t.ms=a.milliseconds,t.M=a.months),s=new Ln(t),Pn(n)&&je(n,"_locale")&&(s._locale=n._locale),Pn(n)&&je(n,"_isValid")&&(s._isValid=n._isValid),s}Ot.fn=Ln.prototype,Ot.invalid=Df;function ui(n,e){var t=n&&parseFloat(n.replace(",","."));return(isNaN(t)?0:t)*e}function sl(n,e){var t={};return t.months=e.month()-n.month()+(e.year()-n.year())*12,n.clone().add(t.months,"M").isAfter(e)&&--t.months,t.milliseconds=+e-+n.clone().add(t.months,"M"),t}function Gf(n,e){var t;return n.isValid()&&e.isValid()?(e=Os(e,n),n.isBefore(e)?t=sl(n,e):(t=sl(e,n),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function al(n,e){return function(t,i){var r,s;return i!==null&&!isNaN(+i)&&(Lo(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=t,t=i,i=s),r=Ot(t,i),ol(this,r,n),this}}function ol(n,e,t,i){var r=e._milliseconds,s=Ts(e._days),a=Ts(e._months);n.isValid()&&(i=i??!0,a&&jo(n,Gi(n,"Month")+a*t),s&&zo(n,"Date",Gi(n,"Date")+s*t),r&&n._d.setTime(n._d.valueOf()+r*t),i&&he.updateOffset(n,s||a))}var Yf=al(1,"add"),Uf=al(-1,"subtract");function ll(n){return typeof n=="string"||n instanceof String}function qf(n){return Tt(n)||zi(n)||ll(n)||It(n)||Jf(n)||Kf(n)||n===null||n===void 0}function Kf(n){var e=oi(n)&&!ss(n),t=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],r,s,a=i.length;for(r=0;r<a;r+=1)s=i[r],t=t||je(n,s);return e&&t}function Jf(n){var e=Rt(n),t=!1;return e&&(t=n.filter(function(i){return!It(i)&&ll(n)}).length===0),e&&t}function Xf(n){var e=oi(n)&&!ss(n),t=!1,i=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],r,s;for(r=0;r<i.length;r+=1)s=i[r],t=t||je(n,s);return e&&t}function Zf(n,e){var t=n.diff(e,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function Qf(n,e){arguments.length===1&&(arguments[0]?qf(arguments[0])?(n=arguments[0],e=void 0):Xf(arguments[0])&&(e=arguments[0],n=void 0):(n=void 0,e=void 0));var t=n||Xe(),i=Os(t,this).startOf("day"),r=he.calendarFormat(this,i)||"sameElse",s=e&&(Pt(e[r])?e[r].call(this,t):e[r]);return this.format(s||this.localeData().calendar(r,this,Xe(t)))}function ep(){return new Ii(this)}function tp(n,e){var t=Tt(n)?n:Xe(n);return this.isValid()&&t.isValid()?(e=Ct(e)||"millisecond",e==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(e).valueOf()):!1}function ip(n,e){var t=Tt(n)?n:Xe(n);return this.isValid()&&t.isValid()?(e=Ct(e)||"millisecond",e==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(e).valueOf()<t.valueOf()):!1}function np(n,e,t,i){var r=Tt(n)?n:Xe(n),s=Tt(e)?e:Xe(e);return this.isValid()&&r.isValid()&&s.isValid()?(i=i||"()",(i[0]==="("?this.isAfter(r,t):!this.isBefore(r,t))&&(i[1]===")"?this.isBefore(s,t):!this.isAfter(s,t))):!1}function rp(n,e){var t=Tt(n)?n:Xe(n),i;return this.isValid()&&t.isValid()?(e=Ct(e)||"millisecond",e==="millisecond"?this.valueOf()===t.valueOf():(i=t.valueOf(),this.clone().startOf(e).valueOf()<=i&&i<=this.clone().endOf(e).valueOf())):!1}function sp(n,e){return this.isSame(n,e)||this.isAfter(n,e)}function ap(n,e){return this.isSame(n,e)||this.isBefore(n,e)}function op(n,e,t){var i,r,s;if(!this.isValid())return NaN;if(i=Os(n,this),!i.isValid())return NaN;switch(r=(i.utcOffset()-this.utcOffset())*6e4,e=Ct(e),e){case"year":s=An(this,i)/12;break;case"month":s=An(this,i);break;case"quarter":s=An(this,i)/3;break;case"second":s=(this-i)/1e3;break;case"minute":s=(this-i)/6e4;break;case"hour":s=(this-i)/36e5;break;case"day":s=(this-i-r)/864e5;break;case"week":s=(this-i-r)/6048e5;break;default:s=this-i}return t?s:Et(s)}function An(n,e){if(n.date()<e.date())return-An(e,n);var t=(e.year()-n.year())*12+(e.month()-n.month()),i=n.clone().add(t,"months"),r,s;return e-i<0?(r=n.clone().add(t-1,"months"),s=(e-i)/(i-r)):(r=n.clone().add(t+1,"months"),s=(e-i)/(r-i)),-(t+s)||0}he.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",he.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function lp(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function up(n){if(!this.isValid())return null;var e=n!==!0,t=e?this.clone().utc():this;return t.year()<0||t.year()>9999?Cn(t,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Pt(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",Cn(t,"Z")):Cn(t,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function cp(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var n="moment",e="",t,i,r,s;return this.isLocal()||(n=this.utcOffset()===0?"moment.utc":"moment.parseZone",e="Z"),t="["+n+'("]',i=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",r="-MM-DD[T]HH:mm:ss.SSS",s=e+'[")]',this.format(t+i+r+s)}function dp(n){n||(n=this.isUtc()?he.defaultFormatUtc:he.defaultFormat);var e=Cn(this,n);return this.localeData().postformat(e)}function hp(n,e){return this.isValid()&&(Tt(n)&&n.isValid()||Xe(n).isValid())?Ot({to:this,from:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function fp(n){return this.from(Xe(),n)}function pp(n,e){return this.isValid()&&(Tt(n)&&n.isValid()||Xe(n).isValid())?Ot({from:this,to:n}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()}function mp(n){return this.to(Xe(),n)}function ul(n){var e;return n===void 0?this._locale._abbr:(e=Yt(n),e!=null&&(this._locale=e),this)}var cl=wt("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(n){return n===void 0?this.localeData():this.locale(n)});function dl(){return this._locale}var Fn=1e3,Si=60*Fn,Bn=60*Si,hl=(365*400+97)*24*Bn;function xi(n,e){return(n%e+e)%e}function fl(n,e,t){return n<100&&n>=0?new Date(n+400,e,t)-hl:new Date(n,e,t).valueOf()}function pl(n,e,t){return n<100&&n>=0?Date.UTC(n+400,e,t)-hl:Date.UTC(n,e,t)}function gp(n){var e,t;if(n=Ct(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?pl:fl,n){case"year":e=t(this.year(),0,1);break;case"quarter":e=t(this.year(),this.month()-this.month()%3,1);break;case"month":e=t(this.year(),this.month(),1);break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=t(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=xi(e+(this._isUTC?0:this.utcOffset()*Si),Bn);break;case"minute":e=this._d.valueOf(),e-=xi(e,Si);break;case"second":e=this._d.valueOf(),e-=xi(e,Fn);break}return this._d.setTime(e),he.updateOffset(this,!0),this}function bp(n){var e,t;if(n=Ct(n),n===void 0||n==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?pl:fl,n){case"year":e=t(this.year()+1,0,1)-1;break;case"quarter":e=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=t(this.year(),this.month()+1,1)-1;break;case"week":e=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=Bn-xi(e+(this._isUTC?0:this.utcOffset()*Si),Bn)-1;break;case"minute":e=this._d.valueOf(),e+=Si-xi(e,Si)-1;break;case"second":e=this._d.valueOf(),e+=Fn-xi(e,Fn)-1;break}return this._d.setTime(e),he.updateOffset(this,!0),this}function vp(){return this._d.valueOf()-(this._offset||0)*6e4}function yp(){return Math.floor(this.valueOf()/1e3)}function wp(){return new Date(this.valueOf())}function Cp(){var n=this;return[n.year(),n.month(),n.date(),n.hour(),n.minute(),n.second(),n.millisecond()]}function Ep(){var n=this;return{years:n.year(),months:n.month(),date:n.date(),hours:n.hours(),minutes:n.minutes(),seconds:n.seconds(),milliseconds:n.milliseconds()}}function kp(){return this.isValid()?this.toISOString():null}function Sp(){return os(this)}function xp(){return Qt({},Oe(this))}function _p(){return Oe(this).overflow}function Mp(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Ee("N",0,0,"eraAbbr"),Ee("NN",0,0,"eraAbbr"),Ee("NNN",0,0,"eraAbbr"),Ee("NNNN",0,0,"eraName"),Ee("NNNNN",0,0,"eraNarrow"),Ee("y",["y",1],"yo","eraYear"),Ee("y",["yy",2],0,"eraYear"),Ee("y",["yyy",3],0,"eraYear"),Ee("y",["yyyy",4],0,"eraYear"),ge("N",Ps),ge("NN",Ps),ge("NNN",Ps),ge("NNNN",Vp),ge("NNNNN",Hp),qe(["N","NN","NNN","NNNN","NNNNN"],function(n,e,t,i){var r=t._locale.erasParse(n,i,t._strict);r?Oe(t).era=r:Oe(t).invalidEra=n}),ge("y",wi),ge("yy",wi),ge("yyy",wi),ge("yyyy",wi),ge("yo",zp),qe(["y","yy","yyy","yyyy"],st),qe(["yo"],function(n,e,t,i){var r;t._locale._eraYearOrdinalRegex&&(r=n.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?e[st]=t._locale.eraYearOrdinalParse(n,r):e[st]=parseInt(n,10)});function Rp(n,e){var t,i,r,s=this._eras||Yt("en")._eras;for(t=0,i=s.length;t<i;++t){switch(typeof s[t].since){case"string":r=he(s[t].since).startOf("day"),s[t].since=r.valueOf();break}switch(typeof s[t].until){case"undefined":s[t].until=1/0;break;case"string":r=he(s[t].until).startOf("day").valueOf(),s[t].until=r.valueOf();break}}return s}function Tp(n,e,t){var i,r,s=this.eras(),a,o,u;for(n=n.toUpperCase(),i=0,r=s.length;i<r;++i)if(a=s[i].name.toUpperCase(),o=s[i].abbr.toUpperCase(),u=s[i].narrow.toUpperCase(),t)switch(e){case"N":case"NN":case"NNN":if(o===n)return s[i];break;case"NNNN":if(a===n)return s[i];break;case"NNNNN":if(u===n)return s[i];break}else if([a,o,u].indexOf(n)>=0)return s[i]}function Dp(n,e){var t=n.since<=n.until?1:-1;return e===void 0?he(n.since).year():he(n.since).year()+(e-n.offset)*t}function Op(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].name;return""}function Lp(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].narrow;return""}function Pp(){var n,e,t,i=this.localeData().eras();for(n=0,e=i.length;n<e;++n)if(t=this.clone().startOf("day").valueOf(),i[n].since<=t&&t<=i[n].until||i[n].until<=t&&t<=i[n].since)return i[n].abbr;return""}function Ap(){var n,e,t,i,r=this.localeData().eras();for(n=0,e=r.length;n<e;++n)if(t=r[n].since<=r[n].until?1:-1,i=this.clone().startOf("day").valueOf(),r[n].since<=i&&i<=r[n].until||r[n].until<=i&&i<=r[n].since)return(this.year()-he(r[n].since).year())*t+r[n].offset;return this.year()}function Fp(n){return je(this,"_erasNameRegex")||As.call(this),n?this._erasNameRegex:this._erasRegex}function Bp(n){return je(this,"_erasAbbrRegex")||As.call(this),n?this._erasAbbrRegex:this._erasRegex}function Np(n){return je(this,"_erasNarrowRegex")||As.call(this),n?this._erasNarrowRegex:this._erasRegex}function Ps(n,e){return e.erasAbbrRegex(n)}function Vp(n,e){return e.erasNameRegex(n)}function Hp(n,e){return e.erasNarrowRegex(n)}function zp(n,e){return e._eraYearOrdinalRegex||wi}function As(){var n=[],e=[],t=[],i=[],r,s,a,o,u,c=this.eras();for(r=0,s=c.length;r<s;++r)a=$t(c[r].name),o=$t(c[r].abbr),u=$t(c[r].narrow),e.push(a),n.push(o),t.push(u),i.push(a),i.push(o),i.push(u);this._erasRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+e.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}Ee(0,["gg",2],0,function(){return this.weekYear()%100}),Ee(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Nn(n,e){Ee(0,[n,n.length],0,e)}Nn("gggg","weekYear"),Nn("ggggg","weekYear"),Nn("GGGG","isoWeekYear"),Nn("GGGGG","isoWeekYear"),ge("G",xn),ge("g",xn),ge("GG",Je,gt),ge("gg",Je,gt),ge("GGGG",bs,gs),ge("gggg",bs,gs),ge("GGGGG",Sn,En),ge("ggggg",Sn,En),ji(["gggg","ggggg","GGGG","GGGGG"],function(n,e,t,i){e[i.substr(0,2)]=He(n)}),ji(["gg","GG"],function(n,e,t,i){e[i]=he.parseTwoDigitYear(n)});function Ip(n){return ml.call(this,n,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function $p(n){return ml.call(this,n,this.isoWeek(),this.isoWeekday(),1,4)}function jp(){return Gt(this.year(),1,4)}function Wp(){return Gt(this.isoWeekYear(),1,4)}function Gp(){var n=this.localeData()._week;return Gt(this.year(),n.dow,n.doy)}function Yp(){var n=this.localeData()._week;return Gt(this.weekYear(),n.dow,n.doy)}function ml(n,e,t,i,r){var s;return n==null?Ui(this,i,r).year:(s=Gt(n,i,r),e>s&&(e=s),Up.call(this,n,e,t,i,r))}function Up(n,e,t,i,r){var s=Yo(n,e,t,i,r),a=Yi(s.year,0,s.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}Ee("Q",0,"Qo","quarter"),ge("Q",Fo),qe("Q",function(n,e){e[jt]=(He(n)-1)*3});function qp(n){return n==null?Math.ceil((this.month()+1)/3):this.month((n-1)*3+this.month()%3)}Ee("D",["DD",2],"Do","date"),ge("D",Je,Ci),ge("DD",Je,gt),ge("Do",function(n,e){return n?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient}),qe(["D","DD"],Ft),qe("Do",function(n,e){e[Ft]=He(n.match(Je)[0])});var gl=Ei("Date",!0);Ee("DDD",["DDDD",3],"DDDo","dayOfYear"),ge("DDD",kn),ge("DDDD",Bo),qe(["DDD","DDDD"],function(n,e,t){t._dayOfYear=He(n)});function Kp(n){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return n==null?e:this.add(n-e,"d")}Ee("m",["mm",2],0,"minute"),ge("m",Je,vs),ge("mm",Je,gt),qe(["m","mm"],Dt);var Jp=Ei("Minutes",!1);Ee("s",["ss",2],0,"second"),ge("s",Je,vs),ge("ss",Je,gt),qe(["s","ss"],Wt);var Xp=Ei("Seconds",!1);Ee("S",0,0,function(){return~~(this.millisecond()/100)}),Ee(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Ee(0,["SSS",3],0,"millisecond"),Ee(0,["SSSS",4],0,function(){return this.millisecond()*10}),Ee(0,["SSSSS",5],0,function(){return this.millisecond()*100}),Ee(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),Ee(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),Ee(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),Ee(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),ge("S",kn,Fo),ge("SS",kn,gt),ge("SSS",kn,Bo);var ti,bl;for(ti="SSSS";ti.length<=9;ti+="S")ge(ti,wi);function Zp(n,e){e[li]=He(("0."+n)*1e3)}for(ti="S";ti.length<=9;ti+="S")qe(ti,Zp);bl=Ei("Milliseconds",!1),Ee("z",0,0,"zoneAbbr"),Ee("zz",0,0,"zoneName");function Qp(){return this._isUTC?"UTC":""}function em(){return this._isUTC?"Coordinated Universal Time":""}var de=Ii.prototype;de.add=Yf,de.calendar=Qf,de.clone=ep,de.diff=op,de.endOf=bp,de.format=dp,de.from=hp,de.fromNow=fp,de.to=pp,de.toNow=mp,de.get=uh,de.invalidAt=_p,de.isAfter=tp,de.isBefore=ip,de.isBetween=np,de.isSame=rp,de.isSameOrAfter=sp,de.isSameOrBefore=ap,de.isValid=Sp,de.lang=cl,de.locale=ul,de.localeData=dl,de.max=Sf,de.min=kf,de.parsingFlags=xp,de.set=ch,de.startOf=gp,de.subtract=Uf,de.toArray=Cp,de.toObject=Ep,de.toDate=wp,de.toISOString=up,de.inspect=cp,typeof Symbol<"u"&&Symbol.for!=null&&(de[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),de.toJSON=kp,de.toString=lp,de.unix=yp,de.valueOf=vp,de.creationData=Mp,de.eraName=Op,de.eraNarrow=Lp,de.eraAbbr=Pp,de.eraYear=Ap,de.year=Ho,de.isLeapYear=lh,de.weekYear=Ip,de.isoWeekYear=$p,de.quarter=de.quarters=qp,de.month=Wo,de.daysInMonth=yh,de.week=de.weeks=Mh,de.isoWeek=de.isoWeeks=Rh,de.weeksInYear=Gp,de.weeksInWeekYear=Yp,de.isoWeeksInYear=jp,de.isoWeeksInISOWeekYear=Wp,de.date=gl,de.day=de.days=Ih,de.weekday=$h,de.isoWeekday=jh,de.dayOfYear=Kp,de.hour=de.hours=Jh,de.minute=de.minutes=Jp,de.second=de.seconds=Xp,de.millisecond=de.milliseconds=bl,de.utcOffset=Pf,de.utc=Ff,de.local=Bf,de.parseZone=Nf,de.hasAlignedHourOffset=Vf,de.isDST=Hf,de.isLocal=If,de.isUtcOffset=$f,de.isUtc=rl,de.isUTC=rl,de.zoneAbbr=Qp,de.zoneName=em,de.dates=wt("dates accessor is deprecated. Use date instead.",gl),de.months=wt("months accessor is deprecated. Use month instead",Wo),de.years=wt("years accessor is deprecated. Use year instead",Ho),de.zone=wt("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Af),de.isDSTShifted=wt("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zf);function tm(n){return Xe(n*1e3)}function im(){return Xe.apply(null,arguments).parseZone()}function vl(n){return n}var We=ds.prototype;We.calendar=zd,We.longDateFormat=Wd,We.invalidDate=Yd,We.ordinal=Kd,We.preparse=vl,We.postformat=vl,We.relativeTime=Xd,We.pastFuture=Zd,We.set=Vd,We.eras=Rp,We.erasParse=Tp,We.erasConvertYear=Dp,We.erasAbbrRegex=Bp,We.erasNameRegex=Fp,We.erasNarrowRegex=Np,We.months=mh,We.monthsShort=gh,We.monthsParse=vh,We.monthsRegex=Ch,We.monthsShortRegex=wh,We.week=kh,We.firstDayOfYear=_h,We.firstDayOfWeek=xh,We.weekdays=Bh,We.weekdaysMin=Vh,We.weekdaysShort=Nh,We.weekdaysParse=zh,We.weekdaysRegex=Wh,We.weekdaysShortRegex=Gh,We.weekdaysMinRegex=Yh,We.isPM=qh,We.meridiem=Xh;function Vn(n,e,t,i){var r=Yt(),s=Lt().set(i,e);return r[t](s,n)}function yl(n,e,t){if(It(n)&&(e=n,n=void 0),n=n||"",e!=null)return Vn(n,e,t,"month");var i,r=[];for(i=0;i<12;i++)r[i]=Vn(n,i,t,"month");return r}function Fs(n,e,t,i){typeof n=="boolean"?(It(e)&&(t=e,e=void 0),e=e||""):(e=n,t=e,n=!1,It(e)&&(t=e,e=void 0),e=e||"");var r=Yt(),s=n?r._week.dow:0,a,o=[];if(t!=null)return Vn(e,(t+s)%7,i,"day");for(a=0;a<7;a++)o[a]=Vn(e,(a+s)%7,i,"day");return o}function nm(n,e){return yl(n,e,"months")}function rm(n,e){return yl(n,e,"monthsShort")}function sm(n,e,t){return Fs(n,e,t,"weekdays")}function am(n,e,t){return Fs(n,e,t,"weekdaysShort")}function om(n,e,t){return Fs(n,e,t,"weekdaysMin")}ei("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(n){var e=n%10,t=He(n%100/10)===1?"th":e===1?"st":e===2?"nd":e===3?"rd":"th";return n+t}}),he.lang=wt("moment.lang is deprecated. Use moment.locale instead.",ei),he.langData=wt("moment.langData is deprecated. Use moment.localeData instead.",Yt);var Ut=Math.abs;function lm(){var n=this._data;return this._milliseconds=Ut(this._milliseconds),this._days=Ut(this._days),this._months=Ut(this._months),n.milliseconds=Ut(n.milliseconds),n.seconds=Ut(n.seconds),n.minutes=Ut(n.minutes),n.hours=Ut(n.hours),n.months=Ut(n.months),n.years=Ut(n.years),this}function wl(n,e,t,i){var r=Ot(e,t);return n._milliseconds+=i*r._milliseconds,n._days+=i*r._days,n._months+=i*r._months,n._bubble()}function um(n,e){return wl(this,n,e,1)}function cm(n,e){return wl(this,n,e,-1)}function Cl(n){return n<0?Math.floor(n):Math.ceil(n)}function dm(){var n=this._milliseconds,e=this._days,t=this._months,i=this._data,r,s,a,o,u;return n>=0&&e>=0&&t>=0||n<=0&&e<=0&&t<=0||(n+=Cl(Bs(t)+e)*864e5,e=0,t=0),i.milliseconds=n%1e3,r=Et(n/1e3),i.seconds=r%60,s=Et(r/60),i.minutes=s%60,a=Et(s/60),i.hours=a%24,e+=Et(a/24),u=Et(El(e)),t+=u,e-=Cl(Bs(u)),o=Et(t/12),t%=12,i.days=e,i.months=t,i.years=o,this}function El(n){return n*4800/146097}function Bs(n){return n*146097/4800}function hm(n){if(!this.isValid())return NaN;var e,t,i=this._milliseconds;if(n=Ct(n),n==="month"||n==="quarter"||n==="year")switch(e=this._days+i/864e5,t=this._months+El(e),n){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(e=this._days+Math.round(Bs(this._months)),n){case"week":return e/7+i/6048e5;case"day":return e+i/864e5;case"hour":return e*24+i/36e5;case"minute":return e*1440+i/6e4;case"second":return e*86400+i/1e3;case"millisecond":return Math.floor(e*864e5)+i;default:throw new Error("Unknown unit "+n)}}function qt(n){return function(){return this.as(n)}}var kl=qt("ms"),fm=qt("s"),pm=qt("m"),mm=qt("h"),gm=qt("d"),bm=qt("w"),vm=qt("M"),ym=qt("Q"),wm=qt("y"),Cm=kl;function Em(){return Ot(this)}function km(n){return n=Ct(n),this.isValid()?this[n+"s"]():NaN}function ci(n){return function(){return this.isValid()?this._data[n]:NaN}}var Sm=ci("milliseconds"),xm=ci("seconds"),_m=ci("minutes"),Mm=ci("hours"),Rm=ci("days"),Tm=ci("months"),Dm=ci("years");function Om(){return Et(this.days()/7)}var Kt=Math.round,_i={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Lm(n,e,t,i,r){return r.relativeTime(e||1,!!t,n,i)}function Pm(n,e,t,i){var r=Ot(n).abs(),s=Kt(r.as("s")),a=Kt(r.as("m")),o=Kt(r.as("h")),u=Kt(r.as("d")),c=Kt(r.as("M")),d=Kt(r.as("w")),p=Kt(r.as("y")),h=s<=t.ss&&["s",s]||s<t.s&&["ss",s]||a<=1&&["m"]||a<t.m&&["mm",a]||o<=1&&["h"]||o<t.h&&["hh",o]||u<=1&&["d"]||u<t.d&&["dd",u];return t.w!=null&&(h=h||d<=1&&["w"]||d<t.w&&["ww",d]),h=h||c<=1&&["M"]||c<t.M&&["MM",c]||p<=1&&["y"]||["yy",p],h[2]=e,h[3]=+n>0,h[4]=i,Lm.apply(null,h)}function Am(n){return n===void 0?Kt:typeof n=="function"?(Kt=n,!0):!1}function Fm(n,e){return _i[n]===void 0?!1:e===void 0?_i[n]:(_i[n]=e,n==="s"&&(_i.ss=e-1),!0)}function Bm(n,e){if(!this.isValid())return this.localeData().invalidDate();var t=!1,i=_i,r,s;return typeof n=="object"&&(e=n,n=!1),typeof n=="boolean"&&(t=n),typeof e=="object"&&(i=Object.assign({},_i,e),e.s!=null&&e.ss==null&&(i.ss=e.s-1)),r=this.localeData(),s=Pm(this,!t,i,r),t&&(s=r.pastFuture(+this,s)),r.postformat(s)}var Ns=Math.abs;function Mi(n){return(n>0)-(n<0)||+n}function Hn(){if(!this.isValid())return this.localeData().invalidDate();var n=Ns(this._milliseconds)/1e3,e=Ns(this._days),t=Ns(this._months),i,r,s,a,o=this.asSeconds(),u,c,d,p;return o?(i=Et(n/60),r=Et(i/60),n%=60,i%=60,s=Et(t/12),t%=12,a=n?n.toFixed(3).replace(/\.?0+$/,""):"",u=o<0?"-":"",c=Mi(this._months)!==Mi(o)?"-":"",d=Mi(this._days)!==Mi(o)?"-":"",p=Mi(this._milliseconds)!==Mi(o)?"-":"",u+"P"+(s?c+s+"Y":"")+(t?c+t+"M":"")+(e?d+e+"D":"")+(r||i||n?"T":"")+(r?p+r+"H":"")+(i?p+i+"M":"")+(n?p+a+"S":"")):"P0D"}var $e=Ln.prototype;$e.isValid=Tf,$e.abs=lm,$e.add=um,$e.subtract=cm,$e.as=hm,$e.asMilliseconds=kl,$e.asSeconds=fm,$e.asMinutes=pm,$e.asHours=mm,$e.asDays=gm,$e.asWeeks=bm,$e.asMonths=vm,$e.asQuarters=ym,$e.asYears=wm,$e.valueOf=Cm,$e._bubble=dm,$e.clone=Em,$e.get=km,$e.milliseconds=Sm,$e.seconds=xm,$e.minutes=_m,$e.hours=Mm,$e.days=Rm,$e.weeks=Om,$e.months=Tm,$e.years=Dm,$e.humanize=Bm,$e.toISOString=Hn,$e.toString=Hn,$e.toJSON=Hn,$e.locale=ul,$e.localeData=dl,$e.toIsoString=wt("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Hn),$e.lang=cl,Ee("X",0,0,"unix"),Ee("x",0,0,"valueOf"),ge("x",xn),ge("X",ih),qe("X",function(n,e,t){t._d=new Date(parseFloat(n)*1e3)}),qe("x",function(n,e,t){t._d=new Date(He(n))});//! moment.js
|
|
25
|
+
he.version="2.30.1",Bd(Xe),he.fn=de,he.min=xf,he.max=_f,he.now=Mf,he.utc=Lt,he.unix=tm,he.months=nm,he.isDate=zi,he.locale=ei,he.invalid=yn,he.duration=Ot,he.isMoment=Tt,he.weekdays=sm,he.parseZone=im,he.localeData=Yt,he.isDuration=Pn,he.monthsShort=rm,he.weekdaysMin=om,he.defineLocale=Ss,he.updateLocale=tf,he.locales=nf,he.weekdaysShort=am,he.normalizeUnits=Ct,he.relativeTimeRounding=Am,he.relativeTimeThreshold=Fm,he.calendarFormat=Zf,he.prototype=de,he.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const Sl=n=>n===void 0||n==="auto"||n==="instant"||n==="smooth";function Nm(n,e){this.scrollLeft=n,this.scrollTop=e}const xl=(n,e,t="cannot convert to dictionary.")=>`Failed to execute '${n}' on '${e}': ${t}`,_l=(n,e,t)=>xl(n,e,`The provided value '${t}' is not a valid enum value of type ScrollBehavior.`),Ml=(n,e,t)=>{var i;const r=`__SEAMLESS.BACKUP$${e}`;return!n[r]&&n[e]&&!(!((i=n[e])===null||i===void 0)&&i.__isPolyfill)&&(n[r]=n[e]),n[r]||t},Vm=n=>{const e=typeof n;return n!==null&&(e==="object"||e==="function")},Vs=n=>n.ownerDocument.scrollingElement||n.ownerDocument.documentElement;function Hm(n){if(typeof Event=="function")return new Event("scrollend",{bubbles:n,cancelable:!1});const e=document.createEvent("Event");return e.initEvent("scrollend",n,!1),e}const zm=n=>.5*(1-Math.cos(Math.PI*n));function Hs(){var n;let e;return!((n=window.performance)===null||n===void 0)&&n.now?e=()=>window.performance.now():e=()=>window.Date.now(),Hs=e,e()}const Im=500,Rl=n=>{const t=(Hs()-n.timeStamp)/(n.duration||Im);if(t>1){n.method(n.targetX,n.targetY),n.callback();return}const i=(n.timingFunc||zm)(t),r=n.startX+(n.targetX-n.startX)*i,s=n.startY+(n.targetY-n.startY)*i;n.method(r,s),n.rafId=window.requestAnimationFrame(()=>{Rl(n)})},zn=n=>isFinite(n)?Number(n):0,$m=n=>{var e;return(e=n.isConnected)!==null&&e!==void 0?e:!n.ownerDocument||!(n.ownerDocument.compareDocumentPosition(n)&1)},jm=(n,e,t)=>{var i,r;if(!$m(n))return;const s=n.scrollLeft,a=n.scrollTop,o=zn((i=e.left)!==null&&i!==void 0?i:s),u=zn((r=e.top)!==null&&r!==void 0?r:a);if(o===s&&u===a)return;const c=Ml(HTMLElement.prototype,"scroll",Nm),d=Ml(Object.getPrototypeOf(n),"scroll",c).bind(n);if(e.behavior!=="smooth"){d(o,u);return}const p=()=>{window.removeEventListener("wheel",_),window.removeEventListener("touchmove",_)},h=()=>{p();const k=n.nodeType===9;n.dispatchEvent(Hm(k))},f=Object.assign(Object.assign({},t),{timeStamp:Hs(),startX:s,startY:a,targetX:o,targetY:u,rafId:0,method:d,callback:h}),_=()=>{window.cancelAnimationFrame(f.rafId),p()};window.addEventListener("wheel",_,{passive:!0,once:!0}),window.addEventListener("touchmove",_,{passive:!0,once:!0}),Rl(f)},Wm=n=>n.window===n,Gm=(n=>(e,t,i)=>{const[r,s]=Wm(e)?[Vs(e.document.documentElement),"Window"]:[e,"Element"],a=t??{};if(!Vm(a))throw new TypeError(xl(n,s));if(!Sl(a.behavior))throw new TypeError(_l(n,s,a.behavior));n==="scrollBy"&&(a.left=zn(a.left)+r.scrollLeft,a.top=zn(a.top)+r.scrollTop),jm(r,a,i)})("scroll"),Tl=n=>{switch(n){case"horizontal-tb":case"lr":case"lr-tb":case"rl":case"rl-tb":return 0;case"vertical-rl":case"tb":case"tb-rl":return 1;case"vertical-lr":case"tb-lr":return 2;case"sideways-rl":return 3;case"sideways-lr":return 4}return 0},Dl=(n,e,t,i)=>{let r=0;switch(e||(r^=2),n){case 0:r=r>>1|(r&1)<<1,[t,i]=[i,t];break;case 1:case 3:r^=1;break;case 4:r^=2;break}return[r,t,i]},Ym=n=>(Dl(Tl(n.writingMode),n.direction!=="rtl",void 0,void 0)[0]&1)===1,Um=(n,e,t)=>{const[i,r,s]=Dl(e,t,n.block||"start",n.inline||"nearest");return[r,s].map((a,o)=>{switch(a){case"center":return 1;case"nearest":return 0;default:{const u=i>>o&1;return a==="start"==!u?2:3}}})},Ol=(n,e,t,i,r,s,a)=>n!==0?n:r<e&&s>t||r>e&&s<t?null:r<=e&&a<=i||s>=t&&a>=i?2:s>t&&a<i||r<e&&a>i?3:null,Ll=n=>n!=="visible"&&n!=="clip",qm=n=>{var e;try{return((e=n.ownerDocument.defaultView)===null||e===void 0?void 0:e.frameElement)||null}catch{return null}},Km=(n,e)=>n.clientHeight<n.scrollHeight||n.clientWidth<n.scrollWidth?Ll(e.overflowY)||Ll(e.overflowX)||n===Vs(n):!1,Pl=n=>{const e=n.parentNode,t=n.parentElement;if(t===null&&e!==null){if(e.nodeType===11)return e.host;if(e.nodeType===9)return qm(n)}return t},zs=(n,e,t)=>n<e?e:n>t?t:n,Jm=n=>["scroll-margin","scroll-snap-margin"].filter(e=>e in n.documentElement.style)[0],Xm=(n,e,t)=>{const{top:i,right:r,bottom:s,left:a}=e,o=Jm(n.ownerDocument);if(!o)return[i,r,s,a];const u=c=>{const d=t.getPropertyValue(`${o}-${c}`);return parseInt(d,10)||0};return[i-u("top"),r+u("right"),s+u("bottom"),a-u("left")]},In=(n,e,t)=>{switch(n){case 1:return(e+t)/2;case 3:return t;case 2:case 0:return e}},Zm=(n,e)=>{var t,i,r;const s=(t=n.ownerDocument.defaultView)===null||t===void 0?void 0:t.visualViewport,[a,o,u,c]=n===Vs(n)?[0,0,(i=s?.width)!==null&&i!==void 0?i:n.clientWidth,(r=s?.height)!==null&&r!==void 0?r:n.clientHeight]:[e.left,e.top,n.clientWidth,n.clientHeight],d=a+n.clientLeft,p=o+n.clientTop,h=d+u,f=p+c;return[p,h,f,d]},Qm=(n,e)=>{const t=[];let i=n.ownerDocument,r=i.defaultView;if(!r)return t;const s=window.getComputedStyle(n),a=s.direction!=="rtl",o=Tl(s.writingMode||s.getPropertyValue("-webkit-writing-mode")||s.getPropertyValue("-ms-writing-mode")),[u,c]=Um(e,o,a);let[d,p,h,f]=Xm(n,n.getBoundingClientRect(),s);for(let _=Pl(n);_!==null;_=Pl(_)){if(i!==_.ownerDocument){if(i=_.ownerDocument,r=i.defaultView,!r)break;const{left:T,top:M}=_.getBoundingClientRect();d+=M,p+=T,h+=M,f+=T}const k=r.getComputedStyle(_);if(k.position==="fixed")break;if(!Km(_,k))continue;const w=_.getBoundingClientRect(),[y,v,R,m]=Zm(_,w),x=Ol(u,m,v,_.clientWidth,f,p,p-f),g=Ol(c,y,R,_.clientHeight,d,h,h-d),S=x===null?0:In(x,f,p)-In(x,m,v),C=g===null?0:In(g,d,h)-In(g,y,R),E=Ym(k)?zs(S,-_.scrollWidth+_.clientWidth-_.scrollLeft,-_.scrollLeft):zs(S,-_.scrollLeft,_.scrollWidth-_.clientWidth-_.scrollLeft),b=zs(C,-_.scrollTop,_.scrollHeight-_.clientHeight-_.scrollTop);t.push([_,{left:_.scrollLeft+E,top:_.scrollTop+b,behavior:e.behavior}]),d=Math.max(d-b,y),p=Math.min(p-E,v),h=Math.min(h-b,R),f=Math.max(f-E,m)}return t},Al=(n,e,t)=>{const i=e||{};if(!Sl(i.behavior))throw new TypeError(_l("scrollIntoView","Element",i.behavior));Qm(n,i).forEach(([s,a])=>{Gm(s,a,t)})},Fl=(n,e)=>e.some(t=>n.includes(t)),Bl=(n,e)=>e.every(t=>n.includes(t));function Nl(n){return Array.isArray(n)?n.map(e=>({id:e.id,label:e.name,all:e})):[]}function Vl(){setTimeout(()=>{const e=document.querySelectorAll(".not-valid")[0];e&&Al(e,{behavior:"smooth",block:"center"})})}function Hl(n,e){const t=document.querySelector(n);t&&Al(t,{behavior:"smooth",block:"center",...e})}function zl(){return navigator?.language?.split("-")[0]}function Is(){return["ru","en","kz"]}function Il(n){return Is().includes(n)}function $s(n,e){let t;return function(...i){t&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function $l(n,e){let t;return function(...i){t||(n(...i),t=!0,setTimeout(()=>t=!1,e))}}function js(n){const e={};for(const[t,i]of Object.entries(n))i&&(e[t]=i);return e}function jl(n){return n.map(e=>js(e))}function Wl(n){return n.reduce((e,t)=>e+t,0)}const Gl=()=>({alias:"email"}),Yl=(n="ru")=>({ru:{mask:"+7(999)999-99-99"},kz:{mask:"+7(999)999-99-99"},us:{mask:"+1(999)999-9999"}})[n],Ul=()=>({regex:"^[0-9]{10,12}$"}),ql=()=>({mask:"999999999"}),Kl=()=>({mask:"999-999-999 99"}),Jl=()=>({mask:"9999 999999"});function Ws(n){return typeof n!="string"?!1:he(n).isValid()}function Xl(n,e={}){const{withTime:t=!1,locale:i="ru"}=e;if(!n||n.length===0||!Ws(n))return"";const r=new Date(n),s=r.getHours()>=10?r.getHours():`0${r.getHours()}`,a=r.getMinutes()>=10?r.getMinutes():`0${r.getMinutes()}`,o=r.getFullYear(),u=r.getMonth()+1>=10?r.getMonth()+1:`0${r.getMonth()+1}`,c=r.getDate()>=10?r.getDate():`0${r.getDate()}`;return i==="ru"?t?`${c}.${u}.${o} ${s}:${a}`:`${c}.${u}.${o}`:t?`${u}.${c}.${o} ${s}:${a}`:`${u}.${c}.${o}`}function Zl(n,e={}){const{locale:t="ru",currency:i="RUB"}=e,r={ru:"ru-RU",en:"en-US",kz:"kk-KZ"},a={style:"currency",maximumSignificantDigits:2,currency:{ru:"RUB",en:"USD",kz:"KZT"}[t]||i};return new Intl.NumberFormat(r[t]||"en-US",a).format(Number(n))}function Ql(n){return he(new Date).format(n)}function eu(n,e){const t=new Date(n);return t.setDate(t.getDate()+e),t}function tu(n,e){const t=new Date(n);return t.setMonth(t.getMonth()+e),t}function iu(n,e){const t=new Date(n);return t.setFullYear(t.getFullYear()+e),t}function nu(n,e,t,i){let r=Math.abs(n);return r%=100,r>=5&&r<=20?i:(r%=10,r===1?e:r>=2&&r<=4?t:i)}function ru(n){return!n||n.length===0?n:n[0].toUpperCase()+n.slice(1)}function su(n){return n.replace(/\b\w/g,e=>e.toUpperCase())}function au(n){return n.replace(/(?:^\w|[A-Z]|\b\w)/g,(e,t)=>t===0?e.toLowerCase():e.toUpperCase()).replace(/\s+/g,"")}function ou(n){return n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1-$2").toLowerCase()}function lu(n){return n.replace(/([a-z0-9]|(?=[A-Z]))([A-Z])/g,"$1_$2").toLowerCase()}function uu(n,e,t="..."){return n.length<=e?n:n.substring(0,e)+t}function cu(n){let e=n.replace(/\D/g,"").slice(0,8);return e.length>=5?`${e.slice(0,2)}.${e.slice(2,4)}.${e.slice(4)}`:e.length>=3?`${e.slice(0,2)}.${e.slice(2)}`:e}function du({str:n,limit:e=null}){return!e||!n?n:n.substring(0,e)}function hu(n,e){let t="";for(const[i,r]of n.entries()){const s=n.length>i+1?", ":" ";if(t+=`${r.name}${s}`,t.length>e){let a=n.length-(i+1);const o=a>0?`+${a}`:"";t=`${t.substr(0,e)}...${o}`;break}}return t}function fu(n){return[...new Set(n)]}function pu(n,e){return n.reduce((t,i)=>{const r=String(i[e]);return t[r]=t[r]||[],t[r].push(i),t},{})}function mu(n,e,t="asc"){return[...n].sort((i,r)=>{const s=i[e],a=r[e];return s<a?t==="asc"?-1:1:s>a?t==="asc"?1:-1:0})}function gu(n,e){const t=[];for(let i=0;i<n.length;i+=e)t.push(n.slice(i,i+e));return t}function bu(n){return typeof n=="object"&&n!==null}function ii(n){return n===void 0?n:JSON.parse(JSON.stringify(n))}function Gs(n,e){return JSON.stringify(n)===JSON.stringify(e)}function vu(n,e){return n.sort().toString()===e.sort().toString()}function yu(n,e){let t=n.length,i=e.length;if(t!==i)return!1;n.sort(),e.sort();for(let r=0;r<t;r++)if(n[r]!==e[r])return!1;return!0}const wu=n=>{const e=ii(n),t={};for(const[i,r]of Object.entries(e)){const s=i.split(".");let a=t;for(const[u,c]of s.slice(0,-1).entries()){if(!a[c]){const d=Number.isInteger(Number(s[+u+1]));a[c]=d?[]:{}}a=a[c]}const o=s.pop();o&&(a[o]=r)}return t},Ys=n=>{let e=ii(n),t={};for(const i in e){if(typeof e[i]!="object"||e[i]===null){t[i]=e[i];continue}const r=Ys(e[i]);for(const s in r)t[`${i}.${s}`]=r[s]}return t};function Cu(n,e){const t={};return e.forEach(i=>{i in n&&(t[i]=n[i])}),t}function Eu(n,e){const t={...n};return e.forEach(i=>{delete t[i]}),t}function Xi(n,e,t,i=!1){if(i)return l.render(null,n),!0;const r=l.h(e,t);return l.render(r,n),!0}function di(){const n=Date.now(),e=Math.floor(Math.random()*9999);return n+e}function ku(n=""){return`${n}${Date.now()}-${Math.random().toString(36).substr(2,9)}`}function Su(n){throw new Error(`${n} is required.`)}function xu(n){return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n)}function _u(n){return/^[\+]?[1-9][\d]{0,15}$/.test(n.replace(/\D/g,""))}function Mu(n){try{return new URL(n),!0}catch{return!1}}function Ru(n,e){try{localStorage.setItem(n,JSON.stringify(e))}catch(t){console.error("Error saving to localStorage:",t)}}function Tu(n,e){try{const t=localStorage.getItem(n);return t?JSON.parse(t):e||null}catch(t){return console.error("Error reading from localStorage:",t),e||null}}function Du(n){try{localStorage.removeItem(n)}catch(e){console.error("Error removing from localStorage:",e)}}function Ou(n,e){try{sessionStorage.setItem(n,JSON.stringify(e))}catch(t){console.error("Error saving to sessionStorage:",t)}}function Lu(n,e){try{const t=sessionStorage.getItem(n);return t?JSON.parse(t):e||null}catch(t){return console.error("Error reading from sessionStorage:",t),e||null}}function Pu(n){try{sessionStorage.removeItem(n)}catch(e){console.error("Error removing from sessionStorage:",e)}}function Au(n){const e=new Map;return((...t)=>{const i=JSON.stringify(t);if(e.has(i))return e.get(i);const r=n(...t);return e.set(i,r),r})}function Fu(n){let e=!1,t;return((...i)=>(e||(e=!0,t=n(...i)),t))}function Bu(n,e,t){return Math.min(Math.max(n,e),t)}function Nu(n,e,t){return n+(e-n)*t}function Vu(n,e){return Math.floor(Math.random()*(e-n+1))+n}function Hu(n,e){return Math.round(n*Math.pow(10,e))/Math.pow(10,e)}const eg=Object.freeze(Object.defineProperty({__proto__:null,addDays:eu,addMonths:tu,addYears:iu,areArraysEqual:yu,arrayToCutString:hu,camelCase:au,capitalize:su,chunk:gu,clamp:Bu,cutString:du,debounce:$s,default:{prepareSelectOptions:Nl,scrollToError:Vl,scrollToElement:Hl,getBrowserLocale:zl,getSupportedLocales:Is,isValidLocale:Il,debounce:$s,throttle:$l,getValueFromObjectItem:js,getValueFromArr:jl,sumOfArrayNumbers:Wl,initEmailMask:Gl,initPhoneMask:Yl,initInnMask:Ul,initKppMask:ql,initSnilsMask:Kl,initPassportMask:Jl,isValidDate:Ws,formatDate:Xl,formatMoney:Zl,getNowDate:Ql,addDays:eu,addMonths:tu,addYears:iu,getDeclinationFromNumber:nu,firstToUppercase:ru,capitalize:su,camelCase:au,kebabCase:ou,snakeCase:lu,truncate:uu,maskDate:cu,cutString:du,arrayToCutString:hu,findOne:Fl,findAll:Bl,unique:fu,groupBy:pu,sortBy:mu,chunk:gu,isObject:bu,getDeepCopyObject:ii,isEqual:Gs,isArraysEqual:vu,areArraysEqual:yu,unflatenObject:wu,flattenObject:Ys,pick:Cu,omit:Eu,mountSubFilter:Xi,getUniqueKey:di,generateId:ku,required:Su,isValidEmail:xu,isValidPhone:_u,isValidUrl:Mu,setLocalStorage:Ru,getLocalStorage:Tu,removeLocalStorage:Du,setSessionStorage:Ou,getSessionStorage:Lu,removeSessionStorage:Pu,memoize:Au,once:Fu,clamp:Bu,lerp:Nu,random:Vu,roundToDecimals:Hu},findAll:Bl,findOne:Fl,firstToUppercase:ru,flattenObject:Ys,formatDate:Xl,formatMoney:Zl,generateId:ku,getBrowserLocale:zl,getDeclinationFromNumber:nu,getDeepCopyObject:ii,getLocalStorage:Tu,getNowDate:Ql,getSessionStorage:Lu,getSupportedLocales:Is,getUniqueKey:di,getValueFromArr:jl,getValueFromObjectItem:js,groupBy:pu,initEmailMask:Gl,initInnMask:Ul,initKppMask:ql,initPassportMask:Jl,initPhoneMask:Yl,initSnilsMask:Kl,isArraysEqual:vu,isEqual:Gs,isObject:bu,isValidDate:Ws,isValidEmail:xu,isValidLocale:Il,isValidPhone:_u,isValidUrl:Mu,kebabCase:ou,lerp:Nu,maskDate:cu,memoize:Au,mountSubFilter:Xi,omit:Eu,once:Fu,pick:Cu,prepareSelectOptions:Nl,random:Vu,removeLocalStorage:Du,removeSessionStorage:Pu,required:Su,roundToDecimals:Hu,scrollToElement:Hl,scrollToError:Vl,setLocalStorage:Ru,setSessionStorage:Ou,snakeCase:lu,sortBy:mu,sumOfArrayNumbers:Wl,throttle:$l,truncate:uu,unflatenObject:wu,unique:fu},Symbol.toStringTag,{value:"Module"})),tg={class:"lh-1","data-test":"FormError"},hi={__name:"FormError",props:{errors:{type:Array,default:()=>[]}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",tg,[n.errors?.length?(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:0},l.renderList(n.errors,(i,r)=>(l.openBlock(),l.createElementBlock("div",{class:"text-danger small",key:r},l.toDisplayString(i),1))),128)):l.createCommentVNode("",!0)]))}},ig={class:"position-relative"},ng=["value","placeholder","disabled"],$n=Ve({__name:"CustomInput",props:{modelValue:{type:[String,Number],default:""},titleClass:{type:String,default:""},title:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},inputClass:{type:[String,Object],default:""},error:{type:[String,Array],default:""},maskOptions:{type:Object,default:()=>({})},maxNumber:{type:Number,default:null}},emits:["change","blur","update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(null),s=c=>{let d=c.target.value;t.maxNumber!==null&&Number(d)>=t.maxNumber&&(d=t.maxNumber.toString(),c.target.value=d),i("update:modelValue",d)},a=()=>{i("update:modelValue",""),i("change","")},o=()=>{Object.keys(t.maskOptions).length!==0&&r.value&&Fd(t.maskOptions).mask(r.value)};l.onMounted(()=>{o()}),l.watch(()=>t.maskOptions,(c,d)=>{Gs(c,d)||o()},{deep:!0});const u=l.computed(()=>Array.isArray(t.error)?t.error.filter(Boolean):typeof t.error=="string"&&t.error?[t.error]:[]);return(c,d)=>(l.openBlock(),l.createElementBlock("div",null,[n.title?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["mb-1 fw-bold",[n.titleClass]])},l.toDisplayString(n.title),3)):l.createCommentVNode("",!0),l.createElementVNode("div",ig,[l.createElementVNode("input",{ref_key:"inputEl",ref:r,type:"text",class:l.normalizeClass(["form-control outline-none",{[n.inputClass]:n.inputClass,"is-invalid":u.value.length>0}]),value:n.modelValue,placeholder:n.placeholder,disabled:n.disabled,onBlur:d[0]||(d[0]=p=>i("blur")),onInput:s},null,42,ng),n.modelValue&&!n.disabled?(l.openBlock(),l.createElementBlock("i",{key:0,class:"bi bi-x-lg remove-button position-absolute",onClick:a})):l.createCommentVNode("",!0)]),l.createVNode(hi,{errors:u.value},null,8,["errors"])]))}},[["__scopeId","data-v-294d9aac"]]),rg={class:"position-relative"},sg=["type","value"],ag=Ve({__name:"PasswordInput",props:{modelValue:{type:String,default:""},error:{type:[String,Array],default:""},initialVisibility:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n){const e=n,t=l.ref(e.initialVisibility);l.watch(()=>e.initialVisibility,r=>{t.value=r});const i=l.computed(()=>Array.isArray(e.error)?e.error.filter(Boolean):typeof e.error=="string"&&e.error?[e.error]:[]);return(r,s)=>(l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",rg,[l.createElementVNode("input",{class:l.normalizeClass(["form-control password-input outline-none",{"is-invalid":i.value.length>0}]),type:t.value?"text":"password",value:n.modelValue,autocomplete:"new-password",onInput:s[0]||(s[0]=a=>r.$emit("update:modelValue",a.target.value))},null,42,sg),l.createElementVNode("div",{class:"toggle-pass",onClick:s[1]||(s[1]=a=>t.value=!t.value)},[l.createElementVNode("i",{class:l.normalizeClass(["bi",[t.value?"bi-eye-slash-fill":"bi-eye-fill"]]),style:{"font-size":"20px"}},null,2)])]),l.createVNode(hi,{errors:i.value},null,8,["errors"])]))}},[["__scopeId","data-v-7b5f1918"]]),og={class:"form-check d-flex align-items-center"},lg=["id","name","checked"],ug=["for"],cg={__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},name:{type:String,required:!0},label:{type:String,default:""},id:{type:String,default:()=>`checkbox-${Math.random().toString(36).slice(2,9)}`},size:{type:String,default:"sm",validator:n=>["sm","md","lg"].includes(n)},clickableLabel:{type:Boolean,default:!0},indeterminate:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(null),s=l.computed(()=>t.size==="sm"?"5px":t.size==="md"?"10px":t.size==="lg"?"15px":"5px"),a=o=>{i("update:modelValue",o.target.checked)};return l.watch(()=>t.indeterminate,o=>{r.value&&(r.value.indeterminate=o)}),l.onMounted(()=>{r.value&&(r.value.indeterminate=t.indeterminate)}),(o,u)=>(l.openBlock(),l.createElementBlock("div",og,[l.createElementVNode("input",{ref_key:"inputRef",ref:r,class:"form-check-input mr-2 mt-0",type:"checkbox",id:n.id,name:n.name,style:l.normalizeStyle({padding:s.value}),checked:n.modelValue,onChange:a},null,44,lg),n.label?(l.openBlock(),l.createElementBlock("label",{key:0,class:l.normalizeClass(["form-check-label lh-n",{"cursor-pointer":n.clickableLabel}]),for:n.clickableLabel?n.id:void 0},l.toDisplayString(n.label),11,ug)):l.createCommentVNode("",!0)]))}};var dg=Object.defineProperty,hg=Object.defineProperties,fg=Object.getOwnPropertyDescriptors,zu=Object.getOwnPropertySymbols,pg=Object.prototype.hasOwnProperty,mg=Object.prototype.propertyIsEnumerable,Iu=(n,e,t)=>e in n?dg(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Ri=(n,e)=>{for(var t in e||(e={}))pg.call(e,t)&&Iu(n,t,e[t]);if(zu)for(var t of zu(e))mg.call(e,t)&&Iu(n,t,e[t]);return n},$u=(n,e)=>hg(n,fg(e));const gg={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(n){this.autoscroll&&n&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var n;const e=((n=this.$refs.dropdownMenu)==null?void 0:n.children[this.typeAheadPointer])||!1;if(e){const t=this.getDropdownViewport(),{top:i,bottom:r,height:s}=e.getBoundingClientRect();if(i<t.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(r>t.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(t.height-s)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},bg={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let n=0;n<this.filteredOptions.length;n++)if(this.selectable(this.filteredOptions[n])){this.typeAheadPointer=n;break}},open(n){n&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let n=this.typeAheadPointer-1;n>=0;n--)if(this.selectable(this.filteredOptions[n])){this.typeAheadPointer=n;break}},typeAheadDown(){for(let n=this.typeAheadPointer+1;n<this.filteredOptions.length;n++)if(this.selectable(this.filteredOptions[n])){this.typeAheadPointer=n;break}},typeAheadSelect(){const n=this.filteredOptions[this.typeAheadPointer];n&&this.selectable(n)&&this.select(n)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},vg={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(n){this.mutableLoading=n}},methods:{toggleLoading(n=null){return n==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=n}}},Us=(n,e)=>{const t=n.__vccOpts||n;for(const[i,r]of e)t[i]=r;return t},yg={},wg={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},Cg=l.createElementVNode("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),Eg=[Cg];function kg(n,e){return l.openBlock(),l.createElementBlock("svg",wg,Eg)}const Sg=Us(yg,[["render",kg]]),xg={},_g={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Mg=l.createElementVNode("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),Rg=[Mg];function Tg(n,e){return l.openBlock(),l.createElementBlock("svg",_g,Rg)}const Dg=Us(xg,[["render",Tg]]),ju={Deselect:Sg,OpenIndicator:Dg},Og={mounted(n,{instance:e}){if(e.appendToBody){const{height:t,top:i,left:r,width:s}=e.$refs.toggle.getBoundingClientRect();let a=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset;n.unbindPosition=e.calculatePosition(n,e,{width:s+"px",left:a+r+"px",top:o+i+t+"px"}),document.body.appendChild(n)}},unmounted(n,{instance:e}){e.appendToBody&&(n.unbindPosition&&typeof n.unbindPosition=="function"&&n.unbindPosition(),n.parentNode&&n.parentNode.removeChild(n))}};function Lg(n){const e={};return Object.keys(n).sort().forEach(t=>{e[t]=n[t]}),JSON.stringify(e)}let Pg=0;function Ag(){return++Pg}const Fg={components:Ri({},ju),directives:{appendToBody:Og},mixins:[gg,bg,vg],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:n=>n},selectable:{type:Function,default:n=>!0},getOptionLabel:{type:Function,default(n){return typeof n=="object"?n.hasOwnProperty(this.label)?n[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(n)}.
|
|
26
|
+
https://vue-select.org/api/props.html#getoptionlabel`):n}},getOptionKey:{type:Function,default(n){if(typeof n!="object")return n;try{return n.hasOwnProperty("id")?n.id:Lg(n)}catch(e){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.
|
|
27
|
+
https://vue-select.org/api/props.html#getoptionkey`,n,e)}}},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(n,e,t){return(e||"").toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1}},filter:{type:Function,default(n,e){return n.filter(t=>{let i=this.getOptionLabel(t);return typeof i=="number"&&(i=i.toString()),this.filterBy(t,i,e)})}},createOption:{type:Function,default(n){return typeof this.optionList[0]=="object"?{[this.label]:n}:n}},resetOnOptionsChange:{default:!1,validator:n=>["function","boolean"].includes(typeof n)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:n,multiple:e}){return n&&!e}},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:(n,e)=>n},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(n,e,{width:t,top:i,left:r}){n.style.top=i,n.style.left=r,n.style.width=t}},dropdownShouldOpen:{type:Function,default({noDrop:n,open:e,mutableLoading:t}){return n?!1:e&&!t}},uid:{type:[String,Number],default:()=>Ag()}},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 n=this.modelValue;return this.isTrackingValues&&(n=this.$data._value),n!=null&&n!==""?[].concat(n):[]},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 n={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:Ri({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:e=>this.search=e.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:n,listFooter:n,header:$u(Ri({},n),{deselect:this.deselect}),footer:$u(Ri({},n),{deselect:this.deselect})}},childComponents(){return Ri(Ri({},ju),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 n=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return n;const e=this.search.length?this.filter(n,this.search,this):n;if(this.taggable&&this.search.length){const t=this.createOption(this.search);this.optionExists(t)||e.unshift(t)}return e},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(n,e){const t=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(n,e,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&t()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(n){this.isTrackingValues&&this.setInternalValueFromOptions(n)}},multiple(){this.clearSelection()},open(n){this.$emit(n?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(n){Array.isArray(n)?this.$data._value=n.map(e=>this.findOptionFromReducedValue(e)):this.$data._value=this.findOptionFromReducedValue(n)},select(n){this.$emit("option:selecting",n),this.isOptionSelected(n)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(n):(this.taggable&&!this.optionExists(n)&&(this.$emit("option:created",n),this.pushTag(n)),this.multiple&&(n=this.selectedValue.concat(n)),this.updateValue(n),this.$emit("option:selected",n)),this.onAfterSelect(n)},deselect(n){this.$emit("option:deselecting",n),this.updateValue(this.selectedValue.filter(e=>!this.optionComparator(e,n))),this.$emit("option:deselected",n)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(n){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(n){typeof this.modelValue>"u"&&(this.$data._value=n),n!==null&&(Array.isArray(n)?n=n.map(e=>this.reduce(e)):n=this.reduce(n)),this.$emit("update:modelValue",n)},toggleDropdown(n){const e=n.target!==this.searchEl;e&&n.preventDefault();const t=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||t.filter(Boolean).some(i=>i.contains(n.target)||i===n.target)){n.preventDefault();return}this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(n){return this.selectedValue.some(e=>this.optionComparator(e,n))},isOptionDeselectable(n){return this.isOptionSelected(n)&&this.deselectFromDropdown},optionComparator(n,e){return this.getOptionKey(n)===this.getOptionKey(e)},findOptionFromReducedValue(n){const e=i=>JSON.stringify(this.reduce(i))===JSON.stringify(n),t=[...this.options,...this.pushedTags].filter(e);return t.length===1?t[0]:t.find(i=>this.optionComparator(i,this.$data._value))||n},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let n=null;this.multiple&&(n=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(n)}},optionExists(n){return this.optionList.some(e=>this.optionComparator(e,n))},normalizeOptionForSlot(n){return typeof n=="object"?n:{[this.label]:n}},pushTag(n){this.pushedTags.push(n)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:n,multiple:e}=this;this.clearSearchOnBlur({clearSearchOnSelect:n,multiple:e})&&(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(n){const e=r=>(r.preventDefault(),!this.isComposing&&this.typeAheadSelect()),t={8:r=>this.maybeDeleteValue(),9:r=>this.onTab(),27:r=>this.onEscape(),38:r=>(r.preventDefault(),this.typeAheadUp()),40:r=>(r.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(r=>t[r]=e);const i=this.mapKeydown(t,this);if(typeof i[n.keyCode]=="function")return i[n.keyCode](n)}}},Bg=["dir"],Ng=["id","aria-expanded","aria-owns"],Vg={ref:"selectedOptions",class:"vs__selected-options"},Hg=["disabled","title","aria-label","onClick"],zg={ref:"actions",class:"vs__actions"},Ig=["disabled"],$g={class:"vs__spinner"},jg=["id"],Wg=["id","aria-selected","onMouseover","onClick"],Gg={key:0,class:"vs__no-options"},Yg=l.createTextVNode(" Sorry, no matching options. "),Ug=["id"];function qg(n,e,t,i,r,s){const a=l.resolveDirective("append-to-body");return l.openBlock(),l.createElementBlock("div",{dir:t.dir,class:l.normalizeClass(["v-select",s.stateClasses])},[l.renderSlot(n.$slots,"header",l.normalizeProps(l.guardReactiveProps(s.scope.header))),l.createElementVNode("div",{id:`vs${t.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":s.dropdownOpen.toString(),"aria-owns":`vs${t.uid}__listbox`,"aria-label":"Search for option",onMousedown:e[1]||(e[1]=o=>s.toggleDropdown(o))},[l.createElementVNode("div",Vg,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.selectedValue,(o,u)=>l.renderSlot(n.$slots,"selected-option-container",{option:s.normalizeOptionForSlot(o),deselect:s.deselect,multiple:t.multiple,disabled:t.disabled},()=>[(l.openBlock(),l.createElementBlock("span",{key:t.getOptionKey(o),class:"vs__selected"},[l.renderSlot(n.$slots,"selected-option",l.normalizeProps(l.guardReactiveProps(s.normalizeOptionForSlot(o))),()=>[l.createTextVNode(l.toDisplayString(t.getOptionLabel(o)),1)]),t.multiple?(l.openBlock(),l.createElementBlock("button",{key:0,ref_for:!0,ref:c=>r.deselectButtons[u]=c,disabled:t.disabled,type:"button",class:"vs__deselect",title:`Deselect ${t.getOptionLabel(o)}`,"aria-label":`Deselect ${t.getOptionLabel(o)}`,onClick:c=>s.deselect(o)},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.childComponents.Deselect)))],8,Hg)):l.createCommentVNode("",!0)]))])),256)),l.renderSlot(n.$slots,"search",l.normalizeProps(l.guardReactiveProps(s.scope.search)),()=>[l.createElementVNode("input",l.mergeProps({class:"vs__search"},s.scope.search.attributes,l.toHandlers(s.scope.search.events)),null,16)])],512),l.createElementVNode("div",zg,[l.withDirectives(l.createElementVNode("button",{ref:"clearButton",disabled:t.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:e[0]||(e[0]=(...o)=>s.clearSelection&&s.clearSelection(...o))},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.childComponents.Deselect)))],8,Ig),[[l.vShow,s.showClearButton]]),l.renderSlot(n.$slots,"open-indicator",l.normalizeProps(l.guardReactiveProps(s.scope.openIndicator)),()=>[t.noDrop?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(l.resolveDynamicComponent(s.childComponents.OpenIndicator),l.normalizeProps(l.mergeProps({key:0},s.scope.openIndicator.attributes)),null,16))]),l.renderSlot(n.$slots,"spinner",l.normalizeProps(l.guardReactiveProps(s.scope.spinner)),()=>[l.withDirectives(l.createElementVNode("div",$g,"Loading...",512),[[l.vShow,n.mutableLoading]])])],512)],40,Ng),l.createVNode(l.Transition,{name:t.transition},{default:l.withCtx(()=>[s.dropdownOpen?l.withDirectives((l.openBlock(),l.createElementBlock("ul",{id:`vs${t.uid}__listbox`,ref:"dropdownMenu",key:`vs${t.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:e[2]||(e[2]=l.withModifiers((...o)=>s.onMousedown&&s.onMousedown(...o),["prevent"])),onMouseup:e[3]||(e[3]=(...o)=>s.onMouseUp&&s.onMouseUp(...o))},[l.renderSlot(n.$slots,"list-header",l.normalizeProps(l.guardReactiveProps(s.scope.listHeader))),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.filteredOptions,(o,u)=>(l.openBlock(),l.createElementBlock("li",{id:`vs${t.uid}__option-${u}`,key:t.getOptionKey(o),role:"option",class:l.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":s.isOptionDeselectable(o)&&u===n.typeAheadPointer,"vs__dropdown-option--selected":s.isOptionSelected(o),"vs__dropdown-option--highlight":u===n.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(o)}]),"aria-selected":u===n.typeAheadPointer?!0:null,onMouseover:c=>t.selectable(o)?n.typeAheadPointer=u:null,onClick:l.withModifiers(c=>t.selectable(o)?s.select(o):null,["prevent","stop"])},[l.renderSlot(n.$slots,"option",l.normalizeProps(l.guardReactiveProps(s.normalizeOptionForSlot(o))),()=>[l.createTextVNode(l.toDisplayString(t.getOptionLabel(o)),1)])],42,Wg))),128)),s.filteredOptions.length===0?(l.openBlock(),l.createElementBlock("li",Gg,[l.renderSlot(n.$slots,"no-options",l.normalizeProps(l.guardReactiveProps(s.scope.noOptions)),()=>[Yg])])):l.createCommentVNode("",!0),l.renderSlot(n.$slots,"list-footer",l.normalizeProps(l.guardReactiveProps(s.scope.listFooter)))],40,jg)),[[a]]):(l.openBlock(),l.createElementBlock("ul",{key:1,id:`vs${t.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,Ug))]),_:3},8,["name"]),l.renderSlot(n.$slots,"footer",l.normalizeProps(l.guardReactiveProps(s.scope.footer)))],10,Bg)}const Kg=Us(Fg,[["render",qg]]);var dt="top",kt="bottom",St="right",ht="left",qs="auto",Zi=[dt,kt,St,ht],Ti="start",Qi="end",Jg="clippingParents",Wu="viewport",en="popper",Xg="reference",Gu=Zi.reduce(function(n,e){return n.concat([e+"-"+Ti,e+"-"+Qi])},[]),Yu=[].concat(Zi,[qs]).reduce(function(n,e){return n.concat([e,e+"-"+Ti,e+"-"+Qi])},[]),Zg="beforeRead",Qg="read",eb="afterRead",tb="beforeMain",ib="main",nb="afterMain",rb="beforeWrite",sb="write",ab="afterWrite",ob=[Zg,Qg,eb,tb,ib,nb,rb,sb,ab];function Bt(n){return n?(n.nodeName||"").toLowerCase():null}function bt(n){if(n==null)return window;if(n.toString()!=="[object Window]"){var e=n.ownerDocument;return e&&e.defaultView||window}return n}function fi(n){var e=bt(n).Element;return n instanceof e||n instanceof Element}function xt(n){var e=bt(n).HTMLElement;return n instanceof e||n instanceof HTMLElement}function Ks(n){if(typeof ShadowRoot>"u")return!1;var e=bt(n).ShadowRoot;return n instanceof e||n instanceof ShadowRoot}function lb(n){var e=n.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},r=e.attributes[t]||{},s=e.elements[t];!xt(s)||!Bt(s)||(Object.assign(s.style,i),Object.keys(r).forEach(function(a){var o=r[a];o===!1?s.removeAttribute(a):s.setAttribute(a,o===!0?"":o)}))})}function ub(n){var e=n.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var r=e.elements[i],s=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(u,c){return u[c]="",u},{});!xt(r)||!Bt(r)||(Object.assign(r.style,o),Object.keys(s).forEach(function(u){r.removeAttribute(u)}))})}}const cb={name:"applyStyles",enabled:!0,phase:"write",fn:lb,effect:ub,requires:["computeStyles"]};function Nt(n){return n.split("-")[0]}var pi=Math.max,jn=Math.min,Di=Math.round;function Js(){var n=navigator.userAgentData;return n!=null&&n.brands&&Array.isArray(n.brands)?n.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Uu(){return!/^((?!chrome|android).)*safari/i.test(Js())}function Oi(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=n.getBoundingClientRect(),r=1,s=1;e&&xt(n)&&(r=n.offsetWidth>0&&Di(i.width)/n.offsetWidth||1,s=n.offsetHeight>0&&Di(i.height)/n.offsetHeight||1);var a=fi(n)?bt(n):window,o=a.visualViewport,u=!Uu()&&t,c=(i.left+(u&&o?o.offsetLeft:0))/r,d=(i.top+(u&&o?o.offsetTop:0))/s,p=i.width/r,h=i.height/s;return{width:p,height:h,top:d,right:c+p,bottom:d+h,left:c,x:c,y:d}}function Xs(n){var e=Oi(n),t=n.offsetWidth,i=n.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:n.offsetLeft,y:n.offsetTop,width:t,height:i}}function qu(n,e){var t=e.getRootNode&&e.getRootNode();if(n.contains(e))return!0;if(t&&Ks(t)){var i=e;do{if(i&&n.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Jt(n){return bt(n).getComputedStyle(n)}function db(n){return["table","td","th"].indexOf(Bt(n))>=0}function ni(n){return((fi(n)?n.ownerDocument:n.document)||window.document).documentElement}function Wn(n){return Bt(n)==="html"?n:n.assignedSlot||n.parentNode||(Ks(n)?n.host:null)||ni(n)}function Ku(n){return!xt(n)||Jt(n).position==="fixed"?null:n.offsetParent}function hb(n){var e=/firefox/i.test(Js()),t=/Trident/i.test(Js());if(t&&xt(n)){var i=Jt(n);if(i.position==="fixed")return null}var r=Wn(n);for(Ks(r)&&(r=r.host);xt(r)&&["html","body"].indexOf(Bt(r))<0;){var s=Jt(r);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return r;r=r.parentNode}return null}function tn(n){for(var e=bt(n),t=Ku(n);t&&db(t)&&Jt(t).position==="static";)t=Ku(t);return t&&(Bt(t)==="html"||Bt(t)==="body"&&Jt(t).position==="static")?e:t||hb(n)||e}function Zs(n){return["top","bottom"].indexOf(n)>=0?"x":"y"}function nn(n,e,t){return pi(n,jn(e,t))}function fb(n,e,t){var i=nn(n,e,t);return i>t?t:i}function Ju(){return{top:0,right:0,bottom:0,left:0}}function Xu(n){return Object.assign({},Ju(),n)}function Zu(n,e){return e.reduce(function(t,i){return t[i]=n,t},{})}var pb=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Xu(typeof e!="number"?e:Zu(e,Zi))};function mb(n){var e,t=n.state,i=n.name,r=n.options,s=t.elements.arrow,a=t.modifiersData.popperOffsets,o=Nt(t.placement),u=Zs(o),c=[ht,St].indexOf(o)>=0,d=c?"height":"width";if(!(!s||!a)){var p=pb(r.padding,t),h=Xs(s),f=u==="y"?dt:ht,_=u==="y"?kt:St,k=t.rects.reference[d]+t.rects.reference[u]-a[u]-t.rects.popper[d],w=a[u]-t.rects.reference[u],y=tn(s),v=y?u==="y"?y.clientHeight||0:y.clientWidth||0:0,R=k/2-w/2,m=p[f],x=v-h[d]-p[_],g=v/2-h[d]/2+R,S=nn(m,g,x),C=u;t.modifiersData[i]=(e={},e[C]=S,e.centerOffset=S-g,e)}}function gb(n){var e=n.state,t=n.options,i=t.element,r=i===void 0?"[data-popper-arrow]":i;r!=null&&(typeof r=="string"&&(r=e.elements.popper.querySelector(r),!r)||qu(e.elements.popper,r)&&(e.elements.arrow=r))}const bb={name:"arrow",enabled:!0,phase:"main",fn:mb,effect:gb,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Li(n){return n.split("-")[1]}var vb={top:"auto",right:"auto",bottom:"auto",left:"auto"};function yb(n,e){var t=n.x,i=n.y,r=e.devicePixelRatio||1;return{x:Di(t*r)/r||0,y:Di(i*r)/r||0}}function Qu(n){var e,t=n.popper,i=n.popperRect,r=n.placement,s=n.variation,a=n.offsets,o=n.position,u=n.gpuAcceleration,c=n.adaptive,d=n.roundOffsets,p=n.isFixed,h=a.x,f=h===void 0?0:h,_=a.y,k=_===void 0?0:_,w=typeof d=="function"?d({x:f,y:k}):{x:f,y:k};f=w.x,k=w.y;var y=a.hasOwnProperty("x"),v=a.hasOwnProperty("y"),R=ht,m=dt,x=window;if(c){var g=tn(t),S="clientHeight",C="clientWidth";if(g===bt(t)&&(g=ni(t),Jt(g).position!=="static"&&o==="absolute"&&(S="scrollHeight",C="scrollWidth")),g=g,r===dt||(r===ht||r===St)&&s===Qi){m=kt;var E=p&&g===x&&x.visualViewport?x.visualViewport.height:g[S];k-=E-i.height,k*=u?1:-1}if(r===ht||(r===dt||r===kt)&&s===Qi){R=St;var b=p&&g===x&&x.visualViewport?x.visualViewport.width:g[C];f-=b-i.width,f*=u?1:-1}}var T=Object.assign({position:o},c&&vb),M=d===!0?yb({x:f,y:k},bt(t)):{x:f,y:k};if(f=M.x,k=M.y,u){var O;return Object.assign({},T,(O={},O[m]=v?"0":"",O[R]=y?"0":"",O.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+k+"px)":"translate3d("+f+"px, "+k+"px, 0)",O))}return Object.assign({},T,(e={},e[m]=v?k+"px":"",e[R]=y?f+"px":"",e.transform="",e))}function wb(n){var e=n.state,t=n.options,i=t.gpuAcceleration,r=i===void 0?!0:i,s=t.adaptive,a=s===void 0?!0:s,o=t.roundOffsets,u=o===void 0?!0:o,c={placement:Nt(e.placement),variation:Li(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:r,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Qu(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Qu(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const Cb={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:wb,data:{}};var Gn={passive:!0};function Eb(n){var e=n.state,t=n.instance,i=n.options,r=i.scroll,s=r===void 0?!0:r,a=i.resize,o=a===void 0?!0:a,u=bt(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&c.forEach(function(d){d.addEventListener("scroll",t.update,Gn)}),o&&u.addEventListener("resize",t.update,Gn),function(){s&&c.forEach(function(d){d.removeEventListener("scroll",t.update,Gn)}),o&&u.removeEventListener("resize",t.update,Gn)}}const kb={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Eb,data:{}};var Sb={left:"right",right:"left",bottom:"top",top:"bottom"};function Yn(n){return n.replace(/left|right|bottom|top/g,function(e){return Sb[e]})}var xb={start:"end",end:"start"};function ec(n){return n.replace(/start|end/g,function(e){return xb[e]})}function Qs(n){var e=bt(n),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function ea(n){return Oi(ni(n)).left+Qs(n).scrollLeft}function _b(n,e){var t=bt(n),i=ni(n),r=t.visualViewport,s=i.clientWidth,a=i.clientHeight,o=0,u=0;if(r){s=r.width,a=r.height;var c=Uu();(c||!c&&e==="fixed")&&(o=r.offsetLeft,u=r.offsetTop)}return{width:s,height:a,x:o+ea(n),y:u}}function Mb(n){var e,t=ni(n),i=Qs(n),r=(e=n.ownerDocument)==null?void 0:e.body,s=pi(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=pi(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-i.scrollLeft+ea(n),u=-i.scrollTop;return Jt(r||t).direction==="rtl"&&(o+=pi(t.clientWidth,r?r.clientWidth:0)-s),{width:s,height:a,x:o,y:u}}function ta(n){var e=Jt(n),t=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+r+i)}function tc(n){return["html","body","#document"].indexOf(Bt(n))>=0?n.ownerDocument.body:xt(n)&&ta(n)?n:tc(Wn(n))}function rn(n,e){var t;e===void 0&&(e=[]);var i=tc(n),r=i===((t=n.ownerDocument)==null?void 0:t.body),s=bt(i),a=r?[s].concat(s.visualViewport||[],ta(i)?i:[]):i,o=e.concat(a);return r?o:o.concat(rn(Wn(a)))}function ia(n){return Object.assign({},n,{left:n.x,top:n.y,right:n.x+n.width,bottom:n.y+n.height})}function Rb(n,e){var t=Oi(n,!1,e==="fixed");return t.top=t.top+n.clientTop,t.left=t.left+n.clientLeft,t.bottom=t.top+n.clientHeight,t.right=t.left+n.clientWidth,t.width=n.clientWidth,t.height=n.clientHeight,t.x=t.left,t.y=t.top,t}function ic(n,e,t){return e===Wu?ia(_b(n,t)):fi(e)?Rb(e,t):ia(Mb(ni(n)))}function Tb(n){var e=rn(Wn(n)),t=["absolute","fixed"].indexOf(Jt(n).position)>=0,i=t&&xt(n)?tn(n):n;return fi(i)?e.filter(function(r){return fi(r)&&qu(r,i)&&Bt(r)!=="body"}):[]}function Db(n,e,t,i){var r=e==="clippingParents"?Tb(n):[].concat(e),s=[].concat(r,[t]),a=s[0],o=s.reduce(function(u,c){var d=ic(n,c,i);return u.top=pi(d.top,u.top),u.right=jn(d.right,u.right),u.bottom=jn(d.bottom,u.bottom),u.left=pi(d.left,u.left),u},ic(n,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function nc(n){var e=n.reference,t=n.element,i=n.placement,r=i?Nt(i):null,s=i?Li(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,u;switch(r){case dt:u={x:a,y:e.y-t.height};break;case kt:u={x:a,y:e.y+e.height};break;case St:u={x:e.x+e.width,y:o};break;case ht:u={x:e.x-t.width,y:o};break;default:u={x:e.x,y:e.y}}var c=r?Zs(r):null;if(c!=null){var d=c==="y"?"height":"width";switch(s){case Ti:u[c]=u[c]-(e[d]/2-t[d]/2);break;case Qi:u[c]=u[c]+(e[d]/2-t[d]/2);break}}return u}function sn(n,e){e===void 0&&(e={});var t=e,i=t.placement,r=i===void 0?n.placement:i,s=t.strategy,a=s===void 0?n.strategy:s,o=t.boundary,u=o===void 0?Jg:o,c=t.rootBoundary,d=c===void 0?Wu:c,p=t.elementContext,h=p===void 0?en:p,f=t.altBoundary,_=f===void 0?!1:f,k=t.padding,w=k===void 0?0:k,y=Xu(typeof w!="number"?w:Zu(w,Zi)),v=h===en?Xg:en,R=n.rects.popper,m=n.elements[_?v:h],x=Db(fi(m)?m:m.contextElement||ni(n.elements.popper),u,d,a),g=Oi(n.elements.reference),S=nc({reference:g,element:R,placement:r}),C=ia(Object.assign({},R,S)),E=h===en?C:g,b={top:x.top-E.top+y.top,bottom:E.bottom-x.bottom+y.bottom,left:x.left-E.left+y.left,right:E.right-x.right+y.right},T=n.modifiersData.offset;if(h===en&&T){var M=T[r];Object.keys(b).forEach(function(O){var F=[St,kt].indexOf(O)>=0?1:-1,z=[dt,kt].indexOf(O)>=0?"y":"x";b[O]+=M[z]*F})}return b}function Ob(n,e){e===void 0&&(e={});var t=e,i=t.placement,r=t.boundary,s=t.rootBoundary,a=t.padding,o=t.flipVariations,u=t.allowedAutoPlacements,c=u===void 0?Yu:u,d=Li(i),p=d?o?Gu:Gu.filter(function(_){return Li(_)===d}):Zi,h=p.filter(function(_){return c.indexOf(_)>=0});h.length===0&&(h=p);var f=h.reduce(function(_,k){return _[k]=sn(n,{placement:k,boundary:r,rootBoundary:s,padding:a})[Nt(k)],_},{});return Object.keys(f).sort(function(_,k){return f[_]-f[k]})}function Lb(n){if(Nt(n)===qs)return[];var e=Yn(n);return[ec(n),e,ec(e)]}function Pb(n){var e=n.state,t=n.options,i=n.name;if(!e.modifiersData[i]._skip){for(var r=t.mainAxis,s=r===void 0?!0:r,a=t.altAxis,o=a===void 0?!0:a,u=t.fallbackPlacements,c=t.padding,d=t.boundary,p=t.rootBoundary,h=t.altBoundary,f=t.flipVariations,_=f===void 0?!0:f,k=t.allowedAutoPlacements,w=e.options.placement,y=Nt(w),v=y===w,R=u||(v||!_?[Yn(w)]:Lb(w)),m=[w].concat(R).reduce(function(U,Z){return U.concat(Nt(Z)===qs?Ob(e,{placement:Z,boundary:d,rootBoundary:p,padding:c,flipVariations:_,allowedAutoPlacements:k}):Z)},[]),x=e.rects.reference,g=e.rects.popper,S=new Map,C=!0,E=m[0],b=0;b<m.length;b++){var T=m[b],M=Nt(T),O=Li(T)===Ti,F=[dt,kt].indexOf(M)>=0,z=F?"width":"height",$=sn(e,{placement:T,boundary:d,rootBoundary:p,altBoundary:h,padding:c}),H=F?O?St:ht:O?kt:dt;x[z]>g[z]&&(H=Yn(H));var V=Yn(H),Y=[];if(s&&Y.push($[M]<=0),o&&Y.push($[H]<=0,$[V]<=0),Y.every(function(U){return U})){E=T,C=!1;break}S.set(T,Y)}if(C)for(var D=_?3:1,P=function(Z){var j=m.find(function(ne){var G=S.get(ne);if(G)return G.slice(0,Z).every(function(B){return B})});if(j)return E=j,"break"},I=D;I>0;I--){var N=P(I);if(N==="break")break}e.placement!==E&&(e.modifiersData[i]._skip=!0,e.placement=E,e.reset=!0)}}const Ab={name:"flip",enabled:!0,phase:"main",fn:Pb,requiresIfExists:["offset"],data:{_skip:!1}};function rc(n,e,t){return t===void 0&&(t={x:0,y:0}),{top:n.top-e.height-t.y,right:n.right-e.width+t.x,bottom:n.bottom-e.height+t.y,left:n.left-e.width-t.x}}function sc(n){return[dt,St,kt,ht].some(function(e){return n[e]>=0})}function Fb(n){var e=n.state,t=n.name,i=e.rects.reference,r=e.rects.popper,s=e.modifiersData.preventOverflow,a=sn(e,{elementContext:"reference"}),o=sn(e,{altBoundary:!0}),u=rc(a,i),c=rc(o,r,s),d=sc(u),p=sc(c);e.modifiersData[t]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:p},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":p})}const Bb={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Fb};function Nb(n,e,t){var i=Nt(n),r=[ht,dt].indexOf(i)>=0?-1:1,s=typeof t=="function"?t(Object.assign({},e,{placement:n})):t,a=s[0],o=s[1];return a=a||0,o=(o||0)*r,[ht,St].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function Vb(n){var e=n.state,t=n.options,i=n.name,r=t.offset,s=r===void 0?[0,0]:r,a=Yu.reduce(function(d,p){return d[p]=Nb(p,e.rects,s),d},{}),o=a[e.placement],u=o.x,c=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=a}const Hb={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Vb};function zb(n){var e=n.state,t=n.name;e.modifiersData[t]=nc({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Ib={name:"popperOffsets",enabled:!0,phase:"read",fn:zb,data:{}};function $b(n){return n==="x"?"y":"x"}function jb(n){var e=n.state,t=n.options,i=n.name,r=t.mainAxis,s=r===void 0?!0:r,a=t.altAxis,o=a===void 0?!1:a,u=t.boundary,c=t.rootBoundary,d=t.altBoundary,p=t.padding,h=t.tether,f=h===void 0?!0:h,_=t.tetherOffset,k=_===void 0?0:_,w=sn(e,{boundary:u,rootBoundary:c,padding:p,altBoundary:d}),y=Nt(e.placement),v=Li(e.placement),R=!v,m=Zs(y),x=$b(m),g=e.modifiersData.popperOffsets,S=e.rects.reference,C=e.rects.popper,E=typeof k=="function"?k(Object.assign({},e.rects,{placement:e.placement})):k,b=typeof E=="number"?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,M={x:0,y:0};if(g){if(s){var O,F=m==="y"?dt:ht,z=m==="y"?kt:St,$=m==="y"?"height":"width",H=g[m],V=H+w[F],Y=H-w[z],D=f?-C[$]/2:0,P=v===Ti?S[$]:C[$],I=v===Ti?-C[$]:-S[$],N=e.elements.arrow,U=f&&N?Xs(N):{width:0,height:0},Z=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:Ju(),j=Z[F],ne=Z[z],G=nn(0,S[$],U[$]),B=R?S[$]/2-D-G-j-b.mainAxis:P-G-j-b.mainAxis,Q=R?-S[$]/2+D+G+ne+b.mainAxis:I+G+ne+b.mainAxis,X=e.elements.arrow&&tn(e.elements.arrow),q=X?m==="y"?X.clientTop||0:X.clientLeft||0:0,oe=(O=T?.[m])!=null?O:0,se=H+B-oe-q,pe=H+Q-oe,me=nn(f?jn(V,se):V,H,f?pi(Y,pe):Y);g[m]=me,M[m]=me-H}if(o){var we,Ae=m==="x"?dt:ht,Fe=m==="x"?kt:St,Ne=g[x],re=x==="y"?"height":"width",K=Ne+w[Ae],ie=Ne-w[Fe],le=[dt,ht].indexOf(y)!==-1,ae=(we=T?.[x])!=null?we:0,ve=le?K:Ne-S[re]-C[re]-ae+b.altAxis,Re=le?Ne+S[re]+C[re]-ae-b.altAxis:ie,Se=f&&le?fb(ve,Ne,Re):nn(f?ve:K,Ne,f?Re:ie);g[x]=Se,M[x]=Se-Ne}e.modifiersData[i]=M}}const Wb={name:"preventOverflow",enabled:!0,phase:"main",fn:jb,requiresIfExists:["offset"]};function Gb(n){return{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}}function Yb(n){return n===bt(n)||!xt(n)?Qs(n):Gb(n)}function Ub(n){var e=n.getBoundingClientRect(),t=Di(e.width)/n.offsetWidth||1,i=Di(e.height)/n.offsetHeight||1;return t!==1||i!==1}function qb(n,e,t){t===void 0&&(t=!1);var i=xt(e),r=xt(e)&&Ub(e),s=ni(e),a=Oi(n,r,t),o={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!t)&&((Bt(e)!=="body"||ta(s))&&(o=Yb(e)),xt(e)?(u=Oi(e,!0),u.x+=e.clientLeft,u.y+=e.clientTop):s&&(u.x=ea(s))),{x:a.left+o.scrollLeft-u.x,y:a.top+o.scrollTop-u.y,width:a.width,height:a.height}}function Kb(n){var e=new Map,t=new Set,i=[];n.forEach(function(s){e.set(s.name,s)});function r(s){t.add(s.name);var a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var u=e.get(o);u&&r(u)}}),i.push(s)}return n.forEach(function(s){t.has(s.name)||r(s)}),i}function Jb(n){var e=Kb(n);return ob.reduce(function(t,i){return t.concat(e.filter(function(r){return r.phase===i}))},[])}function Xb(n){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(n())})})),e}}function Zb(n){var e=n.reduce(function(t,i){var r=t[i.name];return t[i.name]=r?Object.assign({},r,i,{options:Object.assign({},r.options,i.options),data:Object.assign({},r.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var ac={placement:"bottom",modifiers:[],strategy:"absolute"};function oc(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function Qb(n){n===void 0&&(n={});var e=n,t=e.defaultModifiers,i=t===void 0?[]:t,r=e.defaultOptions,s=r===void 0?ac:r;return function(o,u,c){c===void 0&&(c=s);var d={placement:"bottom",orderedModifiers:[],options:Object.assign({},ac,s),modifiersData:{},elements:{reference:o,popper:u},attributes:{},styles:{}},p=[],h=!1,f={state:d,setOptions:function(y){var v=typeof y=="function"?y(d.options):y;k(),d.options=Object.assign({},s,d.options,v),d.scrollParents={reference:fi(o)?rn(o):o.contextElement?rn(o.contextElement):[],popper:rn(u)};var R=Jb(Zb([].concat(i,d.options.modifiers)));return d.orderedModifiers=R.filter(function(m){return m.enabled}),_(),f.update()},forceUpdate:function(){if(!h){var y=d.elements,v=y.reference,R=y.popper;if(oc(v,R)){d.rects={reference:qb(v,tn(R),d.options.strategy==="fixed"),popper:Xs(R)},d.reset=!1,d.placement=d.options.placement,d.orderedModifiers.forEach(function(b){return d.modifiersData[b.name]=Object.assign({},b.data)});for(var m=0;m<d.orderedModifiers.length;m++){if(d.reset===!0){d.reset=!1,m=-1;continue}var x=d.orderedModifiers[m],g=x.fn,S=x.options,C=S===void 0?{}:S,E=x.name;typeof g=="function"&&(d=g({state:d,options:C,name:E,instance:f})||d)}}}},update:Xb(function(){return new Promise(function(w){f.forceUpdate(),w(d)})}),destroy:function(){k(),h=!0}};if(!oc(o,u))return f;f.setOptions(c).then(function(w){!h&&c.onFirstUpdate&&c.onFirstUpdate(w)});function _(){d.orderedModifiers.forEach(function(w){var y=w.name,v=w.options,R=v===void 0?{}:v,m=w.effect;if(typeof m=="function"){var x=m({state:d,name:y,instance:f,options:R}),g=function(){};p.push(x||g)}})}function k(){p.forEach(function(w){return w()}),p=[]}return f}}var ev=[kb,Ib,Cb,cb,Hb,Ab,Wb,bb,Bb],tv=Qb({defaultModifiers:ev});function iv(n,e,{width:t}){n.style.width=t;const i=tv(e.$refs.toggle,n,{placement:e.$attrs.placement,modifiers:[{name:"offset",options:{offset:[0,-1]}},{name:"toggleClass",enabled:!0,phase:"write",fn({state:r}){e.$el.classList.toggle("drop-up",r.placement==="top")}}]});return()=>i.destroy()}const nv={class:"text-muted"},rv={key:0,class:"py-1"},sv={class:"text-wrap"},av=["innerHTML"],ov={key:1,class:"text-muted p-0"},lv={class:"text-wrap"},uv={key:2,class:"text-muted p-0 small d-flex justify-content-center"},cv={class:"text-wrap px-2"},dv={class:"selected"},hv=["innerHTML"],fv={key:0,style:{"border-left-color":"rgba(88, 151, 251, 0.71)"},class:"vs__spinner"},Xt={__name:"VSelect",props:{modelValue:[String,Object,Number],reduce:{type:Function,default:n=>n.id},hint:{type:String,default:""},classes:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},title:{type:String},disabled:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},searchTimout:{type:Number,default:1e3},dropDownPlacement:{type:String,default:"bottom",validator(n,e){return["bottom","top"].includes(n)}},error:{type:[Array,String],default:null}},emits:["update:modelValue","search","blur","focus"],setup(n,{emit:e}){const t=e,i=n,r=i.multiple?[]:null;l.getCurrentInstance();const s=l.ref(r),a=$s(u,i.searchTimout),o=l.computed(()=>{const p=ii(i.options);return p?p.map(h=>{const f=i.modelValue;return f?{...h,disabled:h.id===f}:h}):[]});function u(p){t("search",p)}const c=p=>!(!p.id||p.disabled),d=l.computed(()=>Array.isArray(i.error)?i.error?.filter(Boolean):typeof i.error=="string"&&i.error?[i.error]:[]);return l.watch(()=>i.modelValue,p=>{s.value=i.modelValue},{deep:!0}),l.watch(()=>s.value,p=>{t("update:modelValue",p)},{deep:!0}),l.onMounted(()=>{s.value=i.modelValue}),(p,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[n.title?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(p.titleClass)},l.toDisplayString(n.title),3)):l.createCommentVNode("",!0),l.createVNode(l.unref(Kg),l.mergeProps({class:"style-chooser"},p.$attrs,{modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=f=>s.value=f),reduce:n.reduce,options:o.value,multiple:n.multiple,placeholder:n.placeholder,disabled:n.disabled,loading:n.isLoading,clearable:n.allowClear,placement:n.dropDownPlacement,appendToBody:n.dropDownPlacement==="top","calculate-position":l.unref(iv),selectable:f=>c(f),"onSearch:blur":h[1]||(h[1]=f=>t("blur")),"onSearch:focus":h[2]||(h[2]=f=>t("focus")),onSearch:l.unref(a),class:[...n.classes,n.error?"not-valid":""]}),{"no-options":l.withCtx(({search:f,searching:_,loading:k})=>[l.createElementVNode("span",nv,l.toDisplayString(n.hint),1)]),option:l.withCtx(({label:f,html:_,id:k,disabled:w})=>[k?(l.openBlock(),l.createElementBlock("div",rv,[l.createElementVNode("div",sv,l.toDisplayString(f),1),_?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:_},null,8,av)):l.createCommentVNode("",!0)])):w?(l.openBlock(),l.createElementBlock("div",ov,[l.createElementVNode("div",lv,l.toDisplayString(f)+"disabled",1)])):(l.openBlock(),l.createElementBlock("div",uv,[h[3]||(h[3]=l.createElementVNode("span",null,"-",-1)),l.createElementVNode("span",cv,l.toDisplayString(f),1),h[4]||(h[4]=l.createElementVNode("span",null,"-",-1))]))]),"selected-option":l.withCtx(({label:f,html:_})=>[l.createElementVNode("div",dv,[l.createElementVNode("div",null,l.toDisplayString(f),1),_?(l.openBlock(),l.createElementBlock("div",{key:0,innerHTML:_},null,8,hv)):l.createCommentVNode("",!0)])]),spinner:l.withCtx(({loading:f})=>[f?(l.openBlock(),l.createElementBlock("div",fv)):l.createCommentVNode("",!0)]),_:1},16,["modelValue","reduce","options","multiple","placeholder","disabled","loading","clearable","placement","appendToBody","calculate-position","selectable","onSearch","class"]),l.createVNode(hi,{errors:d.value},null,8,["errors"])],64))}},pv={class:"form-check"},mv=["type","id","name"],gv=["for"],lc=Ve(l.defineComponent({__name:"BooleanCheckbox",props:{defaultValue:{default:null},trueValue:{default:"1"},modelValue:{default:void 0},name:{default:""},group:{default:""},type:{default:"checkbox"},label:{default:""},error:{default:""},setFilterParamsStringsHandler:{type:Function,default:void 0}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(),s=di(),a=l.computed(()=>t.group.length?t.group:t.name),o=()=>{i("update:modelValue",r.value?.checked?t.trueValue:t.defaultValue)},u=l.computed(()=>!t.modelValue||t.modelValue!==t.trueValue?(r.value&&(r.value.checked=!1),c(),null):(r.value&&(r.value.checked=!0),c(),!0)),c=()=>{if(!t.setFilterParamsStringsHandler)return!1;const p=r.value?.checked?"Да":null;t.setFilterParamsStringsHandler(t.name,p)},d=l.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]);return l.watch(()=>t.modelValue,p=>{r.value&&(r.value.checked=!!p)}),(p,h)=>(l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",pv,[(l.openBlock(),l.createElementBlock("input",{class:l.normalizeClass(["form-check-input",[p.error?"not-valid":""]]),ref_key:"input",ref:r,type:p.type,id:String(l.unref(s)),name:a.value,key:String(u.value),onClick:o},null,10,mv)),l.createElementVNode("label",{class:l.normalizeClass(["form-check-label",[p.error?"text-danger":""]]),for:String(l.unref(s))},l.toDisplayString(p.label),11,gv)]),l.createVNode(hi,{errors:d.value},null,8,["errors"])],64))}}),[["__scopeId","data-v-b2a37180"]]),bv={class:"multi-checkbox"},vv=["checked","onClick","id","value","name"],yv=["for"],wv=Ve(l.defineComponent({__name:"MultiCheckbox",props:{modelValue:{default:()=>[]},inputClass:{default:""},options:{default:()=>[]},error:{default:""},setFilterParamsStringsHandler:{type:Function,default:void 0},name:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.toRef(t,"modelValue"),s=l.toRef(t,"options"),a=l.toRef(t,"name");function o(p,h){const f=String(h);let _=[...r.value];r.value.includes(f)?_=r.value.filter(k=>String(k)!==f):_.push(f),i("update:modelValue",_)}const u=l.computed(()=>p=>r.value.includes(String(p)));function c(p){if(!t.setFilterParamsStringsHandler)return;let h=p.map(_=>String(_));const f=s.value.filter(_=>h.includes(String(_.id))).map(_=>_.text);if(h.length===0){t.setFilterParamsStringsHandler(a.value,null);return}t.setFilterParamsStringsHandler(a.value,f.join(", "))}const d=l.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]);return l.watch(()=>r.value,p=>{c(p)},{deep:!0}),(p,h)=>(l.openBlock(),l.createElementBlock("div",bv,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,f=>(l.openBlock(),l.createElementBlock("div",{class:"form-check",key:f.id},[l.createElementVNode("input",{class:l.normalizeClass(["form-check-input",[p.inputClass,{"not-valid":p.error}]]),type:"checkbox",checked:u.value(f.id),onClick:_=>o(_,f.id),id:`${a.value}-${f.id}`,value:f.id,name:`${a.value}-${f.id}`},null,10,vv),l.createElementVNode("label",{class:"form-check-label d-block",for:`${a.value}-${f.id}`},l.toDisplayString(f.text),9,yv)]))),128)),l.createVNode(hi,{errors:d.value},null,8,["errors"])]))}}),[["__scopeId","data-v-e23ac74b"]]),Cv={class:"multi-input"},Ev={class:"col"},kv={class:"col-auto"},Sv=["onClick"],xv=Ve(l.defineComponent({__name:"MultiInput",props:{modelValue:{default:()=>[]},title:{default:""},setFilterParamsStringsHandler:{type:Function,default:void 0},name:{default:""},placeholder:{default:""},disabled:{type:Boolean,default:!1},inputClass:{default:""},error:{default:""},maskOptions:{default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.toRef(t,"modelValue");l.toRef(t,"title");const s=l.toRef(t,"placeholder");l.toRef(t,"disabled");const a=l.toRef(t,"error"),o=l.toRef(t,"maskOptions"),u=l.ref([]),c=l.ref(!1),d={value:"",disabled:!1,uniqueKey:1};function p(){const y=ii(d);y.uniqueKey=di(),u.value.push(y)}function h(y,v){y.value=v}const f=l.computed(()=>u.value.length>1);function _(y){u.value=u.value.filter(v=>v.uniqueKey!==y.uniqueKey)}function k(){u.value=[],p()}function w(y){const v=y.map(m=>m.value);if(i("update:modelValue",v),!t.setFilterParamsStringsHandler)return;const R=v.filter(m=>m&&m.length>0);if(R.length===0){t.setFilterParamsStringsHandler(t.name,null);return}t.setFilterParamsStringsHandler(t.name,R.join(", "))}return l.watch(()=>u.value,y=>{c.value||w(y)},{deep:!0}),l.watch(()=>r.value,y=>{c.value=!0,!y||y.length===0?k():u.value.length!==y.length?u.value=y.map((v,R)=>({value:v,disabled:!1,uniqueKey:di()+R})):y.forEach((v,R)=>{u.value[R]&&(u.value[R].value=v)}),l.nextTick(()=>{c.value=!1})},{deep:!0}),l.onMounted(()=>{r.value&&r.value.length>0?u.value=r.value.map((y,v)=>({value:y,disabled:!1,uniqueKey:di()+v})):p()}),(y,v)=>(l.openBlock(),l.createElementBlock("div",Cv,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(u.value,(R,m)=>(l.openBlock(),l.createElementBlock("div",{class:"row mb-2",key:R.uniqueKey},[l.createElementVNode("div",Ev,[l.createVNode($n,{"model-value":R.value,"onUpdate:modelValue":x=>h(R,x),name:y.name,placeholder:s.value,class:l.normalizeClass(y.inputClass),disabled:R.disabled,"mask-options":o.value,error:a.value},null,8,["model-value","onUpdate:modelValue","name","placeholder","class","disabled","mask-options","error"])]),l.createElementVNode("div",kv,[f.value?(l.openBlock(),l.createElementBlock("div",{key:0,class:"d-flex remove-button p-2",style:{cursor:"pointer"},onClick:x=>_(R)},[...v[0]||(v[0]=[l.createElementVNode("i",{class:"bi bi-trash-fill"},null,-1)])],8,Sv)):l.createCommentVNode("",!0)])]))),128)),l.createVNode(Ca,{onClick:p})]))}}),[["__scopeId","data-v-9337052b"]]);var na=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Pi={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(n){return typeof console<"u"&&console.warn(n)},getWeek:function(n){var e=new Date(n.getTime());e.setHours(0,0,0,0),e.setDate(e.getDate()+3-(e.getDay()+6)%7);var t=new Date(e.getFullYear(),0,4);return 1+Math.round(((e.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},an={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(n){var e=n%100;if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},ft=function(n,e){return e===void 0&&(e=2),("000"+n).slice(e*-1)},_t=function(n){return n===!0?1:0};function uc(n,e){var t;return function(){var i=this,r=arguments;clearTimeout(t),t=setTimeout(function(){return n.apply(i,r)},e)}}var ra=function(n){return n instanceof Array?n:[n]};function ut(n,e,t){if(t===!0)return n.classList.add(e);n.classList.remove(e)}function Ge(n,e,t){var i=window.document.createElement(n);return e=e||"",t=t||"",i.className=e,t!==void 0&&(i.textContent=t),i}function Un(n){for(;n.firstChild;)n.removeChild(n.firstChild)}function cc(n,e){if(e(n))return n;if(n.parentNode)return cc(n.parentNode,e)}function qn(n,e){var t=Ge("div","numInputWrapper"),i=Ge("input","numInput "+n),r=Ge("span","arrowUp"),s=Ge("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?i.type="number":(i.type="text",i.pattern="\\d*"),e!==void 0)for(var a in e)i.setAttribute(a,e[a]);return t.appendChild(i),t.appendChild(r),t.appendChild(s),t}function vt(n){try{if(typeof n.composedPath=="function"){var e=n.composedPath();return e[0]}return n.target}catch{return n.target}}var sa=function(){},Kn=function(n,e,t){return t.months[e?"shorthand":"longhand"][n]},_v={D:sa,F:function(n,e,t){n.setMonth(t.months.longhand.indexOf(e))},G:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},H:function(n,e){n.setHours(parseFloat(e))},J:function(n,e){n.setDate(parseFloat(e))},K:function(n,e,t){n.setHours(n.getHours()%12+12*_t(new RegExp(t.amPM[1],"i").test(e)))},M:function(n,e,t){n.setMonth(t.months.shorthand.indexOf(e))},S:function(n,e){n.setSeconds(parseFloat(e))},U:function(n,e){return new Date(parseFloat(e)*1e3)},W:function(n,e,t){var i=parseInt(e),r=new Date(n.getFullYear(),0,2+(i-1)*7,0,0,0,0);return r.setDate(r.getDate()-r.getDay()+t.firstDayOfWeek),r},Y:function(n,e){n.setFullYear(parseFloat(e))},Z:function(n,e){return new Date(e)},d:function(n,e){n.setDate(parseFloat(e))},h:function(n,e){n.setHours((n.getHours()>=12?12:0)+parseFloat(e))},i:function(n,e){n.setMinutes(parseFloat(e))},j:function(n,e){n.setDate(parseFloat(e))},l:sa,m:function(n,e){n.setMonth(parseFloat(e)-1)},n:function(n,e){n.setMonth(parseFloat(e)-1)},s:function(n,e){n.setSeconds(parseFloat(e))},u:function(n,e){return new Date(parseFloat(e))},w:sa,y:function(n,e){n.setFullYear(2e3+parseFloat(e))}},mi={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},on={Z:function(n){return n.toISOString()},D:function(n,e,t){return e.weekdays.shorthand[on.w(n,e,t)]},F:function(n,e,t){return Kn(on.n(n,e,t)-1,!1,e)},G:function(n,e,t){return ft(on.h(n,e,t))},H:function(n){return ft(n.getHours())},J:function(n,e){return e.ordinal!==void 0?n.getDate()+e.ordinal(n.getDate()):n.getDate()},K:function(n,e){return e.amPM[_t(n.getHours()>11)]},M:function(n,e){return Kn(n.getMonth(),!0,e)},S:function(n){return ft(n.getSeconds())},U:function(n){return n.getTime()/1e3},W:function(n,e,t){return t.getWeek(n)},Y:function(n){return ft(n.getFullYear(),4)},d:function(n){return ft(n.getDate())},h:function(n){return n.getHours()%12?n.getHours()%12:12},i:function(n){return ft(n.getMinutes())},j:function(n){return n.getDate()},l:function(n,e){return e.weekdays.longhand[n.getDay()]},m:function(n){return ft(n.getMonth()+1)},n:function(n){return n.getMonth()+1},s:function(n){return n.getSeconds()},u:function(n){return n.getTime()},w:function(n){return n.getDay()},y:function(n){return String(n.getFullYear()).substring(2)}},dc=function(n){var e=n.config,t=e===void 0?Pi:e,i=n.l10n,r=i===void 0?an:i,s=n.isMobile,a=s===void 0?!1:s;return function(o,u,c){var d=c||r;return t.formatDate!==void 0&&!a?t.formatDate(o,u,d):u.split("").map(function(p,h,f){return on[p]&&f[h-1]!=="\\"?on[p](o,d,t):p!=="\\"?p:""}).join("")}},aa=function(n){var e=n.config,t=e===void 0?Pi:e,i=n.l10n,r=i===void 0?an:i;return function(s,a,o,u){if(!(s!==0&&!s)){var c=u||r,d,p=s;if(s instanceof Date)d=new Date(s.getTime());else if(typeof s!="string"&&s.toFixed!==void 0)d=new Date(s);else if(typeof s=="string"){var h=a||(t||Pi).dateFormat,f=String(s).trim();if(f==="today")d=new Date,o=!0;else if(t&&t.parseDate)d=t.parseDate(s,h);else if(/Z$/.test(f)||/GMT$/.test(f))d=new Date(s);else{for(var _=void 0,k=[],w=0,y=0,v="";w<h.length;w++){var R=h[w],m=R==="\\",x=h[w-1]==="\\"||m;if(mi[R]&&!x){v+=mi[R];var g=new RegExp(v).exec(s);g&&(_=!0)&&k[R!=="Y"?"push":"unshift"]({fn:_v[R],val:g[++y]})}else m||(v+=".")}d=!t||!t.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),k.forEach(function(S){var C=S.fn,E=S.val;return d=C(d,E,c)||d}),d=_?d:void 0}}if(!(d instanceof Date&&!isNaN(d.getTime()))){t.errorHandler(new Error("Invalid date provided: "+p));return}return o===!0&&d.setHours(0,0,0,0),d}}};function yt(n,e,t){return t===void 0&&(t=!0),t!==!1?new Date(n.getTime()).setHours(0,0,0,0)-new Date(e.getTime()).setHours(0,0,0,0):n.getTime()-e.getTime()}var Mv=function(n,e,t){return n>Math.min(e,t)&&n<Math.max(e,t)},oa=function(n,e,t){return n*3600+e*60+t},Rv=function(n){var e=Math.floor(n/3600),t=(n-e*3600)/60;return[e,t,n-e*3600-t*60]},Tv={DAY:864e5};function la(n){var e=n.defaultHour,t=n.defaultMinute,i=n.defaultSeconds;if(n.minDate!==void 0){var r=n.minDate.getHours(),s=n.minDate.getMinutes(),a=n.minDate.getSeconds();e<r&&(e=r),e===r&&t<s&&(t=s),e===r&&t===s&&i<a&&(i=n.minDate.getSeconds())}if(n.maxDate!==void 0){var o=n.maxDate.getHours(),u=n.maxDate.getMinutes();e=Math.min(e,o),e===o&&(t=Math.min(u,t)),e===o&&t===u&&(i=n.maxDate.getSeconds())}return{hours:e,minutes:t,seconds:i}}typeof Object.assign!="function"&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(o){o&&Object.keys(o).forEach(function(u){return n[u]=o[u]})},r=0,s=e;r<s.length;r++){var a=s[r];i(a)}return n});var at=function(){return at=Object.assign||function(n){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n},at.apply(this,arguments)},hc=function(){for(var n=0,e=0,t=arguments.length;e<t;e++)n+=arguments[e].length;for(var i=Array(n),r=0,e=0;e<t;e++)for(var s=arguments[e],a=0,o=s.length;a<o;a++,r++)i[r]=s[a];return i},Dv=300;function Ov(n,e){var t={config:at(at({},Pi),it.defaultConfig),l10n:an};t.parseDate=aa({config:t.config,l10n:t.l10n}),t._handlers=[],t.pluginElements=[],t.loadedPlugins=[],t._bind=k,t._setHoursFromDate=h,t._positionCalendar=Fe,t.changeMonth=P,t.changeYear=ne,t.clear=I,t.close=N,t.onMouseOver=q,t._createElement=Ge,t.createDay=g,t.destroy=U,t.isEnabled=G,t.jumpToDate=v,t.updateValue=ke,t.open=se,t.redraw=K,t.set=ve,t.setDate=Se,t.toggle=Zt;function i(){t.utils={getDaysInMonth:function(L,A){return L===void 0&&(L=t.currentMonth),A===void 0&&(A=t.currentYear),L===1&&(A%4===0&&A%100!==0||A%400===0)?29:t.l10n.daysInMonth[L]}}}function r(){t.element=t.input=n,t.isOpen=!1,me(),Ae(),Le(),ue(),i(),t.isMobile||x(),y(),(t.selectedDates.length||t.config.noCalendar)&&(t.config.enableTime&&h(t.config.noCalendar?t.latestSelectedDateObj:void 0),ke(!1)),o();var L=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!t.isMobile&&L&&Fe(),Ue("onReady")}function s(){var L;return((L=t.calendarContainer)===null||L===void 0?void 0:L.getRootNode()).activeElement||document.activeElement}function a(L){return L.bind(t)}function o(){var L=t.config;L.weekNumbers===!1&&L.showMonths===1||L.noCalendar!==!0&&window.requestAnimationFrame(function(){if(t.calendarContainer!==void 0&&(t.calendarContainer.style.visibility="hidden",t.calendarContainer.style.display="block"),t.daysContainer!==void 0){var A=(t.days.offsetWidth+1)*L.showMonths;t.daysContainer.style.width=A+"px",t.calendarContainer.style.width=A+(t.weekWrapper!==void 0?t.weekWrapper.offsetWidth:0)+"px",t.calendarContainer.style.removeProperty("visibility"),t.calendarContainer.style.removeProperty("display")}})}function u(L){if(t.selectedDates.length===0){var A=t.config.minDate===void 0||yt(new Date,t.config.minDate)>=0?new Date:new Date(t.config.minDate.getTime()),W=la(t.config);A.setHours(W.hours,W.minutes,W.seconds,A.getMilliseconds()),t.selectedDates=[A],t.latestSelectedDateObj=A}L!==void 0&&L.type!=="blur"&&et(L);var te=t._input.value;p(),ke(),t._input.value!==te&&t._debouncedChange()}function c(L,A){return L%12+12*_t(A===t.l10n.amPM[1])}function d(L){switch(L%24){case 0:case 12:return 12;default:return L%12}}function p(){if(!(t.hourElement===void 0||t.minuteElement===void 0)){var L=(parseInt(t.hourElement.value.slice(-2),10)||0)%24,A=(parseInt(t.minuteElement.value,10)||0)%60,W=t.secondElement!==void 0?(parseInt(t.secondElement.value,10)||0)%60:0;t.amPM!==void 0&&(L=c(L,t.amPM.textContent));var te=t.config.minTime!==void 0||t.config.minDate&&t.minDateHasTime&&t.latestSelectedDateObj&&yt(t.latestSelectedDateObj,t.config.minDate,!0)===0,ce=t.config.maxTime!==void 0||t.config.maxDate&&t.maxDateHasTime&&t.latestSelectedDateObj&&yt(t.latestSelectedDateObj,t.config.maxDate,!0)===0;if(t.config.maxTime!==void 0&&t.config.minTime!==void 0&&t.config.minTime>t.config.maxTime){var fe=oa(t.config.minTime.getHours(),t.config.minTime.getMinutes(),t.config.minTime.getSeconds()),Te=oa(t.config.maxTime.getHours(),t.config.maxTime.getMinutes(),t.config.maxTime.getSeconds()),ye=oa(L,A,W);if(ye>Te&&ye<fe){var De=Rv(fe);L=De[0],A=De[1],W=De[2]}}else{if(ce){var be=t.config.maxTime!==void 0?t.config.maxTime:t.config.maxDate;L=Math.min(L,be.getHours()),L===be.getHours()&&(A=Math.min(A,be.getMinutes())),A===be.getMinutes()&&(W=Math.min(W,be.getSeconds()))}if(te){var xe=t.config.minTime!==void 0?t.config.minTime:t.config.minDate;L=Math.max(L,xe.getHours()),L===xe.getHours()&&A<xe.getMinutes()&&(A=xe.getMinutes()),A===xe.getMinutes()&&(W=Math.max(W,xe.getSeconds()))}}f(L,A,W)}}function h(L){var A=L||t.latestSelectedDateObj;A&&A instanceof Date&&f(A.getHours(),A.getMinutes(),A.getSeconds())}function f(L,A,W){t.latestSelectedDateObj!==void 0&&t.latestSelectedDateObj.setHours(L%24,A,W||0,0),!(!t.hourElement||!t.minuteElement||t.isMobile)&&(t.hourElement.value=ft(t.config.time_24hr?L:(12+L)%12+12*_t(L%12===0)),t.minuteElement.value=ft(A),t.amPM!==void 0&&(t.amPM.textContent=t.l10n.amPM[_t(L>=12)]),t.secondElement!==void 0&&(t.secondElement.value=ft(W)))}function _(L){var A=vt(L),W=parseInt(A.value)+(L.delta||0);(W/1e3>1||L.key==="Enter"&&!/[^\d]/.test(W.toString()))&&ne(W)}function k(L,A,W,te){if(A instanceof Array)return A.forEach(function(ce){return k(L,ce,W,te)});if(L instanceof Array)return L.forEach(function(ce){return k(ce,A,W,te)});L.addEventListener(A,W,te),t._handlers.push({remove:function(){return L.removeEventListener(A,W,te)}})}function w(){Ue("onChange")}function y(){if(t.config.wrap&&["open","close","toggle","clear"].forEach(function(W){Array.prototype.forEach.call(t.element.querySelectorAll("[data-"+W+"]"),function(te){return k(te,"click",t[W])})}),t.isMobile){pn();return}var L=uc(oe,50);if(t._debouncedChange=uc(w,Dv),t.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&k(t.daysContainer,"mouseover",function(W){t.config.mode==="range"&&q(vt(W))}),k(t._input,"keydown",X),t.calendarContainer!==void 0&&k(t.calendarContainer,"keydown",X),!t.config.inline&&!t.config.static&&k(window,"resize",L),window.ontouchstart!==void 0?k(window.document,"touchstart",j):k(window.document,"mousedown",j),k(window.document,"focus",j,{capture:!0}),t.config.clickOpens===!0&&(k(t._input,"focus",t.open),k(t._input,"click",t.open)),t.daysContainer!==void 0&&(k(t.monthNav,"click",pt),k(t.monthNav,["keyup","increment"],_),k(t.daysContainer,"click",le)),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0){var A=function(W){return vt(W).select()};k(t.timeContainer,["increment"],u),k(t.timeContainer,"blur",u,{capture:!0}),k(t.timeContainer,"click",R),k([t.hourElement,t.minuteElement],["focus","click"],A),t.secondElement!==void 0&&k(t.secondElement,"focus",function(){return t.secondElement&&t.secondElement.select()}),t.amPM!==void 0&&k(t.amPM,"click",function(W){u(W)})}t.config.allowInput&&k(t._input,"blur",Q)}function v(L,A){var W=L!==void 0?t.parseDate(L):t.latestSelectedDateObj||(t.config.minDate&&t.config.minDate>t.now?t.config.minDate:t.config.maxDate&&t.config.maxDate<t.now?t.config.maxDate:t.now),te=t.currentYear,ce=t.currentMonth;try{W!==void 0&&(t.currentYear=W.getFullYear(),t.currentMonth=W.getMonth())}catch(fe){fe.message="Invalid date supplied: "+W,t.config.errorHandler(fe)}A&&t.currentYear!==te&&(Ue("onYearChange"),O()),A&&(t.currentYear!==te||t.currentMonth!==ce)&&Ue("onMonthChange"),t.redraw()}function R(L){var A=vt(L);~A.className.indexOf("arrow")&&m(L,A.classList.contains("arrowUp")?1:-1)}function m(L,A,W){var te=L&&vt(L),ce=W||te&&te.parentNode&&te.parentNode.firstChild,fe=J("increment");fe.delta=A,ce&&ce.dispatchEvent(fe)}function x(){var L=window.document.createDocumentFragment();if(t.calendarContainer=Ge("div","flatpickr-calendar"),t.calendarContainer.tabIndex=-1,!t.config.noCalendar){if(L.appendChild($()),t.innerContainer=Ge("div","flatpickr-innerContainer"),t.config.weekNumbers){var A=D(),W=A.weekWrapper,te=A.weekNumbers;t.innerContainer.appendChild(W),t.weekNumbers=te,t.weekWrapper=W}t.rContainer=Ge("div","flatpickr-rContainer"),t.rContainer.appendChild(V()),t.daysContainer||(t.daysContainer=Ge("div","flatpickr-days"),t.daysContainer.tabIndex=-1),M(),t.rContainer.appendChild(t.daysContainer),t.innerContainer.appendChild(t.rContainer),L.appendChild(t.innerContainer)}t.config.enableTime&&L.appendChild(H()),ut(t.calendarContainer,"rangeMode",t.config.mode==="range"),ut(t.calendarContainer,"animate",t.config.animate===!0),ut(t.calendarContainer,"multiMonth",t.config.showMonths>1),t.calendarContainer.appendChild(L);var ce=t.config.appendTo!==void 0&&t.config.appendTo.nodeType!==void 0;if((t.config.inline||t.config.static)&&(t.calendarContainer.classList.add(t.config.inline?"inline":"static"),t.config.inline&&(!ce&&t.element.parentNode?t.element.parentNode.insertBefore(t.calendarContainer,t._input.nextSibling):t.config.appendTo!==void 0&&t.config.appendTo.appendChild(t.calendarContainer)),t.config.static)){var fe=Ge("div","flatpickr-wrapper");t.element.parentNode&&t.element.parentNode.insertBefore(fe,t.element),fe.appendChild(t.element),t.altInput&&fe.appendChild(t.altInput),fe.appendChild(t.calendarContainer)}!t.config.static&&!t.config.inline&&(t.config.appendTo!==void 0?t.config.appendTo:window.document.body).appendChild(t.calendarContainer)}function g(L,A,W,te){var ce=G(A,!0),fe=Ge("span",L,A.getDate().toString());return fe.dateObj=A,fe.$i=te,fe.setAttribute("aria-label",t.formatDate(A,t.config.ariaDateFormat)),L.indexOf("hidden")===-1&&yt(A,t.now)===0&&(t.todayDateElem=fe,fe.classList.add("today"),fe.setAttribute("aria-current","date")),ce?(fe.tabIndex=-1,ee(A)&&(fe.classList.add("selected"),t.selectedDateElem=fe,t.config.mode==="range"&&(ut(fe,"startRange",t.selectedDates[0]&&yt(A,t.selectedDates[0],!0)===0),ut(fe,"endRange",t.selectedDates[1]&&yt(A,t.selectedDates[1],!0)===0),L==="nextMonthDay"&&fe.classList.add("inRange")))):fe.classList.add("flatpickr-disabled"),t.config.mode==="range"&&Be(A)&&!ee(A)&&fe.classList.add("inRange"),t.weekNumbers&&t.config.showMonths===1&&L!=="prevMonthDay"&&te%7===6&&t.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+t.config.getWeek(A)+"</span>"),Ue("onDayCreate",fe),fe}function S(L){L.focus(),t.config.mode==="range"&&q(L)}function C(L){for(var A=L>0?0:t.config.showMonths-1,W=L>0?t.config.showMonths:-1,te=A;te!=W;te+=L)for(var ce=t.daysContainer.children[te],fe=L>0?0:ce.children.length-1,Te=L>0?ce.children.length:-1,ye=fe;ye!=Te;ye+=L){var De=ce.children[ye];if(De.className.indexOf("hidden")===-1&&G(De.dateObj))return De}}function E(L,A){for(var W=L.className.indexOf("Month")===-1?L.dateObj.getMonth():t.currentMonth,te=A>0?t.config.showMonths:-1,ce=A>0?1:-1,fe=W-t.currentMonth;fe!=te;fe+=ce)for(var Te=t.daysContainer.children[fe],ye=W-t.currentMonth===fe?L.$i+A:A<0?Te.children.length-1:0,De=Te.children.length,be=ye;be>=0&&be<De&&be!=(A>0?De:-1);be+=ce){var xe=Te.children[be];if(xe.className.indexOf("hidden")===-1&&G(xe.dateObj)&&Math.abs(L.$i-be)>=Math.abs(A))return S(xe)}t.changeMonth(ce),b(C(ce),0)}function b(L,A){var W=s(),te=B(W||document.body),ce=L!==void 0?L:te?W:t.selectedDateElem!==void 0&&B(t.selectedDateElem)?t.selectedDateElem:t.todayDateElem!==void 0&&B(t.todayDateElem)?t.todayDateElem:C(A>0?1:-1);ce===void 0?t._input.focus():te?E(ce,A):S(ce)}function T(L,A){for(var W=(new Date(L,A,1).getDay()-t.l10n.firstDayOfWeek+7)%7,te=t.utils.getDaysInMonth((A-1+12)%12,L),ce=t.utils.getDaysInMonth(A,L),fe=window.document.createDocumentFragment(),Te=t.config.showMonths>1,ye=Te?"prevMonthDay hidden":"prevMonthDay",De=Te?"nextMonthDay hidden":"nextMonthDay",be=te+1-W,xe=0;be<=te;be++,xe++)fe.appendChild(g("flatpickr-day "+ye,new Date(L,A-1,be),be,xe));for(be=1;be<=ce;be++,xe++)fe.appendChild(g("flatpickr-day",new Date(L,A,be),be,xe));for(var Ye=ce+1;Ye<=42-W&&(t.config.showMonths===1||xe%7!==0);Ye++,xe++)fe.appendChild(g("flatpickr-day "+De,new Date(L,A+1,Ye%ce),Ye,xe));var mt=Ge("div","dayContainer");return mt.appendChild(fe),mt}function M(){if(t.daysContainer!==void 0){Un(t.daysContainer),t.weekNumbers&&Un(t.weekNumbers);for(var L=document.createDocumentFragment(),A=0;A<t.config.showMonths;A++){var W=new Date(t.currentYear,t.currentMonth,1);W.setMonth(t.currentMonth+A),L.appendChild(T(W.getFullYear(),W.getMonth()))}t.daysContainer.appendChild(L),t.days=t.daysContainer.firstChild,t.config.mode==="range"&&t.selectedDates.length===1&&q()}}function O(){if(!(t.config.showMonths>1||t.config.monthSelectorType!=="dropdown")){var L=function(te){return t.config.minDate!==void 0&&t.currentYear===t.config.minDate.getFullYear()&&te<t.config.minDate.getMonth()?!1:!(t.config.maxDate!==void 0&&t.currentYear===t.config.maxDate.getFullYear()&&te>t.config.maxDate.getMonth())};t.monthsDropdownContainer.tabIndex=-1,t.monthsDropdownContainer.innerHTML="";for(var A=0;A<12;A++)if(L(A)){var W=Ge("option","flatpickr-monthDropdown-month");W.value=new Date(t.currentYear,A).getMonth().toString(),W.textContent=Kn(A,t.config.shorthandCurrentMonth,t.l10n),W.tabIndex=-1,t.currentMonth===A&&(W.selected=!0),t.monthsDropdownContainer.appendChild(W)}}}function F(){var L=Ge("div","flatpickr-month"),A=window.document.createDocumentFragment(),W;t.config.showMonths>1||t.config.monthSelectorType==="static"?W=Ge("span","cur-month"):(t.monthsDropdownContainer=Ge("select","flatpickr-monthDropdown-months"),t.monthsDropdownContainer.setAttribute("aria-label",t.l10n.monthAriaLabel),k(t.monthsDropdownContainer,"change",function(Te){var ye=vt(Te),De=parseInt(ye.value,10);t.changeMonth(De-t.currentMonth),Ue("onMonthChange")}),O(),W=t.monthsDropdownContainer);var te=qn("cur-year",{tabindex:"-1"}),ce=te.getElementsByTagName("input")[0];ce.setAttribute("aria-label",t.l10n.yearAriaLabel),t.config.minDate&&ce.setAttribute("min",t.config.minDate.getFullYear().toString()),t.config.maxDate&&(ce.setAttribute("max",t.config.maxDate.getFullYear().toString()),ce.disabled=!!t.config.minDate&&t.config.minDate.getFullYear()===t.config.maxDate.getFullYear());var fe=Ge("div","flatpickr-current-month");return fe.appendChild(W),fe.appendChild(te),A.appendChild(fe),L.appendChild(A),{container:L,yearElement:ce,monthElement:W}}function z(){Un(t.monthNav),t.monthNav.appendChild(t.prevMonthNav),t.config.showMonths&&(t.yearElements=[],t.monthElements=[]);for(var L=t.config.showMonths;L--;){var A=F();t.yearElements.push(A.yearElement),t.monthElements.push(A.monthElement),t.monthNav.appendChild(A.container)}t.monthNav.appendChild(t.nextMonthNav)}function $(){return t.monthNav=Ge("div","flatpickr-months"),t.yearElements=[],t.monthElements=[],t.prevMonthNav=Ge("span","flatpickr-prev-month"),t.prevMonthNav.innerHTML=t.config.prevArrow,t.nextMonthNav=Ge("span","flatpickr-next-month"),t.nextMonthNav.innerHTML=t.config.nextArrow,z(),Object.defineProperty(t,"_hidePrevMonthArrow",{get:function(){return t.__hidePrevMonthArrow},set:function(L){t.__hidePrevMonthArrow!==L&&(ut(t.prevMonthNav,"flatpickr-disabled",L),t.__hidePrevMonthArrow=L)}}),Object.defineProperty(t,"_hideNextMonthArrow",{get:function(){return t.__hideNextMonthArrow},set:function(L){t.__hideNextMonthArrow!==L&&(ut(t.nextMonthNav,"flatpickr-disabled",L),t.__hideNextMonthArrow=L)}}),t.currentYearElement=t.yearElements[0],Ie(),t.monthNav}function H(){t.calendarContainer.classList.add("hasTime"),t.config.noCalendar&&t.calendarContainer.classList.add("noCalendar");var L=la(t.config);t.timeContainer=Ge("div","flatpickr-time"),t.timeContainer.tabIndex=-1;var A=Ge("span","flatpickr-time-separator",":"),W=qn("flatpickr-hour",{"aria-label":t.l10n.hourAriaLabel});t.hourElement=W.getElementsByTagName("input")[0];var te=qn("flatpickr-minute",{"aria-label":t.l10n.minuteAriaLabel});if(t.minuteElement=te.getElementsByTagName("input")[0],t.hourElement.tabIndex=t.minuteElement.tabIndex=-1,t.hourElement.value=ft(t.latestSelectedDateObj?t.latestSelectedDateObj.getHours():t.config.time_24hr?L.hours:d(L.hours)),t.minuteElement.value=ft(t.latestSelectedDateObj?t.latestSelectedDateObj.getMinutes():L.minutes),t.hourElement.setAttribute("step",t.config.hourIncrement.toString()),t.minuteElement.setAttribute("step",t.config.minuteIncrement.toString()),t.hourElement.setAttribute("min",t.config.time_24hr?"0":"1"),t.hourElement.setAttribute("max",t.config.time_24hr?"23":"12"),t.hourElement.setAttribute("maxlength","2"),t.minuteElement.setAttribute("min","0"),t.minuteElement.setAttribute("max","59"),t.minuteElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(W),t.timeContainer.appendChild(A),t.timeContainer.appendChild(te),t.config.time_24hr&&t.timeContainer.classList.add("time24hr"),t.config.enableSeconds){t.timeContainer.classList.add("hasSeconds");var ce=qn("flatpickr-second");t.secondElement=ce.getElementsByTagName("input")[0],t.secondElement.value=ft(t.latestSelectedDateObj?t.latestSelectedDateObj.getSeconds():L.seconds),t.secondElement.setAttribute("step",t.minuteElement.getAttribute("step")),t.secondElement.setAttribute("min","0"),t.secondElement.setAttribute("max","59"),t.secondElement.setAttribute("maxlength","2"),t.timeContainer.appendChild(Ge("span","flatpickr-time-separator",":")),t.timeContainer.appendChild(ce)}return t.config.time_24hr||(t.amPM=Ge("span","flatpickr-am-pm",t.l10n.amPM[_t((t.latestSelectedDateObj?t.hourElement.value:t.config.defaultHour)>11)]),t.amPM.title=t.l10n.toggleTitle,t.amPM.tabIndex=-1,t.timeContainer.appendChild(t.amPM)),t.timeContainer}function V(){t.weekdayContainer?Un(t.weekdayContainer):t.weekdayContainer=Ge("div","flatpickr-weekdays");for(var L=t.config.showMonths;L--;){var A=Ge("div","flatpickr-weekdaycontainer");t.weekdayContainer.appendChild(A)}return Y(),t.weekdayContainer}function Y(){if(t.weekdayContainer){var L=t.l10n.firstDayOfWeek,A=hc(t.l10n.weekdays.shorthand);L>0&&L<A.length&&(A=hc(A.splice(L,A.length),A.splice(0,L)));for(var W=t.config.showMonths;W--;)t.weekdayContainer.children[W].innerHTML=`
|
|
23
28
|
<span class='flatpickr-weekday'>
|
|
24
|
-
`+
|
|
29
|
+
`+A.join("</span><span class='flatpickr-weekday'>")+`
|
|
25
30
|
</span>
|
|
26
|
-
`}}function T(){t.calendarContainer.classList.add("hasWeeks");var O=Oe("div","flatpickr-weekwrapper");O.appendChild(Oe("span","flatpickr-weekday",t.l10n.weekAbbreviation));var L=Oe("div","flatpickr-weeks");return O.appendChild(L),{weekWrapper:O,weekNumbers:L}}function P(O,L){L===void 0&&(L=!0);var I=L?O:O-t.currentMonth;I<0&&t._hidePrevMonthArrow===!0||I>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=I,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,We("onYearChange"),D()),S(),We("onMonthChange"),Xt())}function W(O,L){if(O===void 0&&(O=!0),L===void 0&&(L=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,L===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var I=_n(t.config),J=I.hours,le=I.minutes,he=I.seconds;C(J,le,he)}t.redraw(),O&&We("onChange")}function z(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),We("onClose")}function U(){t.config!==void 0&&We("onDestroy");for(var O=t._handlers.length;O--;)t._handlers[O].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var L=t.calendarContainer.parentNode;if(L.lastChild&&L.removeChild(L.lastChild),L.parentNode){for(;L.firstChild;)L.parentNode.insertBefore(L.firstChild,L);L.parentNode.removeChild(L)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(I){try{delete t[I]}catch{}})}function K(O){return t.calendarContainer.contains(O)}function Q(O){if(t.isOpen&&!t.config.inline){var L=ut(O),I=K(L),J=L===t.input||L===t.altInput||t.element.contains(L)||O.path&&O.path.indexOf&&(~O.path.indexOf(t.input)||~O.path.indexOf(t.altInput)),le=!J&&!I&&!K(O.relatedTarget),he=!t.config.ignoredFocusElements.some(function(Ee){return Ee.contains(L)});le&&he&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&l(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ie(O){if(!(!O||t.config.minDate&&O<t.config.minDate.getFullYear()||t.config.maxDate&&O>t.config.maxDate.getFullYear())){var L=O,I=t.currentYear!==L;t.currentYear=L||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),I&&(t.redraw(),We("onYearChange"),D())}}function Y(O,L){var I;L===void 0&&(L=!0);var J=t.parseDate(O,void 0,L);if(t.config.minDate&&J&&ht(J,t.config.minDate,L!==void 0?L:!t.minDateHasTime)<0||t.config.maxDate&&J&&ht(J,t.config.maxDate,L!==void 0?L:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(J===void 0)return!1;for(var le=!!t.config.enable,he=(I=t.config.enable)!==null&&I!==void 0?I:t.config.disable,Ee=0,fe=void 0;Ee<he.length;Ee++){if(fe=he[Ee],typeof fe=="function"&&fe(J))return le;if(fe instanceof Date&&J!==void 0&&fe.getTime()===J.getTime())return le;if(typeof fe=="string"){var Se=t.parseDate(fe,void 0,!0);return Se&&Se.getTime()===J.getTime()?le:!le}else if(typeof fe=="object"&&J!==void 0&&fe.from&&fe.to&&J.getTime()>=fe.from.getTime()&&J.getTime()<=fe.to.getTime())return le}return!le}function H(O){return t.daysContainer!==void 0?O.className.indexOf("hidden")===-1&&O.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(O):!1}function ee(O){var L=O.target===t._input,I=t._input.value.trimEnd()!==$e();L&&I&&!(O.relatedTarget&&K(O.relatedTarget))&&t.setDate(t._input.value,!0,O.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function X(O){var L=ut(O),I=t.config.wrap?s.contains(L):L===t._input,J=t.config.allowInput,le=t.isOpen&&(!J||!I),he=t.config.inline&&I&&!J;if(O.keyCode===13&&I){if(J)return t.setDate(t._input.value,!0,L===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),L.blur();t.open()}else if(K(L)||le||he){var Ee=!!t.timeContainer&&t.timeContainer.contains(L);switch(O.keyCode){case 13:Ee?(O.preventDefault(),l(),Z()):re(O);break;case 27:O.preventDefault(),Z();break;case 8:case 46:I&&!t.config.allowInput&&(O.preventDefault(),t.clear());break;case 37:case 39:if(!Ee&&!I){O.preventDefault();var fe=r();if(t.daysContainer!==void 0&&(J===!1||fe&&H(fe))){var Se=O.keyCode===39?1:-1;O.ctrlKey?(O.stopPropagation(),P(Se),f(g(1),0)):f(void 0,Se)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:O.preventDefault();var ce=O.keyCode===40?1:-1;t.daysContainer&&L.$i!==void 0||L===t.input||L===t.altInput?O.ctrlKey?(O.stopPropagation(),ie(t.currentYear-ce),f(g(1),0)):Ee||f(void 0,ce*7):L===t.currentYearElement?ie(t.currentYear-ce):t.config.enableTime&&(!Ee&&t.hourElement&&t.hourElement.focus(),l(O),t._debouncedChange());break;case 9:if(Ee){var ye=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(ft){return ft}),Be=ye.indexOf(L);if(Be!==-1){var Ft=ye[Be+(O.shiftKey?-1:1)];O.preventDefault(),(Ft||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(L)&&O.shiftKey&&(O.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&L===t.amPM)switch(O.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],m(),ot();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],m(),ot();break}(I||K(L))&&We("onKeyDown",O)}function q(O,L){if(L===void 0&&(L="flatpickr-day"),!(t.selectedDates.length!==1||O&&(!O.classList.contains(L)||O.classList.contains("flatpickr-disabled")))){for(var I=O?O.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),J=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),le=Math.min(I,t.selectedDates[0].getTime()),he=Math.max(I,t.selectedDates[0].getTime()),Ee=!1,fe=0,Se=0,ce=le;ce<he;ce+=gd.DAY)Y(new Date(ce),!0)||(Ee=Ee||ce>le&&ce<he,ce<J&&(!fe||ce>fe)?fe=ce:ce>J&&(!Se||ce<Se)&&(Se=ce));var ye=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+L));ye.forEach(function(Be){var Ft=Be.dateObj,ft=Ft.getTime(),ns=fe>0&&ft<fe||Se>0&&ft>Se;if(ns){Be.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Di){Be.classList.remove(Di)});return}else if(Ee&&!ns)return;["startRange","inRange","endRange","notAllowed"].forEach(function(Di){Be.classList.remove(Di)}),O!==void 0&&(O.classList.add(I<=t.selectedDates[0].getTime()?"startRange":"endRange"),J<I&&ft===J?Be.classList.add("startRange"):J>I&&ft===J&&Be.classList.add("endRange"),ft>=fe&&(Se===0||ft<=Se)&&pd(ft,J,I)&&Be.classList.add("inRange"))})}}function oe(){t.isOpen&&!t.config.static&&!t.config.inline&&Le()}function ne(O,L){if(L===void 0&&(L=t._positionElement),t.isMobile===!0){if(O){O.preventDefault();var I=ut(O);I&&I.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),We("onOpen");return}else if(t._input.disabled||t.config.inline)return;var J=t.isOpen;t.isOpen=!0,J||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),We("onOpen"),Le(L)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(O===void 0||!t.timeContainer.contains(O.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function me(O){return function(L){var I=t.config["_"+O+"Date"]=t.parseDate(L,t.config.dateFormat),J=t.config["_"+(O==="min"?"max":"min")+"Date"];I!==void 0&&(t[O==="min"?"minDateHasTime":"maxDateHasTime"]=I.getHours()>0||I.getMinutes()>0||I.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(le){return Y(le)}),!t.selectedDates.length&&O==="min"&&v(I),ot()),t.daysContainer&&(G(),I!==void 0?t.currentYearElement[O]=I.getFullYear().toString():t.currentYearElement.removeAttribute(O),t.currentYearElement.disabled=!!J&&I!==void 0&&J.getFullYear()===I.getFullYear())}}function be(){var O=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],L=Ze(Ze({},JSON.parse(JSON.stringify(s.dataset||{}))),e),I={};t.config.parseDate=L.parseDate,t.config.formatDate=L.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(ye){t.config._enable=we(ye)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(ye){t.config._disable=we(ye)}});var J=L.mode==="time";if(!L.dateFormat&&(L.enableTime||J)){var le=Ke.defaultConfig.dateFormat||gi.dateFormat;I.dateFormat=L.noCalendar||J?"H:i"+(L.enableSeconds?":S":""):le+" H:i"+(L.enableSeconds?":S":"")}if(L.altInput&&(L.enableTime||J)&&!L.altFormat){var he=Ke.defaultConfig.altFormat||gi.altFormat;I.altFormat=L.noCalendar||J?"h:i"+(L.enableSeconds?":S K":" K"):he+(" h:i"+(L.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:me("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:me("max")});var Ee=function(ye){return function(Be){t.config[ye==="min"?"_minTime":"_maxTime"]=t.parseDate(Be,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Ee("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Ee("max")}),L.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,I,L);for(var fe=0;fe<O.length;fe++)t.config[O[fe]]=t.config[O[fe]]===!0||t.config[O[fe]]==="true";Mn.filter(function(ye){return t.config[ye]!==void 0}).forEach(function(ye){t.config[ye]=Sn(t.config[ye]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var fe=0;fe<t.config.plugins.length;fe++){var Se=t.config.plugins[fe](t)||{};for(var ce in Se)Mn.indexOf(ce)>-1?t.config[ce]=Sn(Se[ce]).map(a).concat(t.config[ce]):typeof L[ce]>"u"&&(t.config[ce]=Se[ce])}L.altInputClass||(t.config.altInputClass=xe().className+" "+t.config.altInputClass),We("onParseConfig")}function xe(){return t.config.wrap?s.querySelector("[data-input]"):s}function je(){typeof t.config.locale!="object"&&typeof Ke.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Ze(Ze({},Ke.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ke.l10ns[t.config.locale]:void 0),ii.D="("+t.l10n.weekdays.shorthand.join("|")+")",ii.l="("+t.l10n.weekdays.longhand.join("|")+")",ii.M="("+t.l10n.months.shorthand.join("|")+")",ii.F="("+t.l10n.months.longhand.join("|")+")",ii.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var O=Ze(Ze({},e),JSON.parse(JSON.stringify(s.dataset||{})));O.time_24hr===void 0&&Ke.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=ea(t),t.parseDate=Dn({config:t.config,l10n:t.l10n})}function Le(O){if(typeof t.config.position=="function")return void t.config.position(t,O);if(t.calendarContainer!==void 0){We("onPreCalendarPosition");var L=O||t._positionElement,I=Array.prototype.reduce.call(t.calendarContainer.children,(function(Xb,Zb){return Xb+Zb.offsetHeight}),0),J=t.calendarContainer.offsetWidth,le=t.config.position.split(" "),he=le[0],Ee=le.length>1?le[1]:null,fe=L.getBoundingClientRect(),Se=window.innerHeight-fe.bottom,ce=he==="above"||he!=="below"&&Se<I&&fe.top>I,ye=window.pageYOffset+fe.top+(ce?-I-2:L.offsetHeight+2);if(et(t.calendarContainer,"arrowTop",!ce),et(t.calendarContainer,"arrowBottom",ce),!t.config.inline){var Be=window.pageXOffset+fe.left,Ft=!1,ft=!1;Ee==="center"?(Be-=(J-fe.width)/2,Ft=!0):Ee==="right"&&(Be-=J-fe.width,ft=!0),et(t.calendarContainer,"arrowLeft",!Ft&&!ft),et(t.calendarContainer,"arrowCenter",Ft),et(t.calendarContainer,"arrowRight",ft);var ns=window.document.body.offsetWidth-(window.pageXOffset+fe.right),Di=Be+J>window.document.body.offsetWidth,Yb=ns+J>window.document.body.offsetWidth;if(et(t.calendarContainer,"rightMost",Di),!t.config.static)if(t.calendarContainer.style.top=ye+"px",!Di)t.calendarContainer.style.left=Be+"px",t.calendarContainer.style.right="auto";else if(!Yb)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=ns+"px";else{var Zn=Ne();if(Zn===void 0)return;var Gb=window.document.body.offsetWidth,$b=Math.max(0,Gb/2-J/2),Ub=".flatpickr-calendar.centerMost:before",Kb=".flatpickr-calendar.centerMost:after",qb=Zn.cssRules.length,Jb="{left:"+fe.left+"px;right:auto;}";et(t.calendarContainer,"rightMost",!1),et(t.calendarContainer,"centerMost",!0),Zn.insertRule(Ub+","+Kb+Jb,qb),t.calendarContainer.style.left=$b+"px",t.calendarContainer.style.right="auto"}}}}function Ne(){for(var O=null,L=0;L<document.styleSheets.length;L++){var I=document.styleSheets[L];if(I.cssRules){try{I.cssRules}catch{continue}O=I;break}}return O??se()}function se(){var O=document.createElement("style");return document.head.appendChild(O),O.sheet}function G(){t.config.noCalendar||t.isMobile||(D(),Xt(),S())}function Z(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function re(O){O.preventDefault(),O.stopPropagation();var L=function(ye){return ye.classList&&ye.classList.contains("flatpickr-day")&&!ye.classList.contains("flatpickr-disabled")&&!ye.classList.contains("notAllowed")},I=Qr(ut(O),L);if(I!==void 0){var J=I,le=t.latestSelectedDateObj=new Date(J.dateObj.getTime()),he=(le.getMonth()<t.currentMonth||le.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=J,t.config.mode==="single")t.selectedDates=[le];else if(t.config.mode==="multiple"){var Ee=Jt(le);Ee?t.selectedDates.splice(parseInt(Ee),1):t.selectedDates.push(le)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=le,t.selectedDates.push(le),ht(le,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(ye,Be){return ye.getTime()-Be.getTime()}));if(m(),he){var fe=t.currentYear!==le.getFullYear();t.currentYear=le.getFullYear(),t.currentMonth=le.getMonth(),fe&&(We("onYearChange"),D()),We("onMonthChange")}if(Xt(),S(),ot(),!he&&t.config.mode!=="range"&&t.config.showMonths===1?y(J):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Se=t.config.mode==="single"&&!t.config.enableTime,ce=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Se||ce)&&Z()}R()}}var te={locale:[je,$],showMonths:[N,o,j],minDate:[k],maxDate:[k],positionElement:[ze],clickOpens:[function(){t.config.clickOpens===!0?(x(t._input,"focus",t.open),x(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function pe(O,L){if(O!==null&&typeof O=="object"){Object.assign(t.config,O);for(var I in O)te[I]!==void 0&&te[I].forEach(function(J){return J()})}else t.config[O]=L,te[O]!==void 0?te[O].forEach(function(J){return J()}):Mn.indexOf(O)>-1&&(t.config[O]=Sn(L));t.redraw(),ot(!0)}function Me(O,L){var I=[];if(O instanceof Array)I=O.map(function(J){return t.parseDate(J,L)});else if(O instanceof Date||typeof O=="number")I=[t.parseDate(O,L)];else if(typeof O=="string")switch(t.config.mode){case"single":case"time":I=[t.parseDate(O,L)];break;case"multiple":I=O.split(t.config.conjunction).map(function(J){return t.parseDate(J,L)});break;case"range":I=O.split(t.l10n.rangeSeparator).map(function(J){return t.parseDate(J,L)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(O)));t.selectedDates=t.config.allowInvalidPreload?I:I.filter(function(J){return J instanceof Date&&Y(J,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(J,le){return J.getTime()-le.getTime()})}function ve(O,L,I){if(L===void 0&&(L=!1),I===void 0&&(I=t.config.dateFormat),O!==0&&!O||O instanceof Array&&O.length===0)return t.clear(L);Me(O,I),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),k(void 0,L),v(),t.selectedDates.length===0&&t.clear(!1),ot(L),L&&We("onChange")}function we(O){return O.slice().map(function(L){return typeof L=="string"||typeof L=="number"||L instanceof Date?t.parseDate(L,void 0,!0):L&&typeof L=="object"&&L.from&&L.to?{from:t.parseDate(L.from,void 0),to:t.parseDate(L.to,void 0)}:L}).filter(function(L){return L})}function Pe(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var O=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);O&&Me(O,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ct(){if(t.input=xe(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Oe(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),ze()}function ze(){t._positionElement=t.config.positionElement||t._input}function Xn(){var O=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Oe("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=O,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=O==="datetime-local"?"Y-m-d\\TH:i:S":O==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}x(t.mobileInput,"change",function(L){t.setDate(ut(L).value,!1,t.mobileFormatStr),We("onChange"),We("onClose")})}function is(O){if(t.isOpen===!0)return t.close();t.open(O)}function We(O,L){if(t.config!==void 0){var I=t.config[O];if(I!==void 0&&I.length>0)for(var J=0;I[J]&&J<I.length;J++)I[J](t.selectedDates,t.input.value,t,L);O==="onChange"&&(t.input.dispatchEvent(Ri("change")),t.input.dispatchEvent(Ri("input")))}}function Ri(O){var L=document.createEvent("Event");return L.initEvent(O,!0,!0),L}function Jt(O){for(var L=0;L<t.selectedDates.length;L++){var I=t.selectedDates[L];if(I instanceof Date&&ht(I,O)===0)return""+L}return!1}function ai(O){return t.config.mode!=="range"||t.selectedDates.length<2?!1:ht(O,t.selectedDates[0])>=0&&ht(O,t.selectedDates[1])<=0}function Xt(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(O,L){var I=new Date(t.currentYear,t.currentMonth,1);I.setMonth(t.currentMonth+L),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[L].textContent=Ts(I.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=I.getMonth().toString(),O.value=I.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function $e(O){var L=O||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(I){return t.formatDate(I,L)}).filter(function(I,J,le){return t.config.mode!=="range"||t.config.enableTime||le.indexOf(I)===J}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function ot(O){O===void 0&&(O=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=$e(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=$e(t.config.altFormat)),O!==!1&&We("onValueUpdate")}function ss(O){var L=ut(O),I=t.prevMonthNav.contains(L),J=t.nextMonthNav.contains(L);I||J?P(I?-1:1):t.yearElements.indexOf(L)>=0?L.select():L.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):L.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function tt(O){O.preventDefault();var L=O.type==="keydown",I=ut(O),J=I;t.amPM!==void 0&&I===t.amPM&&(t.amPM.textContent=t.l10n.amPM[bt(t.amPM.textContent===t.l10n.amPM[0])]);var le=parseFloat(J.getAttribute("min")),he=parseFloat(J.getAttribute("max")),Ee=parseFloat(J.getAttribute("step")),fe=parseInt(J.value,10),Se=O.delta||(L?O.which===38?1:-1:0),ce=fe+Ee*Se;if(typeof J.value<"u"&&J.value.length===2){var ye=J===t.hourElement,Be=J===t.minuteElement;ce<le?(ce=he+ce+bt(!ye)+(bt(ye)&&bt(!t.amPM)),Be&&p(void 0,-1,t.hourElement)):ce>he&&(ce=J===t.hourElement?ce-he-bt(!t.amPM):le,Be&&p(void 0,1,t.hourElement)),t.amPM&&ye&&(Ee===1?ce+fe===23:Math.abs(ce-fe)>Ee)&&(t.amPM.textContent=t.l10n.amPM[bt(t.amPM.textContent===t.l10n.amPM[0])]),J.value=nt(ce)}}return n(),t}function bi(s,e){for(var t=Array.prototype.slice.call(s).filter(function(a){return a instanceof HTMLElement}),i=[],n=0;n<t.length;n++){var r=t[n];try{if(r.getAttribute("data-fp-omit")!==null)continue;r._flatpickr!==void 0&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=vd(r,e||{}),i.push(r._flatpickr)}catch(a){console.error(a)}}return i.length===1?i[0]:i}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(s){return bi(this,s)},HTMLElement.prototype.flatpickr=function(s){return bi([this],s)});var Ke=function(s,e){return typeof s=="string"?bi(window.document.querySelectorAll(s),e):s instanceof Node?bi([s],e):bi(s,e)};Ke.defaultConfig={},Ke.l10ns={en:Ze({},Vi),default:Ze({},Vi)},Ke.localize=function(s){Ke.l10ns.default=Ze(Ze({},Ke.l10ns.default),s)},Ke.setDefaults=function(s){Ke.defaultConfig=Ze(Ze({},Ke.defaultConfig),s)},Ke.parseDate=Dn({}),Ke.formatDate=ea({}),Ke.compareDates=ht,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(s){return bi(this,s)}),Date.prototype.fp_incr=function(s){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof s=="string"?parseInt(s,10):s))},typeof window<"u"&&(window.flatpickr=Ke);var Wi={exports:{}},yd=Wi.exports,ia;function wd(){return ia||(ia=1,(function(s,e){(function(t,i){i(e)})(yd,(function(t){var i=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},n={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};i.l10ns.ru=n;var r=i.l10ns;t.Russian=n,t.default=r,Object.defineProperty(t,"__esModule",{value:!0})}))})(Wi,Wi.exports)),Wi.exports}var Cd=wd();const Ed=["value","id","name","disabled","required","placeholder"],kd=["title"],xd=["title"],Md=it(d.defineComponent({__name:"Flatpickr",props:{modelValue:{default:""},id:{default:"flatpickr-input"},error:{default:""},name:{default:"flatpickr"},placeholder:{default:"Выберите дату"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},config:{default:()=>({})},format:{default:"DD.MM.YYYY"},locale:{default:"ru"},resetTitle:{default:"Очистить"},calendarTitle:{default:"Выбрать дату"},allowInput:{type:Boolean,default:!0},enableTime:{type:Boolean,default:!1},time_24hr:{type:Boolean,default:!0},dateFormat:{default:"d.m.Y"},minDate:{default:void 0},maxDate:{default:void 0},defaultDate:{default:void 0},mode:{default:"single"}},emits:["update:modelValue","change","open","close","ready"],setup(s,{emit:e}){const t=s,i=e,n=d.ref(),r=d.ref(null),a=d.ref(!1),o=d.ref(""),l=d.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]),u=R=>{if(!R)return"";const M=new Date(R);if(isNaN(M.getTime()))return"";const k=String(M.getDate()).padStart(2,"0"),_=String(M.getMonth()+1).padStart(2,"0"),p=M.getFullYear();return t.format==="DD.MM.YYYY"?`${k}.${_}.${p}`:t.format==="MM/DD/YYYY"?`${_}/${k}/${p}`:t.format==="YYYY-MM-DD"?`${p}-${_}-${k}`:`${k}.${_}.${p}`},h=R=>{if(!R)return"";if(/^\d{4}-\d{2}-\d{2}/.test(R))return R;if(t.format==="DD.MM.YYYY"){const M=R.split(".");if(M.length===3){const[k,_,p]=M;return`${p}-${_.padStart(2,"0")}-${k.padStart(2,"0")}`}}if(t.format==="MM/DD/YYYY"){const M=R.split("/");if(M.length===3){const[k,_,p]=M;return`${p}-${k.padStart(2,"0")}-${_.padStart(2,"0")}`}}return t.format==="YYYY-MM-DD",R},m=()=>{if(!n.value)return;const R={locale:t.locale==="ru"?Cd.Russian:void 0,allowInput:t.allowInput,enableTime:t.enableTime,time_24hr:t.time_24hr,dateFormat:t.dateFormat,mode:t.mode,wrap:!0,onClose:(M,k,_)=>{const p=M.length>0;if(!(t.modelValue!==k))return!1;if(!p)return v({instance:_}),!1;d.nextTick(()=>{if(t.mode==="multiple"){const c=M.map(y=>u(y));i("update:modelValue",c)}else if(t.mode==="range"){const c=M.map(y=>u(y));i("update:modelValue",c)}else i("update:modelValue",k);i("change",M.map(c=>c.toISOString()),k,_)})},onOpen:M=>{i("open",M)},onReady:M=>{i("ready",M)},...t.config};t.minDate&&t.minDate&&(R.minDate=t.minDate),t.maxDate&&(R.maxDate=t.maxDate),t.defaultDate&&(R.defaultDate=t.defaultDate),r.value=Ke(n.value,R),v({instance:r.value})},v=({instance:R})=>{R?._input&&(t.modelValue?d.nextTick(()=>{Array.isArray(t.modelValue)?R._input.value=t.modelValue.map(M=>u(M)).join(", "):R._input.value=u(t.modelValue),a.value=!0}):d.nextTick(()=>{R._input.value="",a.value=!1}))},C=()=>{t.disabled||!r.value||(r.value.clear(),r.value._input.value="",i("update:modelValue",""),a.value=!1)},F=R=>{const M=R.target;o.value=M.value},x=()=>{if(o.value){const R=h(o.value);R&&i("update:modelValue",R)}};return d.watch(()=>t.modelValue,R=>{if(!R){a.value=!1,r.value?._input&&(r.value._input.value=""),o.value="";return}Array.isArray(R)?o.value=R.map(M=>u(M)).join(", "):o.value=u(R),a.value=!0},{deep:!0}),d.watch(()=>t.disabled,R=>{r.value?._input&&(r.value._input.disabled=R)}),d.onMounted(()=>{m()}),d.onBeforeUnmount(()=>{r.value&&r.value.destroy()}),(R,M)=>(d.openBlock(),d.createElementBlock("div",{style:{position:"relative"},ref_key:"input",ref:n},[d.createElementVNode("div",{class:d.normalizeClass({"not-valid":l.value.length})},[d.createElementVNode("input",{type:"text",class:"form-control flatpickr",value:o.value,id:R.id,name:R.name,disabled:R.disabled,required:R.required,placeholder:R.placeholder,"data-input":"",onInput:F,onBlur:x},null,40,Ed)],2),a.value&&!R.disabled?(d.openBlock(),d.createElementBlock("a",{key:0,class:"remove-button text-dark",onClick:C,style:{position:"absolute",right:"40px",top:"8px","font-size":"16px",cursor:"pointer"},"data-toggle":"",title:R.resetTitle},[...M[0]||(M[0]=[d.createElementVNode("i",{class:"bi bi-x-lg"},null,-1)])],8,kd)):d.createCommentVNode("",!0),d.createElementVNode("a",{class:"remove-button text-dark",style:{position:"absolute",right:"10px",top:"4px","font-size":"20px",cursor:"pointer"},"data-toggle":"",title:R.calendarTitle},[...M[1]||(M[1]=[d.createElementVNode("i",{class:"bi bi-calendar3"},null,-1)])],8,xd),d.createVNode(Ii,{errors:l.value},null,8,["errors"])],512))}}),[["__scopeId","data-v-fb3fef0b"]]),Sd={key:0,class:"modal-wrapper"},Rd={class:"modal-header pb-4 border-bottom-0"},Dd={key:0,class:"modal-title"},Td={key:0,class:"modal-body pt-0"},_d={key:1,class:"modal-footer row justify-content-start pt-3"},sa=d.defineComponent({__name:"DefaultModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},scrollable:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},size:{type:String,default:""},style:{type:String,default:""}},emits:["update:modelValue"],setup(s,{emit:e}){const t=s,i=e,n=d.useSlots(),r=()=>{i("update:modelValue",!1)},a=o=>{o.key==="Escape"&&r()};return d.watch(()=>t.modelValue,o=>{o?(document.body.style.overflow="hidden",window.addEventListener("keydown",a)):(document.body.style.overflow="",window.removeEventListener("keydown",a))},{immediate:!0}),d.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",a)}),(o,l)=>(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[s.modelValue?(d.openBlock(),d.createElementBlock("div",Sd,[d.createElementVNode("div",{class:"overlay",onClick:r}),d.createElementVNode("div",{class:d.normalizeClass(["modal-dialog",{"modal-dialog-scrollable":s.scrollable,"modal-dialog-centered":s.centered,"modal-sm":s.size==="sm","modal-lg":s.size==="lg","modal-xl":s.size==="xl"}])},[d.createElementVNode("div",{class:"modal-content p-3",style:d.normalizeStyle(s.style)},[d.createElementVNode("div",Rd,[s.title?(d.openBlock(),d.createElementBlock("h4",Dd,d.toDisplayString(s.title),1)):d.createCommentVNode("",!0),d.createElementVNode("button",{type:"button",class:"btn-close",onClick:r})]),d.unref(n)["modal-body"]||d.unref(n).body?(d.openBlock(),d.createElementBlock("div",Td,[d.renderSlot(o.$slots,"modal-body"),d.renderSlot(o.$slots,"body")])):d.createCommentVNode("",!0),d.unref(n)["modal-footer"]||d.unref(n).footer?(d.openBlock(),d.createElementBlock("div",_d,[d.renderSlot(o.$slots,"modal-footer"),d.renderSlot(o.$slots,"footer")])):d.createCommentVNode("",!0)],4)],2)])):d.createCommentVNode("",!0)]))}}),Od="/img/success.png",Ld="/img/warning.png",Pd="/img/error.png",Fd="/img/confirmation.png",Ad={class:"row mb-3"},Hd={class:"col-auto"},zd={style:{width:"90px",height:"90px"}},Bd=["src","alt"],Nd={key:1,class:"w-100",src:Od,alt:"Успех"},Id={key:2,class:"w-100",src:Ld,alt:"Предупреждение"},Vd={key:3,class:"w-100",src:Pd,alt:"Ошибка"},jd={key:4,class:"w-100",src:Fd,alt:"Подтверждение"},Wd={class:"col"},Yd={class:"confirmation-content"},Gd={key:0,class:"mb-3"},$d={key:1,class:"text-muted"},Ud={key:0,class:"d-flex gap-2"},Kd=["disabled"],qd=["disabled"],Jd={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Xd=it(d.defineComponent({__name:"ConfirmationModal",props:{title:{default:"Подтверждение"},message:{default:""},description:{default:""},modalVisibility:{type:Boolean,default:!1},size:{default:""},confirmText:{default:"Да"},cancelText:{default:"Нет"},imageSrc:{default:""},imageAlt:{default:""},loading:{type:Boolean,default:!1},mode:{default:"confirmation"},showButtons:{type:Boolean,default:!0}},emits:["update:modalVisibility","confirm","cancel"],setup(s,{emit:e}){const t=s,i=e,n=u=>{i("update:modalVisibility",u)},r=()=>{switch(t.mode){case"success":return"btn btn-success";case"warning":return"btn btn-warning";case"error":return"btn btn-danger";default:return"btn btn-primary"}},a=()=>{switch(t.mode){case"success":return"Отлично";case"warning":return"Понятно";case"error":return"Понятно";default:return t.confirmText}},o=()=>{t.loading||i("confirm")},l=()=>{t.loading||(i("cancel"),i("update:modalVisibility",!1))};return(u,h)=>(d.openBlock(),d.createBlock(sa,{"model-value":u.modalVisibility,"onUpdate:modelValue":n,size:u.size,title:u.title},{"modal-body":d.withCtx(()=>[d.createElementVNode("div",Ad,[d.createElementVNode("div",Hd,[d.createElementVNode("div",zd,[u.imageSrc?(d.openBlock(),d.createElementBlock("img",{key:0,class:"w-100",src:u.imageSrc,alt:u.imageAlt||"Изображение"},null,8,Bd)):u.mode==="success"?(d.openBlock(),d.createElementBlock("img",Nd)):u.mode==="warning"?(d.openBlock(),d.createElementBlock("img",Id)):u.mode==="error"?(d.openBlock(),d.createElementBlock("img",Vd)):(d.openBlock(),d.createElementBlock("img",jd))])]),d.createElementVNode("div",Wd,[d.createElementVNode("div",Yd,[u.message?(d.openBlock(),d.createElementBlock("h5",Gd,d.toDisplayString(u.message),1)):d.createCommentVNode("",!0),u.description?(d.openBlock(),d.createElementBlock("p",$d,d.toDisplayString(u.description),1)):d.createCommentVNode("",!0)])])]),d.renderSlot(u.$slots,"modal-body",{},void 0,!0)]),"modal-footer":d.withCtx(()=>[d.renderSlot(u.$slots,"modal-footer",{},()=>[u.showButtons?(d.openBlock(),d.createElementBlock("div",Ud,[u.mode==="confirmation"?(d.openBlock(),d.createElementBlock("button",{key:0,class:"btn btn-light",onClick:l,disabled:u.loading},d.toDisplayString(u.cancelText),9,Kd)):d.createCommentVNode("",!0),d.createElementVNode("button",{class:d.normalizeClass(r()),onClick:o,disabled:u.loading},[u.loading?(d.openBlock(),d.createElementBlock("span",Jd)):d.createCommentVNode("",!0),d.createTextVNode(" "+d.toDisplayString(a()),1)],10,qd)])):d.createCommentVNode("",!0)],!0)]),_:3},8,["model-value","size","title"]))}}),[["__scopeId","data-v-c2efa4c0"]]),Zd={class:"custom-dropdown"},Qd={style:{"border-bottom":"2px solid #000"}},ec={class:"dropdown-list-wrapper"},tc={key:0,class:"custom-dropdown-menu"},ic=["onClick"],sc=it({__name:"DefaultDropDown",props:{links:{type:Array,required:!0},title:{type:String,default:"Actions"},type:{type:String,default:"actions",validator:function(s){return["actions","profile"].includes(s)}}},setup(s){const e=s,t=d.ref(!1),i=o=>{o&&(o.preventDefault(),o.stopPropagation()),t.value=!t.value},n=o=>{o(),i()},r=o=>{o&&(o.preventDefault(),o.stopPropagation()),setTimeout(()=>{t.value=!1},100)},a=d.computed(()=>e.type==="profile");return(o,l)=>(d.openBlock(),d.createElementBlock("div",Zd,[a.value?(d.openBlock(),d.createElementBlock("a",{key:0,href:"#",class:"cursor-pointer nav-link dropdown-toggle d-flex align-items-center border rounded p-2",onClick:i,onBlur:r},[l[0]||(l[0]=d.createElementVNode("div",{class:"circl"},null,-1)),d.createTextVNode(" "+d.toDisplayString(s.title),1)],32)):(d.openBlock(),d.createElementBlock("a",{key:1,href:"#",class:"link-dark",type:"button",onClick:i,onBlur:r},[d.createElementVNode("span",Qd,d.toDisplayString(s.title),1),l[1]||(l[1]=d.createElementVNode("i",{class:"bi bi-chevron-up dropdown-edit",style:{"font-size":"12px","padding-left":"5px"}},null,-1))],32)),d.createElementVNode("div",ec,[t.value?(d.openBlock(),d.createElementBlock("ul",tc,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(s.links,(u,h)=>(d.openBlock(),d.createElementBlock("li",{key:h},[u.hidden?d.createCommentVNode("",!0):(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(["dropdown-item",{disabled:u?.disabled}]),style:{cursor:"pointer"},onClick:m=>n(u?.action)},d.toDisplayString(u?.title),11,ic))]))),128))])):d.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-efc16eec"]]),nc={class:"card-body"},rc={class:"card-text"},ac=it({__name:"Card",props:{title:{type:String,default:""},bodyClass:{type:String,default:"bg-gray-light"}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["card",s.bodyClass])},[d.createElementVNode("div",nc,[d.renderSlot(e.$slots,"bodyHeader",{},void 0,!0),d.createElementVNode("p",rc,[d.renderSlot(e.$slots,"default",{},void 0,!0)])])],2))}},[["__scopeId","data-v-5fa81802"]]),oc={class:"row mb-4 mx-0","data-test":"PageTitle"},lc={class:"col-12"},uc={class:"row align-items-center"},hc={class:"col-auto"},dc={class:"col d-flex justify-content-end"},cc=it(d.defineComponent({__name:"PageTitle",props:{title:{},subtitle:{default:""},titleClass:{default:""},subtitleClass:{default:""},titleStyle:{default:""},subtitleStyle:{default:""}},setup(s){return(e,t)=>(d.openBlock(),d.createElementBlock("div",oc,[d.createElementVNode("div",lc,[d.createElementVNode("div",uc,[d.createElementVNode("div",hc,[d.createElementVNode("h2",{class:d.normalizeClass(["mb-0",e.titleClass]),style:d.normalizeStyle(e.titleStyle)},d.toDisplayString(e.title),7),e.subtitle?(d.openBlock(),d.createElementBlock("p",{key:0,class:d.normalizeClass(["text-muted mb-0 mt-1",e.subtitleClass]),style:d.normalizeStyle(e.subtitleStyle)},d.toDisplayString(e.subtitle),7)):d.createCommentVNode("",!0)]),d.createElementVNode("div",dc,[d.renderSlot(e.$slots,"default",{},void 0,!0)])])])]))}}),[["__scopeId","data-v-fd1eb9a3"]]),fc={key:0,class:"card-header"},pc={class:"card-title mb-0"},mc={class:"card-body"},gc={class:"row"},bc={class:"row align-items-center"},vc={class:"col-auto label pe-0"},yc={class:"col-auto"},wc={key:0,class:"mt-3"},Cc=it(d.defineComponent({__name:"CardInfo",props:{title:{default:""},fields:{default:()=>[]},cardClass:{default:""},variant:{default:"default"},size:{default:"md"},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1}},setup(s){const e=s,t=d.computed(()=>{const i=["card-info"];return e.variant!=="default"&&i.push(`card-info--${e.variant}`),e.size!=="md"&&i.push(`card-info--${e.size}`),e.bordered&&i.push("card-info--bordered"),e.shadow&&i.push("card-info--shadow"),e.cardClass&&i.push(e.cardClass),i.join(" ")});return(i,n)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["card",t.value])},[i.title?(d.openBlock(),d.createElementBlock("div",fc,[d.createElementVNode("h5",pc,d.toDisplayString(i.title),1)])):d.createCommentVNode("",!0),d.createElementVNode("div",mc,[d.createElementVNode("div",gc,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(i.fields,(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:"col-12 mb-2",key:a},[d.createElementVNode("div",bc,[d.createElementVNode("div",vc,d.toDisplayString(r.label)+": ",1),d.createElementVNode("div",yc,[d.createElementVNode("span",{class:d.normalizeClass(["value",r.valueClass]),style:d.normalizeStyle(r.valueStyle)},d.toDisplayString(r.value),7)])])]))),128))]),i.$slots.default?(d.openBlock(),d.createElementBlock("div",wc,[d.renderSlot(i.$slots,"default",{},void 0,!0)])):d.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-56359964"]]),Ec={key:0,class:"row w-100 parent"},kc={class:"col-12 wrapper w-100"},xc=["innerHTML"],na={__name:"Toast",props:{message:{type:String,default:""},isError:{type:Boolean,default:!1}},setup(s){const e=s,t=d.ref(e.message);d.watch(()=>e.message,n=>{t.value=n});const i=()=>{t.value=""};return(n,r)=>t.value&&t.value.length>0?(d.openBlock(),d.createElementBlock("div",Ec,[d.createElementVNode("div",kc,[d.createElementVNode("div",{class:d.normalizeClass(["alert align-items-center message",[e.isError?"alert-danger":"alert-success"]]),innerHTML:t.value},null,10,xc),d.createElementVNode("i",{class:"bi bi-x-lg",onClick:i})])])):d.createCommentVNode("",!0)}},Mc={class:"row","data-test":"ErrorMessageComponent"},Sc={class:"col-12"},Rc={key:0,class:"bi bi-exclamation-triangle pe-2","aria-hidden":"true"},Dc=["innerHTML"],Tc=it(d.defineComponent({__name:"ErrorMessageComponent",props:{message:{default:""},warningIcon:{type:Boolean,default:!1},type:{default:"danger"},asHtml:{type:Boolean,default:!1}},setup(s){const e=s;d.computed(()=>(Array.isArray(e.message)||e.message)&&e.message.length>0);const t=d.computed(()=>Array.isArray(e.message)?e.message.join(", "):e.message||"");return(i,n)=>(d.openBlock(),d.createElementBlock("div",Mc,[d.createElementVNode("div",Sc,[d.createElementVNode("div",{class:d.normalizeClass([`alert alert-${i.type}`,{"d-flex align-items-center":i.warningIcon}])},[i.warningIcon?(d.openBlock(),d.createElementBlock("i",Rc)):d.createCommentVNode("",!0),i.asHtml?(d.openBlock(),d.createElementBlock("div",{key:1,innerHTML:t.value},null,8,Dc)):(d.openBlock(),d.createElementBlock(d.Fragment,{key:2},[d.createTextVNode(d.toDisplayString(t.value),1)],64))],2)])]))}}),[["__scopeId","data-v-c739823d"]]),_c={class:"col-12 divider divider__wrapper","data-test":"Divider"},Oc={__name:"Divider",props:{height:{type:[Number,String],default:4},className:{type:String,default:"mb-4"},colorHEX:{type:String,default:"#EFEFEF"}},setup(s){const e=s;return(t,i)=>(d.openBlock(),d.createElementBlock("div",_c,[d.createElementVNode("div",{class:d.normalizeClass(e.className),style:d.normalizeStyle(`height: ${e.height}px ; background-color:${e.colorHEX};`)},null,6)]))}};class Je{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class He{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var n=e?t.split(e):[t],r=n.length,a;for(let o=0;o<r&&(i=i[n[o]],a=i,!!i);o++);return a}static deepClone(e,t,i=[]){var n={}.__proto__,r=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var a in e){let o=e[a],l,u;o!=null&&typeof o=="object"&&(o.__proto__===n||o.__proto__===r)&&(l=i.findIndex(h=>h.subject===o),l>-1?t[a]=i[l].copy:(u=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:u}),t[a]=this.deepClone(o,u,i)))}return t}}let Lc=class za extends Je{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,n=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let r=He.elOffset(this.container);i-=r.left,n-=r.top}return{x:i,y:n}}elementPositionCoords(e,t="right"){var i=He.elOffset(e),n,r,a;switch(this.container!==document.body&&(n=He.elOffset(this.container),i.left-=n.left,i.top-=n.top),t){case"right":r=i.left+e.offsetWidth,a=i.top-1;break;case"bottom":r=i.left,a=i.top+e.offsetHeight;break;case"left":r=i.left,a=i.top-1;break;case"top":r=i.left,a=i.top;break;case"center":r=i.left+e.offsetWidth/2,a=i.top+e.offsetHeight/2;break}return{x:r,y:a,offset:i}}show(e,t){var i,n,r,a,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(r=e,o=this.elementPositionCoords(e,t),a=o.offset,i=o.x,n=o.y):typeof e=="number"?(a={top:0,left:0},i=e,n=t):(o=this.containerEventCoords(e),i=o.x,n=o.y,this.reversedX=!1),this.element.style.top=n+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,n,r,a,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",l=>{l.stopPropagation()}),this)}_fitToScreen(e,t,i,n,r){var a=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-n.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,a?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(r){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new za(this.table,e,this),this.childPopup}};class ke extends Je{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(n=>n.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new Lc(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Pc={rownum:function(s,e,t,i,n,r){return r.getPosition()}};class _s extends ke{static moduleName="accessor";static accessors=Pc;constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var r="accessor"+(n.charAt(0).toUpperCase()+n.slice(1)),a;e.definition[r]&&(a=this.lookupAccessor(e.definition[r]),a&&(t=!0,i[r]={accessor:a,params:e.definition[r+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":_s.accessors[e]?t=_s.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),n=e.getComponent(),r=He.deepClone(e.data||{});return this.table.columnManager.traverse(function(a){var o,l,u,h;a.modules.accessor&&(l=a.modules.accessor[i]||a.modules.accessor.accessor||!1,l&&(o=a.getFieldValue(r),o!="undefined"&&(h=a.getComponent(),u=typeof l.params=="function"?l.params(o,r,t,h,n):l.params,a.setFieldValue(r,l.accessor(o,r,t,u,h,n)))))}),r}}var Fc={method:"GET"};function On(s,e){var t=[];if(e=e||"",Array.isArray(s))s.forEach((n,r)=>{t=t.concat(On(n,e?e+"["+r+"]":r))});else if(typeof s=="object")for(var i in s)t=t.concat(On(s[i],e?e+"["+i+"]":i));else t.push({key:e,value:s});return t}function Ac(s){var e=On(s),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function ra(s,e,t){return s&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",s+=(s.includes("?")?"&":"?")+Ac(t)),s}function Hc(s,e,t){var i;return new Promise((n,r)=>{if(s=this.urlGenerator.call(this.table,s,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var a in i.headers)e.headers||(e.headers={}),typeof e.headers[a]>"u"&&(e.headers[a]=i.headers[a]);e.body=i.body.call(this,s,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);s?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(s,e).then(o=>{o.ok?o.json().then(l=>{n(l)}).catch(l=>{r(l),console.warn("Ajax Load Error - Invalid JSON returned",l)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),r(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),r(o)})):(console.warn("Ajax Load Error - No URL Set"),n([]))})}function Ln(s,e){var t=[];if(e=e||"",Array.isArray(s))s.forEach((n,r)=>{t=t.concat(Ln(n,e?e+"["+r+"]":r))});else if(typeof s=="object")for(var i in s)t=t.concat(Ln(s[i],e?e+"["+i+"]":i));else t.push({key:e,value:s});return t}var zc={json:{headers:{"Content-Type":"application/json"},body:function(s,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(s,e,t){var i=Ln(t),n=new FormData;return i.forEach(function(r){n.append(r.key,r.value)}),n}}};class vi extends ke{static moduleName="ajax";static defaultConfig=Fc;static defaultURLGenerator=ra;static defaultLoaderPromise=Hc;static contentTypeFormatters=zc;constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=vi.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||vi.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||vi.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,n){var r=this.table.options.ajaxParams;return r&&(typeof r=="function"&&(r=r.call(this.table)),n=Object.assign(Object.assign({},r),n)),n}requestDataCheck(e,t,i,n){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,n,r){var a;return!r&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):r}setDefaultConfig(e={}){this.config=Object.assign({},vi.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(n=>(this.table.options.ajaxResponse&&(n=this.table.options.ajaxResponse.call(this.table,e,t,n)),n)):Promise.reject()}}var Bc={replace:function(s){return this.table.setData(s)},update:function(s){return this.table.updateOrAddData(s)},insert:function(s){return this.table.addData(s)}},Nc={table:function(s){var e=[],t=!0,i=this.table.columnManager.columns,n=[],r=[];return s=s.split(`
|
|
27
|
-
`),
|
|
28
|
-
`)}copy(e,t){var i,n;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(n=document.body.createTextRange(),n.moveToElementText(this.table.element),n.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Os.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Os.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,n;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),n=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,n)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}class Wc{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class aa{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class Yi extends Je{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},n={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=n[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var r=this.column.definition.cssClass.split(" ");r.forEach(a=>{e.classList.add(a)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var n=this.setValueProcessData(e,t,i);n&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var n=!1;return(this.value!==e||i)&&(n=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),n&&this.dispatch("cell-value-changed",this),n}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new aa(this)),this.component}}class oa{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var la={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class _t extends Je{static defaultOptionList=la;constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((n,r)=>{var a=new _t(n,this);this.attachColumn(a)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(_t.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{_t.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",n=>{n.stopPropagation(),i.focus()}),i.addEventListener("mousedown",n=>{n.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,n=>{i.value=n||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,n=>{this._formatColumnHeaderTitle(t,n||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,n=i.length,r;for(let a=0;a<n&&(t=t[i[a]],r=t,!!t);a++);return r}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,n=this.fieldStructure,r=n.length;for(let a=0;a<r;a++)if(a==r-1)i[n[a]]=t;else{if(!i[n[a]])if(typeof t<"u")i[n[a]]={};else break;i=i[n[a]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(n){n.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(n){n.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let n=0;n<i;n++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new Yi(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(n=>{n.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(n=>{var r=n.getWidth();r>t&&(t=r)}),t)){var i=t+1;e?this.setWidth(i):(this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new oa(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof _t?this.parent.getComponent():!1}}class Ls{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class Qe extends Je{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&He.elVisible(this.element),i={},n;return new Promise((r,a)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),n=this.chain("row-data-changing",[this,i,e],null,e);for(let o in n)this.data[o]=n[o];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach(u=>{let h=this.getCell(u.getField());if(h){let m=u.getFieldValue(n);h.getValue()!==m&&(h.setValueProcessData(m),t&&h.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),r()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Ls(this)),this.component}}var Yc={avg:function(s,e,t){var i=0,n=typeof t.precision<"u"?t.precision:2;return s.length&&(i=s.reduce(function(r,a){return Number(r)+Number(a)}),i=i/s.length,i=n!==!1?i.toFixed(n):i),parseFloat(i).toString()},max:function(s,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return s.forEach(function(r){r=Number(r),(r>i||i===null)&&(i=r)}),i!==null?n!==!1?i.toFixed(n):i:""},min:function(s,e,t){var i=null,n=typeof t.precision<"u"?t.precision:!1;return s.forEach(function(r){r=Number(r),(r<i||i===null)&&(i=r)}),i!==null?n!==!1?i.toFixed(n):i:""},sum:function(s,e,t){var i=0,n=typeof t.precision<"u"?t.precision:!1;return s.length&&s.forEach(function(r){r=Number(r),i+=isNaN(r)?0:Number(r)}),n!==!1?i.toFixed(n):i},concat:function(s,e,t){var i=0;return s.length&&(i=s.reduce(function(n,r){return String(n)+String(r)})),i},count:function(s,e,t){var i=0;return s.length&&s.forEach(function(n){n&&i++}),i},unique:function(s,e,t){var i=s.filter((n,r)=>(s||n===0)&&s.indexOf(n)===r);return i.length}};class yi extends ke{static moduleName="columnCalcs";static calculations=Yc;constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new _t({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":yi.calculations[t.topCalc]?i.topCalc=yi.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":yi.calculations[t.bottomCalc]?i.botCalc=yi.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,n=this.table.modules.dataTree;return e.forEach(r=>{t.push(r.getData()),i&&r.modules.dataTree?.open&&this.rowsToData(n.getFilteredTreeChildren(r)).forEach(a=>{t.push(r)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),n;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),n=new Qe(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),n.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),n.component=!1,n.getComponent=()=>(n.component||(n.component=new Wc(n)),n.component),n.generateCells=()=>{var r=[];this.table.columnManager.columnsByIndex.forEach(a=>{this.genColumn.setField(a.getField()),this.genColumn.hozAlign=a.hozAlign,a.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(a.definition[e+"CalcFormatter"]),params:a.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=a.definition.cssClass;var o=new Yi(this.genColumn,n);o.getElement(),o.column=a,o.setWidth(),a.cells.push(o),r.push(o),a.visible||o.hide()}),n.cells=r},n}generateRowData(e,t){var i={},n=e=="top"?this.topCalcs:this.botCalcs,r=e=="top"?"topCalc":"botCalc",a,o;return n.forEach(function(l){var u=[];l.modules.columnCalcs&&l.modules.columnCalcs[r]&&(t.forEach(function(h){u.push(l.getFieldValue(h))}),o=r+"Params",a=typeof l.modules.columnCalcs[o]=="function"?l.modules.columnCalcs[o](u,t):l.modules.columnCalcs[o],l.setFieldValue(i,l.modules.columnCalcs[r](u,t,a)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),n={},r={};return i.forEach(a=>{n[a.getKey()]=this.getGroupResults(a)}),r={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:n},r}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}class Gc extends ke{static moduleName="dataTree";constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,n){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,n){return t.dataTreeStartExpanded[n]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),n=i||!i&&typeof t=="object"&&t!==null;!n&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!n&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:n?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&n?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&n?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:n}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),n=e.modules.dataTree;n.branchEl&&(n.branchEl.parentNode&&n.branchEl.parentNode.removeChild(n.branchEl),n.branchEl=!1),n.controlEl&&(n.controlEl.parentNode&&n.controlEl.parentNode.removeChild(n.controlEl),n.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+n.index),n.index&&(this.branchEl?(n.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(n.branchEl,i.firstChild),this.table.rtl?n.branchEl.style.marginRight=(n.branchEl.offsetWidth+n.branchEl.style.marginLeft)*(n.index-1)+n.index*this.indent+"px":n.branchEl.style.marginLeft=(n.branchEl.offsetWidth+n.branchEl.style.marginRight)*(n.index-1)+n.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+n.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+n.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,n=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",r=>{r.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",r=>{r.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",r=>{r.stopPropagation()}),n&&n.parentNode===t?n.parentNode.replaceChild(i.controlEl,n):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,n)=>{var r,a;t.push(i),i instanceof Qe&&(i.create(),r=i.modules.dataTree,!r.index&&r.children!==!1&&(a=this.getChildren(i,!1,!0),a.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var n=e.modules.dataTree,r=[],a=[];return n.children!==!1&&(n.open||t)&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?r=this.table.modules.filter.filter(n.children):r=n.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(r,i),r.forEach(o=>{a.push(o);var l=this.getChildren(o,!1,!0);l.forEach(u=>{a.push(u)})})),a}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(n=>{var r=new Qe(n||{},this.table.rowManager);r.create(),r.modules.dataTree.index=e.modules.dataTree.index+1,r.modules.dataTree.parent=e,r.modules.dataTree.children&&(r.modules.dataTree.open=this.startOpen(r.getComponent(),r.modules.dataTree.index)),t.push(r)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],n;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(t.children):n=t.children,n.forEach(r=>{r instanceof Qe&&i.push(r)})),i}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach(i=>{i instanceof Qe&&i.wipe()})}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,n){var r=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof n<"u"&&(r=this.findChildIndex(n,e),r!==!1&&e.data[this.field].splice(i?r:r+1,0,t)),r===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof Qe?i=e.data:e instanceof Ls?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(n=>n instanceof Qe?n.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(n=>n.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var n=e.modules.dataTree,r=[];return n&&n.children&&(Array.isArray(n.children)||(n.children=this.generateChildren(e)),n.children.forEach(a=>{a instanceof Qe&&(r.push(t?a.getComponent():a),i&&this.getTreeChildren(a,t,i).forEach(o=>{r.push(o)}))})),r}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}function $c(s,e={},t){var i=e.delimiter?e.delimiter:",",n=[],r=[];s.forEach(a=>{var o=[];switch(a.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":a.columns.forEach((l,u)=>{l&&l.depth===1&&(r[u]=typeof l.value>"u"||l.value===null?"":'"'+String(l.value).split('"').join('""')+'"')});break;case"row":a.columns.forEach(l=>{if(l){switch(typeof l.value){case"object":l.value=l.value!==null?JSON.stringify(l.value):"";break;case"undefined":l.value="";break}o.push('"'+String(l.value).split('"').join('""')+'"')}}),n.push(o.join(i));break}}),r.length&&n.unshift(r.join(i)),n=n.join(`
|
|
29
|
-
`),e.bom&&(
|
|
30
|
-
`),"application/x-ndjson")}var Zc={csv:$c,json:Uc,jsonLines:Xc,pdf:Kc,xlsx:qc,html:Jc};class Ps extends ke{static moduleName="download";static downloaders=Zc;constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){}downloadToTab(e,t,i,n){this.download(e,t,i,n,!0)}download(e,t,i,n,r){var a=!1;function o(u,h){r?r===!0?this.triggerDownload(u,h,e,t,!0):r(u):this.triggerDownload(u,h,e,t)}if(typeof e=="function"?a=e:Ps.downloaders[e]?a=Ps.downloaders[e]:console.warn("Download Error - No such download type found: ",e),a){var l=this.generateExportList(n);a.call(this.table,l,i||{},o.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(n=>{var r;n.type==="group"&&(r=n.columns[0],i&&i[n.indent]&&(r.value=i[n.indent](r.value,n.component._group.getRowCount(),n.component._group.getData(),n.component)))}),t}triggerDownload(e,t,i,n,r){var a=document.createElement("a"),o=this.table.options.downloadEncoder(e,t);o&&(r?window.open(window.URL.createObjectURL(o)):(n=n||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(o,n):(a.setAttribute("href",window.URL.createObjectURL(o)),a.setAttribute("download",n),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}}function Fs(s,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",n=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",r=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function a(o){var l=t[o];typeof l<"u"&&l!==r&&l!==i&&l!==n&&(s.value=s.value+""+l,a(o+1))}s.addEventListener("keydown",o=>{var l=s.value.length,u=o.key;if(o.keyCode>46&&!o.ctrlKey&&!o.metaKey){if(l>=t.length)return o.preventDefault(),o.stopPropagation(),!1;switch(t[l]){case i:if(u.toUpperCase()==u.toLowerCase())return o.preventDefault(),o.stopPropagation(),!1;break;case n:if(isNaN(u))return o.preventDefault(),o.stopPropagation(),!1;break;case r:break;default:if(u!==t[l])return o.preventDefault(),o.stopPropagation(),!1}}}),s.addEventListener("keyup",o=>{o.keyCode>46&&e.maskAutoFill&&a(s.value.length)}),s.placeholder||(s.placeholder=t),e.maskAutoFill&&a(s.value.length)}function Qc(s,e,t,i,n){var r=s.getValue(),a=document.createElement("input");if(a.setAttribute("type",n.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let l in n.elementAttributes)l.charAt(0)=="+"?(l=l.slice(1),a.setAttribute(l,a.getAttribute(l)+n.elementAttributes["+"+l])):a.setAttribute(l,n.elementAttributes[l]);a.value=typeof r<"u"?r:"",e(function(){s.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%",n.selectContents&&a.select())});function o(l){(r===null||typeof r>"u")&&a.value!==""||a.value!==r?t(a.value)&&(r=a.value):i()}return a.addEventListener("change",o),a.addEventListener("blur",o),a.addEventListener("keydown",function(l){switch(l.keyCode){case 13:o();break;case 27:i();break;case 35:case 36:l.stopPropagation();break}}),n.mask&&Fs(a,n),a}function ef(s,e,t,i,n){var r=s.getValue(),a=n.verticalNavigation||"hybrid",o=String(r!==null&&typeof r<"u"?r:""),l=document.createElement("textarea"),u=0;if(l.style.display="block",l.style.padding="2px",l.style.height="100%",l.style.width="100%",l.style.boxSizing="border-box",l.style.whiteSpace="pre-wrap",l.style.resize="none",n.elementAttributes&&typeof n.elementAttributes=="object")for(let m in n.elementAttributes)m.charAt(0)=="+"?(m=m.slice(1),l.setAttribute(m,l.getAttribute(m)+n.elementAttributes["+"+m])):l.setAttribute(m,n.elementAttributes[m]);l.value=o,e(function(){s.getType()==="cell"&&(l.focus({preventScroll:!0}),l.style.height="100%",l.scrollHeight,l.style.height=l.scrollHeight+"px",s.getRow().normalizeHeight(),n.selectContents&&l.select())});function h(m){(r===null||typeof r>"u")&&l.value!==""||l.value!==r?(t(l.value)&&(r=l.value),setTimeout(function(){s.getRow().normalizeHeight()},300)):i()}return l.addEventListener("change",h),l.addEventListener("blur",h),l.addEventListener("keyup",function(){l.style.height="";var m=l.scrollHeight;l.style.height=m+"px",m!=u&&(u=m,s.getRow().normalizeHeight())}),l.addEventListener("keydown",function(m){switch(m.keyCode){case 13:m.shiftKey&&n.shiftEnterSubmit&&h();break;case 27:i();break;case 38:(a=="editor"||a=="hybrid"&&l.selectionStart)&&(m.stopImmediatePropagation(),m.stopPropagation());break;case 40:(a=="editor"||a=="hybrid"&&l.selectionStart!==l.value.length)&&(m.stopImmediatePropagation(),m.stopPropagation());break;case 35:case 36:m.stopPropagation();break}}),n.mask&&Fs(l,n),l}function tf(s,e,t,i,n){var r=s.getValue(),a=n.verticalNavigation||"editor",o=document.createElement("input");if(o.setAttribute("type","number"),typeof n.max<"u"&&o.setAttribute("max",n.max),typeof n.min<"u"&&o.setAttribute("min",n.min),typeof n.step<"u"&&o.setAttribute("step",n.step),o.style.padding="4px",o.style.width="100%",o.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let h in n.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),o.setAttribute(h,o.getAttribute(h)+n.elementAttributes["+"+h])):o.setAttribute(h,n.elementAttributes[h]);o.value=r;var l=function(h){u()};e(function(){s.getType()==="cell"&&(o.removeEventListener("blur",l),o.focus({preventScroll:!0}),o.style.height="100%",o.addEventListener("blur",l),n.selectContents&&o.select())});function u(){var h=o.value;!isNaN(h)&&h!==""&&(h=Number(h)),h!==r?t(h)&&(r=h):i()}return o.addEventListener("keydown",function(h){switch(h.keyCode){case 13:u();break;case 27:i();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break;case 35:case 36:h.stopPropagation();break}}),n.mask&&Fs(o,n),o}function sf(s,e,t,i,n){var r=s.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),typeof n.max<"u"&&a.setAttribute("max",n.max),typeof n.min<"u"&&a.setAttribute("min",n.min),typeof n.step<"u"&&a.setAttribute("step",n.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let l in n.elementAttributes)l.charAt(0)=="+"?(l=l.slice(1),a.setAttribute(l,a.getAttribute(l)+n.elementAttributes["+"+l])):a.setAttribute(l,n.elementAttributes[l]);a.value=r,e(function(){s.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%")});function o(){var l=a.value;!isNaN(l)&&l!==""&&(l=Number(l)),l!=r?t(l)&&(r=l):i()}return a.addEventListener("blur",function(l){o()}),a.addEventListener("keydown",function(l){switch(l.keyCode){case 13:o();break;case 27:i();break}}),a}function nf(s,e,t,i,n){var r=n.format,a=n.verticalNavigation||"editor",o=r?window.DateTime||luxon.DateTime:null,l=s.getValue(),u=document.createElement("input");function h(v){var C;return o.isDateTime(v)?C=v:r==="iso"?C=o.fromISO(String(v)):C=o.fromFormat(String(v),r),C.toFormat("yyyy-MM-dd")}if(u.type="date",u.style.padding="4px",u.style.width="100%",u.style.boxSizing="border-box",n.max&&u.setAttribute("max",r?h(n.max):n.max),n.min&&u.setAttribute("min",r?h(n.min):n.min),n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),u.setAttribute(v,u.getAttribute(v)+n.elementAttributes["+"+v])):u.setAttribute(v,n.elementAttributes[v]);l=typeof l<"u"?l:"",r&&(o?l=h(l):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),u.value=l,e(function(){s.getType()==="cell"&&(u.focus({preventScroll:!0}),u.style.height="100%",n.selectContents&&u.select())});function m(){var v=u.value,C;if((l===null||typeof l>"u")&&v!==""||v!==l){if(v&&r)switch(C=o.fromFormat(String(v),"yyyy-MM-dd"),r){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(r)}t(v)&&(l=u.value)}else i()}return u.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==u)&&m()}),u.addEventListener("keydown",function(v){switch(v.keyCode){case 13:m();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:a=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),u}function rf(s,e,t,i,n){var r=n.format,a=n.verticalNavigation||"editor",o=r?window.DateTime||luxon.DateTime:null,l,u=s.getValue(),h=document.createElement("input");if(h.type="time",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),h.setAttribute(v,h.getAttribute(v)+n.elementAttributes["+"+v])):h.setAttribute(v,n.elementAttributes[v]);u=typeof u<"u"?u:"",r&&(o?(o.isDateTime(u)?l=u:r==="iso"?l=o.fromISO(String(u)):l=o.fromFormat(String(u),r),u=l.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),h.value=u,e(function(){s.getType()=="cell"&&(h.focus({preventScroll:!0}),h.style.height="100%",n.selectContents&&h.select())});function m(){var v=h.value,C;if((u===null||typeof u>"u")&&v!==""||v!==u){if(v&&r)switch(C=o.fromFormat(String(v),"hh:mm"),r){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(r)}t(v)&&(u=h.value)}else i()}return h.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==h)&&m()}),h.addEventListener("keydown",function(v){switch(v.keyCode){case 13:m();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:a=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),h}function af(s,e,t,i,n){var r=n.format,a=n.verticalNavigation||"editor",o=r?this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"):null,l,u=s.getValue(),h=document.createElement("input");if(h.type="datetime-local",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let v in n.elementAttributes)v.charAt(0)=="+"?(v=v.slice(1),h.setAttribute(v,h.getAttribute(v)+n.elementAttributes["+"+v])):h.setAttribute(v,n.elementAttributes[v]);u=typeof u<"u"?u:"",r&&(o?(o.isDateTime(u)?l=u:r==="iso"?l=o.fromISO(String(u)):l=o.fromFormat(String(u),r),u=l.toFormat("yyyy-MM-dd")+"T"+l.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),h.value=u,e(function(){s.getType()==="cell"&&(h.focus({preventScroll:!0}),h.style.height="100%",n.selectContents&&h.select())});function m(){var v=h.value,C;if((u===null||typeof u>"u")&&v!==""||v!==u){if(v&&r)switch(C=o.fromISO(String(v)),r){case!0:v=C;break;case"iso":v=C.toISO();break;default:v=C.toFormat(r)}t(v)&&(u=h.value)}else i()}return h.addEventListener("blur",function(v){(v.relatedTarget||v.rangeParent||v.explicitOriginalTarget!==h)&&m()}),h.addEventListener("keydown",function(v){switch(v.keyCode){case 13:m();break;case 27:i();break;case 35:case 36:v.stopPropagation();break;case 38:case 40:a=="editor"&&(v.stopImmediatePropagation(),v.stopPropagation());break}}),h}let of=class{constructor(e,t,i,n,r,a){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(a),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:n,cancel:r},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&Fs(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(n=>t.includes(n)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(t==-1?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(n=>typeof n.label<"u"&&n.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(n=>this.listIteration===i?this._parseList(n):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=ra(e,{},i),fetch(e).then(n=>n.ok?n.json().catch(r=>(console.warn("List Ajax Load Error - Invalid JSON returned",r),Promise.reject(r))):(console.error("List Ajax Load Error - Connection Error: "+n.status,n.statusText),Promise.reject(n))).catch(n=>(console.error("List Ajax Load Error - Connection Error: ",n),Promise.reject(n)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),n;return e?n=this.table.columnManager.getColumnByField(e):n=this.cell.getColumn()._getSelf(),n?i.forEach(r=>{var a=n.getFieldValue(r);this._emptyValueCheck(a)||(this.params.multiselect&&Array.isArray(a)?a.forEach(o=>{this._emptyValueCheck(o)||(t[o]=!0)}):t[a]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_emptyValueCheck(e){return e===null||typeof e>"u"||e===""}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,n])=>({label:n,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var n={};e.options?n=this._parseListGroup(e,i+1):(n={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(n,!0)),t.push(n)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(n=>{this._parseListItem(n,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,n)=>e(i.label,n.label,i.value,n.value,i.original,n.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,n,r,a,o=0,l,u=/(\d+)|(\D+)/g,h=/\d/,m=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)m=!t&&t!==0?0:-1;else if(!t&&t!==0)m=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),n=String(t).toLowerCase(),i===n)return 0;if(!(h.test(i)&&h.test(n)))return i>n?1:-1;for(i=i.match(u),n=n.match(u),l=i.length>n.length?n.length:i.length;o<l;)if(r=i[o],a=n[o++],r!==a)return isFinite(r)&&isFinite(a)?(r.charAt(0)==="0"&&(r="."+r),a.charAt(0)==="0"&&(a="."+a),r-a):r>a?1:-1;return i.length>n.length}return m}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var n=!1;return i.group?(i.options.forEach(r=>{this._filterItem(e,t,r)&&(n=!0)}),i.visible=n):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,n){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let n in e.elementAttributes)n.charAt(0)=="+"?(n=n.slice(1),t.setAttribute(n,this.input.getAttribute(n)+e.elementAttributes["+"+n])):t.setAttribute(n,e.elementAttributes[n]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(n=>{this._buildItem(n)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(n=>n.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(n=>n.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}};function lf(s,e,t,i,n){var r=new of(this,s,e,t,i,n);return r.input}function uf(s,e,t,i,n){var r=this,a=s.getElement(),o=s.getValue(),l=a.getElementsByTagName("svg").length||5,u=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,h=[],m=document.createElement("div"),v=document.createElementNS("http://www.w3.org/2000/svg","svg");function C(M){h.forEach(function(k,_){_<M?(r.table.browser=="ie"?k.setAttribute("class","tabulator-star-active"):k.classList.replace("tabulator-star-inactive","tabulator-star-active"),k.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):(r.table.browser=="ie"?k.setAttribute("class","tabulator-star-inactive"):k.classList.replace("tabulator-star-active","tabulator-star-inactive"),k.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function F(M){var k=document.createElement("span"),_=v.cloneNode(!0);h.push(_),k.addEventListener("mouseenter",function(p){p.stopPropagation(),p.stopImmediatePropagation(),C(M)}),k.addEventListener("mousemove",function(p){p.stopPropagation(),p.stopImmediatePropagation()}),k.addEventListener("click",function(p){p.stopPropagation(),p.stopImmediatePropagation(),t(M),a.blur()}),k.appendChild(_),m.appendChild(k)}function x(M){o=M,C(M)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",m.style.verticalAlign="middle",m.style.display="inline-block",m.style.padding="4px",v.setAttribute("width",u),v.setAttribute("height",u),v.setAttribute("viewBox","0 0 512 512"),v.setAttribute("xml:space","preserve"),v.style.padding="0 1px",n.elementAttributes&&typeof n.elementAttributes=="object")for(let M in n.elementAttributes)M.charAt(0)=="+"?(M=M.slice(1),m.setAttribute(M,m.getAttribute(M)+n.elementAttributes["+"+M])):m.setAttribute(M,n.elementAttributes[M]);for(var R=1;R<=l;R++)F(R);return o=Math.min(parseInt(o),l),C(o),m.addEventListener("mousemove",function(M){C(0)}),m.addEventListener("click",function(M){t(0)}),a.addEventListener("blur",function(M){i()}),a.addEventListener("keydown",function(M){switch(M.keyCode){case 39:x(o+1);break;case 37:x(o-1);break;case 13:t(o);break;case 27:i();break}}),m}function hf(s,e,t,i,n){var r=s.getElement(),a=typeof n.max>"u"?r.getElementsByTagName("div")[0]&&r.getElementsByTagName("div")[0].getAttribute("max")||100:n.max,o=typeof n.min>"u"?r.getElementsByTagName("div")[0]&&r.getElementsByTagName("div")[0].getAttribute("min")||0:n.min,l=(a-o)/100,u=s.getValue()||0,h=document.createElement("div"),m=document.createElement("div"),v,C;function F(){var x=window.getComputedStyle(r,null),R=l*Math.round(m.offsetWidth/((r.clientWidth-parseInt(x.getPropertyValue("padding-left"))-parseInt(x.getPropertyValue("padding-right")))/100))+o;t(R),r.setAttribute("aria-valuenow",R),r.setAttribute("aria-label",u)}if(h.style.position="absolute",h.style.right="0",h.style.top="0",h.style.bottom="0",h.style.width="5px",h.classList.add("tabulator-progress-handle"),m.style.display="inline-block",m.style.position="relative",m.style.height="100%",m.style.backgroundColor="#488CE9",m.style.maxWidth="100%",m.style.minWidth="0%",n.elementAttributes&&typeof n.elementAttributes=="object")for(let x in n.elementAttributes)x.charAt(0)=="+"?(x=x.slice(1),m.setAttribute(x,m.getAttribute(x)+n.elementAttributes["+"+x])):m.setAttribute(x,n.elementAttributes[x]);return r.style.padding="4px 4px",u=Math.min(parseFloat(u),a),u=Math.max(parseFloat(u),o),u=Math.round((u-o)/l),m.style.width=u+"%",r.setAttribute("aria-valuemin",o),r.setAttribute("aria-valuemax",a),m.appendChild(h),h.addEventListener("mousedown",function(x){v=x.screenX,C=m.offsetWidth}),h.addEventListener("mouseover",function(){h.style.cursor="ew-resize"}),r.addEventListener("mousemove",function(x){v&&(m.style.width=C+x.screenX-v+"px")}),r.addEventListener("mouseup",function(x){v&&(x.stopPropagation(),x.stopImmediatePropagation(),v=!1,C=!1,F())}),r.addEventListener("keydown",function(x){switch(x.keyCode){case 39:x.preventDefault(),m.style.width=m.clientWidth+r.clientWidth/100+"px";break;case 37:x.preventDefault(),m.style.width=m.clientWidth-r.clientWidth/100+"px";break;case 9:case 13:F();break;case 27:i();break}}),r.addEventListener("blur",function(){i()}),m}function df(s,e,t,i,n){var r=s.getValue(),a=document.createElement("input"),o=n.tristate,l=typeof n.indeterminateValue>"u"?null:n.indeterminateValue,u=!1,h=Object.keys(n).includes("trueValue"),m=Object.keys(n).includes("falseValue");if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",n.elementAttributes&&typeof n.elementAttributes=="object")for(let C in n.elementAttributes)C.charAt(0)=="+"?(C=C.slice(1),a.setAttribute(C,a.getAttribute(C)+n.elementAttributes["+"+C])):a.setAttribute(C,n.elementAttributes[C]);a.value=r,o&&(typeof r>"u"||r===l||r==="")&&(u=!0,a.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){s.getType()==="cell"&&a.focus({preventScroll:!0})}),a.checked=h?r===n.trueValue:r===!0||r==="true"||r==="True"||r===1;function v(C){var F=a.checked;return h&&F?F=n.trueValue:m&&!F&&(F=n.falseValue),o?C?u?l:F:a.checked&&!u?(a.checked=!1,a.indeterminate=!0,u=!0,l):(u=!1,F):F}return a.addEventListener("change",function(C){t(v())}),a.addEventListener("blur",function(C){t(v(!0))}),a.addEventListener("keydown",function(C){C.keyCode==13&&t(v()),C.keyCode==27&&i()}),a}function cf(s,e,t,i,n){var r=s._getSelf().column,a,o,l;function u(h){var m=h.getValue(),v="input";switch(typeof m){case"number":v="number";break;case"boolean":v="tickCross";break;case"string":m.includes(`
|
|
31
|
-
`)&&(v="textarea");break}return v}return a=n.editorLookup?n.editorLookup(s):u(s),n.paramsLookup&&(l=typeof n.paramsLookup=="function"?n.paramsLookup(a,s):n.paramsLookup[a]),o=this.table.modules.edit.lookupEditor(a,r),o.call(this,s,e,t,i,l||{})}var ff={input:Qc,textarea:ef,number:tf,range:sf,date:nf,time:rf,datetime:af,list:lf,star:uf,progress:hf,tickCross:df,adaptable:cf};class Pn extends ke{static moduleName="edit";static editors=ff;constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.convertEmptyValues=!1,this.editors=Pn.editors,this.registerTableOption("editTriggerEvent","focus"),this.registerTableOption("editorEmptyValue"),this.registerTableOption("editorEmptyValueFunc",this.emptyValueCheck.bind(this)),this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("editorEmptyValue"),this.registerColumnOption("editorEmptyValueFunc"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("clipboard-paste",this.pasteBlocker.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0)),Object.keys(this.table.options).includes("editorEmptyValue")&&(this.convertEmptyValues=!0)}pasteBlocker(e){if(this.currentCell)return!0}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),this.invalidEdit||(i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})}))))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,n;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(n=this.table.rowManager.prevDisplayRow(e.row,!0),n&&(i=this.findPrevEditableCell(n,n.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,n;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(n=this.table.rowManager.nextDisplayRow(e.row,!0),n&&(i=this.findNextEditableCell(n,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.findPrevEditableCell(e.row,i),n)?(n.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.findNextEditableCell(e.row,i),n)?(n.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.table.rowManager.prevDisplayRow(e.row,!0),n)?(n.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,n;return e&&(t&&t.preventDefault(),i=e.getIndex(),n=this.table.rowManager.nextDisplayRow(e.row,!0),n)?(n.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t<e.cells.length-1)for(var n=t+1;n<e.cells.length;n++){let r=e.cells[n];if(r.column.modules.edit&&He.elVisible(r.getElement())&&this.allowEdit(r)){i=r;break}}return i}findPrevEditableCell(e,t){var i=!1;if(t>0)for(var n=t-1;n>=0;n--){let r=e.cells[n];if(r.column.modules.edit&&He.elVisible(r.getElement())&&this.allowEdit(r)){i=r;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t=Object.keys(e.definition).includes("editorEmptyValue"),i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{},convertEmptyValues:t,editorEmptyValue:e.definition.editorEmptyValue,editorEmptyValueFunc:e.definition.editorEmptyValueFunc};i.editor=this.lookupEditor(e.definition.editor,e),i.editor&&(e.modules.edit=i)}lookupEditor(e,t){var i;switch(typeof e){case"string":this.editors[e]?i=this.editors[e]:console.warn("Editor Error - No such editor found: ",e);break;case"function":i=e;break;case"boolean":e===!0&&(typeof t.definition.formatter!="function"?this.editors[t.definition.formatter]?i=this.editors[t.definition.formatter]:i=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter));break}return i}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("mousedown",function(n){n.button===2?n.preventDefault():t.mouseClick=!0}),this.options("editTriggerEvent")==="dblclick"&&i.addEventListener("dblclick",function(n){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,n,!1))}),(this.options("editTriggerEvent")==="focus"||this.options("editTriggerEvent")==="click")&&i.addEventListener("click",function(n){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,n,!1))}),this.options("editTriggerEvent")==="focus"&&i.addEventListener("focus",function(n){t.recursionBlock||t.edit(e,n,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,n=e.row.getElement();n.offsetTop<t?this.table.rowManager.element.scrollTop-=t-n.offsetTop:n.offsetTop+n.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=n.offsetTop+n.offsetHeight-i);var r=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,o=e.getElement();this.table.modExists("frozenColumns")&&(r+=parseInt(this.table.modules.frozenColumns.leftMargin||0),a-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(r-=parseInt(this.table.columnManager.renderer.vDomPadLeft),a-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),o.offsetLeft<r?this.table.rowManager.element.scrollLeft-=r-o.offsetLeft:o.offsetLeft+o.offsetWidth>a&&(this.table.rowManager.element.scrollLeft+=o.offsetLeft+o.offsetWidth-a)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var n=this,r=!0,a=function(){},o=e.getElement(),l=!1,u,h,m;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function v(M){if(n.currentCell===e&&!l){var k=n.chain("edit-success",[e,M],!0,!0);return k===!0||n.table.options.validationMode==="highlight"?(l=!0,n.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,n.editedCells.indexOf(e)==-1&&n.editedCells.push(e),M=n.transformEmptyValues(M,e),e.setValue(M,!0),k===!0):(l=!0,n.invalidEdit=!0,n.focusCellNoEvent(e,!0),a(),setTimeout(()=>{l=!1},10),!1)}}function C(){n.currentCell===e&&!l&&n.cancelEdit()}function F(M){a=M}if(e.column.modules.edit.blocked)return this.mouseClick=!1,this.blur(o),!1;if(t&&t.stopPropagation(),r=this.allowEdit(e),r||i){if(n.cancelEdit(),n.currentCell=e,this.focusScrollAdjust(e),h=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,h)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,h),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",h),m=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(h):e.column.modules.edit.params,u=e.column.modules.edit.editor.call(n,h,F,v,C,m),this.currentCell&&u!==!1)if(u instanceof Node){for(o.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");o.firstChild;)o.removeChild(o.firstChild);o.appendChild(u),a();for(var x=o.children,R=0;R<x.length;R++)x[R].addEventListener("click",function(M){M.stopPropagation()})}else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",u),this.blur(o),!1;else return this.blur(o),!1;return!0}else return this.mouseClick=!1,this.blur(o),!1}emptyValueCheck(e){return e===""||e===null||typeof e>"u"}transformEmptyValues(e,t){var i=t.column.modules.edit,n=i.convertEmptyValues||this.convertEmptyValues,r;return n&&(r=i.editorEmptyValueFunc||this.options("editorEmptyValueFunc"),r&&r(e)&&(e=i.convertEmptyValues?i.editorEmptyValue:this.options("editorEmptyValue"))),e}blur(e){this.confirm("edit-blur",[e])||e.blur()}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}}class ua{constructor(e,t,i,n){this.type=e,this.columns=t,this.component=i||!1,this.indent=n||0}}class Fn{constructor(e,t,i,n,r){this.value=e,this.component=t||!1,this.width=i,this.height=n,this.depth=r}}var pf={},mf={visible:function(){return this.rowManager.getVisibleRows(!1,!0)},all:function(){return this.rowManager.rows},selected:function(){return this.modules.selectRow.selectedRows},active:function(){return this.options.pagination?this.rowManager.getDisplayRows(this.rowManager.displayRows.length-2):this.rowManager.getDisplayRows()}};class Gi extends ke{static moduleName="export";static columnLookups=pf;static rowLookups=mf;constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.colVisPropAttach="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,n){var r,a,o,l;return this.cloneTableStyle=t,this.config=e||{},this.colVisProp=n,this.colVisPropAttach=this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1),l=Gi.columnLookups[i],l&&(o=l.call(this.table),o=o.filter(u=>this.columnVisCheck(u))),r=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders(o)):[],o&&(o=o.map(u=>u.getComponent())),a=this.bodyToExportRows(this.rowLookup(i),o),r.concat(a)}generateTable(e,t,i,n){var r=this.generateExportList(e,t,i,n);return this.generateTableElement(r)}rowLookup(e){var t=[],i;return typeof e=="function"?e.call(this.table).forEach(n=>{n=this.table.rowManager.findRow(n),n&&t.push(n)}):(i=Gi.rowLookups[e]||Gi.rowLookups.active,t=i.call(this.table)),Object.assign([],t)}generateColumnGroupHeaders(e){var t=[];return e||(e=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex),e.forEach(i=>{var n=this.processColumnGroup(i);n&&t.push(n)}),t}processColumnGroup(e){var t=e.columns,i=0,n=e.definition["title"+this.colVisPropAttach]||e.definition.title,r={title:n,column:e,depth:1};if(t.length){if(r.subGroups=[],r.width=0,t.forEach(a=>{var o=this.processColumnGroup(a);o&&(r.width+=o.width,r.subGroups.push(o),o.depth>i&&(i=o.depth))}),r.depth+=i,!r.width)return!1}else if(this.columnVisCheck(e))r.width=1;else return!1;return r}columnVisCheck(e){var t=e.definition[this.colVisProp];return this.config.rowHeaders===!1&&e.isRowHeader?!1:(typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t===!1||t===!0?t:e.visible&&e.field)}headersToExportRows(e){var t=[],i=0,n=[];function r(a,o){var l=i-o;if(typeof t[o]>"u"&&(t[o]=[]),a.height=a.subGroups?1:l-a.depth+1,t[o].push(a),a.height>1)for(let u=1;u<a.height;u++)typeof t[o+u]>"u"&&(t[o+u]=[]),t[o+u].push(!1);if(a.width>1)for(let u=1;u<a.width;u++)t[o].push(!1);a.subGroups&&a.subGroups.forEach(function(u){r(u,o+1)})}return e.forEach(function(a){a.depth>i&&(i=a.depth)}),e.forEach(function(a){r(a,0)}),t.forEach(a=>{var o=[];a.forEach(l=>{if(l){let u=typeof l.title>"u"?"":l.title;o.push(new Fn(u,l.column.getComponent(),l.width,l.height,l.depth))}else o.push(null)}),n.push(new ua("header",o))}),n}bodyToExportRows(e,t=[]){var i=[];return t.length===0&&this.table.columnManager.columnsByIndex.forEach(n=>{this.columnVisCheck(n)&&t.push(n.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(n=>{switch(n.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&n.modules.dataTree.parent)}return!0}),e.forEach((n,r)=>{var a=n.getData(this.colVisProp),o=[],l=0;switch(n.type){case"group":l=n.level,o.push(new Fn(n.key,n.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(u=>{o.push(new Fn(u._column.getFieldValue(a),u,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(l=n.modules.dataTree.index);break}i.push(new ua(n.type,o,n.getComponent(),l))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),n=document.createElement("tbody"),r=this.lookupTableStyles(),a=this.table.options["rowFormatter"+this.colVisPropAttach],o={};return o.rowFormatter=a!==null?a:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(o.treeElementField=this.table.modules.dataTree.elementField),o.groupHeader=this.table.options["groupHeader"+this.colVisPropAttach],o.groupHeader&&!Array.isArray(o.groupHeader)&&(o.groupHeader=[o.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((l,u)=>{let h;switch(l.type){case"header":i.appendChild(this.generateHeaderElement(l,o,r));break;case"group":n.appendChild(this.generateGroupElement(l,o,r));break;case"calc":n.appendChild(this.generateCalcElement(l,o,r));break;case"row":h=this.generateRowElement(l,o,r),this.mapElementStyles(u%2&&r.evenRow?r.evenRow:r.oddRow,h,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n.appendChild(h);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(n),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.styleRowHeader=e.firstRow.getElementsByClassName("tabulator-row-header")[0],e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var n=document.createElement("tr");return e.columns.forEach(r=>{if(r){var a=document.createElement("th"),o=r.component._column.definition.cssClass?r.component._column.definition.cssClass.split(" "):[];a.colSpan=r.width,a.rowSpan=r.height,a.innerHTML=r.value,this.cloneTableStyle&&(a.style.boxSizing="border-box"),o.forEach(function(l){a.classList.add(l)}),this.mapElementStyles(r.component.getElement(),a,["text-align","border-left","border-right","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(r.component._column.contentElement,a,["padding-top","padding-left","padding-right","padding-bottom"]),r.component._column.visible?this.mapElementStyles(r.component.getElement(),a,["width"]):r.component._column.definition.width&&(a.style.width=r.component._column.definition.width+"px"),r.component._column.parent&&r.component._column.parent.isGroup?this.mapElementStyles(r.component._column.parent.groupElement,a,["border-top"]):this.mapElementStyles(r.component.getElement(),a,["border-top"]),r.component._column.isGroup?this.mapElementStyles(r.component.getElement(),a,["border-bottom"]):this.mapElementStyles(this.table.columnManager.getElement(),a,["border-bottom"]),n.appendChild(a)}}),n}generateGroupElement(e,t,i){var n=document.createElement("tr"),r=document.createElement("td"),a=e.columns[0];return n.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?a.value=t.groupHeader[e.indent](a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(a.value=e.component._group.generator(a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),r.colSpan=a.width,r.innerHTML=a.value,n.classList.add("tabulator-print-table-group"),n.classList.add("tabulator-group-level-"+e.indent),a.component.isVisible()&&n.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,r,["padding-top","padding-left","padding-right","padding-bottom"]),n.appendChild(r),n}generateCalcElement(e,t,i){var n=this.generateRowElement(e,t,i);return n.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,n,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),n}generateRowElement(e,t,i){var n=document.createElement("tr");if(n.classList.add("tabulator-print-table-row"),e.columns.forEach((r,a)=>{if(r){var o=document.createElement("td"),l=r.component._column,u=this.table,h=u.columnManager.findColumnIndex(l),m=r.value,v,C,F={modules:{},getValue:function(){return m},getField:function(){return l.definition.field},getElement:function(){return o},getType:function(){return"cell"},getColumn:function(){return l.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getTable:function(){return u},getComponent:function(){return F},column:l},x=l.definition.cssClass?l.definition.cssClass.split(" "):[];if(x.forEach(function(R){o.classList.add(R)}),this.table.modExists("format")&&this.config.formatCells!==!1)m=this.table.modules.format.formatExportValue(F,this.colVisProp);else switch(typeof m){case"object":m=m!==null?JSON.stringify(m):"";break;case"undefined":m="";break}m instanceof Node?o.appendChild(m):o.innerHTML=m,C=["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"],l.isRowHeader?(v=i.styleRowHeader,C.push("background-color")):v=i.styleCells&&i.styleCells[h]?i.styleCells[h]:i.firstCell,v&&(this.mapElementStyles(v,o,C),l.definition.align&&(o.style.textAlign=l.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==l.field||!t.treeElementField&&a==0)&&(e.component._row.modules.dataTree.controlEl&&o.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),o.firstChild),e.component._row.modules.dataTree.branchEl&&o.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),o.firstChild)),n.appendChild(o),F.modules.format&&F.modules.format.renderedCallback&&F.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let r=Object.assign(e.component);r.getElement=function(){return n},t.rowFormatter(e.component)}return n}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,n){var r=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,n||"htmlOutput");return this.generateHTMLTable(r)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var n={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var r=window.getComputedStyle(e);i.forEach(function(a){t.style[n[a]]||(t.style[n[a]]=r.getPropertyValue(a))})}}}}var gf={"=":function(s,e,t,i){return e==s},"<":function(s,e,t,i){return e<s},"<=":function(s,e,t,i){return e<=s},">":function(s,e,t,i){return e>s},">=":function(s,e,t,i){return e>=s},"!=":function(s,e,t,i){return e!=s},regex:function(s,e,t,i){return typeof s=="string"&&(s=new RegExp(s)),s.test(e)},like:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(s.toLowerCase())>-1:!1},keywords:function(s,e,t,i){var n=s.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),r=String(e===null||typeof e>"u"?"":e).toLowerCase(),a=[];return n.forEach(o=>{r.includes(o)&&a.push(!0)}),i.matchAll?a.length===n.length:!!a.length},starts:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(s.toLowerCase()):!1},ends:function(s,e,t,i){return s===null||typeof s>"u"?e===s:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(s.toLowerCase()):!1},in:function(s,e,t,i){return Array.isArray(s)?s.length?s.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",s),!1)}};class si extends ke{static moduleName="filter";static filters=gf;constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,n){return n.filter=this.getFilters(!0,!0),n}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,n){this.setFilter(e,t,i,n),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,n){this.addFilter(e,t,i,n),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,n=e.getField();function r(a){var o=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",l="",u="",h;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==a){if(e.modules.filter.prevSuccess=a,e.modules.filter.emptyFunc(a))delete i.headerFilters[n];else{switch(e.modules.filter.value=a,typeof e.definition.headerFilterFunc){case"string":si.filters[e.definition.headerFilterFunc]?(l=e.definition.headerFilterFunc,h=function(m){var v=e.definition.headerFilterFuncParams||{},C=e.getFieldValue(m);return v=typeof v=="function"?v(a,C,m):v,si.filters[e.definition.headerFilterFunc](a,C,m,v)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":h=function(m){var v=e.definition.headerFilterFuncParams||{},C=e.getFieldValue(m);return v=typeof v=="function"?v(a,C,m):v,e.definition.headerFilterFunc(a,C,m,v)},l=h;break}if(!h)switch(o){case"partial":h=function(m){var v=e.getFieldValue(m);return typeof v<"u"&&v!==null?String(v).toLowerCase().indexOf(String(a).toLowerCase())>-1:!1},l="like";break;default:h=function(m){return e.getFieldValue(m)==a},l="="}i.headerFilters[n]={value:a,func:h,type:l}}e.modules.filter.value=a,u=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==u&&(i.prevHeaderFilterChangeCheck=u,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:r,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var n=this,r=e.modules.filter.success,a=e.getField(),o,l,u,h,m,v,C,F;e.modules.filter.value=t;function x(){}function R(M){F=M}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),a){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(M){return!M&&M!==0},o=document.createElement("div"),o.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":n.table.modules.edit.editors[e.definition.headerFilter]?(l=n.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(M){return M!==!0&&M!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":l=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?l=e.modules.edit.editor:e.definition.formatter&&n.table.modules.edit.editors[e.definition.formatter]?(l=n.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(M){return M!==!0&&M!==!1})):l=n.table.modules.edit.editors.input;break}if(l){if(h={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},C=e.definition.headerFilterParams||{},C=typeof C=="function"?C.call(n.table,h):C,u=l.call(this.table.modules.edit,h,R,r,x,C),!u){console.warn("Filter Error - Cannot add filter to "+a+" column, editor returned a value of false");return}if(!(u instanceof Node)){console.warn("Filter Error - Cannot add filter to "+a+" column, editor should return an instance of Node, the editor returned:",u);return}n.langBind("headerFilters|columns|"+e.definition.field,function(M){u.setAttribute("placeholder",typeof M<"u"&&M?M:e.definition.headerFilterPlaceholder||n.langText("headerFilters|default"))}),u.addEventListener("click",function(M){M.stopPropagation(),u.focus()}),u.addEventListener("focus",M=>{var k=this.table.columnManager.contentsElement.scrollLeft,_=this.table.rowManager.element.scrollLeft;k!==_&&(this.table.rowManager.scrollHorizontal(k),this.table.columnManager.scrollHorizontal(k))}),m=!1,v=function(M){m&&clearTimeout(m),m=setTimeout(function(){r(u.value)},n.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=u,e.modules.filter.attrType=u.hasAttribute("type")?u.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=u.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(u.addEventListener("keyup",v),u.addEventListener("search",v),e.modules.filter.attrType=="number"&&u.addEventListener("change",function(M){r(u.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&u.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&u.addEventListener("mousedown",function(M){M.stopPropagation()})),o.appendChild(u),e.contentElement.appendChild(o),i||n.headerFilterColumns.push(e),F&&F()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,n){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),this.addFilter(e)}addFilter(e,t,i,n){var r=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:n}]),e.forEach(a=>{a=this.findFilter(a),a&&(this.filterList.push(a),r=!0)}),r&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(n){return e.field(n,e.type||{})}:si.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(n){return si.filters[e.type](e.value,t.getFieldValue(n),n,e.params||{})}:i=function(n){return si.filters[e.type](e.value,n[e.field],n,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(n){typeof n.type=="function"&&(n.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(n=>{var r;Array.isArray(n)?i.push(this.filtersToArray(n,t)):(r={field:n.field,type:n.type,value:n.value},t&&typeof r.type=="function"&&(r.type="function"),i.push(r))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(n=>{var r=-1;typeof n.field=="object"?r=this.filterList.findIndex(a=>n===a):r=this.filterList.findIndex(a=>n.field===a.field&&n.type===a.type&&n.value===a.value),r>-1?this.filterList.splice(r,1):console.warn("Filter Error - No matching filter type found, ignoring: ",n.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,n){var r=[],a=[];return Array.isArray(t)||(t=[{field:t,type:i,value:n}]),t.forEach(o=>{o=this.findFilter(o),o&&a.push(o)}),this.table.rowManager.rows.forEach(o=>{var l=!0;a.forEach(u=>{this.filterRecurse(u,o.getData())||(l=!1)}),l&&r.push(e==="data"?o.getData("data"):o.getComponent())}),r}filter(e,t){var i=[],n=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(r=>{this.filterRow(r)&&i.push(r)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(r=>{n.push(r.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),n)),i}filterRow(e,t){var i=!0,n=e.getData();this.filterList.forEach(a=>{this.filterRecurse(a,n)||(i=!1)});for(var r in this.headerFilters)this.headerFilters[r].func(n)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(n=>{this.filterRecurse(n,t)&&(i=!0)}):i=e.func(t),i}}function bf(s,e,t){return this.emptyToSpace(this.sanitizeHTML(s.getValue()))}function vf(s,e,t){return s.getValue()}function yf(s,e,t){return s.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(s.getValue()))}function wf(s,e,t){var i=parseFloat(s.getValue()),n="",r,a,o,l,u,h=e.decimal||".",m=e.thousand||",",v=e.negativeSign||"-",C=e.symbol||"",F=!!e.symbolAfter,x=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(s.getValue()));if(i<0&&(i=Math.abs(i),n=v),r=x!==!1?i.toFixed(x):i,r=String(r).split("."),a=r[0],o=r.length>1?h+r[1]:"",e.thousand!==!1)for(l=/(\d+)(\d{3})/;l.test(a);)a=a.replace(l,"$1"+m+"$2");return u=a+o,n===!0?(u="("+u+")",F?u+C:C+u):F?n+u+C:n+C+u}function Cf(s,e,t){var i=s.getValue(),n=e.urlPrefix||"",r=e.download,a=i,o=document.createElement("a"),l;function u(h,m){var v=h.shift(),C=m[v];return h.length&&typeof C=="object"?u(h,C):C}if(e.labelField&&(l=s.getData(),a=u(e.labelField.split(this.table.options.nestedFieldSeparator),l)),e.label)switch(typeof e.label){case"string":a=e.label;break;case"function":a=e.label(s);break}if(a){if(e.urlField&&(l=s.getData(),i=He.retrieveNestedData(this.table.options.nestedFieldSeparator,e.urlField,l)),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(s);break}return o.setAttribute("href",n+i),e.target&&o.setAttribute("target",e.target),e.download&&(typeof r=="function"?r=r(s):r=r===!0?"":r,o.setAttribute("download",r)),o.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),o}else return" "}function Ef(s,e,t){var i=document.createElement("img"),n=s.getValue();switch(e.urlPrefix&&(n=e.urlPrefix+s.getValue()),e.urlSuffix&&(n=n+e.urlSuffix),i.setAttribute("src",n),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){s.getRow().normalizeHeight()}),i}function kf(s,e,t){var i=s.getValue(),n=s.getElement(),r=e.allowEmpty,a=e.allowTruthy,o=Object.keys(e).includes("trueValue"),l=typeof e.tickElement<"u"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',u=typeof e.crossElement<"u"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return o&&i===e.trueValue||!o&&(a&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(n.setAttribute("aria-checked",!0),l||""):r&&(i==="null"||i===""||i===null||typeof i>"u")?(n.setAttribute("aria-checked","mixed"),""):(n.setAttribute("aria-checked",!1),u||"")}function xf(s,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),n=e.inputFormat||"yyyy-MM-dd HH:mm:ss",r=e.outputFormat||"dd/MM/yyyy HH:mm:ss",a=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",o=s.getValue();if(typeof i<"u"){var l;return i.isDateTime(o)?l=o:n==="iso"?l=i.fromISO(String(o)):l=i.fromFormat(String(o),n),l.isValid?(e.timezone&&(l=l.setZone(e.timezone)),l.toFormat(r)):a===!0||!o?o:typeof a=="function"?a(o):a}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function Mf(s,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),n=e.inputFormat||"yyyy-MM-dd HH:mm:ss",r=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",a=typeof e.suffix<"u"?e.suffix:!1,o=typeof e.unit<"u"?e.unit:"days",l=typeof e.humanize<"u"?e.humanize:!1,u=typeof e.date<"u"?e.date:i.now(),h=s.getValue();if(typeof i<"u"){var m;return i.isDateTime(h)?m=h:n==="iso"?m=i.fromISO(String(h)):m=i.fromFormat(String(h),n),m.isValid?l?m.diff(u,o).toHuman()+(a?" "+a:""):parseInt(m.diff(u,o)[o])+(a?" "+a:""):r===!0?h:typeof r=="function"?r(h):r}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function Sf(s,e,t){var i=s.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function Rf(s,e,t){var i=s.getValue(),n=s.getElement(),r=e&&e.stars?e.stars:5,a=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),l='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',u='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';a.style.verticalAlign="middle",o.setAttribute("width","14"),o.setAttribute("height","14"),o.setAttribute("viewBox","0 0 512 512"),o.setAttribute("xml:space","preserve"),o.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,r));for(var h=1;h<=r;h++){var m=o.cloneNode(!0);m.innerHTML=h<=i?l:u,a.appendChild(m)}return n.style.whiteSpace="nowrap",n.style.overflow="hidden",n.style.textOverflow="ellipsis",n.setAttribute("aria-label",i),a}function Df(s,e,t){var i=this.sanitizeHTML(s.getValue())||0,n=document.createElement("span"),r=e&&e.max?e.max:100,a=e&&e.min?e.min:0,o=e&&typeof e.color<"u"?e.color:["red","orange","green"],l="#666666",u,h;if(!(isNaN(i)||typeof s.getValue()>"u")){switch(n.classList.add("tabulator-traffic-light"),h=parseFloat(i)<=r?parseFloat(i):r,h=parseFloat(h)>=a?parseFloat(h):a,u=(r-a)/100,h=Math.round((h-a)/u),typeof o){case"string":l=o;break;case"function":l=o(i);break;case"object":if(Array.isArray(o)){var m=100/o.length,v=Math.floor(h/m);v=Math.min(v,o.length-1),v=Math.max(v,0),l=o[v];break}}return n.style.backgroundColor=l,n}}function Tf(s,e={},t){var i=this.sanitizeHTML(s.getValue())||0,n=s.getElement(),r=e.max?e.max:100,a=e.min?e.min:0,o=e.legendAlign?e.legendAlign:"center",l,u,h,m,v;switch(u=parseFloat(i)<=r?parseFloat(i):r,u=parseFloat(u)>=a?parseFloat(u):a,l=(r-a)/100,u=Math.round((u-a)/l),typeof e.color){case"string":h=e.color;break;case"function":h=e.color(i);break;case"object":if(Array.isArray(e.color)){let R=100/e.color.length,M=Math.floor(u/R);M=Math.min(M,e.color.length-1),M=Math.max(M,0),h=e.color[M];break}default:h="#2DC214"}switch(typeof e.legend){case"string":m=e.legend;break;case"function":m=e.legend(i);break;case"boolean":m=i;break;default:m=!1}switch(typeof e.legendColor){case"string":v=e.legendColor;break;case"function":v=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let R=100/e.legendColor.length,M=Math.floor(u/R);M=Math.min(M,e.legendColor.length-1),M=Math.max(M,0),v=e.legendColor[M]}break;default:v="#000"}n.style.minWidth="30px",n.style.position="relative",n.setAttribute("aria-label",u);var C=document.createElement("div");C.style.display="inline-block",C.style.width=u+"%",C.style.backgroundColor=h,C.style.height="100%",C.setAttribute("data-max",r),C.setAttribute("data-min",a);var F=document.createElement("div");if(F.style.position="relative",F.style.width="100%",F.style.height="100%",m){var x=document.createElement("div");x.style.position="absolute",x.style.top=0,x.style.left=0,x.style.textAlign=o,x.style.width="100%",x.style.color=v,x.innerHTML=m}return t(function(){if(!(s instanceof aa)){var R=document.createElement("div");R.style.position="absolute",R.style.top="4px",R.style.bottom="4px",R.style.left="4px",R.style.right="4px",n.appendChild(R),n=R}n.appendChild(F),F.appendChild(C),m&&F.appendChild(x)}),""}function _f(s,e,t){return s.getElement().style.backgroundColor=this.sanitizeHTML(s.getValue()),""}function Of(s,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'}function Lf(s,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'}function Pf(s,e,t){var i=s.getValue(),n=e.size||15,r=n+"px",a,o,l=e.hasOwnProperty("onValue")?e.onValue:!0,u=e.hasOwnProperty("offValue")?e.offValue:!1,h=e.onTruthy?i:i===l;return a=document.createElement("div"),a.classList.add("tabulator-toggle"),h?(a.classList.add("tabulator-toggle-on"),a.style.flexDirection="row-reverse",e.onColor&&(a.style.background=e.onColor)):e.offColor&&(a.style.background=e.offColor),a.style.width=2.5*n+"px",a.style.borderRadius=r,e.clickable&&a.addEventListener("click",m=>{s.setValue(h?u:l)}),o=document.createElement("div"),o.classList.add("tabulator-toggle-switch"),o.style.height=r,o.style.width=r,o.style.borderRadius=r,a.appendChild(o),a}function Ff(s,e,t){var i=document.createElement("span"),n=s.getRow(),r=s.getTable();return n.watchPosition(a=>{e.relativeToPage&&(a+=r.modules.page.getPageSize()*(r.modules.page.getPage()-1)),i.innerText=a}),i}function Af(s,e,t){return s.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"}function Hf(s,e,t){var i,n,r;function a(o){var l=o.getValue(),u="plaintext";switch(typeof l){case"boolean":u="tickCross";break;case"string":l.includes(`
|
|
32
|
-
`)&&(u="textarea");break}return u}return i=e.formatterLookup?e.formatterLookup(s):a(s),e.paramsLookup&&(r=typeof e.paramsLookup=="function"?e.paramsLookup(i,s):e.paramsLookup[i]),n=this.table.modules.format.lookupFormatter(i),n.call(this,s,r||{},t)}function zf(s,e,t){var i=e.delimiter||",",n=s.getValue(),r=this.table,a;return e.valueMap&&(typeof e.valueMap=="string"?a=function(o){return o.map(l=>He.retrieveNestedData(r.options.nestedFieldSeparator,e.valueMap,l))}:a=e.valueMap),Array.isArray(n)?(a&&(n=a(n)),n.join(i)):n}function Bf(s,e,t){var i=e.indent||" ",n=typeof e.multiline>"u"?!0:e.multiline,r=e.replacer||null,a=s.getValue();return n&&(s.getElement().style.whiteSpace="pre-wrap"),JSON.stringify(a,r,i)}var Nf={plaintext:bf,html:vf,textarea:yf,money:wf,link:Cf,image:Ef,tickCross:kf,datetime:xf,datetimediff:Mf,lookup:Sf,star:Rf,traffic:Df,progress:Tf,color:_f,buttonTick:Of,buttonCross:Lf,toggle:Pf,rownum:Ff,handle:Af,adaptable:Hf,array:zf,json:Bf};class wi extends ke{static moduleName="format";static formatters=Nf;constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupTypeFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupTypeFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupTypeFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupTypeFormatter(e,"HtmlOutput"))}lookupTypeFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},n=e.definition["formatter"+t];return i.formatter=this.lookupFormatter(n),i}lookupFormatter(e){var t;switch(typeof e){case"string":wi.formatters[e]?t=wi.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),t=wi.formatters.plaintext);break;case"function":t=e;break;default:t=wi.formatters.plaintext;break}return t}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var n,r,a,o;return e.definition.titleFormatter?(n=this.lookupFormatter(e.definition.titleFormatter),a=l=>{e.titleFormatterRendered=l},o={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},r=e.definition.titleFormatterParams||{},r=typeof r=="function"?r():r,n.call(this,o,r,a)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function n(r){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=r,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,n)}formatExportValue(e,t){var i=e.column.modules.format[t],n;if(i){let r=function(a){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=a,e.modules.format.rendered=!1};return n=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),n,r)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?" ":e}}class If extends ke{static moduleName="frozenColumns";constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-deleted",this.reinitializeColumns.bind(this)),this.subscribe("column-hide",this.reinitializeColumns.bind(this)),this.subscribe("column-show",this.reinitializeColumns.bind(this)),this.subscribe("columns-loaded",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)}),this.layout()}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,n=0;this.leftColumns.forEach((r,a)=>{if(r.modules.frozen.marginValue=i,r.modules.frozen.margin=r.modules.frozen.marginValue+"px",r.visible&&(i+=r.getWidth()),a==this.leftColumns.length-1?r.modules.frozen.edge=!0:r.modules.frozen.edge=!1,r.parent.isGroup){var o=this.getColGroupParentElement(r);t.includes(o)||(this.layoutElement(o,r),t.push(o)),o.classList.toggle("tabulator-frozen-left",r.modules.frozen.edge&&r.modules.frozen.position==="left"),o.classList.toggle("tabulator-frozen-right",r.modules.frozen.edge&&r.modules.frozen.position==="right")}else this.layoutElement(r.getElement(),r);e&&r.cells.forEach(l=>{this.layoutElement(l.getElement(!0),r)})}),this.rightColumns.forEach((r,a)=>{r.modules.frozen.marginValue=n,r.modules.frozen.margin=r.modules.frozen.marginValue+"px",r.visible&&(n+=r.getWidth()),a==this.rightColumns.length-1?r.modules.frozen.edge=!0:r.modules.frozen.edge=!1,r.parent.isGroup?this.layoutElement(this.getColGroupParentElement(r),r):this.layoutElement(r.getElement(),r),e&&r.cells.forEach(o=>{this.layoutElement(o.getElement(!0),r)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),e.classList.toggle("tabulator-frozen-left",t.modules.frozen.edge&&t.modules.frozen.position==="left"),e.classList.toggle("tabulator-frozen-right",t.modules.frozen.edge&&t.modules.frozen.position==="right"))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}getFrozenColumns(){return this.leftColumns.concat(this.rightColumns)}_calcSpace(e,t){var i=0;for(let n=0;n<t;n++)e[n].visible&&(i+=e[n].getWidth());return i}}class Vf extends ke{static moduleName="frozenRows";constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){var e=document.createDocumentFragment();this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach(e=>{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var n=t.indexOf(i);n>-1&&t.splice(n,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}class jf{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class Ci{constructor(e,t,i,n,r,a,o){this.groupManager=e,this.parent=t,this.key=n,this.level=i,this.field=r,this.hasSubGroups=i<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=o,this.rows=[],this.groups=[],this.groupList=[],this.generator=a,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=o?o.visible:typeof e.startOpen[i]<"u"?e.startOpen[i]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):this.rows.forEach(t=>{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,n=new Ci(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=n,this.groupList.push(n)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),n=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[n]&&this.groups[n].addRow(e):(this.groups[n]||this._createGroup(i,t),this.groups[n].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var n=this.conformRowData({});e.updateData(n);var r=this.rows.indexOf(t);r>-1?i?this.rows.splice(r+1,0,e):this.rows.splice(r,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(n=>{i.push(n.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(n=>{var r=n.getElement();e.parentNode.insertBefore(r,e.nextSibling),n.initialize(),e=r})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var n=i.getRowGroup(e);n&&(t=n)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(n=>{i=i.concat(n.getRows(e,t))}):this.rows.forEach(function(n){i.push(e?n.getComponent():n)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){(!this.initialized||e)&&(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,He.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new jf(this)),this.component}}class Wf extends ke{static moduleName="groupRows";constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,i=this.table.options.groupHeader;if(this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(r,a)=>{this.headerGenerator[0]=(o,l,u)=>(typeof o>"u"?"":o)+"<span>("+l+" "+(l===1?r:a.groups.items)+")</span>"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var n=this.table.columnManager.getRealColumns();n.forEach(r=>{r.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),r.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((r,a)=>{var o,l;typeof r=="function"?o=r:(l=this.table.columnManager.getColumnByField(r),l?o=function(u){return l.getFieldValue(u)}:o=function(u){return u[r]}),this.groupIDLookups.push({field:typeof r=="function"?!1:r,func:o,values:this.allowedValues?this.allowedValues[a]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(r=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var n=e.modules.group.rows;return n.length>1&&(!t||t&&n.indexOf(t)==-1?i?n[0]!==e&&(t=n[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):n[n.length-1]!==e&&(t=n[n.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof Ci&&(t=this.table.rowManager.prevDisplayRow(e)||t);var n=t instanceof Ci?t:t.modules.group,r=e instanceof Ci?e:e.modules.group;n===r?this.table.rowManager.moveRowInArray(n.rows,e,t,i):(r&&r.removeRow(e),n.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var n={};n.level=0,n.rowCount=0,n.headerContent="";var r=[];i.hasSubGroups?(r=this.pullGroupListData(i.groupList),n.level=i.level,n.rowCount=r.length-i.groupList.length,n.headerContent=i.generator(i.key,n.rowCount,i.rows,i),t.push(n),t=t.concat(r)):(n.level=i.level,n.headerContent=i.generator(i.key,i.rows.length,i.rows,i),n.rowCount=i.getRows().length,t.push(n),i.getRows().forEach(a=>{t.push(a.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var n=i.getRowGroup(e);n&&(t=n)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var n=t+"_"+e,r;i=i||[],r=new Ci(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[n]),this.groups[n]=r,this.groupList.push(r)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),n="0_"+i;this.groups[n]&&this.groups[n].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),n=!this.groups["0_"+i];return n&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!n}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),n=this.getExpectedPath(e),r;r=i.length==n.length&&i.every((a,o)=>a===n[o]),r||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(n=>{t.push(n.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,n)=>{this.table.rowManager.styleRow(i,n),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}var Yf={cellEdit:function(s){s.component.setValueProcessData(s.data.oldValue),s.component.cellRendered()},rowAdd:function(s){s.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowDelete:function(s){var e=this.table.rowManager.addRowActual(s.data.data,s.data.pos,s.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(s.component,e),this.table.rowManager.checkPlaceholder()},rowMove:function(s){var e=s.data.posFrom-s.data.posTo>0;this.table.rowManager.moveRowActual(s.component,this.table.rowManager.getRowFromPosition(s.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},Gf={cellEdit:function(s){s.component.setValueProcessData(s.data.newValue),s.component.cellRendered()},rowAdd:function(s){var e=this.table.rowManager.addRowActual(s.data.data,s.data.pos,s.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(s.component,e),this.table.rowManager.checkPlaceholder()},rowDelete:function(s){s.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowMove:function(s){this.table.rowManager.moveRowActual(s.component,this.table.rowManager.getRowFromPosition(s.data.posTo),s.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},$f={undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"]},Uf={undo:function(s){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(s.preventDefault(),this.table.modules.history.undo()))},redo:function(s){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(s.preventDefault(),this.table.modules.history.redo()))}},Kf={keybindings:{bindings:$f,actions:Uf}};class As extends ke{static moduleName="history";static moduleExtensions=Kf;static undoers=Yf;static redoers=Gf;constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,n){this.action("rowAdd",e,{data:t,pos:i,index:n})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return As.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Undo Error - No more history to undo":"History module not enabled"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return As.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Redo Error - No more history to redo":"History module not enabled"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof Qe)i.component===e&&(i.component=t);else if(i.component instanceof Yi&&i.component.row===e){var n=i.component.column.getField();n&&(i.component=t.getCell(n))}})}}class qf extends ke{static moduleName="htmlTableImport";constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),n=e.getElementsByTagName("tbody")[0],r=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),n=n?n.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,n):this._generateBlankHeaders(i,n);for(var a=0;a<n.length;a++){var o=n[a],l=o.getElementsByTagName("td"),u={};this.hasIndex||(u[t.index]=a);for(var h=0;h<l.length;h++){var m=l[h];typeof this.fieldIndex[h]<"u"&&(u[this.fieldIndex[h]]=m.innerHTML)}r.push(u)}t.data=r,this.dispatchExternal("htmlImported")}_extractOptions(e,t,i){var n=e.attributes,r=Object.keys(i||t),a={};r.forEach(h=>{a[h.toLowerCase()]=h});for(var o in n){var l=n[o],u;l&&typeof l=="object"&&l.name&&l.name.indexOf("tabulator-")===0&&(u=l.name.replace("tabulator-",""),typeof a[u]<"u"&&(t[a[u]]=this._attribValue(l.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i<e.length;i++){var n=e[i],r=!1,a=this._findCol(n.textContent),o;a?r=!0:a={title:n.textContent.trim()},a.field||(a.field=n.textContent.trim().toLowerCase().replaceAll(" ","_")),o=n.getAttribute("width"),o&&!a.width&&(a.width=o),this._extractOptions(n,a,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),r||this.table.options.columns.push(a)}}_generateBlankHeaders(e,t){for(var i=0;i<e.length;i++){var n=e[i],r={title:"",field:"col"+i};this.fieldIndex[i]=r.field;var a=n.getAttribute("width");a&&(r.width=a),this.table.options.columns.push(r)}}}function Jf(s){var e=[],t=0,i=0,n=!1;for(let r=0;r<s.length;r++){let a=s[r],o=s[r+1];if(e[t]||(e[t]=[]),e[t][i]||(e[t][i]=""),a=='"'&&n&&o=='"'){e[t][i]+=a,r++;continue}if(a=='"'){n=!n;continue}if(a==","&&!n){i++;continue}if(a=="\r"&&o==`
|
|
33
|
-
`&&!
|
|
34
|
-
`)&&!n){i=0,t++;continue}e[t][i]+=a}return e}function Xf(s){try{return JSON.parse(s)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function Zf(s){return s}function Qf(s){var e=this.dependencyRegistry.lookup("XLSX"),t=e.read(s),i=t.Sheets[t.SheetNames[0]];return e.utils.sheet_to_json(i,{header:1})}var ep={csv:Jf,json:Xf,array:Zf,xlsx:Qf};class An extends ke{static moduleName="import";static importers=ep;constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text"),this.registerTableOption("importHeaderTransform"),this.registerTableOption("importValueTransform"),this.registerTableOption("importDataValidator"),this.registerTableOption("importFileValidator")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&(typeof e=="string"||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,i,n,r){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch(a=>(console.error("Import Error:",a||"Unable to import data"),Promise.reject(a)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=An.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t,i){var n=this.lookupImporter(e);if(n)return this.pickFile(t,i).then(this.importData.bind(this,n)).then(this.structureData.bind(this)).then(this.mutateData.bind(this)).then(this.validateData.bind(this)).then(this.setData.bind(this)).catch(r=>(this.dispatch("import-error",r),this.dispatchExternal("importError",r),console.error("Import Error:",r||"Unable to import file"),this.table.dataLoader.alertError(),setTimeout(()=>{this.table.dataLoader.clearAlert()},3e3),Promise.reject(r)))}pickFile(e,t){return new Promise((i,n)=>{var r=document.createElement("input");r.type="file",r.accept=e,r.addEventListener("change",a=>{var o=r.files[0],l=new FileReader,u=this.validateFile(o);if(u===!0){switch(this.dispatch("import-importing",r.files),this.dispatchExternal("importImporting",r.files),t||this.table.options.importReader){case"buffer":l.readAsArrayBuffer(o);break;case"binary":l.readAsBinaryString(o);break;case"url":l.readAsDataURL(o);break;case"text":default:l.readAsText(o)}l.onload=h=>{i(l.result)},l.onerror=h=>{console.warn("File Load Error - Unable to read file"),n(h)}}else n(u)}),this.dispatch("import-choose"),this.dispatchExternal("importChoose"),r.click()})}importData(e,t){var i;return this.table.dataLoader.alertLoader(),new Promise((n,r)=>{setTimeout(()=>{i=e.call(this.table,t),i instanceof Promise||i?n(i):r()},10)})}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"import"))}):t=e,t}transformHeader(e){var t=[];if(this.table.options.importHeaderTransform)e.forEach(i=>{t.push(this.table.options.importHeaderTransform.call(this.table,i,e))});else return e;return t}transformData(e){var t=[];if(this.table.options.importValueTransform)e.forEach(i=>{t.push(this.table.options.importValueTransform.call(this.table,i,e))});else return e;return t}structureArrayToObject(e){var t=this.transformHeader(e.shift()),i=e.map(n=>{var r={};return n=this.transformData(n),t.forEach((a,o)=>{r[a]=n[o]}),r});return i}structureArrayToColumns(e){var t=[],i=this.transformHeader(e[0]),n=this.table.getColumns();return n[0]&&i[0]&&n[0].getDefinition().title===i[0]&&e.shift(),e.forEach(r=>{var a={};r=this.transformData(r),r.forEach((o,l)=>{var u=n[l];u&&(a[u.getField()]=o)}),t.push(a)}),t}validateFile(e){return this.table.options.importFileValidator?this.table.options.importFileValidator.call(this.table,e):!0}validateData(e){var t;return this.table.options.importDataValidator?(t=this.table.options.importDataValidator.call(this.table,e),t===!0?e:Promise.reject(t)):e}setData(e){return this.dispatch("import-imported",e),this.dispatchExternal("importImported",e),this.table.dataLoader.clearAlert(),this.table.setData(e)}}class tp extends ke{static moduleName="interaction";constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let n in this.eventMap)this.eventMap[n]===i&&this.subscribers[n]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,n){var r=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":r.tap=!0,clearTimeout(r.tapHold),r.tapHold=setTimeout(()=>{clearTimeout(r.tapHold),r.tapHold=null,r.tap=null,clearTimeout(r.tapDbl),r.tapDbl=null,this.dispatchEvent(e+"TapHold",i,n)},1e3);break;case"end":r.tap&&(r.tap=null,this.dispatchEvent(e+"Tap",i,n)),r.tapDbl?(clearTimeout(r.tapDbl),r.tapDbl=null,this.dispatchEvent(e+"DblTap",i,n)):r.tapDbl=setTimeout(()=>{clearTimeout(r.tapDbl),r.tapDbl=null},300),clearTimeout(r.tapHold),r.tapHold=null;break}}dispatchEvent(e,t,i){var n=i.getComponent(),r;this.columnSubscribers[e]&&(i instanceof Yi?r=i.column.definition[e]:i instanceof _t&&(r=i.definition[e]),r&&r(t,n)),this.dispatchExternal(e,t,n)}}var ip={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,navLeft:37,navRight:39,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35},sp={keyBlock:function(s){s.stopPropagation(),s.preventDefault()},scrollPageUp:function(s){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;s.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(s){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;s.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(s){var e=this.table.rowManager;s.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(s){var e=this.table.rowManager;s.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(s){this.dispatch("keybinding-nav-prev",s)},navNext:function(s){this.dispatch("keybinding-nav-next",s)},navLeft:function(s){this.dispatch("keybinding-nav-left",s)},navRight:function(s){this.dispatch("keybinding-nav-right",s)},navUp:function(s){this.dispatch("keybinding-nav-up",s)},navDown:function(s){this.dispatch("keybinding-nav-down",s)}};class $i extends ke{static moduleName="keybindings";static bindings=ip;static actions=sp;constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,$i.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)$i.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var n=Array.isArray(i)?i:[i];n.forEach(r=>{this.mapBinding(t,r)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:$i.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},n=t.toString().toLowerCase().split(" ").join("").split("+");n.forEach(r=>{switch(r){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:r=isNaN(r)?r.toUpperCase().charCodeAt(0):parseInt(r),i.keys.push(r),this.watchKeys[r]||(this.watchKeys[r]=[]),this.watchKeys[r].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,n=e.watchKeys[i];n&&(e.pressedKeys.push(i),n.forEach(function(r){e.checkBinding(t,r)}))},this.keydownBinding=function(t){var i=t.keyCode,n=e.watchKeys[i];if(n){var r=e.pressedKeys.indexOf(i);r>-1&&e.pressedKeys.splice(r,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(n=>{var r=this.pressedKeys.indexOf(n);r==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}}class np extends ke{static moduleName="menu";constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,n,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,n,r){var a=!(e instanceof MouseEvent),o=document.createElement("div"),l;if(o.classList.add("tabulator-menu"),a||e.preventDefault(),!(!i||!i.length)){if(n)l=r.child(o);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=l=this.popup(o)}i.forEach(u=>{var h=document.createElement("div"),m=u.label,v=u.disabled;u.separator?h.classList.add("tabulator-menu-separator"):(h.classList.add("tabulator-menu-item"),typeof m=="function"&&(m=m.call(this.table,t.getComponent())),m instanceof Node?h.appendChild(m):h.innerHTML=m,typeof v=="function"&&(v=v.call(this.table,t.getComponent())),v?(h.classList.add("tabulator-menu-item-disabled"),h.addEventListener("click",C=>{C.stopPropagation()})):u.menu&&u.menu.length?h.addEventListener("click",C=>{C.stopPropagation(),this.loadMenu(C,t,u.menu,h,l)}):u.action&&h.addEventListener("click",C=>{u.action(C,t.getComponent())}),u.menu&&u.menu.length&&h.classList.add("tabulator-menu-item-submenu")),o.appendChild(h)}),o.addEventListener("click",u=>{this.rootPopup&&this.rootPopup.hide()}),l.show(n||e),l===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",i,l),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatch("menu-opened",i,l),this.dispatchExternal("menuOpened",t.getComponent()))}}}class rp extends ke{static moduleName="moveColumn";constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&(this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("alert-show",this.abortMove.bind(this)))}abortMove(){clearTimeout(this.checkTimeout)}initializeColumn(e){var t=this,i={},n;!e.modules.frozen&&!e.isGroup&&!e.isRowHeader&&(n=e.getElement(),i.mousemove=(function(r){e.parent===t.moving.parent&&((t.touchMove?r.touches[0].pageX:r.pageX)-He.elOffset(n).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveColumn(e,!1)))}).bind(t),n.addEventListener("mousedown",function(r){t.touchMove=!1,r.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(r,e)},t.checkPeriod))}),n.addEventListener("mouseup",function(r){r.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,n,r,a,o,l,u;t.addEventListener("touchstart",h=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,n=e.nextColumn(),a=n?n.getWidth()/2:0,r=e.prevColumn(),o=r?r.getWidth()/2:0,l=0,u=0,i=!1,this.startMove(h,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",h=>{var m,v;this.moving&&(this.moveHover(h),i||(i=h.touches[0].pageX),m=h.touches[0].pageX-i,m>0?n&&m-l>a&&(v=n,v!==e&&(i=h.touches[0].pageX,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement().nextSibling),this.moveColumn(v,!0))):r&&-m-u>o&&(v=r,v!==e&&(i=h.touches[0].pageX,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement()),this.moveColumn(v,!1))),v&&(n=v.nextColumn(),l=a,a=n?n.getWidth()/2:0,r=v.prevColumn(),u=o,o=r?r.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",h=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(h)})}startMove(e,t){var i=t.getElement(),n=this.table.columnManager.getContentsElement(),r=this.table.columnManager.getHeadersElement();this.table.modules.selectRange&&this.table.modules.selectRange.columnSelection&&this.table.modules.selectRange.mousedown&&this.table.modules.selectRange.selecting==="column"||(this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-He.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),n.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=n.clientHeight-r.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e),this.dispatch("column-moving",e,this.moving))}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(n,r){var a=n.getElement(!0);a.parentNode&&i[r]&&a.parentNode.insertBefore(i[r].getElement(),a.nextSibling)}):e.getCells().forEach(function(n,r){var a=n.getElement(!0);a.parentNode&&i[r]&&a.parentNode.insertBefore(i[r].getElement(),a)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,n=(this.touchMove?e.touches[0].pageX:e.pageX)-He.elOffset(t).left+i,r;this.hoverElement.style.left=n-this.startX+"px",n-i<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{r=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=r,this.autoScrollTimeout=!1},1))),i+t.clientWidth-n<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{r=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=r,this.autoScrollTimeout=!1},1)))}}var ap={delete:function(s,e,t){s.delete()}},op={insert:function(s,e,t){return this.table.addRow(s.getData(),void 0,e),!0},add:function(s,e,t){return this.table.addRow(s.getData()),!0},update:function(s,e,t){return e?(e.update(s.getData()),!0):!1},replace:function(s,e,t){return e?(this.table.addRow(s.getData(),void 0,e),e.delete(),!0):!1}};class Hs extends ke{static moduleName="moveRow";static senders=ap;static receivers=op;constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(n){t.tableRowDrop(n,e)}).bind(t),i.mousemove=(function(n){var r;n.pageY-He.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(r=e.getElement(),r.parentNode.insertBefore(t.placeholderElement,r.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(r=e.getElement(),r.previousSibling&&(r.parentNode.insertBefore(t.placeholderElement,r),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},n;i.mouseup=(function(r){t.tableRowDrop(r,e)}).bind(t),i.mousemove=(function(r){var a=e.getElement();r.pageY-He.elOffset(a).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a),t.moveRow(e,!1))}).bind(t),this.hasHandle||(n=e.getElement(),n.addEventListener("mousedown",function(r){r.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(r,e)},t.checkPeriod))}),n.addEventListener("mouseup",function(r){r.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(n){n.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(n,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(n){n.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,n,r,a,o,l,u;t.addEventListener("touchstart",h=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,n=e.nextRow(),a=n?n.getHeight()/2:0,r=e.prevRow(),o=r?r.getHeight()/2:0,l=0,u=0,i=!1,this.startMove(h,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",h=>{var m,v;this.moving&&(h.preventDefault(),this.moveHover(h),i||(i=h.touches[0].pageY),m=h.touches[0].pageY-i,m>0?n&&m-l>a&&(v=n,v!==e&&(i=h.touches[0].pageY,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement().nextSibling),this.moveRow(v,!0))):r&&-m-u>o&&(v=r,v!==e&&(i=h.touches[0].pageY,v.getElement().parentNode.insertBefore(this.placeholderElement,v.getElement()),this.moveRow(v,!1))),v&&(n=v.nextRow(),l=a,a=n?n.getHeight()/2:0,r=v.prevRow(),u=o,o=r?r.getHeight()/2:0))}),t.addEventListener("touchend",h=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(h),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,n=this.touchMove?e.touches[0].pageY:e.pageY,r,a;r=t.getElement(),this.connection?(a=r.getBoundingClientRect(),this.startX=a.left-i+window.pageXOffset,this.startY=a.top-n+window.pageYOffset):this.startY=n-r.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,n=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(n-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var n=r=>{this.elementRowDrop(r,i,this.moving)};i.addEventListener("mouseup",n),i.tabulatorElementDropEvent=n,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var n=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":n=Hs.senders[this.table.options.movableRowsSender];break;case"function":n=this.table.options.movableRowsSender;break}n?n.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,n=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=Hs.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?n=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),n?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:n})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}var lp={};class zs extends ke{static moduleName="mutator";static mutators=lp;constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard","import"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutatorImport"),this.registerColumnOption("mutatorImportParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(n=>{var r="mutator"+(n.charAt(0).toUpperCase()+n.slice(1)),a;e.definition[r]&&(a=this.lookupMutator(e.definition[r]),a&&(t=!0,i[r]={mutator:a,params:e.definition[r+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":zs.mutators[e]?t=zs.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var n="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),r;return this.enabled&&this.table.columnManager.traverse(a=>{var o,l,u;a.modules.mutate&&(o=a.modules.mutate[n]||a.modules.mutate.mutator||!1,o&&(r=a.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof r<"u")&&(u=a.getComponent(),l=typeof o.params=="function"?o.params(r,e,t,u):o.params,a.setFieldValue(e,o.mutator(r,e,t,l,u)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,n={};if(i)return n=Object.assign(n,e.row.getData()),e.column.setFieldValue(n,t),i.mutator(t,n,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var n=e.row.getCell(i);n&&n.setValue(n.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}}function up(s,e,t,i,n){var r=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),h=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",m=>{a.innerHTML=m}),this.table.modules.localize.langBind("pagination|counter|of",m=>{l.innerHTML=m}),this.table.modules.localize.langBind("pagination|counter|rows",m=>{h.innerHTML=m}),i?(o.innerHTML=" "+e+"-"+Math.min(e+s-1,i)+" ",u.innerHTML=" "+i+" ",r.appendChild(a),r.appendChild(o),r.appendChild(l),r.appendChild(u),r.appendChild(h)):(o.innerHTML=" 0 ",r.appendChild(a),r.appendChild(o),r.appendChild(h)),r}function hp(s,e,t,i,n){var r=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),l=document.createElement("span"),u=document.createElement("span"),h=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",m=>{a.innerHTML=m}),o.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",m=>{l.innerHTML=m}),u.innerHTML=" "+n+" ",this.table.modules.localize.langBind("pagination|counter|pages",m=>{h.innerHTML=m}),r.appendChild(a),r.appendChild(o),r.appendChild(l),r.appendChild(u),r.appendChild(h),r}var dp={rows:up,pages:hp};class Hn extends ke{static moduleName="page";static pageCounters=dp;constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("paginationOutOfRange",!1),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,n=i.getDisplayRows(),r;return t?n.length?r=n[0]:i.activeRows.length&&(r=i.activeRows[i.activeRows.length-1],t=!1):n.length&&(r=n[n.length-1],t=!(n.length<this.size)),{index:r,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:(e=document.createElement("div"),e.classList.add("tabulator-row"),e.style.visibility="hidden",t=document.createElement("div"),t.classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,i,n){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),n.page=this.page,this.size&&(n.size=this.size),n}userSetPageToRow(e){return this.table.options.pagination&&(e=this.table.rowManager.findRow(e),e)?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return this.table.options.pagination?(this.setPageSize(e),this.setPage(1)):!1}scrollVertical(e,t){var i,n,r;!t&&!this.table.dataLoader.loading&&(i=this.table.rowManager.getElement(),n=i.scrollHeight-i.clientHeight-e,r=this.table.options.progressiveLoadScrollMargin||i.clientHeight*2,n<r&&this.nextPage().catch(()=>{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(n){i.innerHTML=n}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=Hn.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",n=>{this.firstBut.innerHTML=n}),this.langBind("pagination|first_title",n=>{this.firstBut.setAttribute("aria-label",n),this.firstBut.setAttribute("title",n)}),this.langBind("pagination|prev",n=>{this.prevBut.innerHTML=n}),this.langBind("pagination|prev_title",n=>{this.prevBut.setAttribute("aria-label",n),this.prevBut.setAttribute("title",n)}),this.langBind("pagination|next",n=>{this.nextBut.innerHTML=n}),this.langBind("pagination|next_title",n=>{this.nextBut.setAttribute("aria-label",n),this.nextBut.setAttribute("title",n)}),this.langBind("pagination|last",n=>{this.lastBut.innerHTML=n}),this.langBind("pagination|last_title",n=>{this.lastBut.setAttribute("aria-label",n),this.lastBut.setAttribute("title",n)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",n=>{this.pageSizeSelect.setAttribute("aria-label",n),this.pageSizeSelect.setAttribute("title",n),t.innerHTML=n}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",n=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var n=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(n)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var n;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),n=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof n){case"object":if(n instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(n)}else this.pageCounterElement.innerHTML="",n!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",n);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=n}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),n=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);this.page==1?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let r=i;r<=n;r++)r>0&&r<=this.max&&this.pagesElement.appendChild(this._generatePageButton(r));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t=0,i,n,r,a,o=e.filter(l=>l.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(n=0,r=e.length):(n=this.size*(this.page-1),r=n+parseInt(this.size)),this._setPageButtons();for(let l=n;l<r;l++){let u=e[l];u&&(i.push(u),u.type==="row"&&(a||(a=u),t++))}return this._setPageCounter(o.length,t,a?o.indexOf(a)+1:0),i}else return this._setPageButtons(),this._setPageCounter(o.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally(()=>{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t,i;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout(()=>{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout(()=>{this.nextPage()});break}return!1}else{if(this.page>this.max&&(console.warn("Remote Pagination Error - Server returned last page value lower than the current page"),i=this.options("paginationOutOfRange"),i))return this.setPage(typeof i=="function"?i.call(this,this.page,this.max):i);this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}var cp={local:function(s,e){var t=localStorage.getItem(s+"-"+e);return t?JSON.parse(t):!1},cookie:function(s,e){var t=document.cookie,i=s+"-"+e,n=t.indexOf(i+"="),r,a;return n>-1&&(t=t.slice(n),r=t.indexOf(";"),r>-1&&(t=t.slice(0,r)),a=t.replace(i+"=","")),a?JSON.parse(a):!1}},fp={local:function(s,e,t){localStorage.setItem(s+"-"+e,JSON.stringify(t))},cookie:function(s,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=s+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};class Ot extends ke{static moduleName="persistence";static moduleInitOrder=-10;static readers=cp;static writers=fp;constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:Ot.readers[this.table.options.persistenceReaderFunc]?this.readFunc=Ot.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):Ot.readers[this.mode]?this.readFunc=Ot.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:Ot.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=Ot.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):Ot.writers[this.mode]?this.writeFunc=Ot.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e,!0)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(n=>{var r=Object.getOwnPropertyDescriptor(t,n),a=t[n];r&&Object.defineProperty(t,n,{set:o=>{a=o,this.defWatcherBlock||this.save("columns"),r.set&&r.set(o)},get:()=>(r.get&&r.get(),a)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t,i){var n=[];return t=t||[],t.forEach((r,a)=>{var o=this._findColumn(e,r),l;o&&(i?l=Object.keys(r):this.config.columns===!0||this.config.columns==null?(l=Object.keys(o),l.push("width")):l=this.config.columns,l.forEach(u=>{u!=="columns"&&typeof r[u]<"u"&&(o[u]=r[u])}),o.columns&&(o.columns=this.mergeDefinition(o.columns,r.columns)),n.push(o))}),e.forEach((r,a)=>{var o=this._findColumn(t,r);o||(n.length>a?n.splice(a,0,r):n.push(r))}),n}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(n){switch(i){case"group":return n.title===t.title&&n.columns.length===t.columns.length;case"field":return n.field===t.field;case"object":return n===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(n=>{var r={},a=n.getDefinition(),o;n.isGroup?(r.title=a.title,r.columns=this.parseColumns(n.getColumns())):(r.field=n.getField(),this.config.columns===!0||this.config.columns==null?(o=Object.keys(a),o.push("width"),o.push("visible")):o=this.config.columns,o.forEach(l=>{switch(l){case"width":r.width=n.getWidth();break;case"visible":r.visible=n.visible;break;default:typeof a[l]!="function"&&i.indexOf(l)===-1&&(r[l]=a[l])}})),t.push(r)}),t}}class pp extends ke{static moduleName="popup";constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",n=>{n.stopPropagation(),n.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,n,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,n){var r;function a(o){r=o}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),a):e,this.loadPopup(t,i,e,r,n)}loadPopup(e,t,i,n,r){var a=!(e instanceof MouseEvent),o,l;i instanceof HTMLElement?o=i:(o=document.createElement("div"),o.innerHTML=i),o.classList.add("tabulator-popup"),o.addEventListener("click",u=>{u.stopPropagation()}),a||e.preventDefault(),l=this.popup(o),typeof n=="function"&&l.renderCallback(n),e?l.show(e):l.show(t.getElement(),r||"center"),l.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}class mp extends ke{static moduleName="print";constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var n=window.scrollX,r=window.scrollY,a=document.createElement("div"),o=document.createElement("div"),l=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),u,h;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),u=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof u=="string"?a.innerHTML=u:a.appendChild(u),this.element.appendChild(a)),this.element.appendChild(l),this.table.options.printFooter&&(o.classList.add("tabulator-print-footer"),h=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof h=="string"?o.innerHTML=h:o.appendChild(h),this.element.appendChild(o)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,l),window.print(),this.cleanup(),window.scrollTo(n,r),this.manualBlock=!1}}class gp extends ke{static moduleName="reactiveData";constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),r;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),n.forEach(a=>{t.table.rowManager.addRowActual(a,!1)}),r=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),r}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),r;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),n.forEach(a=>{t.table.rowManager.addRowActual(a,!0)}),r=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),r}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var n,r;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(n=t.table.rowManager.getRowFromDataObject(t.data[0]),n&&n.deleteActual()),r=t.origFuncs.shift.call(e),t.unblock("data-shift")),r}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var n,r;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(n=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),n&&n.deleteActual()),r=t.origFuncs.pop.call(e),t.unblock("data-pop")),r}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var n=Array.from(arguments),r=n[0]<0?e.length+n[0]:n[0],a=n[1],o=n[2]?n.slice(2):!1,l,u;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),o&&(l=e[r]?t.table.rowManager.getRowFromDataObject(e[r]):!1,l?o.forEach(m=>{t.table.rowManager.addRowActual(m,!0,l,!0)}):(o=o.slice().reverse(),o.forEach(m=>{t.table.rowManager.addRowActual(m,!0,!1,!0)}))),a!==0){var h=e.slice(r,typeof n[1]>"u"?n[1]:r+a);h.forEach((m,v)=>{var C=t.table.rowManager.getRowFromDataObject(m);C&&C.deleteActual(v!==h.length-1)})}(o||a!==0)&&t.table.rowManager.reRenderInPosition(),u=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return u}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],n={};i&&(n.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var r=n.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return r}}),n.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var r=n.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return r}}),n.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var r=n.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return r}}),n.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var r=n.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return r}}),n.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var r=n.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return r}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var n=this,r=Object.getOwnPropertyDescriptor(t,i),a=t[i],o=this.currentVersion;Object.defineProperty(t,i,{set:l=>{if(a=l,!n.blocked&&o===n.currentVersion){n.block("key");var u={};u[i]=l,e.updateData(u),n.unblock("key")}r.set&&r.set(l)},get:()=>(r.get&&r.get(),a)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}class bp extends ke{static moduleName="resizeColumns";constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1),this.registerTableOption("resizableColumnGuide",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t,i.modules.resize.handleEl.style["z-index"]=11),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,n){var r=this,a=!1,o=i.definition.resizable,l={},u=i.getLastColumn();if(e==="header"&&(a=i.definition.formatter=="textarea"||i.definition.variableHeight,l={variableHeight:a}),(o===!0||o==e)&&this._checkResizability(u)){var h=document.createElement("span");h.className="tabulator-col-resize-handle",h.addEventListener("click",function(v){v.stopPropagation()});var m=function(v){r.startColumn=i,r.initialNextColumn=r.nextColumn=u.nextColumn(),r._mouseDown(v,u,h)};h.addEventListener("mousedown",m),h.addEventListener("touchstart",m,{passive:!0}),h.addEventListener("dblclick",v=>{var C=u.getWidth();v.stopPropagation(),u.reinitializeWidth(!0),C!==u.getWidth()&&(r.dispatch("column-resized",u),r.dispatchExternal("columnResized",u.getComponent()))}),i.modules.frozen&&(h.style.position="sticky",h.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),l.handleEl=h,n.parentNode&&i.visible&&n.after(h)}t.modules.resize=l}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}resize(e,t){var i=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,n=i-this.startX,r=i-this.latestX,a,o;if(this.latestX=i,this.table.rtl&&(n=-n,r=-r),a=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+n),o=t.width==t.minWidth||t.width==t.maxWidth,r<0&&(this.nextColumn=this.initialNextColumn),this.table.options.resizableColumnFit&&this.nextColumn&&!(a&&o)){let l=this.nextColumn.getWidth();r>0&&l<=this.nextColumn.minWidth&&(this.nextColumn=this.nextColumn.nextColumn()),this.nextColumn&&this.nextColumn.setWidth(this.nextColumn.getWidth()-r)}this.table.columnManager.rerenderColumns(!0),!this.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}calcGuidePosition(e,t,i){var n=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,r=i.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,a=this.table.element.getBoundingClientRect().x,o=t.element.getBoundingClientRect().left-a,l=n-this.startX,u=Math.max(r+l,o+t.minWidth);return t.maxWidth&&(u=Math.min(u,o+t.maxWidth)),u}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var n=this,r;this.dispatchExternal("columnResizing",t.getComponent()),n.table.options.resizableColumnGuide&&(r=document.createElement("span"),r.classList.add("tabulator-col-resize-guide"),n.table.element.appendChild(r),setTimeout(()=>{r.style.left=n.calcGuidePosition(e,t,i)+"px"})),n.table.element.classList.add("tabulator-block-select");function a(l){n.table.options.resizableColumnGuide?r.style.left=n.calcGuidePosition(l,t,i)+"px":n.resize(l,t)}function o(l){n.table.options.resizableColumnGuide&&(n.resize(l,t),r.remove()),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!1),n.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),n.table.element.classList.remove("tabulator-block-select"),n.startWidth!==t.getWidth()&&(n.table.columnManager.verticalAlignHeaders(),n.dispatch("column-resized",t),n.dispatchExternal("columnResized",t.getComponent()))}e.stopPropagation(),n.startColumn.modules.edit&&(n.startColumn.modules.edit.blocked=!0),n.startX=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,n.latestX=n.startX,n.startWidth=t.getWidth(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class vp extends ke{static moduleName="resizeRows";constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1),this.registerTableOption("resizableRowGuide",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),n=document.createElement("div");n.className="tabulator-row-resize-handle";var r=document.createElement("div");r.className="tabulator-row-resize-handle prev",n.addEventListener("click",function(l){l.stopPropagation()});var a=function(l){t.startRow=e,t._mouseDown(l,e,n)};n.addEventListener("mousedown",a),n.addEventListener("touchstart",a,{passive:!0}),r.addEventListener("click",function(l){l.stopPropagation()});var o=function(l){var u=t.table.rowManager.prevDisplayRow(e);u&&(t.startRow=u,t._mouseDown(l,u,r))};r.addEventListener("mousedown",o),r.addEventListener("touchstart",o,{passive:!0}),i.appendChild(n),i.appendChild(r)}resize(e,t){t.setHeight(this.startHeight+((typeof e.screenY>"u"?e.touches[0].screenY:e.screenY)-this.startY))}calcGuidePosition(e,t,i){var n=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,r=i.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,a=this.table.element.getBoundingClientRect().y,o=t.element.getBoundingClientRect().top-a,l=n-this.startY;return Math.max(r+l,o)}_mouseDown(e,t,i){var n=this,r;n.dispatchExternal("rowResizing",t.getComponent()),n.table.options.resizableRowGuide&&(r=document.createElement("span"),r.classList.add("tabulator-row-resize-guide"),n.table.element.appendChild(r),setTimeout(()=>{r.style.top=n.calcGuidePosition(e,t,i)+"px"})),n.table.element.classList.add("tabulator-block-select");function a(l){n.table.options.resizableRowGuide?r.style.top=n.calcGuidePosition(l,t,i)+"px":n.resize(l,t)}function o(l){n.table.options.resizableRowGuide&&(n.resize(l,t),r.remove()),document.body.removeEventListener("mouseup",a),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),n.table.element.classList.remove("tabulator-block-select"),n.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),n.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,n.startHeight=t.getHeight(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class yp extends ke{static moduleName="resizeTable";constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var n=Math.floor(i[0].contentRect.height),r=Math.floor(i[0].contentRect.width);(this.tableHeight!=n||this.tableWidth!=r)&&(this.tableHeight=n,this.tableWidth=r,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var n=Math.floor(i[0].contentRect.height),r=Math.floor(i[0].contentRect.width);(this.containerHeight!=n||this.containerWidth!=r)&&(this.containerHeight=n,this.containerWidth=r,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell))&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}function wp(s,e,t){var i=document.createElement("div"),n=s.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=`<svg class='tabulator-responsive-collapse-toggle-open' viewbox="0 0 24 24">
|
|
31
|
+
`}}function D(){t.calendarContainer.classList.add("hasWeeks");var L=Ge("div","flatpickr-weekwrapper");L.appendChild(Ge("span","flatpickr-weekday",t.l10n.weekAbbreviation));var A=Ge("div","flatpickr-weeks");return L.appendChild(A),{weekWrapper:L,weekNumbers:A}}function P(L,A){A===void 0&&(A=!0);var W=A?L:L-t.currentMonth;W<0&&t._hidePrevMonthArrow===!0||W>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=W,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ue("onYearChange"),O()),M(),Ue("onMonthChange"),Ie())}function I(L,A){if(L===void 0&&(L=!0),A===void 0&&(A=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,A===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var W=la(t.config),te=W.hours,ce=W.minutes,fe=W.seconds;f(te,ce,fe)}t.redraw(),L&&Ue("onChange")}function N(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ue("onClose")}function U(){t.config!==void 0&&Ue("onDestroy");for(var L=t._handlers.length;L--;)t._handlers[L].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var A=t.calendarContainer.parentNode;if(A.lastChild&&A.removeChild(A.lastChild),A.parentNode){for(;A.firstChild;)A.parentNode.insertBefore(A.firstChild,A);A.parentNode.removeChild(A)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(W){try{delete t[W]}catch{}})}function Z(L){return t.calendarContainer.contains(L)}function j(L){if(t.isOpen&&!t.config.inline){var A=vt(L),W=Z(A),te=A===t.input||A===t.altInput||t.element.contains(A)||L.path&&L.path.indexOf&&(~L.path.indexOf(t.input)||~L.path.indexOf(t.altInput)),ce=!te&&!W&&!Z(L.relatedTarget),fe=!t.config.ignoredFocusElements.some(function(Te){return Te.contains(A)});ce&&fe&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&u(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function ne(L){if(!(!L||t.config.minDate&&L<t.config.minDate.getFullYear()||t.config.maxDate&&L>t.config.maxDate.getFullYear())){var A=L,W=t.currentYear!==A;t.currentYear=A||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),W&&(t.redraw(),Ue("onYearChange"),O())}}function G(L,A){var W;A===void 0&&(A=!0);var te=t.parseDate(L,void 0,A);if(t.config.minDate&&te&&yt(te,t.config.minDate,A!==void 0?A:!t.minDateHasTime)<0||t.config.maxDate&&te&&yt(te,t.config.maxDate,A!==void 0?A:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(te===void 0)return!1;for(var ce=!!t.config.enable,fe=(W=t.config.enable)!==null&&W!==void 0?W:t.config.disable,Te=0,ye=void 0;Te<fe.length;Te++){if(ye=fe[Te],typeof ye=="function"&&ye(te))return ce;if(ye instanceof Date&&te!==void 0&&ye.getTime()===te.getTime())return ce;if(typeof ye=="string"){var De=t.parseDate(ye,void 0,!0);return De&&De.getTime()===te.getTime()?ce:!ce}else if(typeof ye=="object"&&te!==void 0&&ye.from&&ye.to&&te.getTime()>=ye.from.getTime()&&te.getTime()<=ye.to.getTime())return ce}return!ce}function B(L){return t.daysContainer!==void 0?L.className.indexOf("hidden")===-1&&L.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(L):!1}function Q(L){var A=L.target===t._input,W=t._input.value.trimEnd()!==Me();A&&W&&!(L.relatedTarget&&Z(L.relatedTarget))&&t.setDate(t._input.value,!0,L.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function X(L){var A=vt(L),W=t.config.wrap?n.contains(A):A===t._input,te=t.config.allowInput,ce=t.isOpen&&(!te||!W),fe=t.config.inline&&W&&!te;if(L.keyCode===13&&W){if(te)return t.setDate(t._input.value,!0,A===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),A.blur();t.open()}else if(Z(A)||ce||fe){var Te=!!t.timeContainer&&t.timeContainer.contains(A);switch(L.keyCode){case 13:Te?(L.preventDefault(),u(),ie()):le(L);break;case 27:L.preventDefault(),ie();break;case 8:case 46:W&&!t.config.allowInput&&(L.preventDefault(),t.clear());break;case 37:case 39:if(!Te&&!W){L.preventDefault();var ye=s();if(t.daysContainer!==void 0&&(te===!1||ye&&B(ye))){var De=L.keyCode===39?1:-1;L.ctrlKey?(L.stopPropagation(),P(De),b(C(1),0)):b(void 0,De)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:L.preventDefault();var be=L.keyCode===40?1:-1;t.daysContainer&&A.$i!==void 0||A===t.input||A===t.altInput?L.ctrlKey?(L.stopPropagation(),ne(t.currentYear-be),b(C(1),0)):Te||b(void 0,be*7):A===t.currentYearElement?ne(t.currentYear-be):t.config.enableTime&&(!Te&&t.hourElement&&t.hourElement.focus(),u(L),t._debouncedChange());break;case 9:if(Te){var xe=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(lt){return lt}),Ye=xe.indexOf(A);if(Ye!==-1){var mt=xe[Ye+(L.shiftKey?-1:1)];L.preventDefault(),(mt||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(A)&&L.shiftKey&&(L.preventDefault(),t._input.focus());break}}if(t.amPM!==void 0&&A===t.amPM)switch(L.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],p(),ke();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],p(),ke();break}(W||Z(A))&&Ue("onKeyDown",L)}function q(L,A){if(A===void 0&&(A="flatpickr-day"),!(t.selectedDates.length!==1||L&&(!L.classList.contains(A)||L.classList.contains("flatpickr-disabled")))){for(var W=L?L.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),te=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),ce=Math.min(W,t.selectedDates[0].getTime()),fe=Math.max(W,t.selectedDates[0].getTime()),Te=!1,ye=0,De=0,be=ce;be<fe;be+=Tv.DAY)G(new Date(be),!0)||(Te=Te||be>ce&&be<fe,be<te&&(!ye||be>ye)?ye=be:be>te&&(!De||be<De)&&(De=be));var xe=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+A));xe.forEach(function(Ye){var mt=Ye.dateObj,lt=mt.getTime(),si=ye>0&<<ye||De>0&<>De;if(si){Ye.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(zt){Ye.classList.remove(zt)});return}else if(Te&&!si)return;["startRange","inRange","endRange","notAllowed"].forEach(function(zt){Ye.classList.remove(zt)}),L!==void 0&&(L.classList.add(W<=t.selectedDates[0].getTime()?"startRange":"endRange"),te<W&<===te?Ye.classList.add("startRange"):te>W&<===te&&Ye.classList.add("endRange"),lt>=ye&&(De===0||lt<=De)&&Mv(lt,te,W)&&Ye.classList.add("inRange"))})}}function oe(){t.isOpen&&!t.config.static&&!t.config.inline&&Fe()}function se(L,A){if(A===void 0&&(A=t._positionElement),t.isMobile===!0){if(L){L.preventDefault();var W=vt(L);W&&W.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ue("onOpen");return}else if(t._input.disabled||t.config.inline)return;var te=t.isOpen;t.isOpen=!0,te||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ue("onOpen"),Fe(A)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(L===void 0||!t.timeContainer.contains(L.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function pe(L){return function(A){var W=t.config["_"+L+"Date"]=t.parseDate(A,t.config.dateFormat),te=t.config["_"+(L==="min"?"max":"min")+"Date"];W!==void 0&&(t[L==="min"?"minDateHasTime":"maxDateHasTime"]=W.getHours()>0||W.getMinutes()>0||W.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(ce){return G(ce)}),!t.selectedDates.length&&L==="min"&&h(W),ke()),t.daysContainer&&(K(),W!==void 0?t.currentYearElement[L]=W.getFullYear().toString():t.currentYearElement.removeAttribute(L),t.currentYearElement.disabled=!!te&&W!==void 0&&te.getFullYear()===W.getFullYear())}}function me(){var L=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],A=at(at({},JSON.parse(JSON.stringify(n.dataset||{}))),e),W={};t.config.parseDate=A.parseDate,t.config.formatDate=A.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(xe){t.config._enable=_e(xe)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(xe){t.config._disable=_e(xe)}});var te=A.mode==="time";if(!A.dateFormat&&(A.enableTime||te)){var ce=it.defaultConfig.dateFormat||Pi.dateFormat;W.dateFormat=A.noCalendar||te?"H:i"+(A.enableSeconds?":S":""):ce+" H:i"+(A.enableSeconds?":S":"")}if(A.altInput&&(A.enableTime||te)&&!A.altFormat){var fe=it.defaultConfig.altFormat||Pi.altFormat;W.altFormat=A.noCalendar||te?"h:i"+(A.enableSeconds?":S K":" K"):fe+(" h:i"+(A.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:pe("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:pe("max")});var Te=function(xe){return function(Ye){t.config[xe==="min"?"_minTime":"_maxTime"]=t.parseDate(Ye,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:Te("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:Te("max")}),A.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,W,A);for(var ye=0;ye<L.length;ye++)t.config[L[ye]]=t.config[L[ye]]===!0||t.config[L[ye]]==="true";na.filter(function(xe){return t.config[xe]!==void 0}).forEach(function(xe){t.config[xe]=ra(t.config[xe]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var ye=0;ye<t.config.plugins.length;ye++){var De=t.config.plugins[ye](t)||{};for(var be in De)na.indexOf(be)>-1?t.config[be]=ra(De[be]).map(a).concat(t.config[be]):typeof A[be]>"u"&&(t.config[be]=De[be])}A.altInputClass||(t.config.altInputClass=we().className+" "+t.config.altInputClass),Ue("onParseConfig")}function we(){return t.config.wrap?n.querySelector("[data-input]"):n}function Ae(){typeof t.config.locale!="object"&&typeof it.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=at(at({},it.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?it.l10ns[t.config.locale]:void 0),mi.D="("+t.l10n.weekdays.shorthand.join("|")+")",mi.l="("+t.l10n.weekdays.longhand.join("|")+")",mi.M="("+t.l10n.months.shorthand.join("|")+")",mi.F="("+t.l10n.months.longhand.join("|")+")",mi.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var L=at(at({},e),JSON.parse(JSON.stringify(n.dataset||{})));L.time_24hr===void 0&&it.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=dc(t),t.parseDate=aa({config:t.config,l10n:t.l10n})}function Fe(L){if(typeof t.config.position=="function")return void t.config.position(t,L);if(t.calendarContainer!==void 0){Ue("onPreCalendarPosition");var A=L||t._positionElement,W=Array.prototype.reduce.call(t.calendarContainer.children,(function(lr,r1){return lr+r1.offsetHeight}),0),te=t.calendarContainer.offsetWidth,ce=t.config.position.split(" "),fe=ce[0],Te=ce.length>1?ce[1]:null,ye=A.getBoundingClientRect(),De=window.innerHeight-ye.bottom,be=fe==="above"||fe!=="below"&&De<W&&ye.top>W,xe=window.pageYOffset+ye.top+(be?-W-2:A.offsetHeight+2);if(ut(t.calendarContainer,"arrowTop",!be),ut(t.calendarContainer,"arrowBottom",be),!t.config.inline){var Ye=window.pageXOffset+ye.left,mt=!1,lt=!1;Te==="center"?(Ye-=(te-ye.width)/2,mt=!0):Te==="right"&&(Ye-=te-ye.width,lt=!0),ut(t.calendarContainer,"arrowLeft",!mt&&!lt),ut(t.calendarContainer,"arrowCenter",mt),ut(t.calendarContainer,"arrowRight",lt);var si=window.document.body.offsetWidth-(window.pageXOffset+ye.right),zt=Ye+te>window.document.body.offsetWidth,ar=si+te>window.document.body.offsetWidth;if(ut(t.calendarContainer,"rightMost",zt),!t.config.static)if(t.calendarContainer.style.top=xe+"px",!zt)t.calendarContainer.style.left=Ye+"px",t.calendarContainer.style.right="auto";else if(!ar)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=si+"px";else{var bi=Ne();if(bi===void 0)return;var or=window.document.body.offsetWidth,ya=Math.max(0,or/2-te/2),mn=".flatpickr-calendar.centerMost:before",ai=".flatpickr-calendar.centerMost:after",Hi=bi.cssRules.length,wa="{left:"+ye.left+"px;right:auto;}";ut(t.calendarContainer,"rightMost",!1),ut(t.calendarContainer,"centerMost",!0),bi.insertRule(mn+","+ai+wa,Hi),t.calendarContainer.style.left=ya+"px",t.calendarContainer.style.right="auto"}}}}function Ne(){for(var L=null,A=0;A<document.styleSheets.length;A++){var W=document.styleSheets[A];if(W.cssRules){try{W.cssRules}catch{continue}L=W;break}}return L??re()}function re(){var L=document.createElement("style");return document.head.appendChild(L),L.sheet}function K(){t.config.noCalendar||t.isMobile||(O(),Ie(),M())}function ie(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function le(L){L.preventDefault(),L.stopPropagation();var A=function(xe){return xe.classList&&xe.classList.contains("flatpickr-day")&&!xe.classList.contains("flatpickr-disabled")&&!xe.classList.contains("notAllowed")},W=cc(vt(L),A);if(W!==void 0){var te=W,ce=t.latestSelectedDateObj=new Date(te.dateObj.getTime()),fe=(ce.getMonth()<t.currentMonth||ce.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=te,t.config.mode==="single")t.selectedDates=[ce];else if(t.config.mode==="multiple"){var Te=ee(ce);Te?t.selectedDates.splice(parseInt(Te),1):t.selectedDates.push(ce)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=ce,t.selectedDates.push(ce),yt(ce,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(xe,Ye){return xe.getTime()-Ye.getTime()}));if(p(),fe){var ye=t.currentYear!==ce.getFullYear();t.currentYear=ce.getFullYear(),t.currentMonth=ce.getMonth(),ye&&(Ue("onYearChange"),O()),Ue("onMonthChange")}if(Ie(),M(),ke(),!fe&&t.config.mode!=="range"&&t.config.showMonths===1?S(te):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var De=t.config.mode==="single"&&!t.config.enableTime,be=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(De||be)&&ie()}w()}}var ae={locale:[Ae,Y],showMonths:[z,o,V],minDate:[v],maxDate:[v],positionElement:[ze],clickOpens:[function(){t.config.clickOpens===!0?(k(t._input,"focus",t.open),k(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function ve(L,A){if(L!==null&&typeof L=="object"){Object.assign(t.config,L);for(var W in L)ae[W]!==void 0&&ae[W].forEach(function(te){return te()})}else t.config[L]=A,ae[L]!==void 0?ae[L].forEach(function(te){return te()}):na.indexOf(L)>-1&&(t.config[L]=ra(A));t.redraw(),ke(!0)}function Re(L,A){var W=[];if(L instanceof Array)W=L.map(function(te){return t.parseDate(te,A)});else if(L instanceof Date||typeof L=="number")W=[t.parseDate(L,A)];else if(typeof L=="string")switch(t.config.mode){case"single":case"time":W=[t.parseDate(L,A)];break;case"multiple":W=L.split(t.config.conjunction).map(function(te){return t.parseDate(te,A)});break;case"range":W=L.split(t.l10n.rangeSeparator).map(function(te){return t.parseDate(te,A)});break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(L)));t.selectedDates=t.config.allowInvalidPreload?W:W.filter(function(te){return te instanceof Date&&G(te,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(te,ce){return te.getTime()-ce.getTime()})}function Se(L,A,W){if(A===void 0&&(A=!1),W===void 0&&(W=t.config.dateFormat),L!==0&&!L||L instanceof Array&&L.length===0)return t.clear(A);Re(L,W),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),v(void 0,A),h(),t.selectedDates.length===0&&t.clear(!1),ke(A),A&&Ue("onChange")}function _e(L){return L.slice().map(function(A){return typeof A=="string"||typeof A=="number"||A instanceof Date?t.parseDate(A,void 0,!0):A&&typeof A=="object"&&A.from&&A.to?{from:t.parseDate(A.from,void 0),to:t.parseDate(A.to,void 0)}:A}).filter(function(A){return A})}function ue(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var L=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);L&&Re(L,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function Le(){if(t.input=we(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Ge(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),ze()}function ze(){t._positionElement=t.config.positionElement||t._input}function pn(){var L=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Ge("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=L,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=L==="datetime-local"?"Y-m-d\\TH:i:S":L==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}k(t.mobileInput,"change",function(A){t.setDate(vt(A).value,!1,t.mobileFormatStr),Ue("onChange"),Ue("onClose")})}function Zt(L){if(t.isOpen===!0)return t.close();t.open(L)}function Ue(L,A){if(t.config!==void 0){var W=t.config[L];if(W!==void 0&&W.length>0)for(var te=0;W[te]&&te<W.length;te++)W[te](t.selectedDates,t.input.value,t,A);L==="onChange"&&(t.input.dispatchEvent(J("change")),t.input.dispatchEvent(J("input")))}}function J(L){var A=document.createEvent("Event");return A.initEvent(L,!0,!0),A}function ee(L){for(var A=0;A<t.selectedDates.length;A++){var W=t.selectedDates[A];if(W instanceof Date&&yt(W,L)===0)return""+A}return!1}function Be(L){return t.config.mode!=="range"||t.selectedDates.length<2?!1:yt(L,t.selectedDates[0])>=0&&yt(L,t.selectedDates[1])<=0}function Ie(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(L,A){var W=new Date(t.currentYear,t.currentMonth,1);W.setMonth(t.currentMonth+A),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[A].textContent=Kn(W.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=W.getMonth().toString(),L.value=W.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function Me(L){var A=L||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(W){return t.formatDate(W,A)}).filter(function(W,te,ce){return t.config.mode!=="range"||t.config.enableTime||ce.indexOf(W)===te}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function ke(L){L===void 0&&(L=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=Me(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=Me(t.config.altFormat)),L!==!1&&Ue("onValueUpdate")}function pt(L){var A=vt(L),W=t.prevMonthNav.contains(A),te=t.nextMonthNav.contains(A);W||te?P(W?-1:1):t.yearElements.indexOf(A)>=0?A.select():A.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):A.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function et(L){L.preventDefault();var A=L.type==="keydown",W=vt(L),te=W;t.amPM!==void 0&&W===t.amPM&&(t.amPM.textContent=t.l10n.amPM[_t(t.amPM.textContent===t.l10n.amPM[0])]);var ce=parseFloat(te.getAttribute("min")),fe=parseFloat(te.getAttribute("max")),Te=parseFloat(te.getAttribute("step")),ye=parseInt(te.value,10),De=L.delta||(A?L.which===38?1:-1:0),be=ye+Te*De;if(typeof te.value<"u"&&te.value.length===2){var xe=te===t.hourElement,Ye=te===t.minuteElement;be<ce?(be=fe+be+_t(!xe)+(_t(xe)&&_t(!t.amPM)),Ye&&m(void 0,-1,t.hourElement)):be>fe&&(be=te===t.hourElement?be-fe-_t(!t.amPM):ce,Ye&&m(void 0,1,t.hourElement)),t.amPM&&xe&&(Te===1?be+ye===23:Math.abs(be-ye)>Te)&&(t.amPM.textContent=t.l10n.amPM[_t(t.amPM.textContent===t.l10n.amPM[0])]),te.value=ft(be)}}return r(),t}function Ai(n,e){for(var t=Array.prototype.slice.call(n).filter(function(a){return a instanceof HTMLElement}),i=[],r=0;r<t.length;r++){var s=t[r];try{if(s.getAttribute("data-fp-omit")!==null)continue;s._flatpickr!==void 0&&(s._flatpickr.destroy(),s._flatpickr=void 0),s._flatpickr=Ov(s,e||{}),i.push(s._flatpickr)}catch(a){console.error(a)}}return i.length===1?i[0]:i}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return Ai(this,n)},HTMLElement.prototype.flatpickr=function(n){return Ai([this],n)});var it=function(n,e){return typeof n=="string"?Ai(window.document.querySelectorAll(n),e):n instanceof Node?Ai([n],e):Ai(n,e)};it.defaultConfig={},it.l10ns={en:at({},an),default:at({},an)},it.localize=function(n){it.l10ns.default=at(at({},it.l10ns.default),n)},it.setDefaults=function(n){it.defaultConfig=at(at({},it.defaultConfig),n)},it.parseDate=aa({}),it.formatDate=dc({}),it.compareDates=yt,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return Ai(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=it);var ln={exports:{}},Lv=ln.exports,fc;function Pv(){return fc||(fc=1,(function(n,e){(function(t,i){i(e)})(Lv,(function(t){var i=typeof window<"u"&&window.flatpickr!==void 0?window.flatpickr:{l10ns:{}},r={weekdays:{shorthand:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],longhand:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},months:{shorthand:["Янв","Фев","Март","Апр","Май","Июнь","Июль","Авг","Сен","Окт","Ноя","Дек"],longhand:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"]},firstDayOfWeek:1,ordinal:function(){return""},rangeSeparator:" — ",weekAbbreviation:"Нед.",scrollTitle:"Прокрутите для увеличения",toggleTitle:"Нажмите для переключения",amPM:["ДП","ПП"],yearAriaLabel:"Год",time_24hr:!0};i.l10ns.ru=r;var s=i.l10ns;t.Russian=r,t.default=s,Object.defineProperty(t,"__esModule",{value:!0})}))})(ln,ln.exports)),ln.exports}var Av=Pv();const Fv=["value","id","name","disabled","required","placeholder"],Bv=["title"],Nv=["title"],Vv=Ve(l.defineComponent({__name:"Flatpickr",props:{modelValue:{default:""},id:{default:"flatpickr-input"},error:{default:""},name:{default:"flatpickr"},placeholder:{default:"Выберите дату"},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},config:{default:()=>({})},format:{default:"DD.MM.YYYY"},locale:{default:"ru"},resetTitle:{default:"Очистить"},calendarTitle:{default:"Выбрать дату"},allowInput:{type:Boolean,default:!0},enableTime:{type:Boolean,default:!1},time_24hr:{type:Boolean,default:!0},dateFormat:{default:"d.m.Y"},minDate:{default:void 0},maxDate:{default:void 0},defaultDate:{default:void 0},mode:{default:"single"}},emits:["update:modelValue","change","open","close","ready"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(),s=l.ref(null),a=l.ref(!1),o=l.ref(""),u=l.computed(()=>Array.isArray(t.error)?t.error?.filter(Boolean)||[]:typeof t.error=="string"&&t.error?[t.error]:[]),c=w=>{if(!w)return"";const y=new Date(w);if(isNaN(y.getTime()))return"";const v=String(y.getDate()).padStart(2,"0"),R=String(y.getMonth()+1).padStart(2,"0"),m=y.getFullYear();return t.format==="DD.MM.YYYY"?`${v}.${R}.${m}`:t.format==="MM/DD/YYYY"?`${R}/${v}/${m}`:t.format==="YYYY-MM-DD"?`${m}-${R}-${v}`:`${v}.${R}.${m}`},d=w=>{if(!w)return"";if(/^\d{4}-\d{2}-\d{2}/.test(w))return w;if(t.format==="DD.MM.YYYY"){const y=w.split(".");if(y.length===3){const[v,R,m]=y;return`${m}-${R.padStart(2,"0")}-${v.padStart(2,"0")}`}}if(t.format==="MM/DD/YYYY"){const y=w.split("/");if(y.length===3){const[v,R,m]=y;return`${m}-${v.padStart(2,"0")}-${R.padStart(2,"0")}`}}return t.format==="YYYY-MM-DD",w},p=()=>{if(!r.value)return;const w={locale:t.locale==="ru"?Av.Russian:void 0,allowInput:t.allowInput,enableTime:t.enableTime,time_24hr:t.time_24hr,dateFormat:t.dateFormat,mode:t.mode,wrap:!0,onClose:(y,v,R)=>{const m=y.length>0;if(!(t.modelValue!==v))return!1;if(!m)return h({instance:R}),!1;l.nextTick(()=>{if(t.mode==="multiple"){const g=y.map(S=>c(S));i("update:modelValue",g)}else if(t.mode==="range"){const g=y.map(S=>c(S));i("update:modelValue",g)}else i("update:modelValue",v);i("change",y.map(g=>g.toISOString()),v,R)})},onOpen:y=>{i("open",y)},onReady:y=>{i("ready",y)},...t.config};t.minDate&&t.minDate&&(w.minDate=t.minDate),t.maxDate&&(w.maxDate=t.maxDate),t.defaultDate&&(w.defaultDate=t.defaultDate),s.value=it(r.value,w),h({instance:s.value})},h=({instance:w})=>{w?._input&&(t.modelValue?l.nextTick(()=>{Array.isArray(t.modelValue)?w._input.value=t.modelValue.map(y=>c(y)).join(", "):w._input.value=c(t.modelValue),a.value=!0}):l.nextTick(()=>{w._input.value="",a.value=!1}))},f=()=>{t.disabled||!s.value||(s.value.clear(),s.value._input.value="",i("update:modelValue",""),a.value=!1)},_=w=>{const y=w.target;o.value=y.value},k=()=>{if(o.value){const w=d(o.value);w&&i("update:modelValue",w)}};return l.watch(()=>t.modelValue,w=>{if(!w){a.value=!1,s.value?._input&&(s.value._input.value=""),o.value="";return}Array.isArray(w)?o.value=w.map(y=>c(y)).join(", "):o.value=c(w),a.value=!0},{deep:!0}),l.watch(()=>t.disabled,w=>{s.value?._input&&(s.value._input.disabled=w)}),l.onMounted(()=>{p()}),l.onBeforeUnmount(()=>{s.value&&s.value.destroy()}),(w,y)=>(l.openBlock(),l.createElementBlock("div",{style:{position:"relative"},ref_key:"input",ref:r},[l.createElementVNode("div",{class:l.normalizeClass({"not-valid":u.value.length})},[l.createElementVNode("input",{type:"text",class:"form-control flatpickr",value:o.value,id:w.id,name:w.name,disabled:w.disabled,required:w.required,placeholder:w.placeholder,"data-input":"",onInput:_,onBlur:k},null,40,Fv)],2),a.value&&!w.disabled?(l.openBlock(),l.createElementBlock("a",{key:0,class:"remove-button text-dark",onClick:f,style:{position:"absolute",right:"40px",top:"8px","font-size":"16px",cursor:"pointer"},"data-toggle":"",title:w.resetTitle},[...y[0]||(y[0]=[l.createElementVNode("i",{class:"bi bi-x-lg"},null,-1)])],8,Bv)):l.createCommentVNode("",!0),l.createElementVNode("a",{class:"remove-button text-dark",style:{position:"absolute",right:"10px",top:"4px","font-size":"20px",cursor:"pointer"},"data-toggle":"",title:w.calendarTitle},[...y[1]||(y[1]=[l.createElementVNode("i",{class:"bi bi-calendar3"},null,-1)])],8,Nv),l.createVNode(hi,{errors:u.value},null,8,["errors"])],512))}}),[["__scopeId","data-v-fb3fef0b"]]);function Hv(n={}){const{placeholder:e="Поиск...",searchHint:t="Введите минимум 3 символа",searchTypes:i=[{value:"partial",label:"По частичному совпадению"},{value:"exact",label:"По полному совпадению"}],defaultSearchType:r="partial",minSearchLength:s=3}=n,a=l.ref(""),o=l.ref([]),u=l.ref(!1),c=l.ref(r),d=l.ref(!1),p=l.ref(!1),h=l.computed(()=>a.value&&a.value.length>0&&a.value.length<s?`Введите минимум ${s} символа`:t),f=l.computed(()=>i);return{search:a,options:o,isSearchLoading:u,searchType:c,showSettings:d,isLoading:p,enterCharacterMessage:h,filteredSearchTypes:f,onSearch:g=>{a.value=g||"",g&&g.length>=s},onSelect:g=>{},clearSearch:()=>{a.value="",o.value=[]},toggleSettings:()=>{d.value=!d.value},hideSettings:()=>{d.value=!1},setOptions:g=>{o.value=g},setLoading:g=>{u.value=g},setGlobalLoading:g=>{p.value=g}}}const zv=["disabled"],Iv={key:1,class:"bi bi-three-dots-vertical"},$v=Ve(l.defineComponent({__name:"HeaderSearchForm",props:{placeholder:{default:"Поиск..."},searchHint:{default:"Введите минимум 3 символа"},searchTypes:{default:()=>[{value:"partial",label:"По частичному совпадению"},{value:"exact",label:"По полному совпадению"}]},defaultSearchType:{default:"partial"},minSearchLength:{default:3},searchTypeName:{default:"searchType"},options:{default:()=>[]},isLoading:{type:Boolean,default:!1},isSearchLoading:{type:Boolean,default:!1}},emits:["search","select","searchTypeChange"],setup(n,{expose:e,emit:t}){const i=n,r=t,s={placeholder:i.placeholder,searchHint:i.searchHint,searchTypes:i.searchTypes,defaultSearchType:i.defaultSearchType,minSearchLength:i.minSearchLength},{search:a,options:o,isSearchLoading:u,searchType:c,showSettings:d,isLoading:p,enterCharacterMessage:h,filteredSearchTypes:f,onSearch:_,onSelect:k,clearSearch:w,toggleSettings:y,hideSettings:v}=Hv(s),R=l.ref();l.computed(()=>i.options.length>0?i.options:o.value),l.computed(()=>i.isSearchLoading||u.value),l.computed(()=>i.isLoading||p.value);const m=E=>{const b=E||"";_(b),r("search",b,c.value)},x=E=>{k(E),r("select",E)},g=l.computed(()=>i.searchTypeName);l.watch(c,E=>{r("searchTypeChange",E),v()});const S=E=>{const b=E.target;C.value?.contains(b)||v()},C=l.ref();return l.onMounted(()=>{document.addEventListener("click",S)}),l.onUnmounted(()=>{document.removeEventListener("click",S)}),e({clearSearch:w,setOptions:E=>{o.value=E},setLoading:E=>{u.value=E},setGlobalLoading:E=>{p.value=E},focus:()=>{R.value?.$el?.querySelector("input")?.focus()}}),(E,b)=>(l.openBlock(),l.createElementBlock("div",{ref_key:"wrapperRef",ref:C,class:"position-relative d-flex align-items-center rounded search-select-wrapper"},[(l.openBlock(),l.createBlock(Xt,{ref_key:"selectRef",ref:R,key:l.unref(c),classes:["border-0","outline-none"],style:{maxWidth:"500px",minWidth:"500px"},modelValue:l.unref(a),"onUpdate:modelValue":[b[0]||(b[0]=T=>l.isRef(a)?a.value=T:null),x],reduce:T=>T,options:E.options,placeholder:E.placeholder,onSearch:m,onBlur:l.unref(w),onFocus:l.unref(v),isLoading:E.isSearchLoading,hint:l.unref(h)},null,8,["modelValue","reduce","options","placeholder","onBlur","onFocus","isLoading","hint"])),l.createElementVNode("button",{class:"btn btn-light px-2",onClick:b[1]||(b[1]=(...T)=>l.unref(y)&&l.unref(y)(...T)),disabled:E.isLoading},[E.isLoading?(l.openBlock(),l.createBlock(ur,{key:0,isSmall:!0})):(l.openBlock(),l.createElementBlock("i",Iv))],8,zv),l.unref(d)?(l.openBlock(),l.createElementBlock("ul",{key:0,class:"position-absolute setting-list",onClick:b[3]||(b[3]=l.withModifiers(()=>{},["stop"]))},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(f),T=>(l.openBlock(),l.createElementBlock("li",{key:T.value,class:"setting-item"},[l.createVNode(lc,{name:g.value,label:T.label,modelValue:l.unref(c),"onUpdate:modelValue":b[2]||(b[2]=M=>l.isRef(c)?c.value=M:null),type:"radio",group:g.value,trueValue:T.value},null,8,["name","label","modelValue","group","trueValue"])]))),128))])):l.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-060eb2dc"]]);function jv(n={}){const{loadRegions:e,loadDistricts:t,loadLocalities:i,loadStreets:r,regionKey:s="region_id",districtKey:a="district_id",localityKey:o="locality_id",streetKey:u="street_id",houseKey:c="house",buildingKey:d="building",apartmentKey:p="apartment",regionLabel:h="Регион",districtLabel:f="Район",localityLabel:_="Населенный пункт",streetLabel:k="Улица",houseLabel:w="Дом",buildingLabel:y="Корпус",apartmentLabel:v="Квартира",columnWidth:R="12",prefix:m="",multiLocalities:x=!1,multiStreets:g=!1,showHouseFields:S=!0}=n,C=l.ref({}),E=l.ref(!1),b=l.ref(!1),T=l.ref(!1),M=l.ref(!1),O=l.ref(!1),F=l.ref([]),z=l.ref([]),$=l.ref([]),H=l.ref([]),V=l.computed(()=>`${m}${s}`),Y=l.computed(()=>`${m}${a}`),D=l.computed(()=>`${m}${o}`),P=l.computed(()=>`${m}${u}`),I=l.computed(()=>`${m}${c}`),N=l.computed(()=>`${m}${d}`),U=l.computed(()=>`${m}${p}`),Z=l.computed(()=>({region:h,district:f,locality:_,street:k,house:w,building:y,apartment:v})),j=async ue=>{if(e){b.value=!0;try{F.value=await e(ue)}finally{b.value=!1}}},ne=async ue=>{if(t){T.value=!0;try{z.value=await t(ue)}finally{T.value=!1}}},G=async ue=>{if(i){M.value=!0;try{$.value=await i(ue)}finally{M.value=!1}}},B=async ue=>{if(r){O.value=!0;try{H.value=await r(ue)}finally{O.value=!1}}},Q=ue=>{const Le={...C.value,[V.value]:ue,[Y.value]:null,[D.value]:null,[P.value]:null,[I.value]:null,[N.value]:null,[U.value]:null};C.value=Le,z.value=[],$.value=[],H.value=[]},X=ue=>{const Le={...C.value,[Y.value]:ue,[D.value]:null,[P.value]:null,[I.value]:null,[N.value]:null,[U.value]:null};C.value=Le},q=ue=>{const Le={...C.value,[D.value]:ue,[P.value]:null,[I.value]:null,[N.value]:null,[U.value]:null};C.value=Le,H.value=[]},oe=async ue=>{Q(ue),ue&&(await ne(ue),await G(ue),await B(ue))},se=async ue=>{if(X(ue),!ue){const Le=C.value[V.value];Le&&await oe(Le);return}await G(ue)},pe=async ue=>{q(ue),ue&&await B(ue)},me=ue=>{const Le={...C.value,[P.value]:ue,[I.value]:null,[N.value]:null,[U.value]:null};C.value=Le},we=ue=>{const Le=ue.target,ze={...C.value,[I.value]:Le.value};C.value=ze},Ae=ue=>{const Le=ue.target,ze={...C.value,[N.value]:Le.value};C.value=ze},Fe=ue=>{const Le=ue.target,ze={...C.value,[U.value]:Le.value};C.value=ze},Ne=l.computed(()=>{const ue=C.value[V.value];return ue&&F.value.find(Le=>String(Le.id)===String(ue))?.label||""}),re=l.computed(()=>{const ue=C.value[Y.value];return ue&&z.value.find(Le=>String(Le.id)===String(ue))?.label||""}),K=l.computed(()=>{const ue=C.value[D.value];return ue&&$.value.find(Le=>String(Le.id)===String(ue))?.label||""}),ie=l.computed(()=>{const ue=C.value[P.value];return ue&&H.value.find(Le=>String(Le.id)===String(ue))?.label||""}),le=l.computed(()=>{const ue=C.value[I.value];return ue?`${w} ${ue}`:""}),ae=l.computed(()=>{const ue=C.value[N.value];return ue?`${y} ${ue}`:""}),ve=l.computed(()=>{const ue=C.value[U.value];return ue?`${v} ${ue}`:""}),Re=l.computed(()=>[Ne.value,re.value,K.value,ie.value,le.value,ae.value,ve.value].filter(Boolean).join(", ")),Se=l.computed(()=>{const ue=C.value[D.value];return Array.isArray(ue)?ue.length>1:!1}),_e=l.computed(()=>g?!1:S);return{modelValue:C,isLoading:E,isRegionLoading:b,isDistrictLoading:T,isLocalityLoading:M,isStreetLoading:O,regionOptions:F,districtOptions:z,localityOptions:$,streetOptions:H,finalRegionKey:V,finalDistrictKey:Y,finalLocalityKey:D,finalStreetKey:P,finalHouseKey:I,finalBuildingKey:N,finalApartmentKey:U,labels:Z,selectedRegionLabel:Ne,selectedDistrictLabel:re,selectedLocalityLabel:K,selectedStreetLabel:ie,selectedHouseLabel:le,selectedBuildingLabel:ae,selectedApartmentLabel:ve,fullAddress:Re,isMultiLocalitiesSelected:Se,shouldShowHouseFields:_e,loadRegionOptions:j,loadDistrictOptions:ne,loadLocalityOptions:G,loadStreetOptions:B,onRegionSelect:oe,onDistrictSelect:se,onLocalitySelect:pe,onStreetSelect:me,onHouseInput:we,onBuildingInput:Ae,onApartmentInput:Fe,resetFieldsByRegion:Q,resetFieldsByDistrict:X,resetFieldsByLocality:q}}const Wv={class:"address-form"},Gv={class:"row"},Yv={class:"form-label"},Uv={class:"form-label"},qv={class:"form-label"},Kv={class:"form-label"},Jv={class:"form-label"},Xv=["value","disabled","placeholder"],Zv={class:"form-label"},Qv=["value","disabled","placeholder"],ey={class:"form-label"},ty=["value","disabled","placeholder"],iy={key:0,class:"mt-3"},ny={class:"alert alert-info"},ry=Ve(l.defineComponent({__name:"AddressForm",props:{modelValue:{default:()=>({})},loadRegions:{},loadDistricts:{},loadLocalities:{},loadStreets:{},regionKey:{default:"region_id"},districtKey:{default:"district_id"},localityKey:{default:"locality_id"},streetKey:{default:"street_id"},houseKey:{default:"house"},buildingKey:{default:"building"},apartmentKey:{default:"apartment"},regionLabel:{default:"Регион"},districtLabel:{default:"Район"},localityLabel:{default:"Населенный пункт"},streetLabel:{default:"Улица"},houseLabel:{default:"Дом"},buildingLabel:{default:"Корпус"},apartmentLabel:{default:"Квартира"},columnWidth:{default:"12"},prefix:{default:""},multiLocalities:{type:Boolean,default:!1},multiStreets:{type:Boolean,default:!1},showHouseFields:{type:Boolean,default:!0},showFullAddress:{type:Boolean,default:!1},disabledFields:{default:()=>({})},allowClear:{default:()=>({})},countryId:{default:void 0}},emits:["update:modelValue","change","regionChange","districtChange","localityChange","streetChange"],setup(n,{expose:e,emit:t}){const i=n,r=t,s={loadRegions:i.loadRegions,loadDistricts:i.loadDistricts,loadLocalities:i.loadLocalities,loadStreets:i.loadStreets,regionKey:i.regionKey,districtKey:i.districtKey,localityKey:i.localityKey,streetKey:i.streetKey,houseKey:i.houseKey,buildingKey:i.buildingKey,apartmentKey:i.apartmentKey,regionLabel:i.regionLabel,districtLabel:i.districtLabel,localityLabel:i.localityLabel,streetLabel:i.streetLabel,houseLabel:i.houseLabel,buildingLabel:i.buildingLabel,apartmentLabel:i.apartmentLabel,columnWidth:i.columnWidth,prefix:i.prefix,multiLocalities:i.multiLocalities,multiStreets:i.multiStreets,showHouseFields:i.showHouseFields},{modelValue:a,isRegionLoading:o,isDistrictLoading:u,isLocalityLoading:c,isStreetLoading:d,regionOptions:p,districtOptions:h,localityOptions:f,streetOptions:_,finalRegionKey:k,finalDistrictKey:w,finalLocalityKey:y,finalStreetKey:v,finalHouseKey:R,finalBuildingKey:m,finalApartmentKey:x,labels:g,fullAddress:S,isMultiLocalitiesSelected:C,shouldShowHouseFields:E,loadRegionOptions:b,onRegionSelect:T,onDistrictSelect:M,onLocalitySelect:O,onStreetSelect:F,onHouseInput:z,onBuildingInput:$,onApartmentInput:H}=jv(s);l.watch(()=>i.modelValue,j=>{a.value={...j}},{immediate:!0,deep:!0}),l.watch(a,j=>{r("update:modelValue",{...j}),r("change",{...j})},{deep:!0});const V=async j=>{await T(j),r("regionChange",j)},Y=async j=>{await M(j),r("districtChange",j)},D=async j=>{await O(j),r("localityChange",j)},P=j=>{F(j),r("streetChange",j)},I=j=>{z(j)},N=j=>{$(j)},U=j=>{H(j)},Z=l.computed(()=>{if(!i.multiLocalities)return!1;const j=a.value[v.value];return!Array.isArray(j)||j?.length<2});return l.onMounted(async()=>{i.countryId&&i.loadRegions&&await b(i.countryId)}),e({loadRegionOptions:b,resetForm:()=>{a.value={},p.value=[],h.value=[],f.value=[],_.value=[]},getFullAddress:()=>S.value}),(j,ne)=>(l.openBlock(),l.createElementBlock("div",Wv,[l.createElementVNode("div",Gv,[l.createElementVNode("div",{class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",Yv,l.toDisplayString(l.unref(g).region),1),l.createVNode(Xt,{modelValue:j.modelValue[l.unref(k)],options:l.unref(p),disabled:j.disabledFields?.region||l.unref(o),"onUpdate:modelValue":V,allowClear:j.allowClear?.region,isLoading:l.unref(o),placeholder:`Выберите ${l.unref(g).region.toLowerCase()}`},null,8,["modelValue","options","disabled","allowClear","isLoading","placeholder"])],2),l.createElementVNode("div",{class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",Uv,l.toDisplayString(l.unref(g).district),1),l.createVNode(Xt,{modelValue:j.modelValue[l.unref(w)],disabled:j.disabledFields?.district||l.unref(u),options:l.unref(h),"onUpdate:modelValue":Y,allowClear:j.allowClear?.district,isLoading:l.unref(u),placeholder:`Выберите ${l.unref(g).district.toLowerCase()}`},null,8,["modelValue","disabled","options","allowClear","isLoading","placeholder"])],2),l.createElementVNode("div",{class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",qv,l.toDisplayString(l.unref(g).locality),1),l.createVNode(Xt,{modelValue:j.modelValue[l.unref(y)],disabled:j.disabledFields?.locality||l.unref(c),"onUpdate:modelValue":D,options:l.unref(f),name:l.unref(y),showAddButton:Z.value,isLoading:l.unref(c),placeholder:`Выберите ${l.unref(g).locality.toLowerCase()}`,multiple:j.multiLocalities},null,8,["modelValue","disabled","options","name","showAddButton","isLoading","placeholder","multiple"])],2),l.unref(C)?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",{class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",Kv,l.toDisplayString(l.unref(g).street),1),l.createVNode(Xt,{modelValue:j.modelValue[l.unref(v)],disabled:j.disabledFields?.street||l.unref(d),options:l.unref(_),"onUpdate:modelValue":P,allowClear:j.allowClear?.street,isLoading:l.unref(d),placeholder:`Выберите ${l.unref(g).street.toLowerCase()}`,multiple:j.multiStreets},null,8,["modelValue","disabled","options","allowClear","isLoading","placeholder","multiple"])],2),l.unref(E)?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",Jv,l.toDisplayString(l.unref(g).house),1),l.createElementVNode("input",{type:"text",class:"form-control",value:j.modelValue[l.unref(R)]||"",disabled:j.disabledFields?.house,onInput:I,placeholder:`Введите ${l.unref(g).house.toLowerCase()}`},null,40,Xv)],2)):l.createCommentVNode("",!0),l.unref(E)?(l.openBlock(),l.createElementBlock("div",{key:1,class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",Zv,l.toDisplayString(l.unref(g).building),1),l.createElementVNode("input",{type:"text",class:"form-control",value:j.modelValue[l.unref(m)]||"",disabled:j.disabledFields?.building,onInput:N,placeholder:`Введите ${l.unref(g).building.toLowerCase()}`},null,40,Qv)],2)):l.createCommentVNode("",!0),l.unref(E)?(l.openBlock(),l.createElementBlock("div",{key:2,class:l.normalizeClass(`col-${j.columnWidth} mb-2`)},[l.createElementVNode("label",ey,l.toDisplayString(l.unref(g).apartment),1),l.createElementVNode("input",{type:"text",class:"form-control",value:j.modelValue[l.unref(x)]||"",disabled:j.disabledFields?.apartment,onInput:U,placeholder:`Введите ${l.unref(g).apartment.toLowerCase()}`},null,40,ty)],2)):l.createCommentVNode("",!0)],64))]),j.showFullAddress&&l.unref(S)?(l.openBlock(),l.createElementBlock("div",iy,[l.createElementVNode("div",ny,[ne[0]||(ne[0]=l.createElementVNode("strong",null,"Полный адрес:",-1)),l.createTextVNode(" "+l.toDisplayString(l.unref(S)),1)])])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-3676b3d4"]]),sy={class:"age-from-to-form"},ay={class:"form-group"},oy={key:0,class:"form-label mb-2"},ly={class:"row align-items-center mb-2"},uy={class:"col-auto"},cy={class:"form-label mb-0"},dy={class:"col"},hy={class:"col"},fy={class:"row align-items-center mb-2"},py={class:"col-auto"},my={class:"form-label mb-0"},gy={class:"col"},by={class:"col"},vy=Ve(l.defineComponent({__name:"AgeFromAgeTo",props:{modelValue:{default:null},title:{default:""},nameFrom:{default:"age_from"},nameTo:{default:"age_to"},placeholderFrom:{default:"От"},placeholderTo:{default:"До"},timeTypeOptions:{default:()=>[{id:1,label:"Дней",value:"days"},{id:2,label:"Недель",value:"weeks"},{id:3,label:"Месяцев",value:"months"},{id:4,label:"Лет",value:"years"}]},disabled:{type:Boolean,default:!1},onFilterUpdate:{type:Function,default:void 0}},emits:["update:modelValue","change"],setup(n,{expose:e,emit:t}){const i=n,r=t,s={age_from:null,age_to:null,time_type_from:null,time_type_to:null},a=l.ref({...s}),o=l.computed(()=>{const f=a.value.age_from;if(!f)return null;const _=a.value.time_type_from,k=i.timeTypeOptions.find(({id:w})=>Number(w)===Number(_))?.label;return k?`${f} ${k}`:null}),u=l.computed(()=>{const f=a.value.age_to;if(!f)return null;const _=a.value.time_type_to,k=i.timeTypeOptions.find(({id:w})=>Number(w)===Number(_))?.label;return k?`${f} ${k}`:null}),c=()=>{a.value={...s}},d=()=>{i.onFilterUpdate&&(i.onFilterUpdate(i.nameFrom,o.value),i.onFilterUpdate(i.nameTo,u.value))},p=f=>{if(!f.age_from&&!f.age_to&&!f.time_type_from&&!f.time_type_to){r("update:modelValue",null),r("change",{...s}),d();return}const k=[];f.age_from&&f.time_type_from&&k.push(`age_from[time_type]=${f.time_type_from}&age_from[value]=${f.age_from}`),f.age_to&&f.time_type_to&&k.push(`age_to[time_type]=${f.time_type_to}&age_to[value]=${f.age_to}`);const w=k.length>0?k.join("&")+"&":"";r("update:modelValue",w||null),r("change",{...f}),d()},h=f=>{if(f)try{const _=new URLSearchParams(f),k=_.get("age_from[value]"),w=_.get("age_from[time_type]"),y=_.get("age_to[value]"),v=_.get("age_to[time_type]");a.value={age_from:k?Number(k):null,age_to:y?Number(y):null,time_type_from:w?Number(w):null,time_type_to:v?Number(v):null}}catch(_){console.warn("Error parsing query string:",_)}};return l.watch(()=>i.modelValue,(f,_)=>{f!==_&&(f===null?c():h(f))},{immediate:!0}),l.watch(()=>a.value,f=>{p(f)},{deep:!0}),l.onMounted(()=>{i.modelValue&&h(i.modelValue)}),e({reset:c,getFormData:()=>({age_from:a.value.age_from?Number(a.value.age_from):null,age_to:a.value.age_to?Number(a.value.age_to):null,time_type_from:a.value.time_type_from?Number(a.value.time_type_from):null,time_type_to:a.value.time_type_to?Number(a.value.time_type_to):null}),getFilterStrings:()=>({from:o.value,to:u.value})}),(f,_)=>(l.openBlock(),l.createElementBlock("div",sy,[l.createElementVNode("div",ay,[f.title?(l.openBlock(),l.createElementBlock("label",oy,l.toDisplayString(f.title),1)):l.createCommentVNode("",!0),l.createElementVNode("div",ly,[l.createElementVNode("div",uy,[l.createElementVNode("label",cy,l.toDisplayString(f.placeholderFrom),1)]),l.createElementVNode("div",dy,[l.createVNode($n,{modelValue:a.value.age_from,"onUpdate:modelValue":_[0]||(_[0]=k=>a.value.age_from=k),name:f.nameFrom,maskOptions:{regex:"^[0-9]*$"},placeholder:`Введите ${f.placeholderFrom.toLowerCase()}`,disabled:f.disabled},null,8,["modelValue","name","placeholder","disabled"])]),l.createElementVNode("div",hy,[l.createVNode(Xt,{modelValue:a.value.time_type_from,"onUpdate:modelValue":_[1]||(_[1]=k=>a.value.time_type_from=k),name:`${f.nameFrom}_type`,multiple:!1,options:f.timeTypeOptions,allowClear:!1,disabled:f.disabled,placeholder:"Выберите тип"},null,8,["modelValue","name","options","disabled"])])]),l.createElementVNode("div",fy,[l.createElementVNode("div",py,[l.createElementVNode("label",my,l.toDisplayString(f.placeholderTo),1)]),l.createElementVNode("div",gy,[l.createVNode($n,{modelValue:a.value.age_to,"onUpdate:modelValue":_[2]||(_[2]=k=>a.value.age_to=k),name:f.nameTo,maskOptions:{regex:"^[0-9]*$"},placeholder:`Введите ${f.placeholderTo.toLowerCase()}`,disabled:f.disabled},null,8,["modelValue","name","placeholder","disabled"])]),l.createElementVNode("div",by,[l.createVNode(Xt,{modelValue:a.value.time_type_to,"onUpdate:modelValue":_[3]||(_[3]=k=>a.value.time_type_to=k),name:`${f.nameTo}_type`,multiple:!1,options:f.timeTypeOptions,allowClear:!1,disabled:f.disabled,placeholder:"Выберите тип"},null,8,["modelValue","name","options","disabled"])])])])]))}}),[["__scopeId","data-v-4b5f9814"]]),yy={key:0,class:"modal-wrapper"},wy={class:"modal-header pb-4 border-bottom-0"},Cy={key:0,class:"modal-title"},Ey={key:0,class:"modal-body pt-0"},ky={key:1,class:"modal-footer row justify-content-start pt-3"},pc=l.defineComponent({__name:"DefaultModal",props:{modelValue:{type:Boolean,default:!1},title:{type:String,default:""},scrollable:{type:Boolean,default:!1},centered:{type:Boolean,default:!0},size:{type:String,default:""},style:{type:String,default:""}},emits:["update:modelValue"],setup(n,{emit:e}){const t=n,i=e,r=l.useSlots(),s=()=>{i("update:modelValue",!1)},a=o=>{o.key==="Escape"&&s()};return l.watch(()=>t.modelValue,o=>{o?(document.body.style.overflow="hidden",window.addEventListener("keydown",a)):(document.body.style.overflow="",window.removeEventListener("keydown",a))},{immediate:!0}),l.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",a)}),(o,u)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[n.modelValue?(l.openBlock(),l.createElementBlock("div",yy,[l.createElementVNode("div",{class:"overlay",onClick:s}),l.createElementVNode("div",{class:l.normalizeClass(["modal-dialog",{"modal-dialog-scrollable":n.scrollable,"modal-dialog-centered":n.centered,"modal-sm":n.size==="sm","modal-lg":n.size==="lg","modal-xl":n.size==="xl"}])},[l.createElementVNode("div",{class:"modal-content p-3",style:l.normalizeStyle(n.style)},[l.createElementVNode("div",wy,[n.title?(l.openBlock(),l.createElementBlock("h4",Cy,l.toDisplayString(n.title),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"btn-close",onClick:s})]),l.unref(r)["modal-body"]||l.unref(r).body?(l.openBlock(),l.createElementBlock("div",Ey,[l.renderSlot(o.$slots,"modal-body"),l.renderSlot(o.$slots,"body")])):l.createCommentVNode("",!0),l.unref(r)["modal-footer"]||l.unref(r).footer?(l.openBlock(),l.createElementBlock("div",ky,[l.renderSlot(o.$slots,"modal-footer"),l.renderSlot(o.$slots,"footer")])):l.createCommentVNode("",!0)],4)],2)])):l.createCommentVNode("",!0)]))}}),Sy="/img/success.png",xy="/img/warning.png",_y="/img/error.png",My="/img/confirmation.png",Ry={class:"row mb-3"},Ty={class:"col-auto"},Dy={style:{width:"90px",height:"90px"}},Oy=["src","alt"],Ly={key:1,class:"w-100",src:Sy,alt:"Успех"},Py={key:2,class:"w-100",src:xy,alt:"Предупреждение"},Ay={key:3,class:"w-100",src:_y,alt:"Ошибка"},Fy={key:4,class:"w-100",src:My,alt:"Подтверждение"},By={class:"col"},Ny={class:"confirmation-content"},Vy={key:0,class:"mb-3"},Hy={key:1,class:"text-muted"},zy={key:0,class:"d-flex gap-2"},Iy=["disabled"],$y=["disabled"],jy={key:0,class:"spinner-border spinner-border-sm me-2",role:"status"},Wy=Ve(l.defineComponent({__name:"ConfirmationModal",props:{title:{default:"Подтверждение"},message:{default:""},description:{default:""},modalVisibility:{type:Boolean,default:!1},size:{default:""},confirmText:{default:"Да"},cancelText:{default:"Нет"},imageSrc:{default:""},imageAlt:{default:""},loading:{type:Boolean,default:!1},mode:{default:"confirmation"},showButtons:{type:Boolean,default:!0}},emits:["update:modalVisibility","confirm","cancel"],setup(n,{emit:e}){const t=n,i=e,r=c=>{i("update:modalVisibility",c)},s=()=>{switch(t.mode){case"success":return"btn btn-success";case"warning":return"btn btn-warning";case"error":return"btn btn-danger";default:return"btn btn-primary"}},a=()=>{switch(t.mode){case"success":return"Отлично";case"warning":return"Понятно";case"error":return"Понятно";default:return t.confirmText}},o=()=>{t.loading||i("confirm")},u=()=>{t.loading||(i("cancel"),i("update:modalVisibility",!1))};return(c,d)=>(l.openBlock(),l.createBlock(pc,{"model-value":c.modalVisibility,"onUpdate:modelValue":r,size:c.size,title:c.title},{"modal-body":l.withCtx(()=>[l.createElementVNode("div",Ry,[l.createElementVNode("div",Ty,[l.createElementVNode("div",Dy,[c.imageSrc?(l.openBlock(),l.createElementBlock("img",{key:0,class:"w-100",src:c.imageSrc,alt:c.imageAlt||"Изображение"},null,8,Oy)):c.mode==="success"?(l.openBlock(),l.createElementBlock("img",Ly)):c.mode==="warning"?(l.openBlock(),l.createElementBlock("img",Py)):c.mode==="error"?(l.openBlock(),l.createElementBlock("img",Ay)):(l.openBlock(),l.createElementBlock("img",Fy))])]),l.createElementVNode("div",By,[l.createElementVNode("div",Ny,[c.message?(l.openBlock(),l.createElementBlock("h5",Vy,l.toDisplayString(c.message),1)):l.createCommentVNode("",!0),c.description?(l.openBlock(),l.createElementBlock("p",Hy,l.toDisplayString(c.description),1)):l.createCommentVNode("",!0)])])]),l.renderSlot(c.$slots,"modal-body",{},void 0,!0)]),"modal-footer":l.withCtx(()=>[l.renderSlot(c.$slots,"modal-footer",{},()=>[c.showButtons?(l.openBlock(),l.createElementBlock("div",zy,[c.mode==="confirmation"?(l.openBlock(),l.createElementBlock("button",{key:0,class:"btn btn-light",onClick:u,disabled:c.loading},l.toDisplayString(c.cancelText),9,Iy)):l.createCommentVNode("",!0),l.createElementVNode("button",{class:l.normalizeClass(s()),onClick:o,disabled:c.loading},[c.loading?(l.openBlock(),l.createElementBlock("span",jy)):l.createCommentVNode("",!0),l.createTextVNode(" "+l.toDisplayString(a()),1)],10,$y)])):l.createCommentVNode("",!0)],!0)]),_:3},8,["model-value","size","title"]))}}),[["__scopeId","data-v-c2efa4c0"]]),Gy={key:0,class:"filter-modal-wrapper"},Yy={class:"filter-modal-dialog"},Uy={class:"filter-modal-content"},qy={class:"filter-modal-header"},Ky={key:0,class:"filter-modal-title"},Jy={class:"filter-modal-body"},Xy={class:"filter-modal-footer"},Zy=Ve(l.defineComponent({__name:"TableFilterModalComponent",props:{title:{default:""},modalVisibility:{type:Boolean,default:!1}},emits:["emitModalVisibility"],setup(n,{emit:e}){const t=n,i=e,r=()=>{i("emitModalVisibility",!1)},s=a=>{a.key==="Escape"&&r()};return l.watch(()=>t.modalVisibility,a=>{a?(document.body.style.overflow="hidden",window.addEventListener("keydown",s)):(document.body.style.overflow="",window.removeEventListener("keydown",s))},{immediate:!0}),l.onUnmounted(()=>{document.body.style.overflow="",window.removeEventListener("keydown",s)}),(a,o)=>(l.openBlock(),l.createBlock(l.Teleport,{to:"body"},[a.modalVisibility?(l.openBlock(),l.createElementBlock("div",Gy,[l.createElementVNode("div",{class:"filter-modal-overlay",onClick:r}),l.createElementVNode("div",Yy,[l.createElementVNode("div",Uy,[l.createElementVNode("div",qy,[a.title?(l.openBlock(),l.createElementBlock("h4",Ky,l.toDisplayString(a.title),1)):l.createCommentVNode("",!0),l.createElementVNode("button",{type:"button",class:"btn-close",onClick:r})]),l.createElementVNode("div",Jy,[l.renderSlot(a.$slots,"modal-body",{},void 0,!0)]),l.createElementVNode("div",Xy,[l.renderSlot(a.$slots,"modal-footer",{},void 0,!0)])])])])):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-7c21e35f"]]),Qy={key:0,class:"px-0"},ew={class:"modal-dialog modal-dialog-centered modal-xl"},tw={class:"modal-content py-2 px-4"},iw={class:"modal-header"},nw={class:"modal-title"},rw={class:"modal-body row"},sw={class:"modal-footer border-0 row justify-content-start pt-0"},mc=Ve(l.defineComponent({__name:"EditTableColumnsModalComponent",props:{title:{default:""},modalVisibility:{type:Boolean,default:!1}},emits:["emitModalVisibility"],setup(n,{emit:e}){return(t,i)=>t.modalVisibility?(l.openBlock(),l.createElementBlock("div",Qy,[l.createElementVNode("div",{class:"overlay",onClick:i[0]||(i[0]=r=>t.$emit("emitModalVisibility",!1))}),l.createElementVNode("div",ew,[l.createElementVNode("div",tw,[l.createElementVNode("div",iw,[l.createElementVNode("h3",nw,l.toDisplayString(t.title),1),l.createElementVNode("button",{type:"button",class:"btn-close",onClick:i[1]||(i[1]=r=>t.$emit("emitModalVisibility",!1))})]),l.createElementVNode("div",rw,[l.renderSlot(t.$slots,"modal-body",{},void 0,!0)]),l.createElementVNode("div",sw,[l.renderSlot(t.$slots,"modal-footer",{},void 0,!0)])])])])):l.createCommentVNode("",!0)}}),[["__scopeId","data-v-549f79df"]]),aw={class:"row mb-4 mx-0","data-test":"PageTitle"},ow={class:"col-12"},lw={class:"row align-items-center"},uw={class:"col-auto"},cw={class:"col d-flex justify-content-end"},dw=Ve(l.defineComponent({__name:"PageTitle",props:{title:{},subtitle:{default:""},titleClass:{default:""},subtitleClass:{default:""},titleStyle:{default:""},subtitleStyle:{default:""}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",aw,[l.createElementVNode("div",ow,[l.createElementVNode("div",lw,[l.createElementVNode("div",uw,[l.createElementVNode("h2",{class:l.normalizeClass(["mb-0",e.titleClass]),style:l.normalizeStyle(e.titleStyle)},l.toDisplayString(e.title),7),e.subtitle?(l.openBlock(),l.createElementBlock("p",{key:0,class:l.normalizeClass(["text-muted mb-0 mt-1",e.subtitleClass]),style:l.normalizeStyle(e.subtitleStyle)},l.toDisplayString(e.subtitle),7)):l.createCommentVNode("",!0)]),l.createElementVNode("div",cw,[l.renderSlot(e.$slots,"default",{},void 0,!0)])])])]))}}),[["__scopeId","data-v-fd1eb9a3"]]),hw={class:"card-body"},fw={class:"card-text"},pw=Ve({__name:"Card",props:{title:{type:String,default:""},bodyClass:{type:String,default:"bg-gray-light"}},setup(n){return(e,t)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["card",n.bodyClass])},[l.createElementVNode("div",hw,[l.renderSlot(e.$slots,"bodyHeader",{},void 0,!0),l.createElementVNode("p",fw,[l.renderSlot(e.$slots,"default",{},void 0,!0)])])],2))}},[["__scopeId","data-v-5fa81802"]]),mw={key:0,class:"card-header"},gw={class:"card-title mb-0"},bw={class:"card-body"},vw={class:"row"},yw={class:"row align-items-center"},ww={class:"col-auto label pe-0"},Cw={class:"col-auto"},Ew={key:0,class:"mt-3"},kw=Ve(l.defineComponent({__name:"CardInfo",props:{title:{default:""},fields:{default:()=>[]},cardClass:{default:""},variant:{default:"default"},size:{default:"md"},bordered:{type:Boolean,default:!0},shadow:{type:Boolean,default:!1}},setup(n){const e=n,t=l.computed(()=>{const i=["card-info"];return e.variant!=="default"&&i.push(`card-info--${e.variant}`),e.size!=="md"&&i.push(`card-info--${e.size}`),e.bordered&&i.push("card-info--bordered"),e.shadow&&i.push("card-info--shadow"),e.cardClass&&i.push(e.cardClass),i.join(" ")});return(i,r)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["card",t.value])},[i.title?(l.openBlock(),l.createElementBlock("div",mw,[l.createElementVNode("h5",gw,l.toDisplayString(i.title),1)])):l.createCommentVNode("",!0),l.createElementVNode("div",bw,[l.createElementVNode("div",vw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.fields,(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:"col-12 mb-2",key:a},[l.createElementVNode("div",yw,[l.createElementVNode("div",ww,l.toDisplayString(s.label)+": ",1),l.createElementVNode("div",Cw,[l.createElementVNode("span",{class:l.normalizeClass(["value",s.valueClass]),style:l.normalizeStyle(s.valueStyle)},l.toDisplayString(s.value),7)])])]))),128))]),i.$slots.default?(l.openBlock(),l.createElementBlock("div",Ew,[l.renderSlot(i.$slots,"default",{},void 0,!0)])):l.createCommentVNode("",!0)])],2))}}),[["__scopeId","data-v-56359964"]]),Sw={class:"col-12 divider divider__wrapper","data-test":"Divider"},gc={__name:"Divider",props:{height:{type:[Number,String],default:4},className:{type:String,default:"mb-4"},colorHEX:{type:String,default:"#EFEFEF"}},setup(n){const e=n;return(t,i)=>(l.openBlock(),l.createElementBlock("div",Sw,[l.createElementVNode("div",{class:l.normalizeClass(e.className),style:l.normalizeStyle(`height: ${e.height}px ; background-color:${e.colorHEX};`)},null,6)]))}},xw={class:"custom-dropdown"},_w={style:{"border-bottom":"2px solid #000"}},Mw={class:"dropdown-list-wrapper"},Rw={key:0,class:"custom-dropdown-menu"},Tw=["onClick"],bc=Ve({__name:"DefaultDropDown",props:{links:{type:Array,required:!0},title:{type:String,default:"Actions"},type:{type:String,default:"actions",validator:function(n){return["actions","profile"].includes(n)}}},setup(n){const e=n,t=l.ref(!1),i=o=>{o&&(o.preventDefault(),o.stopPropagation()),t.value=!t.value},r=o=>{o(),i()},s=o=>{o&&(o.preventDefault(),o.stopPropagation()),setTimeout(()=>{t.value=!1},100)},a=l.computed(()=>e.type==="profile");return(o,u)=>(l.openBlock(),l.createElementBlock("div",xw,[a.value?(l.openBlock(),l.createElementBlock("a",{key:0,href:"#",class:"cursor-pointer nav-link dropdown-toggle d-flex align-items-center border rounded p-2",onClick:i,onBlur:s},[u[0]||(u[0]=l.createElementVNode("div",{class:"circl"},null,-1)),l.createTextVNode(" "+l.toDisplayString(n.title),1)],32)):(l.openBlock(),l.createElementBlock("a",{key:1,href:"#",class:"link-dark",type:"button",onClick:i,onBlur:s},[l.createElementVNode("span",_w,l.toDisplayString(n.title),1),u[1]||(u[1]=l.createElementVNode("i",{class:"bi bi-chevron-up dropdown-edit",style:{"font-size":"12px","padding-left":"5px"}},null,-1))],32)),l.createElementVNode("div",Mw,[t.value?(l.openBlock(),l.createElementBlock("ul",Rw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.links,(c,d)=>(l.openBlock(),l.createElementBlock("li",{key:d},[c.hidden?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["dropdown-item",{disabled:c?.disabled}]),style:{cursor:"pointer"},onClick:p=>r(c?.action)},l.toDisplayString(c?.title),11,Tw))]))),128))])):l.createCommentVNode("",!0)])]))}},[["__scopeId","data-v-efc16eec"]]),Dw={class:"page-card"},Ow={class:"row hide-to-print card-header mx-0 w-100"},Lw={class:"col"},Pw={class:"row flex-nowrap align-items-center"},Aw={class:"col-auto"},Fw={key:0,class:"col-auto"},Bw={class:"row",style:{padding:"20px"}},Nw={class:"d-flex align-items-start"},Vw={class:"nav flex-column nav-pills",id:"v-pills-tab",role:"tablist","aria-orientation":"vertical"},Hw=["onClick"],zw={class:"tab-content",id:"v-pills-tabContent"},Iw={key:0,class:"title"},$w={key:1},jw={key:0},Ww=["title"],Gw={class:"row"},Yw={class:"col-12"},Uw=Ve(l.defineComponent({__name:"PageCard",props:{actionLinks:{default:()=>[]},tabs:{default:()=>[]},col:{default:"auto"},actionsTitle:{default:"Действия"}},emits:["click","active-tab"],setup(n,{emit:e}){const t=n,i=e,r=l.ref(0),s=l.ref(!1),a=l.ref(!1),o=l.useSlots(),u=h=>{i("click",h)},c=()=>{a.value=!!o.header&&o.header().length>0},d=()=>{s.value=!!o.footer&&o.footer().length>0},p=h=>{r.value=h,i("active-tab",t.tabs[h])};return l.onMounted(()=>{c(),d()}),(h,f)=>(l.openBlock(),l.createElementBlock("div",Dw,[l.createElementVNode("div",Ow,[l.createElementVNode("div",Lw,[l.createElementVNode("div",Pw,[l.createElementVNode("div",Aw,[a.value?l.renderSlot(h.$slots,"header",{key:0},void 0,!0):l.createCommentVNode("",!0)])])]),h.actionLinks.length>0?(l.openBlock(),l.createElementBlock("div",Fw,[l.createVNode(bc,{title:h.actionsTitle,links:h.actionLinks,onClick:u},null,8,["title","links"])])):l.createCommentVNode("",!0)]),l.createElementVNode("div",Bw,[l.createElementVNode("div",Nw,[l.createElementVNode("div",Vw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.tabs,(_,k)=>l.withDirectives((l.openBlock(),l.createElementBlock("button",{key:k,class:l.normalizeClass(["nav-link me-5",[k===r.value?"active":""]]),onClick:w=>p(k)},l.toDisplayString(_.navLink),11,Hw)),[[l.vShow,_.navLink]])),128))]),l.createElementVNode("div",zw,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(h.tabs,(_,k)=>(l.openBlock(),l.createElementBlock("div",{key:k,class:l.normalizeClass(["tab-pane fade row",[k===r.value?"show active d-flex":""]])},[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.contents,(w,y)=>(l.openBlock(),l.createElementBlock("div",{key:y,class:l.normalizeClass(`col-${h.col} mb-3`)},[w.subtitle?(l.openBlock(),l.createElementBlock("div",Iw,l.toDisplayString(w.subtitle)+": ",1)):l.createCommentVNode("",!0),typeof w.text=="string"?(l.openBlock(),l.createElementBlock("div",$w,l.toDisplayString(w.text),1)):(l.openBlock(!0),l.createElementBlock(l.Fragment,{key:2},l.renderList(w.text,(v,R)=>(l.openBlock(),l.createElementBlock("div",{key:R},[typeof v=="string"?(l.openBlock(),l.createElementBlock("div",jw,l.toDisplayString(v),1)):l.createCommentVNode("",!0),typeof v=="object"?(l.openBlock(),l.createElementBlock("div",{key:1,title:v?.description||""},l.toDisplayString(v.name),9,Ww)):l.createCommentVNode("",!0)]))),128))],2))),128))],2))),128))])]),s.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createVNode(gc,{class:"mt-3"}),l.createElementVNode("div",Gw,[l.createElementVNode("div",Yw,[l.renderSlot(h.$slots,"footer",{},void 0,!0)])])],64)):l.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-89706e0a"]]),qw={key:0,class:"row w-100 parent"},Kw={class:"col-12 wrapper w-100"},Jw=["innerHTML"],vc={__name:"Toast",props:{message:{type:String,default:""},isError:{type:Boolean,default:!1}},setup(n){const e=n,t=l.ref(e.message);l.watch(()=>e.message,r=>{t.value=r});const i=()=>{t.value=""};return(r,s)=>t.value&&t.value.length>0?(l.openBlock(),l.createElementBlock("div",qw,[l.createElementVNode("div",Kw,[l.createElementVNode("div",{class:l.normalizeClass(["alert align-items-center message",[e.isError?"alert-danger":"alert-success"]]),innerHTML:t.value},null,10,Jw),l.createElementVNode("i",{class:"bi bi-x-lg",onClick:i})])])):l.createCommentVNode("",!0)}},Xw={class:"row","data-test":"ErrorMessageComponent"},Zw={class:"col-12"},Qw={key:0,class:"bi bi-exclamation-triangle pe-2","aria-hidden":"true"},eC=["innerHTML"],tC=Ve(l.defineComponent({__name:"ErrorMessageComponent",props:{message:{default:""},warningIcon:{type:Boolean,default:!1},type:{default:"danger"},asHtml:{type:Boolean,default:!1}},setup(n){const e=n;l.computed(()=>(Array.isArray(e.message)||e.message)&&e.message.length>0);const t=l.computed(()=>Array.isArray(e.message)?e.message.join(", "):e.message||"");return(i,r)=>(l.openBlock(),l.createElementBlock("div",Xw,[l.createElementVNode("div",Zw,[l.createElementVNode("div",{class:l.normalizeClass([`alert alert-${i.type}`,{"d-flex align-items-center":i.warningIcon}])},[i.warningIcon?(l.openBlock(),l.createElementBlock("i",Qw)):l.createCommentVNode("",!0),i.asHtml?(l.openBlock(),l.createElementBlock("div",{key:1,innerHTML:t.value},null,8,eC)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:2},[l.createTextVNode(l.toDisplayString(t.value),1)],64))],2)])]))}}),[["__scopeId","data-v-c739823d"]]),iC={class:"accordion-header",style:{background:"transparent"}},nC=["aria-expanded","aria-controls"],rC={key:0},sC=["id"],aC={class:"accordion-body px-0"},oC=Ve(l.defineComponent({__name:"DefaultAccordion",props:{title:{},titleFontSize:{default:16},isCollapsed:{type:Boolean,default:!0},isVisibleBorderBottom:{type:Boolean,default:!0},isCollapsedDefault:{type:Boolean,default:!0},isTitleBold:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},emits:["update-visibility"],setup(n,{emit:e}){const t=n,i=e,r=l.useSlots(),s=l.ref(Math.random().toString(36).substr(2,9)),a=u=>!!r[u],o=()=>{const u=!t.isCollapsed;i("update-visibility",u)};return l.watch(()=>t.isCollapsedDefault,u=>{i("update-visibility",u)},{deep:!0}),(u,c)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["accordion accordion-flush",{"w-100":u.fullWidth}]),style:{background:"transparent"}},[l.createElementVNode("div",{class:l.normalizeClass(["accordion-item",{"border-bottom":u.isVisibleBorderBottom}]),style:{background:"transparent"}},[l.createElementVNode("h2",iC,[l.createElementVNode("button",{onClick:o,class:l.normalizeClass(["accordion-button collapsed ps-0",{visible:!u.isCollapsed,"fw-bolder":u.isTitleBold}]),style:l.normalizeStyle(`font-size:${u.titleFontSize}px;`),type:"button","aria-expanded":!u.isCollapsed,"aria-controls":`accordion-${s.value}`},l.toDisplayString(u.title),15,nC)]),l.createVNode(l.Transition,{name:"fade"},{default:l.withCtx(()=>[a("accordion-body")?(l.openBlock(),l.createElementBlock("div",rC,[l.withDirectives(l.createElementVNode("div",{class:"accordion-collapse collapse show",id:`accordion-${s.value}`},[l.createElementVNode("div",aC,[l.renderSlot(u.$slots,"accordion-body",{},void 0,!0)])],8,sC),[[l.vShow,!u.isCollapsed]])])):l.createCommentVNode("",!0)]),_:3})],2)],2))}}),[["__scopeId","data-v-99bfaf08"]]),lC={class:"accordion-header",style:{background:"transparent"}},uC=["onClick"],cC={class:"d-flex align-items-center w-100"},dC={class:"d-flex align-items-center flex-grow-1"},hC=["value","id","onChange"],fC={class:"form-check-label ps-2 text-body flex-grow-1"},pC={class:"accordion-collapse collapse show","aria-labelledby":"flush-animal-type","data-bs-parent":""},mC={class:"col d-flex flex-wrap px-4"},gC={class:"form-check"},bC=["value","id"],vC=["for"],yC=Ve(l.defineComponent({__name:"KindCheckboxesAccordion",props:{checkboxName:{default:"kinds"},kindGroups:{default:()=>[]},defaultSelectedKinds:{default:()=>[]},defaultSelectedKindGroups:{default:()=>[]}},emits:["emitSelectedKinds","emitSelectedKindGroups"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=l.ref([]),a=l.ref([]),o=l.ref(null),u=l.ref([]),c=(_,k)=>{const w=_.target;if(w.tagName==="INPUT"||w.closest(".form-check-input"))return!1;if(w.tagName==="SPAN"||w.closest(".form-check-label"))return o.value!==Number(k)?(o.value=Number(k),!0):(o.value=null,!0);if(o.value!==Number(k))return o.value=Number(k),!0;o.value=null},d=_=>{const k=i.kindGroups.find(y=>y.id===_);if(!k)return;if(s.value.includes(String(_))){const y=k.kinds.map(R=>String(R.id)),v=[...a.value];y.forEach(R=>{v.includes(R)||v.push(R)}),a.value=v}else{const y=k.kinds.map(v=>String(v.id));a.value=a.value.filter(v=>!y.includes(String(v)))}},p=()=>{l.nextTick(()=>{h()})},h=()=>{const _=[];i.kindGroups.forEach((y,v)=>{const R=u.value?.[v];if(!R)return;const m=y.kinds.map(g=>String(g.id)),x=a.value.filter(g=>m.includes(String(g)));x.length===0?(R.indeterminate=!1,R.checked=!1):x.length===m.length?(R.indeterminate=!1,R.checked=!0,_.push(String(y.id))):(R.indeterminate=!0,R.checked=!1)});const k=s.value.map(String).sort(),w=_.map(String).sort();JSON.stringify(k)!==JSON.stringify(w)&&(s.value=_)};l.watch(()=>a.value,_=>{r("emitSelectedKinds",_)},{deep:!0}),l.watch(()=>s.value,_=>{r("emitSelectedKindGroups",_)},{deep:!0}),l.onMounted(()=>{i.defaultSelectedKinds.length>0&&(a.value=[...i.defaultSelectedKinds]),i.defaultSelectedKindGroups.length>0&&(s.value=[...i.defaultSelectedKindGroups]),l.nextTick(()=>{h()})});const f=l.computed(()=>c);return e({toggleAccordion:c}),(_,k)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.kindGroups,(w,y)=>(l.openBlock(),l.createElementBlock("div",{class:"accordion-item border-bottom",style:{background:"transparent"},key:w.id},[_.kindGroups[y].kinds.length>0?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("div",lC,[l.createElementVNode("button",{class:l.normalizeClass(["accordion-button ps-0",{collapsed:o.value===Number(y)}]),type:"button",style:{background:"transparent"},onClick:v=>f.value(v,y)},[l.createElementVNode("div",cC,[l.createElementVNode("div",dC,[l.withDirectives(l.createElementVNode("input",{class:"form-check-input m-0",type:"checkbox",ref_for:!0,ref_key:"groupCheckbox",ref:u,value:`${w.id}`,id:`${_.checkboxName}_${y}`,name:"kind_group","onUpdate:modelValue":k[0]||(k[0]=v=>s.value=v),onClick:k[1]||(k[1]=l.withModifiers(()=>{},["stop"])),onChange:v=>d(w.id)},null,40,hC),[[l.vModelCheckbox,s.value]]),l.createElementVNode("span",fC,l.toDisplayString(w.name),1)]),l.createElementVNode("i",{class:l.normalizeClass(["bi bi-chevron-down accordion-icon",{rotated:o.value===Number(y)}])},null,2)])],10,uC)]),l.withDirectives(l.createElementVNode("div",pC,[l.createElementVNode("div",mC,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(_.kindGroups[y].kinds,(v,R)=>(l.openBlock(),l.createElementBlock("div",{class:"col-6 mb-2",key:R},[l.createElementVNode("div",gC,[l.withDirectives(l.createElementVNode("input",{class:"form-check-input",type:"checkbox",value:`${v.id}`,id:`${_.checkboxName}_${v.id}`,name:"kinds","onUpdate:modelValue":k[2]||(k[2]=m=>a.value=m),onChange:p},null,40,bC),[[l.vModelCheckbox,a.value]]),l.createElementVNode("label",{class:"form-check-label",for:`${_.checkboxName}_${v.id}`},[l.createElementVNode("small",null,l.toDisplayString(v.name),1)],8,vC)])]))),128))])],512),[[l.vShow,o.value===Number(y)]])],64)):l.createCommentVNode("",!0)]))),128))}}),[["__scopeId","data-v-c0a701d5"]]);class rt{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class Ke{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var r=e?t.split(e):[t],s=r.length,a;for(let o=0;o<s&&(i=i[r[o]],a=i,!!i);o++);return a}static deepClone(e,t,i=[]){var r={}.__proto__,s=[].__proto__;t||(t=Object.assign(Array.isArray(e)?[]:{},e));for(var a in e){let o=e[a],u,c;o!=null&&typeof o=="object"&&(o.__proto__===r||o.__proto__===s)&&(u=i.findIndex(d=>d.subject===o),u>-1?t[a]=i[u].copy:(c=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:c}),t[a]=this.deepClone(o,c,i)))}return t}}let wC=class Dc extends rt{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,r=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let s=Ke.elOffset(this.container);i-=s.left,r-=s.top}return{x:i,y:r}}elementPositionCoords(e,t="right"){var i=Ke.elOffset(e),r,s,a;switch(this.container!==document.body&&(r=Ke.elOffset(this.container),i.left-=r.left,i.top-=r.top),t){case"right":s=i.left+e.offsetWidth,a=i.top-1;break;case"bottom":s=i.left,a=i.top+e.offsetHeight;break;case"left":s=i.left,a=i.top-1;break;case"top":s=i.left,a=i.top;break;case"center":s=i.left+e.offsetWidth/2,a=i.top+e.offsetHeight/2;break}return{x:s,y:a,offset:i}}show(e,t){var i,r,s,a,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(s=e,o=this.elementPositionCoords(e,t),a=o.offset,i=o.x,r=o.y):typeof e=="number"?(a={top:0,left:0},i=e,r=t):(o=this.containerEventCoords(e),i=o.x,r=o.y,this.reversedX=!1),this.element.style.top=r+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,r,s,a,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",u=>{u.stopPropagation()}),this)}_fitToScreen(e,t,i,r,s){var a=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-r.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,a?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(s){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new Dc(this.table,e,this),this.childPopup}};class Pe extends rt{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(r=>r.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new wC(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var CC={rownum:function(n,e,t,i,r,s){return s.getPosition()}};class Jn extends Pe{static moduleName="accessor";static accessors=CC;constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(r=>{var s="accessor"+(r.charAt(0).toUpperCase()+r.slice(1)),a;e.definition[s]&&(a=this.lookupAccessor(e.definition[s]),a&&(t=!0,i[s]={accessor:a,params:e.definition[s+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":Jn.accessors[e]?t=Jn.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),r=e.getComponent(),s=Ke.deepClone(e.data||{});return this.table.columnManager.traverse(function(a){var o,u,c,d;a.modules.accessor&&(u=a.modules.accessor[i]||a.modules.accessor.accessor||!1,u&&(o=a.getFieldValue(s),o!="undefined"&&(d=a.getComponent(),c=typeof u.params=="function"?u.params(o,s,t,d,r):u.params,a.setFieldValue(s,u.accessor(o,s,t,c,d,r)))))}),s}}var EC={method:"GET"};function ua(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((r,s)=>{t=t.concat(ua(r,e?e+"["+s+"]":s))});else if(typeof n=="object")for(var i in n)t=t.concat(ua(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}function kC(n){var e=ua(n),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function yc(n,e,t){return n&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",n+=(n.includes("?")?"&":"?")+kC(t)),n}function SC(n,e,t){var i;return new Promise((r,s)=>{if(n=this.urlGenerator.call(this.table,n,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var a in i.headers)e.headers||(e.headers={}),typeof e.headers[a]>"u"&&(e.headers[a]=i.headers[a]);e.body=i.body.call(this,n,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);n?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(n,e).then(o=>{o.ok?o.json().then(u=>{r(u)}).catch(u=>{s(u),console.warn("Ajax Load Error - Invalid JSON returned",u)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),s(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),s(o)})):(console.warn("Ajax Load Error - No URL Set"),r([]))})}function ca(n,e){var t=[];if(e=e||"",Array.isArray(n))n.forEach((r,s)=>{t=t.concat(ca(r,e?e+"["+s+"]":s))});else if(typeof n=="object")for(var i in n)t=t.concat(ca(n[i],e?e+"["+i+"]":i));else t.push({key:e,value:n});return t}var xC={json:{headers:{"Content-Type":"application/json"},body:function(n,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(n,e,t){var i=ca(t),r=new FormData;return i.forEach(function(s){r.append(s.key,s.value)}),r}}};class Fi extends Pe{static moduleName="ajax";static defaultConfig=EC;static defaultURLGenerator=yc;static defaultLoaderPromise=SC;static contentTypeFormatters=xC;constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=Fi.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||Fi.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||Fi.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,r){var s=this.table.options.ajaxParams;return s&&(typeof s=="function"&&(s=s.call(this.table)),r=Object.assign(Object.assign({},s),r)),r}requestDataCheck(e,t,i,r){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,r,s){var a;return!s&&this.requestDataCheck(e)?(e&&this.setUrl(e),a=this.generateConfig(i),this.sendRequest(this.url,t,a)):s}setDefaultConfig(e={}){this.config=Object.assign({},Fi.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(r=>(this.table.options.ajaxResponse&&(r=this.table.options.ajaxResponse.call(this.table,e,t,r)),r)):Promise.reject()}}var _C={replace:function(n){return this.table.setData(n)},update:function(n){return this.table.updateOrAddData(n)},insert:function(n){return this.table.addData(n)}},MC={table:function(n){var e=[],t=!0,i=this.table.columnManager.columns,r=[],s=[];return n=n.split(`
|
|
32
|
+
`),n.forEach(function(a){e.push(a.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(a){var o=i.find(function(u){return a&&u.definition.title&&a.trim()&&u.definition.title.trim()===a.trim()});o?r.push(o):t=!1}),t||(t=!0,r=[],e[0].forEach(function(a){var o=i.find(function(u){return a&&u.field&&a.trim()&&u.field.trim()===a.trim()});o?r.push(o):t=!1}),t||(r=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(a){var o={};a.forEach(function(u,c){r[c]&&(o[r[c].field]=u)}),s.push(o)}),s):!1}},RC={copyToClipboard:["ctrl + 67","meta + 67"]},TC={copyToClipboard:function(n){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},DC={keybindings:{bindings:RC,actions:TC}};class Xn extends Pe{static moduleName="clipboard";static moduleExtensions=DC;static pasteActions=_C;static pasteParsers=MC;constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,r;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(r=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(r),t=i?this.generatePlainContent(r):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var r=[];i.columns.forEach(s=>{var a="";if(s)if(i.type==="group"&&(s.value=s.component.getKey()),s.value===null)a="";else switch(typeof s.value){case"object":a=JSON.stringify(s.value);break;case"undefined":a="";break;default:a=s.value}r.push(a)}),t.push(r.join(" "))}),t.join(`
|
|
33
|
+
`)}copy(e,t){var i,r;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(r=document.body.createTextRange(),r.moveToElementText(this.table.element),r.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=Xn.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=Xn.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,r;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),r=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,r)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}}class OC{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class wc{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class un extends rt{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},r={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=r[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var s=this.column.definition.cssClass.split(" ");s.forEach(a=>{e.classList.add(a)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var r=this.setValueProcessData(e,t,i);r&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var r=!1;return(this.value!==e||i)&&(r=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),r&&this.dispatch("cell-value-changed",this),r}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new wc(this)),this.component}}class Cc{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Ec={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};class Vt extends rt{static defaultOptionList=Ec;constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((r,s)=>{var a=new Vt(r,this);this.attachColumn(a)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(Vt.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{Vt.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",r=>{r.stopPropagation(),i.focus()}),i.addEventListener("mousedown",r=>{r.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,r=>{i.value=r||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,r=>{this._formatColumnHeaderTitle(t,r||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,r=i.length,s;for(let a=0;a<r&&(t=t[i[a]],s=t,!!t);a++);return s}_setFlatData(e,t){this.field&&(e[this.field]=t)}_setNestedData(e,t){var i=e,r=this.fieldStructure,s=r.length;for(let a=0;a<s;a++)if(a==s-1)i[r[a]]=t;else{if(!i[r[a]])if(typeof t<"u")i[r[a]]={};else break;i=i[r[a]]}}attachColumn(e){this.groupElement?(this.columns.push(e),this.groupElement.appendChild(e.getElement()),e.columnRendered()):console.warn("Column Warning - Column being attached to another column instead of column group")}verticalAlign(e,t){var i=this.parent.isGroup?this.parent.getGroupElement().clientHeight:t||this.parent.getHeadersElement().clientHeight;this.element.style.height=i+"px",this.dispatch("column-height",this,this.element.style.height),this.isGroup&&(this.groupElement.style.minHeight=i-this.contentElement.offsetHeight+"px"),this.columns.forEach(function(r){r.verticalAlign(e)})}clearVerticalAlign(){this.element.style.paddingTop="",this.element.style.height="",this.element.style.minHeight="",this.groupElement.style.minHeight="",this.columns.forEach(function(e){e.clearVerticalAlign()}),this.dispatch("column-height",this,"")}getElement(){return this.element}getGroupElement(){return this.groupElement}getField(){return this.field}getTitleDownload(){return this.titleDownload}getFirstColumn(){return this.isGroup?this.columns.length?this.columns[0].getFirstColumn():!1:this}getLastColumn(){return this.isGroup?this.columns.length?this.columns[this.columns.length-1].getLastColumn():!1:this}getColumns(e){var t=[];return e?this.columns.forEach(i=>{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.table.initialized&&(this.element.style.width=e+"px"),this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e<this.minWidth&&(e=this.minWidth,console.warn("the maxWidth ("+e+"px) for column '"+this.field+"' cannot be smaller that its minWidth ("+this.minWidthStyled+")")),this.maxWidth=e,this.maxWidthStyled=e?e+"px":"",this.element.style.maxWidth=this.maxWidthStyled,this.cells.forEach(function(t){t.setMaxWidth()})}delete(){return new Promise((e,t)=>{this.isGroup&&this.columns.forEach(function(r){r.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let r=0;r<i;r++)this.cells[0].delete();this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.contentElement=!1,this.titleElement=!1,this.groupElement=!1,this.parent.isGroup&&this.parent.removeChild(this),this.table.columnManager.deregisterColumn(this),this.table.columnManager.rerenderColumns(!0),this.dispatch("column-deleted",this),e()})}columnRendered(){this.titleFormatterRendered&&this.titleFormatterRendered(),this.dispatch("column-rendered",this)}generateCell(e){var t=new un(this,e);return this.cells.push(t),t}nextColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(r=>{r.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(r=>{var s=r.getWidth();s>t&&(t=s)}),t)){var i=t+1;e?this.setWidth(i):(this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i))}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new Cc(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof Vt?this.parent.getComponent():!1}}class Zn{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class ot extends rt{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&Ke.elVisible(this.element),i={},r;return new Promise((s,a)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),r=this.chain("row-data-changing",[this,i,e],null,e);for(let o in r)this.data[o]=r[o];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach(c=>{let d=this.getCell(c.getField());if(d){let p=c.getFieldValue(r);d.getValue()!==p&&(d.setValueProcessData(p),t&&d.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t<e;t++)this.cells[0].delete()}wipe(){if(this.detachModules(),this.deleteCells(),this.element){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.parentNode&&this.element.parentNode.removeChild(this.element)}this.element=!1,this.modules={}}isDisplayed(){return this.table.rowManager.getDisplayRows().includes(this)}getPosition(){return this.isDisplayed()?this.position:!1}setPosition(e){e!=this.position&&(this.position=e,this.positionWatchers.forEach(t=>{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new Zn(this)),this.component}}var LC={avg:function(n,e,t){var i=0,r=typeof t.precision<"u"?t.precision:2;return n.length&&(i=n.reduce(function(s,a){return Number(s)+Number(a)}),i=i/n.length,i=r!==!1?i.toFixed(r):i),parseFloat(i).toString()},max:function(n,e,t){var i=null,r=typeof t.precision<"u"?t.precision:!1;return n.forEach(function(s){s=Number(s),(s>i||i===null)&&(i=s)}),i!==null?r!==!1?i.toFixed(r):i:""},min:function(n,e,t){var i=null,r=typeof t.precision<"u"?t.precision:!1;return n.forEach(function(s){s=Number(s),(s<i||i===null)&&(i=s)}),i!==null?r!==!1?i.toFixed(r):i:""},sum:function(n,e,t){var i=0,r=typeof t.precision<"u"?t.precision:!1;return n.length&&n.forEach(function(s){s=Number(s),i+=isNaN(s)?0:Number(s)}),r!==!1?i.toFixed(r):i},concat:function(n,e,t){var i=0;return n.length&&(i=n.reduce(function(r,s){return String(r)+String(s)})),i},count:function(n,e,t){var i=0;return n.length&&n.forEach(function(r){r&&i++}),i},unique:function(n,e,t){var i=n.filter((r,s)=>(n||r===0)&&n.indexOf(r)===s);return i.length}};class Bi extends Pe{static moduleName="columnCalcs";static calculations=LC;constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new Vt({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":Bi.calculations[t.topCalc]?i.topCalc=Bi.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":Bi.calculations[t.bottomCalc]?i.botCalc=Bi.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,r=this.table.modules.dataTree;return e.forEach(s=>{t.push(s.getData()),i&&s.modules.dataTree?.open&&this.rowsToData(r.getFilteredTreeChildren(s)).forEach(a=>{t.push(s)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),r;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),r=new ot(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),r.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),r.component=!1,r.getComponent=()=>(r.component||(r.component=new OC(r)),r.component),r.generateCells=()=>{var s=[];this.table.columnManager.columnsByIndex.forEach(a=>{this.genColumn.setField(a.getField()),this.genColumn.hozAlign=a.hozAlign,a.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter(a.definition[e+"CalcFormatter"]),params:a.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.lookupFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=a.definition.cssClass;var o=new un(this.genColumn,r);o.getElement(),o.column=a,o.setWidth(),a.cells.push(o),s.push(o),a.visible||o.hide()}),r.cells=s},r}generateRowData(e,t){var i={},r=e=="top"?this.topCalcs:this.botCalcs,s=e=="top"?"topCalc":"botCalc",a,o;return r.forEach(function(u){var c=[];u.modules.columnCalcs&&u.modules.columnCalcs[s]&&(t.forEach(function(d){c.push(u.getFieldValue(d))}),o=s+"Params",a=typeof u.modules.columnCalcs[o]=="function"?u.modules.columnCalcs[o](c,t):u.modules.columnCalcs[o],u.setFieldValue(i,u.modules.columnCalcs[s](c,t,a)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),r={},s={};return i.forEach(a=>{r[a.getKey()]=this.getGroupResults(a)}),s={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:r},s}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}}class PC extends Pe{static moduleName="dataTree";constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="<div class='tabulator-data-tree-control-collapse'></div>"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="<div class='tabulator-data-tree-control-expand'></div>"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,r){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,r){return t.dataTreeStartExpanded[r]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),r=i||!i&&typeof t=="object"&&t!==null;!r&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!r&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:r?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&r?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&r?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:r}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),r=e.modules.dataTree;r.branchEl&&(r.branchEl.parentNode&&r.branchEl.parentNode.removeChild(r.branchEl),r.branchEl=!1),r.controlEl&&(r.controlEl.parentNode&&r.controlEl.parentNode.removeChild(r.controlEl),r.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+r.index),r.index&&(this.branchEl?(r.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(r.branchEl,i.firstChild),this.table.rtl?r.branchEl.style.marginRight=(r.branchEl.offsetWidth+r.branchEl.style.marginLeft)*(r.index-1)+r.index*this.indent+"px":r.branchEl.style.marginLeft=(r.branchEl.offsetWidth+r.branchEl.style.marginRight)*(r.index-1)+r.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+r.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+r.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,r=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",s=>{s.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",s=>{s.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",s=>{s.stopPropagation()}),r&&r.parentNode===t?r.parentNode.replaceChild(i.controlEl,r):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,r)=>{var s,a;t.push(i),i instanceof ot&&(i.create(),s=i.modules.dataTree,!s.index&&s.children!==!1&&(a=this.getChildren(i,!1,!0),a.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var r=e.modules.dataTree,s=[],a=[];return r.children!==!1&&(r.open||t)&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(r.children):s=r.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(s,i),s.forEach(o=>{a.push(o);var u=this.getChildren(o,!1,!0);u.forEach(c=>{a.push(c)})})),a}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(r=>{var s=new ot(r||{},this.table.rowManager);s.create(),s.modules.dataTree.index=e.modules.dataTree.index+1,s.modules.dataTree.parent=e,s.modules.dataTree.children&&(s.modules.dataTree.open=this.startOpen(s.getComponent(),s.modules.dataTree.index)),t.push(s)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],r;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?r=this.table.modules.filter.filter(t.children):r=t.children,r.forEach(s=>{s instanceof ot&&i.push(s)})),i}rowDeleting(e){var t=e.modules.dataTree;t&&t.children&&Array.isArray(t.children)&&t.children.forEach(i=>{i instanceof ot&&i.wipe()})}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,r){var s=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof r<"u"&&(s=this.findChildIndex(r,e),s!==!1&&e.data[this.field].splice(i?s:s+1,0,t)),s===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof ot?i=e.data:e instanceof Zn?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(r=>r instanceof ot?r.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(r=>r.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var r=e.modules.dataTree,s=[];return r&&r.children&&(Array.isArray(r.children)||(r.children=this.generateChildren(e)),r.children.forEach(a=>{a instanceof ot&&(s.push(t?a.getComponent():a),i&&this.getTreeChildren(a,t,i).forEach(o=>{s.push(o)}))})),s}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}function AC(n,e={},t){var i=e.delimiter?e.delimiter:",",r=[],s=[];n.forEach(a=>{var o=[];switch(a.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":a.columns.forEach((u,c)=>{u&&u.depth===1&&(s[c]=typeof u.value>"u"||u.value===null?"":'"'+String(u.value).split('"').join('""')+'"')});break;case"row":a.columns.forEach(u=>{if(u){switch(typeof u.value){case"object":u.value=u.value!==null?JSON.stringify(u.value):"";break;case"undefined":u.value="";break}o.push('"'+String(u.value).split('"').join('""')+'"')}}),r.push(o.join(i));break}}),s.length&&r.unshift(s.join(i)),r=r.join(`
|
|
34
|
+
`),e.bom&&(r="\uFEFF"+r),t(r,"text/csv")}function FC(n,e,t){var i=[];n.forEach(r=>{var s={};switch(r.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":r.columns.forEach(a=>{a&&(s[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(s);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function BC(n,e={},t){var i=[],r=[],s={},a=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},o=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},u=e.jsPDF||{},c=e.title?e.title:"",d,p;u.orientation||(u.orientation=e.orientation||"landscape"),u.unit||(u.unit="pt"),n.forEach(f=>{switch(f.type){case"header":i.push(h(f));break;case"group":r.push(h(f,a));break;case"calc":r.push(h(f,o));break;case"row":r.push(h(f));break}});function h(f,_){var k=[];return f.columns.forEach(w=>{var y;if(w){switch(typeof w.value){case"object":w.value=w.value!==null?JSON.stringify(w.value):"";break;case"undefined":w.value="";break}y={content:w.value,colSpan:w.width,rowSpan:w.height},_&&(y.styles=_),k.push(y)}}),k}d=this.dependencyRegistry.lookup("jspdf","jsPDF"),p=new d(u),e.autoTable&&(typeof e.autoTable=="function"?s=e.autoTable(p)||{}:s=e.autoTable),c&&(s.didDrawPage=function(f){p.text(c,40,30)}),s.head=i,s.body=r,p.autoTable(s),e.documentProcessing&&e.documentProcessing(p),t(p.output("arraybuffer"),"application/pdf")}function NC(n,e,t){var i=this,r=e.sheetName||"Sheet1",s=this.dependencyRegistry.lookup("XLSX"),a=s.utils.book_new(),o=new rt(this),u="compress"in e?e.compress:!0,c=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:u},d;c.type="binary",a.SheetNames=[],a.Sheets={};function p(){var _=[],k=[],w={},y={s:{c:0,r:0},e:{c:n[0]?n[0].columns.reduce((v,R)=>v+(R&&R.width?R.width:1),0):0,r:n.length}};return n.forEach((v,R)=>{var m=[];v.columns.forEach(function(x,g){x?(m.push(!(x.value instanceof Date)&&typeof x.value=="object"?JSON.stringify(x.value):x.value),(x.width>1||x.height>-1)&&(x.height>1||x.width>1)&&k.push({s:{r:R,c:g},e:{r:R+x.height-1,c:g+x.width-1}})):m.push("")}),_.push(m)}),s.utils.sheet_add_aoa(w,_),w["!ref"]=s.utils.encode_range(y),k.length&&(w["!merges"]=k),w}if(e.sheetOnly){t(p());return}if(e.sheets)for(var h in e.sheets)e.sheets[h]===!0?(a.SheetNames.push(h),a.Sheets[h]=p()):(a.SheetNames.push(h),o.commsSend(e.sheets[h],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(_){a.Sheets[h]=_}}));else a.SheetNames.push(r),a.Sheets[r]=p();e.documentProcessing&&(a=e.documentProcessing(a));function f(_){for(var k=new ArrayBuffer(_.length),w=new Uint8Array(k),y=0;y!=_.length;++y)w[y]=_.charCodeAt(y)&255;return k}d=s.write(a,c),t(f(d),"application/octet-stream")}function VC(n,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(n),"text/html")}function HC(n,e,t){const i=[];n.forEach(r=>{const s={};switch(r.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":r.columns.forEach(a=>{a&&(s[a.component.getTitleDownload()||a.component.getField()]=a.value)}),i.push(JSON.stringify(s));break}}),t(i.join(`
|
|
35
|
+
`),"application/x-ndjson")}var zC={csv:AC,json:FC,jsonLines:HC,pdf:BC,xlsx:NC,html:VC};class Qn extends Pe{static moduleName="download";static downloaders=zC;constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){}downloadToTab(e,t,i,r){this.download(e,t,i,r,!0)}download(e,t,i,r,s){var a=!1;function o(c,d){s?s===!0?this.triggerDownload(c,d,e,t,!0):s(c):this.triggerDownload(c,d,e,t)}if(typeof e=="function"?a=e:Qn.downloaders[e]?a=Qn.downloaders[e]:console.warn("Download Error - No such download type found: ",e),a){var u=this.generateExportList(r);a.call(this.table,u,i||{},o.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(r=>{var s;r.type==="group"&&(s=r.columns[0],i&&i[r.indent]&&(s.value=i[r.indent](s.value,r.component._group.getRowCount(),r.component._group.getData(),r.component)))}),t}triggerDownload(e,t,i,r,s){var a=document.createElement("a"),o=this.table.options.downloadEncoder(e,t);o&&(s?window.open(window.URL.createObjectURL(o)):(r=r||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(o,r):(a.setAttribute("href",window.URL.createObjectURL(o)),a.setAttribute("download",r),a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}}function er(n,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",r=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",s=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function a(o){var u=t[o];typeof u<"u"&&u!==s&&u!==i&&u!==r&&(n.value=n.value+""+u,a(o+1))}n.addEventListener("keydown",o=>{var u=n.value.length,c=o.key;if(o.keyCode>46&&!o.ctrlKey&&!o.metaKey){if(u>=t.length)return o.preventDefault(),o.stopPropagation(),!1;switch(t[u]){case i:if(c.toUpperCase()==c.toLowerCase())return o.preventDefault(),o.stopPropagation(),!1;break;case r:if(isNaN(c))return o.preventDefault(),o.stopPropagation(),!1;break;case s:break;default:if(c!==t[u])return o.preventDefault(),o.stopPropagation(),!1}}}),n.addEventListener("keyup",o=>{o.keyCode>46&&e.maskAutoFill&&a(n.value.length)}),n.placeholder||(n.placeholder=t),e.maskAutoFill&&a(n.value.length)}function IC(n,e,t,i,r){var s=n.getValue(),a=document.createElement("input");if(a.setAttribute("type",r.search?"search":"text"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let u in r.elementAttributes)u.charAt(0)=="+"?(u=u.slice(1),a.setAttribute(u,a.getAttribute(u)+r.elementAttributes["+"+u])):a.setAttribute(u,r.elementAttributes[u]);a.value=typeof s<"u"?s:"",e(function(){n.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%",r.selectContents&&a.select())});function o(u){(s===null||typeof s>"u")&&a.value!==""||a.value!==s?t(a.value)&&(s=a.value):i()}return a.addEventListener("change",o),a.addEventListener("blur",o),a.addEventListener("keydown",function(u){switch(u.keyCode){case 13:o();break;case 27:i();break;case 35:case 36:u.stopPropagation();break}}),r.mask&&er(a,r),a}function $C(n,e,t,i,r){var s=n.getValue(),a=r.verticalNavigation||"hybrid",o=String(s!==null&&typeof s<"u"?s:""),u=document.createElement("textarea"),c=0;if(u.style.display="block",u.style.padding="2px",u.style.height="100%",u.style.width="100%",u.style.boxSizing="border-box",u.style.whiteSpace="pre-wrap",u.style.resize="none",r.elementAttributes&&typeof r.elementAttributes=="object")for(let p in r.elementAttributes)p.charAt(0)=="+"?(p=p.slice(1),u.setAttribute(p,u.getAttribute(p)+r.elementAttributes["+"+p])):u.setAttribute(p,r.elementAttributes[p]);u.value=o,e(function(){n.getType()==="cell"&&(u.focus({preventScroll:!0}),u.style.height="100%",u.scrollHeight,u.style.height=u.scrollHeight+"px",n.getRow().normalizeHeight(),r.selectContents&&u.select())});function d(p){(s===null||typeof s>"u")&&u.value!==""||u.value!==s?(t(u.value)&&(s=u.value),setTimeout(function(){n.getRow().normalizeHeight()},300)):i()}return u.addEventListener("change",d),u.addEventListener("blur",d),u.addEventListener("keyup",function(){u.style.height="";var p=u.scrollHeight;u.style.height=p+"px",p!=c&&(c=p,n.getRow().normalizeHeight())}),u.addEventListener("keydown",function(p){switch(p.keyCode){case 13:p.shiftKey&&r.shiftEnterSubmit&&d();break;case 27:i();break;case 38:(a=="editor"||a=="hybrid"&&u.selectionStart)&&(p.stopImmediatePropagation(),p.stopPropagation());break;case 40:(a=="editor"||a=="hybrid"&&u.selectionStart!==u.value.length)&&(p.stopImmediatePropagation(),p.stopPropagation());break;case 35:case 36:p.stopPropagation();break}}),r.mask&&er(u,r),u}function jC(n,e,t,i,r){var s=n.getValue(),a=r.verticalNavigation||"editor",o=document.createElement("input");if(o.setAttribute("type","number"),typeof r.max<"u"&&o.setAttribute("max",r.max),typeof r.min<"u"&&o.setAttribute("min",r.min),typeof r.step<"u"&&o.setAttribute("step",r.step),o.style.padding="4px",o.style.width="100%",o.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let d in r.elementAttributes)d.charAt(0)=="+"?(d=d.slice(1),o.setAttribute(d,o.getAttribute(d)+r.elementAttributes["+"+d])):o.setAttribute(d,r.elementAttributes[d]);o.value=s;var u=function(d){c()};e(function(){n.getType()==="cell"&&(o.removeEventListener("blur",u),o.focus({preventScroll:!0}),o.style.height="100%",o.addEventListener("blur",u),r.selectContents&&o.select())});function c(){var d=o.value;!isNaN(d)&&d!==""&&(d=Number(d)),d!==s?t(d)&&(s=d):i()}return o.addEventListener("keydown",function(d){switch(d.keyCode){case 13:c();break;case 27:i();break;case 38:case 40:a=="editor"&&(d.stopImmediatePropagation(),d.stopPropagation());break;case 35:case 36:d.stopPropagation();break}}),r.mask&&er(o,r),o}function WC(n,e,t,i,r){var s=n.getValue(),a=document.createElement("input");if(a.setAttribute("type","range"),typeof r.max<"u"&&a.setAttribute("max",r.max),typeof r.min<"u"&&a.setAttribute("min",r.min),typeof r.step<"u"&&a.setAttribute("step",r.step),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let u in r.elementAttributes)u.charAt(0)=="+"?(u=u.slice(1),a.setAttribute(u,a.getAttribute(u)+r.elementAttributes["+"+u])):a.setAttribute(u,r.elementAttributes[u]);a.value=s,e(function(){n.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%")});function o(){var u=a.value;!isNaN(u)&&u!==""&&(u=Number(u)),u!=s?t(u)&&(s=u):i()}return a.addEventListener("blur",function(u){o()}),a.addEventListener("keydown",function(u){switch(u.keyCode){case 13:o();break;case 27:i();break}}),a}function GC(n,e,t,i,r){var s=r.format,a=r.verticalNavigation||"editor",o=s?window.DateTime||luxon.DateTime:null,u=n.getValue(),c=document.createElement("input");function d(h){var f;return o.isDateTime(h)?f=h:s==="iso"?f=o.fromISO(String(h)):f=o.fromFormat(String(h),s),f.toFormat("yyyy-MM-dd")}if(c.type="date",c.style.padding="4px",c.style.width="100%",c.style.boxSizing="border-box",r.max&&c.setAttribute("max",s?d(r.max):r.max),r.min&&c.setAttribute("min",s?d(r.min):r.min),r.elementAttributes&&typeof r.elementAttributes=="object")for(let h in r.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),c.setAttribute(h,c.getAttribute(h)+r.elementAttributes["+"+h])):c.setAttribute(h,r.elementAttributes[h]);u=typeof u<"u"?u:"",s&&(o?u=d(u):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),c.value=u,e(function(){n.getType()==="cell"&&(c.focus({preventScroll:!0}),c.style.height="100%",r.selectContents&&c.select())});function p(){var h=c.value,f;if((u===null||typeof u>"u")&&h!==""||h!==u){if(h&&s)switch(f=o.fromFormat(String(h),"yyyy-MM-dd"),s){case!0:h=f;break;case"iso":h=f.toISO();break;default:h=f.toFormat(s)}t(h)&&(u=c.value)}else i()}return c.addEventListener("blur",function(h){(h.relatedTarget||h.rangeParent||h.explicitOriginalTarget!==c)&&p()}),c.addEventListener("keydown",function(h){switch(h.keyCode){case 13:p();break;case 27:i();break;case 35:case 36:h.stopPropagation();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break}}),c}function YC(n,e,t,i,r){var s=r.format,a=r.verticalNavigation||"editor",o=s?window.DateTime||luxon.DateTime:null,u,c=n.getValue(),d=document.createElement("input");if(d.type="time",d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let h in r.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),d.setAttribute(h,d.getAttribute(h)+r.elementAttributes["+"+h])):d.setAttribute(h,r.elementAttributes[h]);c=typeof c<"u"?c:"",s&&(o?(o.isDateTime(c)?u=c:s==="iso"?u=o.fromISO(String(c)):u=o.fromFormat(String(c),s),c=u.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),d.value=c,e(function(){n.getType()=="cell"&&(d.focus({preventScroll:!0}),d.style.height="100%",r.selectContents&&d.select())});function p(){var h=d.value,f;if((c===null||typeof c>"u")&&h!==""||h!==c){if(h&&s)switch(f=o.fromFormat(String(h),"hh:mm"),s){case!0:h=f;break;case"iso":h=f.toISO();break;default:h=f.toFormat(s)}t(h)&&(c=d.value)}else i()}return d.addEventListener("blur",function(h){(h.relatedTarget||h.rangeParent||h.explicitOriginalTarget!==d)&&p()}),d.addEventListener("keydown",function(h){switch(h.keyCode){case 13:p();break;case 27:i();break;case 35:case 36:h.stopPropagation();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break}}),d}function UC(n,e,t,i,r){var s=r.format,a=r.verticalNavigation||"editor",o=s?this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"):null,u,c=n.getValue(),d=document.createElement("input");if(d.type="datetime-local",d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let h in r.elementAttributes)h.charAt(0)=="+"?(h=h.slice(1),d.setAttribute(h,d.getAttribute(h)+r.elementAttributes["+"+h])):d.setAttribute(h,r.elementAttributes[h]);c=typeof c<"u"?c:"",s&&(o?(o.isDateTime(c)?u=c:s==="iso"?u=o.fromISO(String(c)):u=o.fromFormat(String(c),s),c=u.toFormat("yyyy-MM-dd")+"T"+u.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),d.value=c,e(function(){n.getType()==="cell"&&(d.focus({preventScroll:!0}),d.style.height="100%",r.selectContents&&d.select())});function p(){var h=d.value,f;if((c===null||typeof c>"u")&&h!==""||h!==c){if(h&&s)switch(f=o.fromISO(String(h)),s){case!0:h=f;break;case"iso":h=f.toISO();break;default:h=f.toFormat(s)}t(h)&&(c=d.value)}else i()}return d.addEventListener("blur",function(h){(h.relatedTarget||h.rangeParent||h.explicitOriginalTarget!==d)&&p()}),d.addEventListener("keydown",function(h){switch(h.keyCode){case 13:p();break;case 27:i();break;case 35:case 36:h.stopPropagation();break;case 38:case 40:a=="editor"&&(h.stopImmediatePropagation(),h.stopPropagation());break}}),d}let qC=class{constructor(e,t,i,r,s,a){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(a),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:r,cancel:s},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&er(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(r=>t.includes(r)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t<this.displayItems.length-1)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t<this.displayItems.length-1&&(t==-1?this._focusItem(this.displayItems[0]):this._focusItem(this.displayItems[t+1])))}_keySide(e){this.params.autocomplete||(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault())}_keyEnter(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem)}_keyEsc(e){this._cancel()}_keyHomeEnd(e){this.params.autocomplete&&e.stopImmediatePropagation()}_keySelectLetter(e){this.params.autocomplete||(e.preventDefault(),e.keyCode>=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(r=>typeof r.label<"u"&&r.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(r=>this.listIteration===i?this._parseList(r):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=yc(e,{},i),fetch(e).then(r=>r.ok?r.json().catch(s=>(console.warn("List Ajax Load Error - Invalid JSON returned",s),Promise.reject(s))):(console.error("List Ajax Load Error - Connection Error: "+r.status,r.statusText),Promise.reject(r))).catch(r=>(console.error("List Ajax Load Error - Connection Error: ",r),Promise.reject(r)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),r;return e?r=this.table.columnManager.getColumnByField(e):r=this.cell.getColumn()._getSelf(),r?i.forEach(s=>{var a=r.getFieldValue(s);this._emptyValueCheck(a)||(this.params.multiselect&&Array.isArray(a)?a.forEach(o=>{this._emptyValueCheck(o)||(t[o]=!0)}):t[a]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_emptyValueCheck(e){return e===null||typeof e>"u"||e===""}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,r])=>({label:r,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var r={};e.options?r=this._parseListGroup(e,i+1):(r={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(r,!0)),t.push(r)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(r=>{this._parseListItem(r,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,r)=>e(i.label,r.label,i.value,r.value,i.original,r.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,r,s,a,o=0,u,c=/(\d+)|(\D+)/g,d=/\d/,p=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)p=!t&&t!==0?0:-1;else if(!t&&t!==0)p=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),r=String(t).toLowerCase(),i===r)return 0;if(!(d.test(i)&&d.test(r)))return i>r?1:-1;for(i=i.match(c),r=r.match(c),u=i.length>r.length?r.length:i.length;o<u;)if(s=i[o],a=r[o++],s!==a)return isFinite(s)&&isFinite(a)?(s.charAt(0)==="0"&&(s="."+s),a.charAt(0)==="0"&&(a="."+a),s-a):s>a?1:-1;return i.length>r.length}return p}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var r=!1;return i.group?(i.options.forEach(s=>{this._filterItem(e,t,s)&&(r=!0)}),i.visible=r):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,r){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let r in e.elementAttributes)r.charAt(0)=="+"?(r=r.slice(1),t.setAttribute(r,this.input.getAttribute(r)+e.elementAttributes["+"+r])):t.setAttribute(r,e.elementAttributes[r]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(r=>{this._buildItem(r)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(r=>r.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(r=>r.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}};function KC(n,e,t,i,r){var s=new qC(this,n,e,t,i,r);return s.input}function JC(n,e,t,i,r){var s=this,a=n.getElement(),o=n.getValue(),u=a.getElementsByTagName("svg").length||5,c=a.getElementsByTagName("svg")[0]?a.getElementsByTagName("svg")[0].getAttribute("width"):14,d=[],p=document.createElement("div"),h=document.createElementNS("http://www.w3.org/2000/svg","svg");function f(y){d.forEach(function(v,R){R<y?(s.table.browser=="ie"?v.setAttribute("class","tabulator-star-active"):v.classList.replace("tabulator-star-inactive","tabulator-star-active"),v.innerHTML='<polygon fill="#488CE9" stroke="#014AAE" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>'):(s.table.browser=="ie"?v.setAttribute("class","tabulator-star-inactive"):v.classList.replace("tabulator-star-active","tabulator-star-inactive"),v.innerHTML='<polygon fill="#010155" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>')})}function _(y){var v=document.createElement("span"),R=h.cloneNode(!0);d.push(R),v.addEventListener("mouseenter",function(m){m.stopPropagation(),m.stopImmediatePropagation(),f(y)}),v.addEventListener("mousemove",function(m){m.stopPropagation(),m.stopImmediatePropagation()}),v.addEventListener("click",function(m){m.stopPropagation(),m.stopImmediatePropagation(),t(y),a.blur()}),v.appendChild(R),p.appendChild(v)}function k(y){o=y,f(y)}if(a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",p.style.verticalAlign="middle",p.style.display="inline-block",p.style.padding="4px",h.setAttribute("width",c),h.setAttribute("height",c),h.setAttribute("viewBox","0 0 512 512"),h.setAttribute("xml:space","preserve"),h.style.padding="0 1px",r.elementAttributes&&typeof r.elementAttributes=="object")for(let y in r.elementAttributes)y.charAt(0)=="+"?(y=y.slice(1),p.setAttribute(y,p.getAttribute(y)+r.elementAttributes["+"+y])):p.setAttribute(y,r.elementAttributes[y]);for(var w=1;w<=u;w++)_(w);return o=Math.min(parseInt(o),u),f(o),p.addEventListener("mousemove",function(y){f(0)}),p.addEventListener("click",function(y){t(0)}),a.addEventListener("blur",function(y){i()}),a.addEventListener("keydown",function(y){switch(y.keyCode){case 39:k(o+1);break;case 37:k(o-1);break;case 13:t(o);break;case 27:i();break}}),p}function XC(n,e,t,i,r){var s=n.getElement(),a=typeof r.max>"u"?s.getElementsByTagName("div")[0]&&s.getElementsByTagName("div")[0].getAttribute("max")||100:r.max,o=typeof r.min>"u"?s.getElementsByTagName("div")[0]&&s.getElementsByTagName("div")[0].getAttribute("min")||0:r.min,u=(a-o)/100,c=n.getValue()||0,d=document.createElement("div"),p=document.createElement("div"),h,f;function _(){var k=window.getComputedStyle(s,null),w=u*Math.round(p.offsetWidth/((s.clientWidth-parseInt(k.getPropertyValue("padding-left"))-parseInt(k.getPropertyValue("padding-right")))/100))+o;t(w),s.setAttribute("aria-valuenow",w),s.setAttribute("aria-label",c)}if(d.style.position="absolute",d.style.right="0",d.style.top="0",d.style.bottom="0",d.style.width="5px",d.classList.add("tabulator-progress-handle"),p.style.display="inline-block",p.style.position="relative",p.style.height="100%",p.style.backgroundColor="#488CE9",p.style.maxWidth="100%",p.style.minWidth="0%",r.elementAttributes&&typeof r.elementAttributes=="object")for(let k in r.elementAttributes)k.charAt(0)=="+"?(k=k.slice(1),p.setAttribute(k,p.getAttribute(k)+r.elementAttributes["+"+k])):p.setAttribute(k,r.elementAttributes[k]);return s.style.padding="4px 4px",c=Math.min(parseFloat(c),a),c=Math.max(parseFloat(c),o),c=Math.round((c-o)/u),p.style.width=c+"%",s.setAttribute("aria-valuemin",o),s.setAttribute("aria-valuemax",a),p.appendChild(d),d.addEventListener("mousedown",function(k){h=k.screenX,f=p.offsetWidth}),d.addEventListener("mouseover",function(){d.style.cursor="ew-resize"}),s.addEventListener("mousemove",function(k){h&&(p.style.width=f+k.screenX-h+"px")}),s.addEventListener("mouseup",function(k){h&&(k.stopPropagation(),k.stopImmediatePropagation(),h=!1,f=!1,_())}),s.addEventListener("keydown",function(k){switch(k.keyCode){case 39:k.preventDefault(),p.style.width=p.clientWidth+s.clientWidth/100+"px";break;case 37:k.preventDefault(),p.style.width=p.clientWidth-s.clientWidth/100+"px";break;case 9:case 13:_();break;case 27:i();break}}),s.addEventListener("blur",function(){i()}),p}function ZC(n,e,t,i,r){var s=n.getValue(),a=document.createElement("input"),o=r.tristate,u=typeof r.indeterminateValue>"u"?null:r.indeterminateValue,c=!1,d=Object.keys(r).includes("trueValue"),p=Object.keys(r).includes("falseValue");if(a.setAttribute("type","checkbox"),a.style.marginTop="5px",a.style.boxSizing="border-box",r.elementAttributes&&typeof r.elementAttributes=="object")for(let f in r.elementAttributes)f.charAt(0)=="+"?(f=f.slice(1),a.setAttribute(f,a.getAttribute(f)+r.elementAttributes["+"+f])):a.setAttribute(f,r.elementAttributes[f]);a.value=s,o&&(typeof s>"u"||s===u||s==="")&&(c=!0,a.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){n.getType()==="cell"&&a.focus({preventScroll:!0})}),a.checked=d?s===r.trueValue:s===!0||s==="true"||s==="True"||s===1;function h(f){var _=a.checked;return d&&_?_=r.trueValue:p&&!_&&(_=r.falseValue),o?f?c?u:_:a.checked&&!c?(a.checked=!1,a.indeterminate=!0,c=!0,u):(c=!1,_):_}return a.addEventListener("change",function(f){t(h())}),a.addEventListener("blur",function(f){t(h(!0))}),a.addEventListener("keydown",function(f){f.keyCode==13&&t(h()),f.keyCode==27&&i()}),a}function QC(n,e,t,i,r){var s=n._getSelf().column,a,o,u;function c(d){var p=d.getValue(),h="input";switch(typeof p){case"number":h="number";break;case"boolean":h="tickCross";break;case"string":p.includes(`
|
|
36
|
+
`)&&(h="textarea");break}return h}return a=r.editorLookup?r.editorLookup(n):c(n),r.paramsLookup&&(u=typeof r.paramsLookup=="function"?r.paramsLookup(a,n):r.paramsLookup[a]),o=this.table.modules.edit.lookupEditor(a,s),o.call(this,n,e,t,i,u||{})}var e0={input:IC,textarea:$C,number:jC,range:WC,date:GC,time:YC,datetime:UC,list:KC,star:JC,progress:XC,tickCross:ZC,adaptable:QC};class da extends Pe{static moduleName="edit";static editors=e0;constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.convertEmptyValues=!1,this.editors=da.editors,this.registerTableOption("editTriggerEvent","focus"),this.registerTableOption("editorEmptyValue"),this.registerTableOption("editorEmptyValueFunc",this.emptyValueCheck.bind(this)),this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("editorEmptyValue"),this.registerColumnOption("editorEmptyValueFunc"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("clipboard-paste",this.pasteBlocker.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0)),Object.keys(this.table.options).includes("editorEmptyValue")&&(this.convertEmptyValues=!0)}pasteBlocker(e){if(this.currentCell)return!0}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),this.invalidEdit||(i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})}))))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,r;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(r=this.table.rowManager.prevDisplayRow(e.row,!0),r&&(i=this.findPrevEditableCell(r,r.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,r;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(r=this.table.rowManager.nextDisplayRow(e.row,!0),r&&(i=this.findNextEditableCell(r,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.findPrevEditableCell(e.row,i),r)?(r.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.findNextEditableCell(e.row,i),r)?(r.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.table.rowManager.prevDisplayRow(e.row,!0),r)?(r.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,r;return e&&(t&&t.preventDefault(),i=e.getIndex(),r=this.table.rowManager.nextDisplayRow(e.row,!0),r)?(r.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t<e.cells.length-1)for(var r=t+1;r<e.cells.length;r++){let s=e.cells[r];if(s.column.modules.edit&&Ke.elVisible(s.getElement())&&this.allowEdit(s)){i=s;break}}return i}findPrevEditableCell(e,t){var i=!1;if(t>0)for(var r=t-1;r>=0;r--){let s=e.cells[r];if(s.column.modules.edit&&Ke.elVisible(s.getElement())&&this.allowEdit(s)){i=s;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t=Object.keys(e.definition).includes("editorEmptyValue"),i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{},convertEmptyValues:t,editorEmptyValue:e.definition.editorEmptyValue,editorEmptyValueFunc:e.definition.editorEmptyValueFunc};i.editor=this.lookupEditor(e.definition.editor,e),i.editor&&(e.modules.edit=i)}lookupEditor(e,t){var i;switch(typeof e){case"string":this.editors[e]?i=this.editors[e]:console.warn("Editor Error - No such editor found: ",e);break;case"function":i=e;break;case"boolean":e===!0&&(typeof t.definition.formatter!="function"?this.editors[t.definition.formatter]?i=this.editors[t.definition.formatter]:i=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",t.definition.formatter));break}return i}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("mousedown",function(r){r.button===2?r.preventDefault():t.mouseClick=!0}),this.options("editTriggerEvent")==="dblclick"&&i.addEventListener("dblclick",function(r){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,r,!1))}),(this.options("editTriggerEvent")==="focus"||this.options("editTriggerEvent")==="click")&&i.addEventListener("click",function(r){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,r,!1))}),this.options("editTriggerEvent")==="focus"&&i.addEventListener("focus",function(r){t.recursionBlock||t.edit(e,r,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,r=e.row.getElement();r.offsetTop<t?this.table.rowManager.element.scrollTop-=t-r.offsetTop:r.offsetTop+r.offsetHeight>i&&(this.table.rowManager.element.scrollTop+=r.offsetTop+r.offsetHeight-i);var s=this.table.rowManager.element.scrollLeft,a=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,o=e.getElement();this.table.modExists("frozenColumns")&&(s+=parseInt(this.table.modules.frozenColumns.leftMargin||0),a-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(s-=parseInt(this.table.columnManager.renderer.vDomPadLeft),a-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),o.offsetLeft<s?this.table.rowManager.element.scrollLeft-=s-o.offsetLeft:o.offsetLeft+o.offsetWidth>a&&(this.table.rowManager.element.scrollLeft+=o.offsetLeft+o.offsetWidth-a)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var r=this,s=!0,a=function(){},o=e.getElement(),u=!1,c,d,p;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function h(y){if(r.currentCell===e&&!u){var v=r.chain("edit-success",[e,y],!0,!0);return v===!0||r.table.options.validationMode==="highlight"?(u=!0,r.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,r.editedCells.indexOf(e)==-1&&r.editedCells.push(e),y=r.transformEmptyValues(y,e),e.setValue(y,!0),v===!0):(u=!0,r.invalidEdit=!0,r.focusCellNoEvent(e,!0),a(),setTimeout(()=>{u=!1},10),!1)}}function f(){r.currentCell===e&&!u&&r.cancelEdit()}function _(y){a=y}if(e.column.modules.edit.blocked)return this.mouseClick=!1,this.blur(o),!1;if(t&&t.stopPropagation(),s=this.allowEdit(e),s||i){if(r.cancelEdit(),r.currentCell=e,this.focusScrollAdjust(e),d=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,d)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,d),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",d),p=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(d):e.column.modules.edit.params,c=e.column.modules.edit.editor.call(r,d,_,h,f,p),this.currentCell&&c!==!1)if(c instanceof Node){for(o.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");o.firstChild;)o.removeChild(o.firstChild);o.appendChild(c),a();for(var k=o.children,w=0;w<k.length;w++)k[w].addEventListener("click",function(y){y.stopPropagation()})}else return console.warn("Edit Error - Editor should return an instance of Node, the editor returned:",c),this.blur(o),!1;else return this.blur(o),!1;return!0}else return this.mouseClick=!1,this.blur(o),!1}emptyValueCheck(e){return e===""||e===null||typeof e>"u"}transformEmptyValues(e,t){var i=t.column.modules.edit,r=i.convertEmptyValues||this.convertEmptyValues,s;return r&&(s=i.editorEmptyValueFunc||this.options("editorEmptyValueFunc"),s&&s(e)&&(e=i.convertEmptyValues?i.editorEmptyValue:this.options("editorEmptyValue"))),e}blur(e){this.confirm("edit-blur",[e])||e.blur()}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}}class kc{constructor(e,t,i,r){this.type=e,this.columns=t,this.component=i||!1,this.indent=r||0}}class ha{constructor(e,t,i,r,s){this.value=e,this.component=t||!1,this.width=i,this.height=r,this.depth=s}}var t0={},i0={visible:function(){return this.rowManager.getVisibleRows(!1,!0)},all:function(){return this.rowManager.rows},selected:function(){return this.modules.selectRow.selectedRows},active:function(){return this.options.pagination?this.rowManager.getDisplayRows(this.rowManager.displayRows.length-2):this.rowManager.getDisplayRows()}};class cn extends Pe{static moduleName="export";static columnLookups=t0;static rowLookups=i0;constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.colVisPropAttach="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,r){var s,a,o,u;return this.cloneTableStyle=t,this.config=e||{},this.colVisProp=r,this.colVisPropAttach=this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1),u=cn.columnLookups[i],u&&(o=u.call(this.table),o=o.filter(c=>this.columnVisCheck(c))),s=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders(o)):[],o&&(o=o.map(c=>c.getComponent())),a=this.bodyToExportRows(this.rowLookup(i),o),s.concat(a)}generateTable(e,t,i,r){var s=this.generateExportList(e,t,i,r);return this.generateTableElement(s)}rowLookup(e){var t=[],i;return typeof e=="function"?e.call(this.table).forEach(r=>{r=this.table.rowManager.findRow(r),r&&t.push(r)}):(i=cn.rowLookups[e]||cn.rowLookups.active,t=i.call(this.table)),Object.assign([],t)}generateColumnGroupHeaders(e){var t=[];return e||(e=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex),e.forEach(i=>{var r=this.processColumnGroup(i);r&&t.push(r)}),t}processColumnGroup(e){var t=e.columns,i=0,r=e.definition["title"+this.colVisPropAttach]||e.definition.title,s={title:r,column:e,depth:1};if(t.length){if(s.subGroups=[],s.width=0,t.forEach(a=>{var o=this.processColumnGroup(a);o&&(s.width+=o.width,s.subGroups.push(o),o.depth>i&&(i=o.depth))}),s.depth+=i,!s.width)return!1}else if(this.columnVisCheck(e))s.width=1;else return!1;return s}columnVisCheck(e){var t=e.definition[this.colVisProp];return this.config.rowHeaders===!1&&e.isRowHeader?!1:(typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t===!1||t===!0?t:e.visible&&e.field)}headersToExportRows(e){var t=[],i=0,r=[];function s(a,o){var u=i-o;if(typeof t[o]>"u"&&(t[o]=[]),a.height=a.subGroups?1:u-a.depth+1,t[o].push(a),a.height>1)for(let c=1;c<a.height;c++)typeof t[o+c]>"u"&&(t[o+c]=[]),t[o+c].push(!1);if(a.width>1)for(let c=1;c<a.width;c++)t[o].push(!1);a.subGroups&&a.subGroups.forEach(function(c){s(c,o+1)})}return e.forEach(function(a){a.depth>i&&(i=a.depth)}),e.forEach(function(a){s(a,0)}),t.forEach(a=>{var o=[];a.forEach(u=>{if(u){let c=typeof u.title>"u"?"":u.title;o.push(new ha(c,u.column.getComponent(),u.width,u.height,u.depth))}else o.push(null)}),r.push(new kc("header",o))}),r}bodyToExportRows(e,t=[]){var i=[];return t.length===0&&this.table.columnManager.columnsByIndex.forEach(r=>{this.columnVisCheck(r)&&t.push(r.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(r=>{switch(r.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&r.modules.dataTree.parent)}return!0}),e.forEach((r,s)=>{var a=r.getData(this.colVisProp),o=[],u=0;switch(r.type){case"group":u=r.level,o.push(new ha(r.key,r.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(c=>{o.push(new ha(c._column.getFieldValue(a),c,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(u=r.modules.dataTree.index);break}i.push(new kc(r.type,o,r.getComponent(),u))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),r=document.createElement("tbody"),s=this.lookupTableStyles(),a=this.table.options["rowFormatter"+this.colVisPropAttach],o={};return o.rowFormatter=a!==null?a:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(o.treeElementField=this.table.modules.dataTree.elementField),o.groupHeader=this.table.options["groupHeader"+this.colVisPropAttach],o.groupHeader&&!Array.isArray(o.groupHeader)&&(o.groupHeader=[o.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((u,c)=>{let d;switch(u.type){case"header":i.appendChild(this.generateHeaderElement(u,o,s));break;case"group":r.appendChild(this.generateGroupElement(u,o,s));break;case"calc":r.appendChild(this.generateCalcElement(u,o,s));break;case"row":d=this.generateRowElement(u,o,s),this.mapElementStyles(c%2&&s.evenRow?s.evenRow:s.oddRow,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r.appendChild(d);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(r),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.styleRowHeader=e.firstRow.getElementsByClassName("tabulator-row-header")[0],e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var r=document.createElement("tr");return e.columns.forEach(s=>{if(s){var a=document.createElement("th"),o=s.component._column.definition.cssClass?s.component._column.definition.cssClass.split(" "):[];a.colSpan=s.width,a.rowSpan=s.height,a.innerHTML=s.value,this.cloneTableStyle&&(a.style.boxSizing="border-box"),o.forEach(function(u){a.classList.add(u)}),this.mapElementStyles(s.component.getElement(),a,["text-align","border-left","border-right","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(s.component._column.contentElement,a,["padding-top","padding-left","padding-right","padding-bottom"]),s.component._column.visible?this.mapElementStyles(s.component.getElement(),a,["width"]):s.component._column.definition.width&&(a.style.width=s.component._column.definition.width+"px"),s.component._column.parent&&s.component._column.parent.isGroup?this.mapElementStyles(s.component._column.parent.groupElement,a,["border-top"]):this.mapElementStyles(s.component.getElement(),a,["border-top"]),s.component._column.isGroup?this.mapElementStyles(s.component.getElement(),a,["border-bottom"]):this.mapElementStyles(this.table.columnManager.getElement(),a,["border-bottom"]),r.appendChild(a)}}),r}generateGroupElement(e,t,i){var r=document.createElement("tr"),s=document.createElement("td"),a=e.columns[0];return r.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?a.value=t.groupHeader[e.indent](a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(a.value=e.component._group.generator(a.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),s.colSpan=a.width,s.innerHTML=a.value,r.classList.add("tabulator-print-table-group"),r.classList.add("tabulator-group-level-"+e.indent),a.component.isVisible()&&r.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,s,["padding-top","padding-left","padding-right","padding-bottom"]),r.appendChild(s),r}generateCalcElement(e,t,i){var r=this.generateRowElement(e,t,i);return r.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,r,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),r}generateRowElement(e,t,i){var r=document.createElement("tr");if(r.classList.add("tabulator-print-table-row"),e.columns.forEach((s,a)=>{if(s){var o=document.createElement("td"),u=s.component._column,c=this.table,d=c.columnManager.findColumnIndex(u),p=s.value,h,f,_={modules:{},getValue:function(){return p},getField:function(){return u.definition.field},getElement:function(){return o},getType:function(){return"cell"},getColumn:function(){return u.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getTable:function(){return c},getComponent:function(){return _},column:u},k=u.definition.cssClass?u.definition.cssClass.split(" "):[];if(k.forEach(function(w){o.classList.add(w)}),this.table.modExists("format")&&this.config.formatCells!==!1)p=this.table.modules.format.formatExportValue(_,this.colVisProp);else switch(typeof p){case"object":p=p!==null?JSON.stringify(p):"";break;case"undefined":p="";break}p instanceof Node?o.appendChild(p):o.innerHTML=p,f=["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"],u.isRowHeader?(h=i.styleRowHeader,f.push("background-color")):h=i.styleCells&&i.styleCells[d]?i.styleCells[d]:i.firstCell,h&&(this.mapElementStyles(h,o,f),u.definition.align&&(o.style.textAlign=u.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==u.field||!t.treeElementField&&a==0)&&(e.component._row.modules.dataTree.controlEl&&o.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),o.firstChild),e.component._row.modules.dataTree.branchEl&&o.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),o.firstChild)),r.appendChild(o),_.modules.format&&_.modules.format.renderedCallback&&_.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let s=Object.assign(e.component);s.getElement=function(){return r},t.rowFormatter(e.component)}return r}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,r){var s=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,r||"htmlOutput");return this.generateHTMLTable(s)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var r={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var s=window.getComputedStyle(e);i.forEach(function(a){t.style[r[a]]||(t.style[r[a]]=s.getPropertyValue(a))})}}}}var n0={"=":function(n,e,t,i){return e==n},"<":function(n,e,t,i){return e<n},"<=":function(n,e,t,i){return e<=n},">":function(n,e,t,i){return e>n},">=":function(n,e,t,i){return e>=n},"!=":function(n,e,t,i){return e!=n},regex:function(n,e,t,i){return typeof n=="string"&&(n=new RegExp(n)),n.test(e)},like:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(n.toLowerCase())>-1:!1},keywords:function(n,e,t,i){var r=n.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),s=String(e===null||typeof e>"u"?"":e).toLowerCase(),a=[];return r.forEach(o=>{s.includes(o)&&a.push(!0)}),i.matchAll?a.length===r.length:!!a.length},starts:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(n.toLowerCase()):!1},ends:function(n,e,t,i){return n===null||typeof n>"u"?e===n:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(n.toLowerCase()):!1},in:function(n,e,t,i){return Array.isArray(n)?n.length?n.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",n),!1)}};class gi extends Pe{static moduleName="filter";static filters=n0;constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,r){return r.filter=this.getFilters(!0,!0),r}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,r){this.setFilter(e,t,i,r),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,r){this.addFilter(e,t,i,r),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,r=e.getField();function s(a){var o=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",u="",c="",d;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==a){if(e.modules.filter.prevSuccess=a,e.modules.filter.emptyFunc(a))delete i.headerFilters[r];else{switch(e.modules.filter.value=a,typeof e.definition.headerFilterFunc){case"string":gi.filters[e.definition.headerFilterFunc]?(u=e.definition.headerFilterFunc,d=function(p){var h=e.definition.headerFilterFuncParams||{},f=e.getFieldValue(p);return h=typeof h=="function"?h(a,f,p):h,gi.filters[e.definition.headerFilterFunc](a,f,p,h)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":d=function(p){var h=e.definition.headerFilterFuncParams||{},f=e.getFieldValue(p);return h=typeof h=="function"?h(a,f,p):h,e.definition.headerFilterFunc(a,f,p,h)},u=d;break}if(!d)switch(o){case"partial":d=function(p){var h=e.getFieldValue(p);return typeof h<"u"&&h!==null?String(h).toLowerCase().indexOf(String(a).toLowerCase())>-1:!1},u="like";break;default:d=function(p){return e.getFieldValue(p)==a},u="="}i.headerFilters[r]={value:a,func:d,type:u}}e.modules.filter.value=a,c=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==c&&(i.prevHeaderFilterChangeCheck=c,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:s,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var r=this,s=e.modules.filter.success,a=e.getField(),o,u,c,d,p,h,f,_;e.modules.filter.value=t;function k(){}function w(y){_=y}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),a){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(y){return!y&&y!==0},o=document.createElement("div"),o.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":r.table.modules.edit.editors[e.definition.headerFilter]?(u=r.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(y){return y!==!0&&y!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":u=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?u=e.modules.edit.editor:e.definition.formatter&&r.table.modules.edit.editors[e.definition.formatter]?(u=r.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(y){return y!==!0&&y!==!1})):u=r.table.modules.edit.editors.input;break}if(u){if(d={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},f=e.definition.headerFilterParams||{},f=typeof f=="function"?f.call(r.table,d):f,c=u.call(this.table.modules.edit,d,w,s,k,f),!c){console.warn("Filter Error - Cannot add filter to "+a+" column, editor returned a value of false");return}if(!(c instanceof Node)){console.warn("Filter Error - Cannot add filter to "+a+" column, editor should return an instance of Node, the editor returned:",c);return}r.langBind("headerFilters|columns|"+e.definition.field,function(y){c.setAttribute("placeholder",typeof y<"u"&&y?y:e.definition.headerFilterPlaceholder||r.langText("headerFilters|default"))}),c.addEventListener("click",function(y){y.stopPropagation(),c.focus()}),c.addEventListener("focus",y=>{var v=this.table.columnManager.contentsElement.scrollLeft,R=this.table.rowManager.element.scrollLeft;v!==R&&(this.table.rowManager.scrollHorizontal(v),this.table.columnManager.scrollHorizontal(v))}),p=!1,h=function(y){p&&clearTimeout(p),p=setTimeout(function(){s(c.value)},r.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=c,e.modules.filter.attrType=c.hasAttribute("type")?c.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=c.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(c.addEventListener("keyup",h),c.addEventListener("search",h),e.modules.filter.attrType=="number"&&c.addEventListener("change",function(y){s(c.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&c.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&c.addEventListener("mousedown",function(y){y.stopPropagation()})),o.appendChild(c),e.contentElement.appendChild(o),i||r.headerFilterColumns.push(e),_&&_()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,r){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:r}]),this.addFilter(e)}addFilter(e,t,i,r){var s=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:r}]),e.forEach(a=>{a=this.findFilter(a),a&&(this.filterList.push(a),s=!0)}),s&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(r){return e.field(r,e.type||{})}:gi.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(r){return gi.filters[e.type](e.value,t.getFieldValue(r),r,e.params||{})}:i=function(r){return gi.filters[e.type](e.value,r[e.field],r,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(r){typeof r.type=="function"&&(r.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(r=>{var s;Array.isArray(r)?i.push(this.filtersToArray(r,t)):(s={field:r.field,type:r.type,value:r.value},t&&typeof s.type=="function"&&(s.type="function"),i.push(s))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(r=>{var s=-1;typeof r.field=="object"?s=this.filterList.findIndex(a=>r===a):s=this.filterList.findIndex(a=>r.field===a.field&&r.type===a.type&&r.value===a.value),s>-1?this.filterList.splice(s,1):console.warn("Filter Error - No matching filter type found, ignoring: ",r.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,r){var s=[],a=[];return Array.isArray(t)||(t=[{field:t,type:i,value:r}]),t.forEach(o=>{o=this.findFilter(o),o&&a.push(o)}),this.table.rowManager.rows.forEach(o=>{var u=!0;a.forEach(c=>{this.filterRecurse(c,o.getData())||(u=!1)}),u&&s.push(e==="data"?o.getData("data"):o.getComponent())}),s}filter(e,t){var i=[],r=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(s=>{this.filterRow(s)&&i.push(s)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(s=>{r.push(s.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),r)),i}filterRow(e,t){var i=!0,r=e.getData();this.filterList.forEach(a=>{this.filterRecurse(a,r)||(i=!1)});for(var s in this.headerFilters)this.headerFilters[s].func(r)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(r=>{this.filterRecurse(r,t)&&(i=!0)}):i=e.func(t),i}}function r0(n,e,t){return this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function s0(n,e,t){return n.getValue()}function a0(n,e,t){return n.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(n.getValue()))}function o0(n,e,t){var i=parseFloat(n.getValue()),r="",s,a,o,u,c,d=e.decimal||".",p=e.thousand||",",h=e.negativeSign||"-",f=e.symbol||"",_=!!e.symbolAfter,k=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(n.getValue()));if(i<0&&(i=Math.abs(i),r=h),s=k!==!1?i.toFixed(k):i,s=String(s).split("."),a=s[0],o=s.length>1?d+s[1]:"",e.thousand!==!1)for(u=/(\d+)(\d{3})/;u.test(a);)a=a.replace(u,"$1"+p+"$2");return c=a+o,r===!0?(c="("+c+")",_?c+f:f+c):_?r+c+f:r+f+c}function l0(n,e,t){var i=n.getValue(),r=e.urlPrefix||"",s=e.download,a=i,o=document.createElement("a"),u;function c(d,p){var h=d.shift(),f=p[h];return d.length&&typeof f=="object"?c(d,f):f}if(e.labelField&&(u=n.getData(),a=c(e.labelField.split(this.table.options.nestedFieldSeparator),u)),e.label)switch(typeof e.label){case"string":a=e.label;break;case"function":a=e.label(n);break}if(a){if(e.urlField&&(u=n.getData(),i=Ke.retrieveNestedData(this.table.options.nestedFieldSeparator,e.urlField,u)),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(n);break}return o.setAttribute("href",r+i),e.target&&o.setAttribute("target",e.target),e.download&&(typeof s=="function"?s=s(n):s=s===!0?"":s,o.setAttribute("download",s)),o.innerHTML=this.emptyToSpace(this.sanitizeHTML(a)),o}else return" "}function u0(n,e,t){var i=document.createElement("img"),r=n.getValue();switch(e.urlPrefix&&(r=e.urlPrefix+n.getValue()),e.urlSuffix&&(r=r+e.urlSuffix),i.setAttribute("src",r),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){n.getRow().normalizeHeight()}),i}function c0(n,e,t){var i=n.getValue(),r=n.getElement(),s=e.allowEmpty,a=e.allowTruthy,o=Object.keys(e).includes("trueValue"),u=typeof e.tickElement<"u"?e.tickElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>',c=typeof e.crossElement<"u"?e.crossElement:'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>';return o&&i===e.trueValue||!o&&(a&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(r.setAttribute("aria-checked",!0),u||""):s&&(i==="null"||i===""||i===null||typeof i>"u")?(r.setAttribute("aria-checked","mixed"),""):(r.setAttribute("aria-checked",!1),c||"")}function d0(n,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),r=e.inputFormat||"yyyy-MM-dd HH:mm:ss",s=e.outputFormat||"dd/MM/yyyy HH:mm:ss",a=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",o=n.getValue();if(typeof i<"u"){var u;return i.isDateTime(o)?u=o:r==="iso"?u=i.fromISO(String(o)):u=i.fromFormat(String(o),r),u.isValid?(e.timezone&&(u=u.setZone(e.timezone)),u.toFormat(s)):a===!0||!o?o:typeof a=="function"?a(o):a}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function h0(n,e,t){var i=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),r=e.inputFormat||"yyyy-MM-dd HH:mm:ss",s=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",a=typeof e.suffix<"u"?e.suffix:!1,o=typeof e.unit<"u"?e.unit:"days",u=typeof e.humanize<"u"?e.humanize:!1,c=typeof e.date<"u"?e.date:i.now(),d=n.getValue();if(typeof i<"u"){var p;return i.isDateTime(d)?p=d:r==="iso"?p=i.fromISO(String(d)):p=i.fromFormat(String(d),r),p.isValid?u?p.diff(c,o).toHuman()+(a?" "+a:""):parseInt(p.diff(c,o)[o])+(a?" "+a:""):s===!0?d:typeof s=="function"?s(d):s}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function f0(n,e,t){var i=n.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function p0(n,e,t){var i=n.getValue(),r=n.getElement(),s=e&&e.stars?e.stars:5,a=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),u='<polygon fill="#FFEA00" stroke="#C1AB60" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>',c='<polygon fill="#D2D2D2" stroke="#686868" stroke-width="37.6152" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="259.216,29.942 330.27,173.919 489.16,197.007 374.185,309.08 401.33,467.31 259.216,392.612 117.104,467.31 144.25,309.08 29.274,197.007 188.165,173.919 "/>';a.style.verticalAlign="middle",o.setAttribute("width","14"),o.setAttribute("height","14"),o.setAttribute("viewBox","0 0 512 512"),o.setAttribute("xml:space","preserve"),o.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,s));for(var d=1;d<=s;d++){var p=o.cloneNode(!0);p.innerHTML=d<=i?u:c,a.appendChild(p)}return r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",r.setAttribute("aria-label",i),a}function m0(n,e,t){var i=this.sanitizeHTML(n.getValue())||0,r=document.createElement("span"),s=e&&e.max?e.max:100,a=e&&e.min?e.min:0,o=e&&typeof e.color<"u"?e.color:["red","orange","green"],u="#666666",c,d;if(!(isNaN(i)||typeof n.getValue()>"u")){switch(r.classList.add("tabulator-traffic-light"),d=parseFloat(i)<=s?parseFloat(i):s,d=parseFloat(d)>=a?parseFloat(d):a,c=(s-a)/100,d=Math.round((d-a)/c),typeof o){case"string":u=o;break;case"function":u=o(i);break;case"object":if(Array.isArray(o)){var p=100/o.length,h=Math.floor(d/p);h=Math.min(h,o.length-1),h=Math.max(h,0),u=o[h];break}}return r.style.backgroundColor=u,r}}function g0(n,e={},t){var i=this.sanitizeHTML(n.getValue())||0,r=n.getElement(),s=e.max?e.max:100,a=e.min?e.min:0,o=e.legendAlign?e.legendAlign:"center",u,c,d,p,h;switch(c=parseFloat(i)<=s?parseFloat(i):s,c=parseFloat(c)>=a?parseFloat(c):a,u=(s-a)/100,c=Math.round((c-a)/u),typeof e.color){case"string":d=e.color;break;case"function":d=e.color(i);break;case"object":if(Array.isArray(e.color)){let w=100/e.color.length,y=Math.floor(c/w);y=Math.min(y,e.color.length-1),y=Math.max(y,0),d=e.color[y];break}default:d="#2DC214"}switch(typeof e.legend){case"string":p=e.legend;break;case"function":p=e.legend(i);break;case"boolean":p=i;break;default:p=!1}switch(typeof e.legendColor){case"string":h=e.legendColor;break;case"function":h=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let w=100/e.legendColor.length,y=Math.floor(c/w);y=Math.min(y,e.legendColor.length-1),y=Math.max(y,0),h=e.legendColor[y]}break;default:h="#000"}r.style.minWidth="30px",r.style.position="relative",r.setAttribute("aria-label",c);var f=document.createElement("div");f.style.display="inline-block",f.style.width=c+"%",f.style.backgroundColor=d,f.style.height="100%",f.setAttribute("data-max",s),f.setAttribute("data-min",a);var _=document.createElement("div");if(_.style.position="relative",_.style.width="100%",_.style.height="100%",p){var k=document.createElement("div");k.style.position="absolute",k.style.top=0,k.style.left=0,k.style.textAlign=o,k.style.width="100%",k.style.color=h,k.innerHTML=p}return t(function(){if(!(n instanceof wc)){var w=document.createElement("div");w.style.position="absolute",w.style.top="4px",w.style.bottom="4px",w.style.left="4px",w.style.right="4px",r.appendChild(w),r=w}r.appendChild(_),_.appendChild(f),p&&_.appendChild(k)}),""}function b0(n,e,t){return n.getElement().style.backgroundColor=this.sanitizeHTML(n.getValue()),""}function v0(n,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#2DC214" clip-rule="evenodd" d="M21.652,3.211c-0.293-0.295-0.77-0.295-1.061,0L9.41,14.34 c-0.293,0.297-0.771,0.297-1.062,0L3.449,9.351C3.304,9.203,3.114,9.13,2.923,9.129C2.73,9.128,2.534,9.201,2.387,9.351 l-2.165,1.946C0.078,11.445,0,11.63,0,11.823c0,0.194,0.078,0.397,0.223,0.544l4.94,5.184c0.292,0.296,0.771,0.776,1.062,1.07 l2.124,2.141c0.292,0.293,0.769,0.293,1.062,0l14.366-14.34c0.293-0.294,0.293-0.777,0-1.071L21.652,3.211z" fill-rule="evenodd"/></svg>'}function y0(n,e,t){return'<svg enable-background="new 0 0 24 24" height="14" width="14" viewBox="0 0 24 24" xml:space="preserve" ><path fill="#CE1515" d="M22.245,4.015c0.313,0.313,0.313,0.826,0,1.139l-6.276,6.27c-0.313,0.312-0.313,0.826,0,1.14l6.273,6.272 c0.313,0.313,0.313,0.826,0,1.14l-2.285,2.277c-0.314,0.312-0.828,0.312-1.142,0l-6.271-6.271c-0.313-0.313-0.828-0.313-1.141,0 l-6.276,6.267c-0.313,0.313-0.828,0.313-1.141,0l-2.282-2.28c-0.313-0.313-0.313-0.826,0-1.14l6.278-6.269 c0.313-0.312,0.313-0.826,0-1.14L1.709,5.147c-0.314-0.313-0.314-0.827,0-1.14l2.284-2.278C4.308,1.417,4.821,1.417,5.135,1.73 L11.405,8c0.314,0.314,0.828,0.314,1.141,0.001l6.276-6.267c0.312-0.312,0.826-0.312,1.141,0L22.245,4.015z"/></svg>'}function w0(n,e,t){var i=n.getValue(),r=e.size||15,s=r+"px",a,o,u=e.hasOwnProperty("onValue")?e.onValue:!0,c=e.hasOwnProperty("offValue")?e.offValue:!1,d=e.onTruthy?i:i===u;return a=document.createElement("div"),a.classList.add("tabulator-toggle"),d?(a.classList.add("tabulator-toggle-on"),a.style.flexDirection="row-reverse",e.onColor&&(a.style.background=e.onColor)):e.offColor&&(a.style.background=e.offColor),a.style.width=2.5*r+"px",a.style.borderRadius=s,e.clickable&&a.addEventListener("click",p=>{n.setValue(d?c:u)}),o=document.createElement("div"),o.classList.add("tabulator-toggle-switch"),o.style.height=s,o.style.width=s,o.style.borderRadius=s,a.appendChild(o),a}function C0(n,e,t){var i=document.createElement("span"),r=n.getRow(),s=n.getTable();return r.watchPosition(a=>{e.relativeToPage&&(a+=s.modules.page.getPageSize()*(s.modules.page.getPage()-1)),i.innerText=a}),i}function E0(n,e,t){return n.getElement().classList.add("tabulator-row-handle"),"<div class='tabulator-row-handle-box'><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div><div class='tabulator-row-handle-bar'></div></div>"}function k0(n,e,t){var i,r,s;function a(o){var u=o.getValue(),c="plaintext";switch(typeof u){case"boolean":c="tickCross";break;case"string":u.includes(`
|
|
37
|
+
`)&&(c="textarea");break}return c}return i=e.formatterLookup?e.formatterLookup(n):a(n),e.paramsLookup&&(s=typeof e.paramsLookup=="function"?e.paramsLookup(i,n):e.paramsLookup[i]),r=this.table.modules.format.lookupFormatter(i),r.call(this,n,s||{},t)}function S0(n,e,t){var i=e.delimiter||",",r=n.getValue(),s=this.table,a;return e.valueMap&&(typeof e.valueMap=="string"?a=function(o){return o.map(u=>Ke.retrieveNestedData(s.options.nestedFieldSeparator,e.valueMap,u))}:a=e.valueMap),Array.isArray(r)?(a&&(r=a(r)),r.join(i)):r}function x0(n,e,t){var i=e.indent||" ",r=typeof e.multiline>"u"?!0:e.multiline,s=e.replacer||null,a=n.getValue();return r&&(n.getElement().style.whiteSpace="pre-wrap"),JSON.stringify(a,s,i)}var _0={plaintext:r0,html:s0,textarea:a0,money:o0,link:l0,image:u0,tickCross:c0,datetime:d0,datetimediff:h0,lookup:f0,star:p0,traffic:m0,progress:g0,color:b0,buttonTick:v0,buttonCross:y0,toggle:w0,rownum:C0,handle:E0,adaptable:k0,array:S0,json:x0};class Ni extends Pe{static moduleName="format";static formatters=_0;constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupTypeFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupTypeFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupTypeFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupTypeFormatter(e,"HtmlOutput"))}lookupTypeFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},r=e.definition["formatter"+t];return i.formatter=this.lookupFormatter(r),i}lookupFormatter(e){var t;switch(typeof e){case"string":Ni.formatters[e]?t=Ni.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),t=Ni.formatters.plaintext);break;case"function":t=e;break;default:t=Ni.formatters.plaintext;break}return t}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var r,s,a,o;return e.definition.titleFormatter?(r=this.lookupFormatter(e.definition.titleFormatter),a=u=>{e.titleFormatterRendered=u},o={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},s=e.definition.titleFormatterParams||{},s=typeof s=="function"?s():s,r.call(this,o,s,a)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function r(s){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=s,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,r)}formatExportValue(e,t){var i=e.column.modules.format[t],r;if(i){let s=function(a){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=a,e.modules.format.rendered=!1};return r=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),r,s)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?" ":e}}class M0 extends Pe{static moduleName="frozenColumns";constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-deleted",this.reinitializeColumns.bind(this)),this.subscribe("column-hide",this.reinitializeColumns.bind(this)),this.subscribe("column-show",this.reinitializeColumns.bind(this)),this.subscribe("columns-loaded",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)}),this.layout()}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,r=0;this.leftColumns.forEach((s,a)=>{if(s.modules.frozen.marginValue=i,s.modules.frozen.margin=s.modules.frozen.marginValue+"px",s.visible&&(i+=s.getWidth()),a==this.leftColumns.length-1?s.modules.frozen.edge=!0:s.modules.frozen.edge=!1,s.parent.isGroup){var o=this.getColGroupParentElement(s);t.includes(o)||(this.layoutElement(o,s),t.push(o)),o.classList.toggle("tabulator-frozen-left",s.modules.frozen.edge&&s.modules.frozen.position==="left"),o.classList.toggle("tabulator-frozen-right",s.modules.frozen.edge&&s.modules.frozen.position==="right")}else this.layoutElement(s.getElement(),s);e&&s.cells.forEach(u=>{this.layoutElement(u.getElement(!0),s)})}),this.rightColumns.forEach((s,a)=>{s.modules.frozen.marginValue=r,s.modules.frozen.margin=s.modules.frozen.marginValue+"px",s.visible&&(r+=s.getWidth()),a==this.rightColumns.length-1?s.modules.frozen.edge=!0:s.modules.frozen.edge=!1,s.parent.isGroup?this.layoutElement(this.getColGroupParentElement(s),s):this.layoutElement(s.getElement(),s),e&&s.cells.forEach(o=>{this.layoutElement(o.getElement(!0),s)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),e.classList.toggle("tabulator-frozen-left",t.modules.frozen.edge&&t.modules.frozen.position==="left"),e.classList.toggle("tabulator-frozen-right",t.modules.frozen.edge&&t.modules.frozen.position==="right"))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}getFrozenColumns(){return this.leftColumns.concat(this.rightColumns)}_calcSpace(e,t){var i=0;for(let r=0;r<t;r++)e[r].visible&&(i+=e[r].getWidth());return i}}class R0 extends Pe{static moduleName="frozenRows";constructor(e){super(e),this.topElement=document.createElement("div"),this.rows=[],this.registerComponentFunction("row","freeze",this.freezeRow.bind(this)),this.registerComponentFunction("row","unfreeze",this.unfreezeRow.bind(this)),this.registerComponentFunction("row","isFrozen",this.isRowFrozen.bind(this)),this.registerTableOption("frozenRowsField","id"),this.registerTableOption("frozenRows",!1)}initialize(){var e=document.createDocumentFragment();this.rows=[],this.topElement.classList.add("tabulator-frozen-rows-holder"),e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.subscribe("row-deleting",this.detachRow.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),10),this.table.options.frozenRows&&(this.subscribe("data-processed",this.initializeRows.bind(this)),this.subscribe("row-added",this.initializeRow.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this))),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}initializeRows(){this.table.rowManager.getRows().forEach(e=>{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var r=t.indexOf(i);r>-1&&t.splice(r,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}class T0{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class Vi{constructor(e,t,i,r,s,a,o){this.groupManager=e,this.parent=t,this.key=r,this.level=i,this.field=s,this.hasSubGroups=i<e.groupIDLookups.length-1,this.addRow=this.hasSubGroups?this._addRowToGroup:this._addRow,this.type="group",this.old=o,this.rows=[],this.groups=[],this.groupList=[],this.generator=a,this.element=!1,this.elementContents=!1,this.height=0,this.outerHeight=0,this.initialized=!1,this.calcs={},this.initialized=!1,this.modules={},this.arrowElement=!1,this.visible=o?o.visible:typeof e.startOpen[i]<"u"?e.startOpen[i]:e.startOpen[0],this.component=null,this.createElements(),this.addBindings(),this.createValueGroups()}wipe(e){e||(this.groupList.length?this.groupList.forEach(function(t){t.wipe()}):this.rows.forEach(t=>{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,r=new Vi(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=r,this.groupList.push(r)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),r=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[r]&&this.groups[r].addRow(e):(this.groups[r]||this._createGroup(i,t),this.groups[r].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var r=this.conformRowData({});e.updateData(r);var s=this.rows.indexOf(t);s>-1?i?this.rows.splice(s+1,0,e):this.rows.splice(s,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(r=>{i.push(r.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(r=>{var s=r.getElement();e.parentNode.insertBefore(s,e.nextSibling),r.initialize(),e=s})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var r=i.getRowGroup(e);r&&(t=r)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(r=>{i=i.concat(r.getRows(e,t))}):this.rows.forEach(function(r){i.push(e?r.getComponent():r)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;e<this.element.childNodes.length;++e)this.element.childNodes[e].parentNode.removeChild(this.element.childNodes[e]);return this.generateGroupHeaderContents(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}normalizeHeight(){this.setHeight(this.element.clientHeight)}initialize(e){(!this.initialized||e)&&(this.normalizeHeight(),this.initialized=!0)}reinitialize(){this.initialized=!1,this.height=0,Ke.elVisible(this.element)&&this.initialize(!0)}setHeight(e){this.height!=e&&(this.height=e,this.outerHeight=this.element.offsetHeight)}getHeight(){return this.outerHeight}getGroup(){return this}reinitializeHeight(){}calcHeight(){}setCellHeight(){}clearCellHeight(){}deinitializeHeight(){}rendered(){}getComponent(){return this.component||(this.component=new T0(this)),this.component}}class D0 extends Pe{static moduleName="groupRows";constructor(e){super(e),this.groupIDLookups=!1,this.startOpen=[function(){return!1}],this.headerGenerator=[function(){return""}],this.groupList=[],this.allowedValues=!1,this.groups={},this.displayHandler=this.getRows.bind(this),this.blockRedraw=!1,this.registerTableOption("groupBy",!1),this.registerTableOption("groupStartOpen",!0),this.registerTableOption("groupValues",!1),this.registerTableOption("groupUpdateOnCellEdit",!1),this.registerTableOption("groupHeader",!1),this.registerTableOption("groupHeaderPrint",null),this.registerTableOption("groupHeaderClipboard",null),this.registerTableOption("groupHeaderHtmlOutput",null),this.registerTableOption("groupHeaderDownload",null),this.registerTableOption("groupToggleElement","arrow"),this.registerTableOption("groupClosedShowCalcs",!1),this.registerTableFunction("setGroupBy",this.setGroupBy.bind(this)),this.registerTableFunction("setGroupValues",this.setGroupValues.bind(this)),this.registerTableFunction("setGroupStartOpen",this.setGroupStartOpen.bind(this)),this.registerTableFunction("setGroupHeader",this.setGroupHeader.bind(this)),this.registerTableFunction("getGroups",this.userGetGroups.bind(this)),this.registerTableFunction("getGroupedData",this.userGetGroupedData.bind(this)),this.registerComponentFunction("row","getGroup",this.rowGetGroup.bind(this))}initialize(){this.subscribe("table-destroy",this._blockRedrawing.bind(this)),this.subscribe("rows-wipe",this._blockRedrawing.bind(this)),this.subscribe("rows-wiped",this._restore_redrawing.bind(this)),this.table.options.groupBy&&(this.table.options.groupUpdateOnCellEdit&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("row-data-changed",this.reassignRowToGroup.bind(this),0)),this.subscribe("table-built",this.configureGroupSetup.bind(this)),this.subscribe("row-deleting",this.rowDeleting.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHeaders.bind(this)),this.subscribe("rows-wipe",this.wipe.bind(this)),this.subscribe("rows-added",this.rowsUpdated.bind(this)),this.subscribe("row-moving",this.rowMoving.bind(this)),this.subscribe("row-adding-index",this.rowAddingIndex.bind(this)),this.subscribe("rows-sample",this.rowSample.bind(this)),this.subscribe("render-virtual-fill",this.virtualRenderFill.bind(this)),this.registerDisplayHandler(this.displayHandler,20),this.initialized=!0)}_blockRedrawing(){this.blockRedraw=!0}_restore_redrawing(){this.blockRedraw=!1}configureGroupSetup(){if(this.table.options.groupBy){var e=this.table.options.groupBy,t=this.table.options.groupStartOpen,i=this.table.options.groupHeader;if(this.allowedValues=this.table.options.groupValues,Array.isArray(e)&&Array.isArray(i)&&e.length>i.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(s,a)=>{this.headerGenerator[0]=(o,u,c)=>(typeof o>"u"?"":o)+"<span>("+u+" "+(u===1?s:a.groups.items)+")</span>"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var r=this.table.columnManager.getRealColumns();r.forEach(s=>{s.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),s.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((s,a)=>{var o,u;typeof s=="function"?o=s:(u=this.table.columnManager.getColumnByField(s),u?o=function(c){return u.getFieldValue(c)}:o=function(c){return c[s]}),this.groupIDLookups.push({field:typeof s=="function"?!1:s,func:o,values:this.allowedValues?this.allowedValues[a]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(s=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var r=e.modules.group.rows;return r.length>1&&(!t||t&&r.indexOf(t)==-1?i?r[0]!==e&&(t=r[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):r[r.length-1]!==e&&(t=r[r.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof Vi&&(t=this.table.rowManager.prevDisplayRow(e)||t);var r=t instanceof Vi?t:t.modules.group,s=e instanceof Vi?e:e.modules.group;r===s?this.table.rowManager.moveRowInArray(r.rows,e,t,i):(s&&s.removeRow(e),r.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var r={};r.level=0,r.rowCount=0,r.headerContent="";var s=[];i.hasSubGroups?(s=this.pullGroupListData(i.groupList),r.level=i.level,r.rowCount=s.length-i.groupList.length,r.headerContent=i.generator(i.key,r.rowCount,i.rows,i),t.push(r),t=t.concat(s)):(r.level=i.level,r.headerContent=i.generator(i.key,i.rows.length,i.rows,i),r.rowCount=i.getRows().length,t.push(r),i.getRows().forEach(a=>{t.push(a.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var r=i.getRowGroup(e);r&&(t=r)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var r=t+"_"+e,s;i=i||[],s=new Vi(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[r]),this.groups[r]=s,this.groupList.push(s)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),r="0_"+i;this.groups[r]&&this.groups[r].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),r=!this.groups["0_"+i];return r&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!r}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),r=this.getExpectedPath(e),s;s=i.length==r.length&&i.every((a,o)=>a===r[o]),s||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(r=>{t.push(r.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,r)=>{this.table.rowManager.styleRow(i,r),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}var O0={cellEdit:function(n){n.component.setValueProcessData(n.data.oldValue),n.component.cellRendered()},rowAdd:function(n){n.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowDelete:function(n){var e=this.table.rowManager.addRowActual(n.data.data,n.data.pos,n.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(n.component,e),this.table.rowManager.checkPlaceholder()},rowMove:function(n){var e=n.data.posFrom-n.data.posTo>0;this.table.rowManager.moveRowActual(n.component,this.table.rowManager.getRowFromPosition(n.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},L0={cellEdit:function(n){n.component.setValueProcessData(n.data.newValue),n.component.cellRendered()},rowAdd:function(n){var e=this.table.rowManager.addRowActual(n.data.data,n.data.pos,n.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(n.component,e),this.table.rowManager.checkPlaceholder()},rowDelete:function(n){n.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowMove:function(n){this.table.rowManager.moveRowActual(n.component,this.table.rowManager.getRowFromPosition(n.data.posTo),n.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},P0={undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"]},A0={undo:function(n){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(n.preventDefault(),this.table.modules.history.undo()))},redo:function(n){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(n.preventDefault(),this.table.modules.history.redo()))}},F0={keybindings:{bindings:P0,actions:A0}};class tr extends Pe{static moduleName="history";static moduleExtensions=F0;static undoers=O0;static redoers=L0;constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,r){this.action("rowAdd",e,{data:t,pos:i,index:r})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return tr.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Undo Error - No more history to undo":"History module not enabled"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return tr.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Redo Error - No more history to redo":"History module not enabled"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof ot)i.component===e&&(i.component=t);else if(i.component instanceof un&&i.component.row===e){var r=i.component.column.getField();r&&(i.component=t.getCell(r))}})}}class B0 extends Pe{static moduleName="htmlTableImport";constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),r=e.getElementsByTagName("tbody")[0],s=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),r=r?r.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,r):this._generateBlankHeaders(i,r);for(var a=0;a<r.length;a++){var o=r[a],u=o.getElementsByTagName("td"),c={};this.hasIndex||(c[t.index]=a);for(var d=0;d<u.length;d++){var p=u[d];typeof this.fieldIndex[d]<"u"&&(c[this.fieldIndex[d]]=p.innerHTML)}s.push(c)}t.data=s,this.dispatchExternal("htmlImported")}_extractOptions(e,t,i){var r=e.attributes,s=Object.keys(i||t),a={};s.forEach(d=>{a[d.toLowerCase()]=d});for(var o in r){var u=r[o],c;u&&typeof u=="object"&&u.name&&u.name.indexOf("tabulator-")===0&&(c=u.name.replace("tabulator-",""),typeof a[c]<"u"&&(t[a[c]]=this._attribValue(u.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i<e.length;i++){var r=e[i],s=!1,a=this._findCol(r.textContent),o;a?s=!0:a={title:r.textContent.trim()},a.field||(a.field=r.textContent.trim().toLowerCase().replaceAll(" ","_")),o=r.getAttribute("width"),o&&!a.width&&(a.width=o),this._extractOptions(r,a,this.table.columnManager.optionsList.registeredDefaults),this.fieldIndex[i]=a.field,a.field==this.table.options.index&&(this.hasIndex=!0),s||this.table.options.columns.push(a)}}_generateBlankHeaders(e,t){for(var i=0;i<e.length;i++){var r=e[i],s={title:"",field:"col"+i};this.fieldIndex[i]=s.field;var a=r.getAttribute("width");a&&(s.width=a),this.table.options.columns.push(s)}}}function N0(n){var e=[],t=0,i=0,r=!1;for(let s=0;s<n.length;s++){let a=n[s],o=n[s+1];if(e[t]||(e[t]=[]),e[t][i]||(e[t][i]=""),a=='"'&&r&&o=='"'){e[t][i]+=a,s++;continue}if(a=='"'){r=!r;continue}if(a==","&&!r){i++;continue}if(a=="\r"&&o==`
|
|
38
|
+
`&&!r){i=0,t++,s++;continue}if((a=="\r"||a==`
|
|
39
|
+
`)&&!r){i=0,t++;continue}e[t][i]+=a}return e}function V0(n){try{return JSON.parse(n)}catch(e){return console.warn("JSON Import Error - File contents is invalid JSON",e),Promise.reject()}}function H0(n){return n}function z0(n){var e=this.dependencyRegistry.lookup("XLSX"),t=e.read(n),i=t.Sheets[t.SheetNames[0]];return e.utils.sheet_to_json(i,{header:1})}var I0={csv:N0,json:V0,array:H0,xlsx:z0};class fa extends Pe{static moduleName="import";static importers=I0;constructor(e){super(e),this.registerTableOption("importFormat"),this.registerTableOption("importReader","text"),this.registerTableOption("importHeaderTransform"),this.registerTableOption("importValueTransform"),this.registerTableOption("importDataValidator"),this.registerTableOption("importFileValidator")}initialize(){this.registerTableFunction("import",this.importFromFile.bind(this)),this.table.options.importFormat&&(this.subscribe("data-loading",this.loadDataCheck.bind(this),10),this.subscribe("data-load",this.loadData.bind(this),10))}loadDataCheck(e){return this.table.options.importFormat&&(typeof e=="string"||Array.isArray(e)&&e.length&&Array.isArray(e))}loadData(e,t,i,r,s){return this.importData(this.lookupImporter(),e).then(this.structureData.bind(this)).catch(a=>(console.error("Import Error:",a||"Unable to import data"),Promise.reject(a)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=fa.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t,i){var r=this.lookupImporter(e);if(r)return this.pickFile(t,i).then(this.importData.bind(this,r)).then(this.structureData.bind(this)).then(this.mutateData.bind(this)).then(this.validateData.bind(this)).then(this.setData.bind(this)).catch(s=>(this.dispatch("import-error",s),this.dispatchExternal("importError",s),console.error("Import Error:",s||"Unable to import file"),this.table.dataLoader.alertError(),setTimeout(()=>{this.table.dataLoader.clearAlert()},3e3),Promise.reject(s)))}pickFile(e,t){return new Promise((i,r)=>{var s=document.createElement("input");s.type="file",s.accept=e,s.addEventListener("change",a=>{var o=s.files[0],u=new FileReader,c=this.validateFile(o);if(c===!0){switch(this.dispatch("import-importing",s.files),this.dispatchExternal("importImporting",s.files),t||this.table.options.importReader){case"buffer":u.readAsArrayBuffer(o);break;case"binary":u.readAsBinaryString(o);break;case"url":u.readAsDataURL(o);break;case"text":default:u.readAsText(o)}u.onload=d=>{i(u.result)},u.onerror=d=>{console.warn("File Load Error - Unable to read file"),r(d)}}else r(c)}),this.dispatch("import-choose"),this.dispatchExternal("importChoose"),s.click()})}importData(e,t){var i;return this.table.dataLoader.alertLoader(),new Promise((r,s)=>{setTimeout(()=>{i=e.call(this.table,t),i instanceof Promise||i?r(i):s()},10)})}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"import"))}):t=e,t}transformHeader(e){var t=[];if(this.table.options.importHeaderTransform)e.forEach(i=>{t.push(this.table.options.importHeaderTransform.call(this.table,i,e))});else return e;return t}transformData(e){var t=[];if(this.table.options.importValueTransform)e.forEach(i=>{t.push(this.table.options.importValueTransform.call(this.table,i,e))});else return e;return t}structureArrayToObject(e){var t=this.transformHeader(e.shift()),i=e.map(r=>{var s={};return r=this.transformData(r),t.forEach((a,o)=>{s[a]=r[o]}),s});return i}structureArrayToColumns(e){var t=[],i=this.transformHeader(e[0]),r=this.table.getColumns();return r[0]&&i[0]&&r[0].getDefinition().title===i[0]&&e.shift(),e.forEach(s=>{var a={};s=this.transformData(s),s.forEach((o,u)=>{var c=r[u];c&&(a[c.getField()]=o)}),t.push(a)}),t}validateFile(e){return this.table.options.importFileValidator?this.table.options.importFileValidator.call(this.table,e):!0}validateData(e){var t;return this.table.options.importDataValidator?(t=this.table.options.importDataValidator.call(this.table,e),t===!0?e:Promise.reject(t)):e}setData(e){return this.dispatch("import-imported",e),this.dispatchExternal("importImported",e),this.table.dataLoader.clearAlert(),this.table.setData(e)}}class $0 extends Pe{static moduleName="interaction";constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let r in this.eventMap)this.eventMap[r]===i&&this.subscribers[r]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,r){var s=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":s.tap=!0,clearTimeout(s.tapHold),s.tapHold=setTimeout(()=>{clearTimeout(s.tapHold),s.tapHold=null,s.tap=null,clearTimeout(s.tapDbl),s.tapDbl=null,this.dispatchEvent(e+"TapHold",i,r)},1e3);break;case"end":s.tap&&(s.tap=null,this.dispatchEvent(e+"Tap",i,r)),s.tapDbl?(clearTimeout(s.tapDbl),s.tapDbl=null,this.dispatchEvent(e+"DblTap",i,r)):s.tapDbl=setTimeout(()=>{clearTimeout(s.tapDbl),s.tapDbl=null},300),clearTimeout(s.tapHold),s.tapHold=null;break}}dispatchEvent(e,t,i){var r=i.getComponent(),s;this.columnSubscribers[e]&&(i instanceof un?s=i.column.definition[e]:i instanceof Vt&&(s=i.definition[e]),s&&s(t,r)),this.dispatchExternal(e,t,r)}}var j0={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,navLeft:37,navRight:39,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35},W0={keyBlock:function(n){n.stopPropagation(),n.preventDefault()},scrollPageUp:function(n){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;n.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(n){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;n.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(n){var e=this.table.rowManager;n.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(n){var e=this.table.rowManager;n.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(n){this.dispatch("keybinding-nav-prev",n)},navNext:function(n){this.dispatch("keybinding-nav-next",n)},navLeft:function(n){this.dispatch("keybinding-nav-left",n)},navRight:function(n){this.dispatch("keybinding-nav-right",n)},navUp:function(n){this.dispatch("keybinding-nav-up",n)},navDown:function(n){this.dispatch("keybinding-nav-down",n)}};class dn extends Pe{static moduleName="keybindings";static bindings=j0;static actions=W0;constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,dn.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)dn.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var r=Array.isArray(i)?i:[i];r.forEach(s=>{this.mapBinding(t,s)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:dn.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},r=t.toString().toLowerCase().split(" ").join("").split("+");r.forEach(s=>{switch(s){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:s=isNaN(s)?s.toUpperCase().charCodeAt(0):parseInt(s),i.keys.push(s),this.watchKeys[s]||(this.watchKeys[s]=[]),this.watchKeys[s].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,r=e.watchKeys[i];r&&(e.pressedKeys.push(i),r.forEach(function(s){e.checkBinding(t,s)}))},this.keydownBinding=function(t){var i=t.keyCode,r=e.watchKeys[i];if(r){var s=e.pressedKeys.indexOf(i);s>-1&&e.pressedKeys.splice(s,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(r=>{var s=this.pressedKeys.indexOf(r);s==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}}class G0 extends Pe{static moduleName="menu";constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,r,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,r,s){var a=!(e instanceof MouseEvent),o=document.createElement("div"),u;if(o.classList.add("tabulator-menu"),a||e.preventDefault(),!(!i||!i.length)){if(r)u=s.child(o);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=u=this.popup(o)}i.forEach(c=>{var d=document.createElement("div"),p=c.label,h=c.disabled;c.separator?d.classList.add("tabulator-menu-separator"):(d.classList.add("tabulator-menu-item"),typeof p=="function"&&(p=p.call(this.table,t.getComponent())),p instanceof Node?d.appendChild(p):d.innerHTML=p,typeof h=="function"&&(h=h.call(this.table,t.getComponent())),h?(d.classList.add("tabulator-menu-item-disabled"),d.addEventListener("click",f=>{f.stopPropagation()})):c.menu&&c.menu.length?d.addEventListener("click",f=>{f.stopPropagation(),this.loadMenu(f,t,c.menu,d,u)}):c.action&&d.addEventListener("click",f=>{c.action(f,t.getComponent())}),c.menu&&c.menu.length&&d.classList.add("tabulator-menu-item-submenu")),o.appendChild(d)}),o.addEventListener("click",c=>{this.rootPopup&&this.rootPopup.hide()}),u.show(r||e),u===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",i,u),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatch("menu-opened",i,u),this.dispatchExternal("menuOpened",t.getComponent()))}}}class Y0 extends Pe{static moduleName="moveColumn";constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&(this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("alert-show",this.abortMove.bind(this)))}abortMove(){clearTimeout(this.checkTimeout)}initializeColumn(e){var t=this,i={},r;!e.modules.frozen&&!e.isGroup&&!e.isRowHeader&&(r=e.getElement(),i.mousemove=(function(s){e.parent===t.moving.parent&&((t.touchMove?s.touches[0].pageX:s.pageX)-Ke.elOffset(r).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(r.parentNode.insertBefore(t.placeholderElement,r.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(r.parentNode.insertBefore(t.placeholderElement,r),t.moveColumn(e,!1)))}).bind(t),r.addEventListener("mousedown",function(s){t.touchMove=!1,s.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(s,e)},t.checkPeriod))}),r.addEventListener("mouseup",function(s){s.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,r,s,a,o,u,c;t.addEventListener("touchstart",d=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,r=e.nextColumn(),a=r?r.getWidth()/2:0,s=e.prevColumn(),o=s?s.getWidth()/2:0,u=0,c=0,i=!1,this.startMove(d,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",d=>{var p,h;this.moving&&(this.moveHover(d),i||(i=d.touches[0].pageX),p=d.touches[0].pageX-i,p>0?r&&p-u>a&&(h=r,h!==e&&(i=d.touches[0].pageX,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement().nextSibling),this.moveColumn(h,!0))):s&&-p-c>o&&(h=s,h!==e&&(i=d.touches[0].pageX,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement()),this.moveColumn(h,!1))),h&&(r=h.nextColumn(),u=a,a=r?r.getWidth()/2:0,s=h.prevColumn(),c=o,o=s?s.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",d=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(d)})}startMove(e,t){var i=t.getElement(),r=this.table.columnManager.getContentsElement(),s=this.table.columnManager.getHeadersElement();this.table.modules.selectRange&&this.table.modules.selectRange.columnSelection&&this.table.modules.selectRange.mousedown&&this.table.modules.selectRange.selecting==="column"||(this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-Ke.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),r.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=r.clientHeight-s.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e),this.dispatch("column-moving",e,this.moving))}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(r,s){var a=r.getElement(!0);a.parentNode&&i[s]&&a.parentNode.insertBefore(i[s].getElement(),a.nextSibling)}):e.getCells().forEach(function(r,s){var a=r.getElement(!0);a.parentNode&&i[s]&&a.parentNode.insertBefore(i[s].getElement(),a)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,r=(this.touchMove?e.touches[0].pageX:e.pageX)-Ke.elOffset(t).left+i,s;this.hoverElement.style.left=r-this.startX+"px",r-i<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{s=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=s,this.autoScrollTimeout=!1},1))),i+t.clientWidth-r<this.autoScrollMargin&&(this.autoScrollTimeout||(this.autoScrollTimeout=setTimeout(()=>{s=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=s,this.autoScrollTimeout=!1},1)))}}var U0={delete:function(n,e,t){n.delete()}},q0={insert:function(n,e,t){return this.table.addRow(n.getData(),void 0,e),!0},add:function(n,e,t){return this.table.addRow(n.getData()),!0},update:function(n,e,t){return e?(e.update(n.getData()),!0):!1},replace:function(n,e,t){return e?(this.table.addRow(n.getData(),void 0,e),e.delete(),!0):!1}};class ir extends Pe{static moduleName="moveRow";static senders=U0;static receivers=q0;constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(r){t.tableRowDrop(r,e)}).bind(t),i.mousemove=(function(r){var s;r.pageY-Ke.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(s=e.getElement(),s.parentNode.insertBefore(t.placeholderElement,s.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(s=e.getElement(),s.previousSibling&&(s.parentNode.insertBefore(t.placeholderElement,s),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},r;i.mouseup=(function(s){t.tableRowDrop(s,e)}).bind(t),i.mousemove=(function(s){var a=e.getElement();s.pageY-Ke.elOffset(a).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(a.parentNode.insertBefore(t.placeholderElement,a),t.moveRow(e,!1))}).bind(t),this.hasHandle||(r=e.getElement(),r.addEventListener("mousedown",function(s){s.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(s,e)},t.checkPeriod))}),r.addEventListener("mouseup",function(s){s.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(r){r.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(r,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(r){r.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,r,s,a,o,u,c;t.addEventListener("touchstart",d=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,r=e.nextRow(),a=r?r.getHeight()/2:0,s=e.prevRow(),o=s?s.getHeight()/2:0,u=0,c=0,i=!1,this.startMove(d,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",d=>{var p,h;this.moving&&(d.preventDefault(),this.moveHover(d),i||(i=d.touches[0].pageY),p=d.touches[0].pageY-i,p>0?r&&p-u>a&&(h=r,h!==e&&(i=d.touches[0].pageY,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement().nextSibling),this.moveRow(h,!0))):s&&-p-c>o&&(h=s,h!==e&&(i=d.touches[0].pageY,h.getElement().parentNode.insertBefore(this.placeholderElement,h.getElement()),this.moveRow(h,!1))),h&&(r=h.nextRow(),u=a,a=r?r.getHeight()/2:0,s=h.prevRow(),c=o,o=s?s.getHeight()/2:0))}),t.addEventListener("touchend",d=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(d),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,r=this.touchMove?e.touches[0].pageY:e.pageY,s,a;s=t.getElement(),this.connection?(a=s.getBoundingClientRect(),this.startX=a.left-i+window.pageXOffset,this.startY=a.top-r+window.pageYOffset):this.startY=r-s.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,r=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(r-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var r=s=>{this.elementRowDrop(s,i,this.moving)};i.addEventListener("mouseup",r),i.tabulatorElementDropEvent=r,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var r=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":r=ir.senders[this.table.options.movableRowsSender];break;case"function":r=this.table.options.movableRowsSender;break}r?r.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,r=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=ir.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?r=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),r?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:r})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}}var K0={};class nr extends Pe{static moduleName="mutator";static mutators=K0;constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard","import"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutatorImport"),this.registerColumnOption("mutatorImportParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(r=>{var s="mutator"+(r.charAt(0).toUpperCase()+r.slice(1)),a;e.definition[s]&&(a=this.lookupMutator(e.definition[s]),a&&(t=!0,i[s]={mutator:a,params:e.definition[s+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":nr.mutators[e]?t=nr.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var r="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),s;return this.enabled&&this.table.columnManager.traverse(a=>{var o,u,c;a.modules.mutate&&(o=a.modules.mutate[r]||a.modules.mutate.mutator||!1,o&&(s=a.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof s<"u")&&(c=a.getComponent(),u=typeof o.params=="function"?o.params(s,e,t,c):o.params,a.setFieldValue(e,o.mutator(s,e,t,u,c)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,r={};if(i)return r=Object.assign(r,e.row.getData()),e.column.setFieldValue(r,t),i.mutator(t,r,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var r=e.row.getCell(i);r&&r.setValue(r.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}}function J0(n,e,t,i,r){var s=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",p=>{a.innerHTML=p}),this.table.modules.localize.langBind("pagination|counter|of",p=>{u.innerHTML=p}),this.table.modules.localize.langBind("pagination|counter|rows",p=>{d.innerHTML=p}),i?(o.innerHTML=" "+e+"-"+Math.min(e+n-1,i)+" ",c.innerHTML=" "+i+" ",s.appendChild(a),s.appendChild(o),s.appendChild(u),s.appendChild(c),s.appendChild(d)):(o.innerHTML=" 0 ",s.appendChild(a),s.appendChild(o),s.appendChild(d)),s}function X0(n,e,t,i,r){var s=document.createElement("span"),a=document.createElement("span"),o=document.createElement("span"),u=document.createElement("span"),c=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",p=>{a.innerHTML=p}),o.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",p=>{u.innerHTML=p}),c.innerHTML=" "+r+" ",this.table.modules.localize.langBind("pagination|counter|pages",p=>{d.innerHTML=p}),s.appendChild(a),s.appendChild(o),s.appendChild(u),s.appendChild(c),s.appendChild(d),s}var Z0={rows:J0,pages:X0};class pa extends Pe{static moduleName="page";static pageCounters=Z0;constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("paginationOutOfRange",!1),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,r=i.getDisplayRows(),s;return t?r.length?s=r[0]:i.activeRows.length&&(s=i.activeRows[i.activeRows.length-1],t=!1):r.length&&(s=r[r.length-1],t=!(r.length<this.size)),{index:s,top:t}}calculatePageSizes(){var e,t;this.table.options.paginationSize?this.size=this.table.options.paginationSize:(e=document.createElement("div"),e.classList.add("tabulator-row"),e.style.visibility="hidden",t=document.createElement("div"),t.classList.add("tabulator-cell"),t.innerHTML="Page Row Test",e.appendChild(t),this.table.rowManager.getTableElement().appendChild(e),this.size=Math.floor(this.table.rowManager.getElement().clientHeight/e.offsetHeight),this.table.rowManager.getTableElement().removeChild(e)),this.dispatchExternal("pageSizeChanged",this.size),this.generatePageSizeSelectList()}initialLoadComplete(){this.initialLoad=!1}remotePageParams(e,t,i,r){return this.initialLoad||(this.progressiveLoad&&!i||!this.progressiveLoad&&!this.dataChanging)&&this.reset(!0),r.page=this.page,this.size&&(r.size=this.size),r}userSetPageToRow(e){return this.table.options.pagination&&(e=this.table.rowManager.findRow(e),e)?this.setPageToRow(e):Promise.reject()}userSetPageSize(e){return this.table.options.pagination?(this.setPageSize(e),this.setPage(1)):!1}scrollVertical(e,t){var i,r,s;!t&&!this.table.dataLoader.loading&&(i=this.table.rowManager.getElement(),r=i.scrollHeight-i.clientHeight-e,s=this.table.options.progressiveLoadScrollMargin||i.clientHeight*2,r<s&&this.nextPage().catch(()=>{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(r){i.innerHTML=r}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=pa.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",r=>{this.firstBut.innerHTML=r}),this.langBind("pagination|first_title",r=>{this.firstBut.setAttribute("aria-label",r),this.firstBut.setAttribute("title",r)}),this.langBind("pagination|prev",r=>{this.prevBut.innerHTML=r}),this.langBind("pagination|prev_title",r=>{this.prevBut.setAttribute("aria-label",r),this.prevBut.setAttribute("title",r)}),this.langBind("pagination|next",r=>{this.nextBut.innerHTML=r}),this.langBind("pagination|next_title",r=>{this.nextBut.setAttribute("aria-label",r),this.nextBut.setAttribute("title",r)}),this.langBind("pagination|last",r=>{this.lastBut.innerHTML=r}),this.langBind("pagination|last_title",r=>{this.lastBut.setAttribute("aria-label",r),this.lastBut.setAttribute("title",r)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",r=>{this.pageSizeSelect.setAttribute("aria-label",r),this.pageSizeSelect.setAttribute("title",r),t.innerHTML=r}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",r=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var r=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(r)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var r;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),r=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof r){case"object":if(r instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(r)}else this.pageCounterElement.innerHTML="",r!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",r);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=r}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+1<this.count?this.max-this.count+1:Math.max(this.page-e,1),r=this.page<=t?Math.min(this.count,this.max):Math.min(this.page+t,this.max);for(;this.pagesElement.firstChild;)this.pagesElement.removeChild(this.pagesElement.firstChild);this.page==1?(this.firstBut.disabled=!0,this.prevBut.disabled=!0):(this.firstBut.disabled=!1,this.prevBut.disabled=!1),this.page==this.max?(this.lastBut.disabled=!0,this.nextBut.disabled=!0):(this.lastBut.disabled=!1,this.nextBut.disabled=!1);for(let s=i;s<=r;s++)s>0&&s<=this.max&&this.pagesElement.appendChild(this._generatePageButton(s));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.page<this.max?(this.page++,this.trackChanges(),this.trigger()):(this.progressiveLoad||console.warn("Pagination Error - Next page would be greater than maximum page of "+this.max+":",this.max+1),Promise.reject())}getPage(){return this.page}getPageMax(){return this.max}getPageSize(e){return this.size}getMode(){return this.mode}getRows(e){var t=0,i,r,s,a,o=e.filter(u=>u.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(r=0,s=e.length):(r=this.size*(this.page-1),s=r+parseInt(this.size)),this._setPageButtons();for(let u=r;u<s;u++){let c=e[u];c&&(i.push(c),c.type==="row"&&(a||(a=c),t++))}return this._setPageCounter(o.length,t,a?o.indexOf(a)+1:0),i}else return this._setPageButtons(),this._setPageCounter(o.length),e.slice(0)}trigger(){var e;switch(this.mode){case"local":return e=this.table.rowManager.scrollLeft,this.refreshData(),this.table.rowManager.scrollHorizontal(e),this.dispatchExternal("pageLoaded",this.getPage()),Promise.resolve();case"remote":return this.dataChanging=!0,this.reloadData(null).finally(()=>{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t,i;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page<this.max&&setTimeout(()=>{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page<this.max&&setTimeout(()=>{this.nextPage()});break}return!1}else{if(this.page>this.max&&(console.warn("Remote Pagination Error - Server returned last page value lower than the current page"),i=this.options("paginationOutOfRange"),i))return this.setPage(typeof i=="function"?i.call(this,this.page,this.max):i);this.dispatchExternal("pageLoaded",this.getPage())}else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}}var Q0={local:function(n,e){var t=localStorage.getItem(n+"-"+e);return t?JSON.parse(t):!1},cookie:function(n,e){var t=document.cookie,i=n+"-"+e,r=t.indexOf(i+"="),s,a;return r>-1&&(t=t.slice(r),s=t.indexOf(";"),s>-1&&(t=t.slice(0,s)),a=t.replace(i+"=","")),a?JSON.parse(a):!1}},eE={local:function(n,e,t){localStorage.setItem(n+"-"+e,JSON.stringify(t))},cookie:function(n,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=n+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};class Ht extends Pe{static moduleName="persistence";static moduleInitOrder=-10;static readers=Q0;static writers=eE;constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:Ht.readers[this.table.options.persistenceReaderFunc]?this.readFunc=Ht.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):Ht.readers[this.mode]?this.readFunc=Ht.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:Ht.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=Ht.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):Ht.writers[this.mode]?this.writeFunc=Ht.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e,!0)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(r=>{var s=Object.getOwnPropertyDescriptor(t,r),a=t[r];s&&Object.defineProperty(t,r,{set:o=>{a=o,this.defWatcherBlock||this.save("columns"),s.set&&s.set(o)},get:()=>(s.get&&s.get(),a)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t,i){var r=[];return t=t||[],t.forEach((s,a)=>{var o=this._findColumn(e,s),u;o&&(i?u=Object.keys(s):this.config.columns===!0||this.config.columns==null?(u=Object.keys(o),u.push("width")):u=this.config.columns,u.forEach(c=>{c!=="columns"&&typeof s[c]<"u"&&(o[c]=s[c])}),o.columns&&(o.columns=this.mergeDefinition(o.columns,s.columns)),r.push(o))}),e.forEach((s,a)=>{var o=this._findColumn(t,s);o||(r.length>a?r.splice(a,0,s):r.push(s))}),r}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(r){switch(i){case"group":return r.title===t.title&&r.columns.length===t.columns.length;case"field":return r.field===t.field;case"object":return r===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(r=>{var s={},a=r.getDefinition(),o;r.isGroup?(s.title=a.title,s.columns=this.parseColumns(r.getColumns())):(s.field=r.getField(),this.config.columns===!0||this.config.columns==null?(o=Object.keys(a),o.push("width"),o.push("visible")):o=this.config.columns,o.forEach(u=>{switch(u){case"width":s.width=r.getWidth();break;case"visible":s.visible=r.visible;break;default:typeof a[u]!="function"&&i.indexOf(u)===-1&&(s[u]=a[u])}})),t.push(s)}),t}}class tE extends Pe{static moduleName="popup";constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",r=>{r.stopPropagation(),r.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,r,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,r){var s;function a(o){s=o}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),a):e,this.loadPopup(t,i,e,s,r)}loadPopup(e,t,i,r,s){var a=!(e instanceof MouseEvent),o,u;i instanceof HTMLElement?o=i:(o=document.createElement("div"),o.innerHTML=i),o.classList.add("tabulator-popup"),o.addEventListener("click",c=>{c.stopPropagation()}),a||e.preventDefault(),u=this.popup(o),typeof r=="function"&&u.renderCallback(r),e?u.show(e):u.show(t.getElement(),s||"center"),u.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}class iE extends Pe{static moduleName="print";constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var r=window.scrollX,s=window.scrollY,a=document.createElement("div"),o=document.createElement("div"),u=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),c,d;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(a.classList.add("tabulator-print-header"),c=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof c=="string"?a.innerHTML=c:a.appendChild(c),this.element.appendChild(a)),this.element.appendChild(u),this.table.options.printFooter&&(o.classList.add("tabulator-print-footer"),d=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof d=="string"?o.innerHTML=d:o.appendChild(d),this.element.appendChild(o)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,u),window.print(),this.cleanup(),window.scrollTo(r,s),this.manualBlock=!1}}class nE extends Pe{static moduleName="reactiveData";constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments),s;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),r.forEach(a=>{t.table.rowManager.addRowActual(a,!1)}),s=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),s}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments),s;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),r.forEach(a=>{t.table.rowManager.addRowActual(a,!0)}),s=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),s}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var r,s;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(r=t.table.rowManager.getRowFromDataObject(t.data[0]),r&&r.deleteActual()),s=t.origFuncs.shift.call(e),t.unblock("data-shift")),s}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var r,s;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(r=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),r&&r.deleteActual()),s=t.origFuncs.pop.call(e),t.unblock("data-pop")),s}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var r=Array.from(arguments),s=r[0]<0?e.length+r[0]:r[0],a=r[1],o=r[2]?r.slice(2):!1,u,c;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),o&&(u=e[s]?t.table.rowManager.getRowFromDataObject(e[s]):!1,u?o.forEach(p=>{t.table.rowManager.addRowActual(p,!0,u,!0)}):(o=o.slice().reverse(),o.forEach(p=>{t.table.rowManager.addRowActual(p,!0,!1,!0)}))),a!==0){var d=e.slice(s,typeof r[1]>"u"?r[1]:s+a);d.forEach((p,h)=>{var f=t.table.rowManager.getRowFromDataObject(p);f&&f.deleteActual(h!==d.length-1)})}(o||a!==0)&&t.table.rowManager.reRenderInPosition(),c=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return c}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],r={};i&&(r.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var s=r.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return s}}),r.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var s=r.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return s}}),r.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var s=r.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return s}}),r.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var s=r.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return s}}),r.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var s=r.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return s}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var r=this,s=Object.getOwnPropertyDescriptor(t,i),a=t[i],o=this.currentVersion;Object.defineProperty(t,i,{set:u=>{if(a=u,!r.blocked&&o===r.currentVersion){r.block("key");var c={};c[i]=u,e.updateData(c),r.unblock("key")}s.set&&s.set(u)},get:()=>(s.get&&s.get(),a)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}class rE extends Pe{static moduleName="resizeColumns";constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1),this.registerTableOption("resizableColumnGuide",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t,i.modules.resize.handleEl.style["z-index"]=11),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,r){var s=this,a=!1,o=i.definition.resizable,u={},c=i.getLastColumn();if(e==="header"&&(a=i.definition.formatter=="textarea"||i.definition.variableHeight,u={variableHeight:a}),(o===!0||o==e)&&this._checkResizability(c)){var d=document.createElement("span");d.className="tabulator-col-resize-handle",d.addEventListener("click",function(h){h.stopPropagation()});var p=function(h){s.startColumn=i,s.initialNextColumn=s.nextColumn=c.nextColumn(),s._mouseDown(h,c,d)};d.addEventListener("mousedown",p),d.addEventListener("touchstart",p,{passive:!0}),d.addEventListener("dblclick",h=>{var f=c.getWidth();h.stopPropagation(),c.reinitializeWidth(!0),f!==c.getWidth()&&(s.dispatch("column-resized",c),s.dispatchExternal("columnResized",c.getComponent()))}),i.modules.frozen&&(d.style.position="sticky",d.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),u.handleEl=d,r.parentNode&&i.visible&&r.after(d)}t.modules.resize=u}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}resize(e,t){var i=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,r=i-this.startX,s=i-this.latestX,a,o;if(this.latestX=i,this.table.rtl&&(r=-r,s=-s),a=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+r),o=t.width==t.minWidth||t.width==t.maxWidth,s<0&&(this.nextColumn=this.initialNextColumn),this.table.options.resizableColumnFit&&this.nextColumn&&!(a&&o)){let u=this.nextColumn.getWidth();s>0&&u<=this.nextColumn.minWidth&&(this.nextColumn=this.nextColumn.nextColumn()),this.nextColumn&&this.nextColumn.setWidth(this.nextColumn.getWidth()-s)}this.table.columnManager.rerenderColumns(!0),!this.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}calcGuidePosition(e,t,i){var r=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,s=i.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,a=this.table.element.getBoundingClientRect().x,o=t.element.getBoundingClientRect().left-a,u=r-this.startX,c=Math.max(s+u,o+t.minWidth);return t.maxWidth&&(c=Math.min(c,o+t.maxWidth)),c}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var r=this,s;this.dispatchExternal("columnResizing",t.getComponent()),r.table.options.resizableColumnGuide&&(s=document.createElement("span"),s.classList.add("tabulator-col-resize-guide"),r.table.element.appendChild(s),setTimeout(()=>{s.style.left=r.calcGuidePosition(e,t,i)+"px"})),r.table.element.classList.add("tabulator-block-select");function a(u){r.table.options.resizableColumnGuide?s.style.left=r.calcGuidePosition(u,t,i)+"px":r.resize(u,t)}function o(u){r.table.options.resizableColumnGuide&&(r.resize(u,t),s.remove()),r.startColumn.modules.edit&&(r.startColumn.modules.edit.blocked=!1),r.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),r.table.element.classList.remove("tabulator-block-select"),r.startWidth!==t.getWidth()&&(r.table.columnManager.verticalAlignHeaders(),r.dispatch("column-resized",t),r.dispatchExternal("columnResized",t.getComponent()))}e.stopPropagation(),r.startColumn.modules.edit&&(r.startColumn.modules.edit.blocked=!0),r.startX=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,r.latestX=r.startX,r.startWidth=t.getWidth(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class sE extends Pe{static moduleName="resizeRows";constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1),this.registerTableOption("resizableRowGuide",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),r=document.createElement("div");r.className="tabulator-row-resize-handle";var s=document.createElement("div");s.className="tabulator-row-resize-handle prev",r.addEventListener("click",function(u){u.stopPropagation()});var a=function(u){t.startRow=e,t._mouseDown(u,e,r)};r.addEventListener("mousedown",a),r.addEventListener("touchstart",a,{passive:!0}),s.addEventListener("click",function(u){u.stopPropagation()});var o=function(u){var c=t.table.rowManager.prevDisplayRow(e);c&&(t.startRow=c,t._mouseDown(u,c,s))};s.addEventListener("mousedown",o),s.addEventListener("touchstart",o,{passive:!0}),i.appendChild(r),i.appendChild(s)}resize(e,t){t.setHeight(this.startHeight+((typeof e.screenY>"u"?e.touches[0].screenY:e.screenY)-this.startY))}calcGuidePosition(e,t,i){var r=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,s=i.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,a=this.table.element.getBoundingClientRect().y,o=t.element.getBoundingClientRect().top-a,u=r-this.startY;return Math.max(s+u,o)}_mouseDown(e,t,i){var r=this,s;r.dispatchExternal("rowResizing",t.getComponent()),r.table.options.resizableRowGuide&&(s=document.createElement("span"),s.classList.add("tabulator-row-resize-guide"),r.table.element.appendChild(s),setTimeout(()=>{s.style.top=r.calcGuidePosition(e,t,i)+"px"})),r.table.element.classList.add("tabulator-block-select");function a(u){r.table.options.resizableRowGuide?s.style.top=r.calcGuidePosition(u,t,i)+"px":r.resize(u,t)}function o(u){r.table.options.resizableRowGuide&&(r.resize(u,t),s.remove()),document.body.removeEventListener("mouseup",a),document.body.removeEventListener("mousemove",a),i.removeEventListener("touchmove",a),i.removeEventListener("touchend",o),r.table.element.classList.remove("tabulator-block-select"),r.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),r.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,r.startHeight=t.getHeight(),document.body.addEventListener("mousemove",a),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",a,{passive:!0}),i.addEventListener("touchend",o)}}class aE extends Pe{static moduleName="resizeTable";constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var r=Math.floor(i[0].contentRect.height),s=Math.floor(i[0].contentRect.width);(this.tableHeight!=r||this.tableWidth!=s)&&(this.tableHeight=r,this.tableWidth=s,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var r=Math.floor(i[0].contentRect.height),s=Math.floor(i[0].contentRect.width);(this.containerHeight!=r||this.containerWidth!=s)&&(this.containerHeight=r,this.containerWidth=s,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell))&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}function oE(n,e,t){var i=document.createElement("div"),r=n.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=`<svg class='tabulator-responsive-collapse-toggle-open' viewbox="0 0 24 24">
|
|
35
40
|
<line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
|
|
36
41
|
<line y1="7" x1="12" y2="17" x2="12" fill="none" stroke-width="3" stroke-linecap="round" />
|
|
37
42
|
</svg>
|
|
38
43
|
|
|
39
44
|
<svg class='tabulator-responsive-collapse-toggle-close' viewbox="0 0 24 24">
|
|
40
45
|
<line x1="7" y1="12" x2="17" y2="12" fill="none" stroke-width="3" stroke-linecap="round" />
|
|
41
|
-
</svg>`,s.getElement().classList.add("tabulator-row-handle");function r(a){var o=n.element;n.open=a,o&&(n.open?(i.classList.add("open"),o.style.display=""):(i.classList.remove("open"),o.style.display="none"))}return i.addEventListener("click",function(a){a.stopImmediatePropagation(),r(!n.open),s.getTable().rowManager.adjustTableSize()}),r(n.open),i}var Cp={format:{formatters:{responsiveCollapse:wp}}};class Ep extends ke{static moduleName="responsiveLayout";static moduleExtensions=Cp;constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.collapseFormatter&&(this.collapseFormatter=this.collapseFormatter.bind(this.table)),this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var n=i.modules.responsive.order-t.modules.responsive.order;return n||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let n=this.columns[this.index];n?(this.hideColumn(n),this.index++):e=!1}else{let n=this.columns[this.index-1];n&&i>0&&i>=n.getWidth()?(this.showColumn(n),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i),e.calcHeight(!0)}}generateCollapsedRowData(e){var t=e.getData(),i=[],n;return this.hiddenColumns.forEach(r=>{var a=r.getFieldValue(t);if(r.definition.title&&r.field)if(r.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let o=function(l){l()};n={value:!1,data:{},getValue:function(){return a},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return r.getComponent()},getTable:()=>this.table},i.push({field:r.field,title:r.definition.title,value:r.modules.format.formatter.call(this.table.modules.format,n,r.modules.format.params,o)})}else i.push({field:r.field,title:r.definition.title,value:a})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(i=>{var n=document.createElement("tr"),r=document.createElement("td"),a=document.createElement("td"),o,l=document.createElement("strong");r.appendChild(l),this.modules.localize.bind("columns|"+i.field,function(u){l.innerHTML=u||i.title}),i.value instanceof Node?(o=document.createElement("div"),o.appendChild(i.value),a.appendChild(o)):a.innerHTML=i.value,n.appendChild(r),n.appendChild(a),t.appendChild(n)}),Object.keys(e).length?t:""}}function kp(s,e,t){var i=document.createElement("input"),n=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",a=>{a.stopPropagation()}),typeof s.getRow=="function"){var r=s.getRow();r instanceof Ls?(i.addEventListener("change",a=>{this.table.options.selectableRowsRangeMode==="click"&&n?n=!1:r.toggleSelect()}),this.table.options.selectableRowsRangeMode==="click"&&i.addEventListener("click",a=>{n=!0,this.table.modules.selectRow.handleComplexRowClick(r._row,a)}),i.checked=r.isSelected&&r.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(r,i)):i=""}else i.addEventListener("change",a=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var xp={format:{formatters:{rowSelection:kp}}};class Mp extends ke{static moduleName="selectRow";static moduleExtensions=xp;constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectableRows","highlight"),this.registerTableOption("selectableRowsRangeMode","drag"),this.registerTableOption("selectableRowsRollingSelection",!0),this.registerTableOption("selectableRowsPersistence",!0),this.registerTableOption("selectableRowsCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.deprecatedOptionsCheck(),this.table.options.selectableRows==="highlight"&&this.table.options.selectableRange&&(this.table.options.selectableRows=!1),this.table.options.selectableRows!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectableRows&&!this.table.options.selectableRowsPersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}deprecatedOptionsCheck(){}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=t.checkRowSelectability(e),n=e.getElement(),r=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",r)};e.modules.select={selected:!1},n.classList.toggle("tabulator-selectable",i),n.classList.toggle("tabulator-unselectable",!i),t.checkRowSelectability(e)&&t.table.options.selectableRows&&t.table.options.selectableRows!="highlight"&&(t.table.options.selectableRowsRangeMode==="click"?n.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(n.addEventListener("click",function(a){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),n.addEventListener("mousedown",function(a){if(a.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",r),document.body.addEventListener("keyup",r),t.toggleRow(e),!1}),n.addEventListener("mouseenter",function(a){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),n.addEventListener("mouseout",function(a){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),n=this.table.rowManager.getDisplayRowIndex(e),r=i<=n?i:n,a=i>=n?i:n,o=this.table.rowManager.getDisplayRows().slice(0),l=o.splice(r,a-r+1);t.ctrlKey||t.metaKey?(l.forEach(u=>{u!==this.lastClickedRow&&(this.table.options.selectableRows!==!0&&!this.isRowSelected(e)?this.selectedRows.length<this.table.options.selectableRows&&this.toggleRow(u):this.toggleRow(u))}),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.table.options.selectableRows!==!0&&l.length>this.table.options.selectableRows&&(l=l.slice(0,this.table.options.selectableRows)),this.selectRows(l)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableRowsCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,n;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"number":i=this.table.rowManager.findRow(e);break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(r=>{n=this._selectRow(r,!0,!0),n&&t.push(n)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectableRows)&&this.table.options.selectableRows!==!0&&!i&&this.selectedRows.length>=this.table.options.selectableRows)if(this.table.options.selectableRowsRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var n=this.table.rowManager.findRow(e);if(n){if(this.selectedRows.indexOf(n)==-1)return n.getElement().classList.add("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!0,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!0),this.selectedRows.push(n),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!0),this.dispatchExternal("rowSelected",n.getComponent()),this._rowSelectionChanged(t,n),n}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],n,r;switch(typeof e){case"undefined":n=Object.assign([],this.selectedRows);break;case"number":n=this.table.rowManager.findRow(e);break;case"string":n=this.table.rowManager.findRow(e),n||(n=this.table.rowManager.getRows(e));break;default:n=e;break}Array.isArray(n)?n.length&&(n.forEach(a=>{r=this._deselectRow(a,!0,!0),r&&i.push(r)}),this._rowSelectionChanged(t,[],i)):n&&this._deselectRow(n,t,!0)}_deselectRow(e,t){var i=this,n=i.table.rowManager.findRow(e),r,a;if(n){if(r=i.selectedRows.findIndex(function(o){return o==n}),r>-1)return a=n.getElement(),a&&a.classList.remove("tabulator-selected"),n.modules.select||(n.modules.select={}),n.modules.select.selected=!1,n.modules.select.checkboxEl&&(n.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(r,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(n,!1),this.dispatchExternal("rowDeselected",n.getComponent()),i._rowSelectionChanged(t,void 0,n),n}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(n=>n.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(n=>n.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0,!0);if(t)for(let n of i)this._selectRow(n,!0);else for(let n of i)this._deselectRow(n,!0)}}class Sp{constructor(e){return this._range=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._range.table.componentFunctionBinder.handle("range",t._range,i)}})}getElement(){return this._range.element}getData(){return this._range.getData()}getCells(){return this._range.getCells(!0,!0)}getStructuredCells(){return this._range.getStructuredCells()}getRows(){return this._range.getRows().map(e=>e.getComponent())}getColumns(){return this._range.getColumns().map(e=>e.getComponent())}getBounds(){return this._range.getBounds()}getTopEdge(){return this._range.top}getBottomEdge(){return this._range.bottom}getLeftEdge(){return this._range.left}getRightEdge(){return this._range.right}setBounds(e,t){this._range.destroyedGuard("setBounds")&&this._range.setBounds(e&&e._cell,t&&t._cell)}setStartBound(e){this._range.destroyedGuard("setStartBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}setEndBound(e){this._range.destroyedGuard("setEndBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}clearValues(){this._range.destroyedGuard("clearValues")&&this._range.clearValues()}remove(){this._range.destroyedGuard("remove")&&this._range.destroy(!0)}}class Rp extends Je{constructor(e,t,i,n){super(e),this.rangeManager=t,this.element=null,this.initialized=!1,this.initializing={start:!1,end:!1},this.destroyed=!1,this.top=0,this.bottom=0,this.left=0,this.right=0,this.table=e,this.start={row:0,col:0},this.end={row:0,col:0},this.rangeManager.rowHeader&&(this.left=1,this.right=1,this.start.col=1,this.end.col=1),this.initElement(),setTimeout(()=>{this.initBounds(i,n)})}initElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-range")}initBounds(e,t){this._updateMinMax(),e&&this.setBounds(e,t||e)}setStart(e,t){(this.start.row!==e||this.start.col!==t)&&(this.start.row=e,this.start.col=t,this.initializing.start=!0,this._updateMinMax())}setEnd(e,t){(this.end.row!==e||this.end.col!==t)&&(this.end.row=e,this.end.col=t,this.initializing.end=!0,this._updateMinMax())}setBounds(e,t,i){e&&this.setStartBound(e),this.setEndBound(t||e),this.rangeManager.layoutElement(i)}setStartBound(e){var t,i;e.type==="column"?this.rangeManager.columnSelection&&this.setStart(0,e.getPosition()-1):(t=e.row.position-1,i=e.column.getPosition()-1,e.column===this.rangeManager.rowHeader?this.setStart(t,1):this.setStart(t,i))}setEndBound(e){var t=this._getTableRows().length,i,n,r;e.type==="column"?this.rangeManager.columnSelection&&(this.rangeManager.selecting==="column"?this.setEnd(t-1,e.getPosition()-1):this.rangeManager.selecting==="cell"&&this.setEnd(0,e.getPosition()-1)):(i=e.row.position-1,n=e.column.getPosition()-1,r=e.column===this.rangeManager.rowHeader,this.rangeManager.selecting==="row"?this.setEnd(i,this._getTableColumns().length-1):this.rangeManager.selecting!=="row"&&r?this.setEnd(i,0):this.rangeManager.selecting==="column"?this.setEnd(t-1,n):this.setEnd(i,n))}_updateMinMax(){this.top=Math.min(this.start.row,this.end.row),this.bottom=Math.max(this.start.row,this.end.row),this.left=Math.min(this.start.col,this.end.col),this.right=Math.max(this.start.col,this.end.col),this.initialized?this.dispatchExternal("rangeChanged",this.getComponent()):this.initializing.start&&this.initializing.end&&(this.initialized=!0,this.dispatchExternal("rangeAdded",this.getComponent()))}_getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}_getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}layout(){var e=this.table.rowManager.renderer.vDomTop,t=this.table.rowManager.renderer.vDomBottom,i=this.table.columnManager.renderer.leftCol,n=this.table.columnManager.renderer.rightCol,r,a,o,l,u,h,m,v,C,F;this.table.options.renderHorizontal==="virtual"&&this.rangeManager.rowHeader&&(n+=1),e==null&&(e=0),t==null&&(t=1/0),i==null&&(i=0),n==null&&(n=1/0),this.overlaps(i,e,n,t)&&(r=Math.max(this.top,e),a=Math.min(this.bottom,t),o=Math.max(this.left,i),l=Math.min(this.right,n),u=this.rangeManager.getCell(r,o),h=this.rangeManager.getCell(a,l),m=u.getElement(),v=h.getElement(),C=u.row.getElement(),F=h.row.getElement(),this.element.classList.add("tabulator-range-active"),this.table.rtl?(this.element.style.right=C.offsetWidth-m.offsetLeft-m.offsetWidth+"px",this.element.style.width=m.offsetLeft+m.offsetWidth-v.offsetLeft+"px"):(this.element.style.left=C.offsetLeft+m.offsetLeft+"px",this.element.style.width=v.offsetLeft+v.offsetWidth-m.offsetLeft+"px"),this.element.style.top=C.offsetTop+"px",this.element.style.height=F.offsetTop+F.offsetHeight-C.offsetTop+"px")}atTopLeft(e){return e.row.position-1===this.top&&e.column.getPosition()-1===this.left}atBottomRight(e){return e.row.position-1===this.bottom&&e.column.getPosition()-1===this.right}occupies(e){return this.occupiesRow(e.row)&&this.occupiesColumn(e.column)}occupiesRow(e){return this.top<=e.position-1&&e.position-1<=this.bottom}occupiesColumn(e){return this.left<=e.getPosition()-1&&e.getPosition()-1<=this.right}overlaps(e,t,i,n){return!(this.left>i||e>this.right||this.top>n||t>this.bottom)}getData(){var e=[],t=this.getRows(),i=this.getColumns();return t.forEach(n=>{var r=n.getData(),a={};i.forEach(o=>{a[o.field]=r[o.field]}),e.push(a)}),e}getCells(e,t){var i=[],n=this.getRows(),r=this.getColumns();return e?i=n.map(a=>{var o=[];return a.getCells().forEach(l=>{r.includes(l.column)&&o.push(t?l.getComponent():l)}),o}):n.forEach(a=>{a.getCells().forEach(o=>{r.includes(o.column)&&i.push(t?o.getComponent():o)})}),i}getStructuredCells(){return this.getCells(!0,!0)}getRows(){return this._getTableRows().slice(this.top,this.bottom+1)}getColumns(){return this._getTableColumns().slice(this.left,this.right+1)}clearValues(){var e=this.getCells(),t=this.table.options.selectableRangeClearCellsValue;this.table.blockRedraw(),e.forEach(i=>{i.setValue(t)}),this.table.restoreRedraw()}getBounds(e){var t=this.getCells(!1,e),i={start:null,end:null};return t.length?(i.start=t[0],i.end=t[t.length-1]):console.warn("No bounds defined on range"),i}getComponent(){return this.component||(this.component=new Sp(this)),this.component}destroy(e){this.destroyed=!0,this.element.remove(),e&&this.rangeManager.rangeRemoved(this),this.initialized&&this.dispatchExternal("rangeRemoved",this.getComponent())}destroyedGuard(e){return this.destroyed&&console.warn("You cannot call the "+e+" function on a destroyed range"),!this.destroyed}}var Dp={rangeJumpUp:["ctrl + 38","meta + 38"],rangeJumpDown:["ctrl + 40","meta + 40"],rangeJumpLeft:["ctrl + 37","meta + 37"],rangeJumpRight:["ctrl + 39","meta + 39"],rangeExpandUp:"shift + 38",rangeExpandDown:"shift + 40",rangeExpandLeft:"shift + 37",rangeExpandRight:"shift + 39",rangeExpandJumpUp:["ctrl + shift + 38","meta + shift + 38"],rangeExpandJumpDown:["ctrl + shift + 40","meta + shift + 40"],rangeExpandJumpLeft:["ctrl + shift + 37","meta + shift + 37"],rangeExpandJumpRight:["ctrl + shift + 39","meta + shift + 39"]},Tp={rangeJumpLeft:function(s){this.dispatch("keybinding-nav-range",s,"left",!0,!1)},rangeJumpRight:function(s){this.dispatch("keybinding-nav-range",s,"right",!0,!1)},rangeJumpUp:function(s){this.dispatch("keybinding-nav-range",s,"up",!0,!1)},rangeJumpDown:function(s){this.dispatch("keybinding-nav-range",s,"down",!0,!1)},rangeExpandLeft:function(s){this.dispatch("keybinding-nav-range",s,"left",!1,!0)},rangeExpandRight:function(s){this.dispatch("keybinding-nav-range",s,"right",!1,!0)},rangeExpandUp:function(s){this.dispatch("keybinding-nav-range",s,"up",!1,!0)},rangeExpandDown:function(s){this.dispatch("keybinding-nav-range",s,"down",!1,!0)},rangeExpandJumpLeft:function(s){this.dispatch("keybinding-nav-range",s,"left",!0,!0)},rangeExpandJumpRight:function(s){this.dispatch("keybinding-nav-range",s,"right",!0,!0)},rangeExpandJumpUp:function(s){this.dispatch("keybinding-nav-range",s,"up",!0,!0)},rangeExpandJumpDown:function(s){this.dispatch("keybinding-nav-range",s,"down",!0,!0)}},_p={range:function(s){var e=[],t=this.table.modules.selectRange.activeRange,i=!1,n,r,a,o,l;return l=s.length,t&&(n=t.getBounds(),r=n.start,n.start===n.end&&(i=!0),r&&(e=this.table.rowManager.activeRows.slice(),a=e.indexOf(r.row),i?o=s.length:o=e.indexOf(n.end.row)-a+1,a>-1&&(this.table.blockRedraw(),e=e.slice(a,a+o),e.forEach((u,h)=>{u.updateData(s[h%l])}),this.table.restoreRedraw()))),e}},Op={range:function(s){var e=[],t=[],i=this.table.modules.selectRange.activeRange,n=!1,r,a,o,l,u;return i&&(r=i.getBounds(),a=r.start,r.start===r.end&&(n=!0),a&&(s=s.split(`
|
|
42
|
-
`),s.forEach(function(h){e.push(h.split(" "))}),e.length&&(l=this.table.columnManager.getVisibleColumnsByIndex(),u=l.indexOf(a.column),u>-1)))?(n?o=e[0].length:o=l.indexOf(r.end.column)-u+1,l=l.slice(u,u+o),e.forEach(h=>{var m={},v=h.length;l.forEach(function(C,F){m[C.field]=h[F%v]}),t.push(m)}),t):!1}},Lp={range:function(){var s=this.modules.selectRange.selectedColumns();return this.columnManager.rowHeader&&s.unshift(this.columnManager.rowHeader),s}},Pp={range:function(){return this.modules.selectRange.selectedRows()}},Fp={keybindings:{bindings:Dp,actions:Tp},clipboard:{pasteActions:_p,pasteParsers:Op},export:{columnLookups:Lp,rowLookups:Pp}};class Ap extends ke{static moduleName="selectRange";static moduleInitOrder=1;static moduleExtensions=Fp;constructor(e){super(e),this.selecting="cell",this.mousedown=!1,this.ranges=[],this.overlay=null,this.rowHeader=null,this.layoutChangeTimeout=null,this.columnSelection=!1,this.rowSelection=!1,this.maxRanges=0,this.activeRange=!1,this.blockKeydown=!1,this.keyDownEvent=this._handleKeyDown.bind(this),this.mouseUpEvent=this._handleMouseUp.bind(this),this.registerTableOption("selectableRange",!1),this.registerTableOption("selectableRangeColumns",!1),this.registerTableOption("selectableRangeRows",!1),this.registerTableOption("selectableRangeClearCells",!1),this.registerTableOption("selectableRangeClearCellsValue",void 0),this.registerTableOption("selectableRangeAutoFocus",!0),this.registerTableFunction("getRangesData",this.getRangesData.bind(this)),this.registerTableFunction("getRanges",this.getRanges.bind(this)),this.registerTableFunction("addRange",this.addRangeFromComponent.bind(this)),this.registerComponentFunction("cell","getRanges",this.cellGetRanges.bind(this)),this.registerComponentFunction("row","getRanges",this.rowGetRanges.bind(this)),this.registerComponentFunction("column","getRanges",this.colGetRanges.bind(this))}initialize(){this.options("selectableRange")&&(this.options("selectableRows")?console.warn("SelectRange functionality cannot be used in conjunction with row selection"):(this.maxRanges=this.options("selectableRange"),this.initializeTable(),this.initializeWatchers()),this.options("columns").findIndex(e=>e.frozen)>0&&console.warn("Having frozen column in arbitrary position with selectRange option may result in unpredictable behavior."),this.options("columns").filter(e=>e.frozen)>1&&console.warn("Having multiple frozen columns with selectRange option may result in unpredictable behavior."))}initializeTable(){this.overlay=document.createElement("div"),this.overlay.classList.add("tabulator-range-overlay"),this.rangeContainer=document.createElement("div"),this.rangeContainer.classList.add("tabulator-range-container"),this.activeRangeCellElement=document.createElement("div"),this.activeRangeCellElement.classList.add("tabulator-range-cell-active"),this.overlay.appendChild(this.rangeContainer),this.overlay.appendChild(this.activeRangeCellElement),this.table.rowManager.element.addEventListener("keydown",this.keyDownEvent),this.resetRanges(),this.table.rowManager.element.appendChild(this.overlay),this.table.columnManager.element.setAttribute("tabindex",0),this.table.element.classList.add("tabulator-ranges")}initializeWatchers(){this.columnSelection=this.options("selectableRangeColumns"),this.rowSelection=this.options("selectableRangeRows"),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-mousedown",this.handleColumnMouseDown.bind(this)),this.subscribe("column-mousemove",this.handleColumnMouseMove.bind(this)),this.subscribe("column-resized",this.handleColumnResized.bind(this)),this.subscribe("column-moving",this.handleColumnMoving.bind(this)),this.subscribe("column-moved",this.handleColumnMoved.bind(this)),this.subscribe("column-width",this.layoutChange.bind(this)),this.subscribe("column-height",this.layoutChange.bind(this)),this.subscribe("column-resized",this.layoutChange.bind(this)),this.subscribe("columns-loaded",this.updateHeaderColumn.bind(this)),this.subscribe("cell-height",this.layoutChange.bind(this)),this.subscribe("cell-rendered",this.renderCell.bind(this)),this.subscribe("cell-mousedown",this.handleCellMouseDown.bind(this)),this.subscribe("cell-mousemove",this.handleCellMouseMove.bind(this)),this.subscribe("cell-click",this.handleCellClick.bind(this)),this.subscribe("cell-editing",this.handleEditingCell.bind(this)),this.subscribe("page-changed",this.redraw.bind(this)),this.subscribe("scroll-vertical",this.layoutChange.bind(this)),this.subscribe("scroll-horizontal",this.layoutChange.bind(this)),this.subscribe("data-destroy",this.tableDestroyed.bind(this)),this.subscribe("data-processed",this.resetRanges.bind(this)),this.subscribe("table-layout",this.layoutElement.bind(this)),this.subscribe("table-redraw",this.redraw.bind(this)),this.subscribe("table-destroy",this.tableDestroyed.bind(this)),this.subscribe("edit-editor-clear",this.finishEditingCell.bind(this)),this.subscribe("edit-blur",this.restoreFocus.bind(this)),this.subscribe("keybinding-nav-prev",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-next",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-left",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-right",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-up",this.keyNavigate.bind(this,"up")),this.subscribe("keybinding-nav-down",this.keyNavigate.bind(this,"down")),this.subscribe("keybinding-nav-range",this.keyNavigateRange.bind(this))}initializeColumn(e){this.columnSelection&&e.definition.headerSort&&this.options("headerSortClickElement")!=="icon"&&console.warn("Using column headerSort with selectableRangeColumns option may result in unpredictable behavior. Consider using headerSortClickElement: 'icon'."),e.modules.edit}updateHeaderColumn(){var e;this.rowSelection&&(this.rowHeader=this.table.columnManager.getVisibleColumnsByIndex()[0],this.rowHeader&&(this.rowHeader.definition.cssClass=this.rowHeader.definition.cssClass+" tabulator-range-row-header",this.rowHeader.definition.headerSort&&console.warn("Using column headerSort with selectableRangeRows option may result in unpredictable behavior"),this.rowHeader.definition.editor&&console.warn("Using column editor with selectableRangeRows option may result in unpredictable behavior"))),this.table.modules.frozenColumns&&this.table.modules.frozenColumns.active&&(e=this.table.modules.frozenColumns.getFrozenColumns(),(e.length>1||e.length===1&&e[0]!==this.rowHeader)&&console.warn("Using frozen columns that are not the range header in combination with the selectRange option may result in unpredictable behavior"))}getRanges(){return this.ranges.map(e=>e.getComponent())}getRangesData(){return this.ranges.map(e=>e.getData())}addRangeFromComponent(e,t){return e=e?e._cell:null,t=t?t._cell:null,this.addRange(e,t)}cellGetRanges(e){var t=[];return e.column===this.rowHeader?t=this.ranges.filter(i=>i.occupiesRow(e.row)):t=this.ranges.filter(i=>i.occupies(e)),t.map(i=>i.getComponent())}rowGetRanges(e){var t=this.ranges.filter(i=>i.occupiesRow(e));return t.map(i=>i.getComponent())}colGetRanges(e){var t=this.ranges.filter(i=>i.occupiesColumn(e));return t.map(i=>i.getComponent())}_handleMouseUp(e){this.mousedown=!1,document.removeEventListener("mouseup",this.mouseUpEvent)}_handleKeyDown(e){if(!this.blockKeydown&&(!this.table.modules.edit||this.table.modules.edit&&!this.table.modules.edit.currentCell)){if(e.key==="Enter"){if(this.table.modules.edit&&this.table.modules.edit.currentCell)return;this.table.modules.edit.editCell(this.getActiveCell()),e.preventDefault()}(e.key==="Backspace"||e.key==="Delete")&&this.options("selectableRangeClearCells")&&this.activeRange&&this.activeRange.clearValues()}}initializeFocus(e){var t;this.restoreFocus();try{document.selection?(t=document.body.createTextRange(),t.moveToElementText(e.getElement()),t.select()):window.getSelection&&(t=document.createRange(),t.selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}catch{}}restoreFocus(e){return this.table.rowManager.element.focus(),!0}handleColumnResized(e){var t;this.selecting!=="column"&&this.selecting!=="all"||(t=this.ranges.some(i=>i.occupiesColumn(e)),t&&this.ranges.forEach(i=>{var n=i.getColumns(!0);n.forEach(r=>{r!==e&&r.setWidth(e.width)})}))}handleColumnMoving(e,t){this.resetRanges().setBounds(t),this.overlay.style.visibility="hidden"}handleColumnMoved(e,t,i){this.activeRange.setBounds(e),this.layoutElement()}handleColumnMouseDown(e,t){e.button===2&&(this.selecting==="column"||this.selecting==="all")&&this.activeRange.occupiesColumn(t)||this.table.options.movableColumns&&this.selecting==="column"&&this.activeRange.occupiesColumn(t)||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleColumnMouseMove(e,t){t===this.rowHeader||!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}renderCell(e){var t=e.getElement(),i=this.ranges.findIndex(n=>n.occupies(e));t.classList.toggle("tabulator-range-selected",i!==-1),t.classList.toggle("tabulator-range-only-cell-selected",this.ranges.length===1&&this.ranges[0].atTopLeft(e)&&this.ranges[0].atBottomRight(e)),t.dataset.range=i}handleCellMouseDown(e,t){e.button===2&&(this.activeRange.occupies(t)||(this.selecting==="row"||this.selecting==="all")&&this.activeRange.occupiesRow(t.row))||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleCellMouseMove(e,t){!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}handleCellClick(e,t){this.initializeFocus(t)}handleEditingCell(e){this.activeRange&&this.activeRange.setBounds(e)}finishEditingCell(){this.blockKeydown=!0,this.table.rowManager.element.focus(),setTimeout(()=>{this.blockKeydown=!1},10)}keyNavigate(e,t){this.navigate(!1,!1,e),t.preventDefault()}keyNavigateRange(e,t,i,n){this.navigate(i,n,t),e.preventDefault()}navigate(e,t,i){var n=!1,r,a,o,l,u,h,m,v,C,F,x;if(this.table.modules.edit&&this.table.modules.edit.currentCell)return!1;if(this.ranges.length>1&&(this.ranges=this.ranges.filter(R=>R===this.activeRange?(R.setEnd(R.start.row,R.start.col),!0):(R.destroy(),!1))),r=this.activeRange,o={top:r.top,bottom:r.bottom,left:r.left,right:r.right},a=t?r.end:r.start,l=a.row,u=a.col,e)switch(i){case"left":u=this.findJumpCellLeft(r.start.row,a.col);break;case"right":u=this.findJumpCellRight(r.start.row,a.col);break;case"up":l=this.findJumpCellUp(a.row,r.start.col);break;case"down":l=this.findJumpCellDown(a.row,r.start.col);break}else{if(t&&(this.selecting==="row"&&(i==="left"||i==="right")||this.selecting==="column"&&(i==="up"||i==="down")))return;switch(i){case"left":u=Math.max(u-1,0);break;case"right":u=Math.min(u+1,this.getTableColumns().length-1);break;case"up":l=Math.max(l-1,0);break;case"down":l=Math.min(l+1,this.getTableRows().length-1);break}}if(this.rowHeader&&u===0&&(u=1),t||r.setStart(l,u),r.setEnd(l,u),t||(this.selecting="cell"),n=o.top!==r.top||o.bottom!==r.bottom||o.left!==r.left||o.right!==r.right,n)return h=this.getRowByRangePos(r.end.row),m=this.getColumnByRangePos(r.end.col),v=h.getElement().getBoundingClientRect(),F=m.getElement().getBoundingClientRect(),C=this.table.rowManager.getElement().getBoundingClientRect(),x=this.table.columnManager.getElement().getBoundingClientRect(),v.top>=C.top&&v.bottom<=C.bottom||(h.getElement().parentNode&&m.getElement().parentNode?this.autoScroll(r,h.getElement(),m.getElement()):h.getComponent().scrollTo(void 0,!1)),F.left>=x.left+this.getRowHeaderWidth()&&F.right<=x.right||(h.getElement().parentNode&&m.getElement().parentNode?this.autoScroll(r,h.getElement(),m.getElement()):m.getComponent().scrollTo(void 0,!1)),this.layoutElement(),!0}rangeRemoved(e){this.ranges=this.ranges.filter(t=>t!==e),this.activeRange===e&&(this.ranges.length?this.activeRange=this.ranges[this.ranges.length-1]:this.addRange()),this.layoutElement()}findJumpRow(e,t,i,n,r){return i&&(t=t.reverse()),this.findJumpItem(n,r,t,function(a){return a.getData()[e.getField()]})}findJumpCol(e,t,i,n,r){return i&&(t=t.reverse()),this.findJumpItem(n,r,t,function(a){return e.getData()[a.getField()]})}findJumpItem(e,t,i,n){var r;for(let a of i){let o=n(a);if(e){if(r=a,o)break}else if(t){if(r=a,o)break}else if(o)r=a;else break}return r}findJumpCellLeft(e,t){var i=this.getRowByRangePos(e),n=this.getTableColumns(),r=this.isEmpty(i.getData()[n[t].getField()]),a=n[t-1]?this.isEmpty(i.getData()[n[t-1].getField()]):!1,o=this.rowHeader?n.slice(1,t):n.slice(0,t),l=this.findJumpCol(i,o,!0,r,a);return l?l.getPosition()-1:t}findJumpCellRight(e,t){var i=this.getRowByRangePos(e),n=this.getTableColumns(),r=this.isEmpty(i.getData()[n[t].getField()]),a=n[t+1]?this.isEmpty(i.getData()[n[t+1].getField()]):!1,o=this.findJumpCol(i,n.slice(t+1,n.length),!1,r,a);return o?o.getPosition()-1:t}findJumpCellUp(e,t){var i=this.getColumnByRangePos(t),n=this.getTableRows(),r=this.isEmpty(n[e].getData()[i.getField()]),a=n[e-1]?this.isEmpty(n[e-1].getData()[i.getField()]):!1,o=this.findJumpRow(i,n.slice(0,e),!0,r,a);return o?o.position-1:e}findJumpCellDown(e,t){var i=this.getColumnByRangePos(t),n=this.getTableRows(),r=this.isEmpty(n[e].getData()[i.getField()]),a=n[e+1]?this.isEmpty(n[e+1].getData()[i.getField()]):!1,o=this.findJumpRow(i,n.slice(e+1,n.length),!1,r,a);return o?o.position-1:e}newSelection(e,t){var i;if(t.type==="column"){if(!this.columnSelection)return;if(t===this.rowHeader){i=this.resetRanges(),this.selecting="all";var n,r=this.getCell(-1,-1);this.rowHeader?n=this.getCell(0,1):n=this.getCell(0,0),i.setBounds(n,r);return}else this.selecting="column"}else t.column===this.rowHeader?this.selecting="row":this.selecting="cell";e.shiftKey?this.activeRange.setBounds(!1,t):e.ctrlKey?this.addRange().setBounds(t):this.resetRanges().setBounds(t)}autoScroll(e,t,i){var n=this.table.rowManager.element,r,a,o,l;typeof t>"u"&&(t=this.getRowByRangePos(e.end.row).getElement()),typeof i>"u"&&(i=this.getColumnByRangePos(e.end.col).getElement()),r={left:i.offsetLeft,right:i.offsetLeft+i.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight},a={left:n.scrollLeft+this.getRowHeaderWidth(),right:Math.ceil(n.scrollLeft+n.clientWidth),top:n.scrollTop,bottom:n.scrollTop+n.offsetHeight-this.table.rowManager.scrollbarWidth},o=a.left<r.left&&r.left<a.right&&a.left<r.right&&r.right<a.right,l=a.top<r.top&&r.top<a.bottom&&a.top<r.bottom&&r.bottom<a.bottom,o||(r.left<a.left?n.scrollLeft=r.left-this.getRowHeaderWidth():r.right>a.right&&(n.scrollLeft=Math.min(r.right-n.clientWidth,r.left-this.getRowHeaderWidth()))),l||(r.top<a.top?n.scrollTop=r.top:r.bottom>a.bottom&&(n.scrollTop=r.bottom-n.clientHeight))}layoutChange(){this.overlay.style.visibility="hidden",clearTimeout(this.layoutChangeTimeout),this.layoutChangeTimeout=setTimeout(this.layoutRanges.bind(this),200)}redraw(e){e&&(this.selecting="cell",this.resetRanges(),this.layoutElement())}layoutElement(e){var t;e?t=this.table.rowManager.getVisibleRows(!0):t=this.table.rowManager.getRows(),t.forEach(i=>{i.type==="row"&&(this.layoutRow(i),i.cells.forEach(n=>this.renderCell(n)))}),this.getTableColumns().forEach(i=>{this.layoutColumn(i)}),this.layoutRanges()}layoutRow(e){var t=e.getElement(),i=!1,n=this.ranges.some(r=>r.occupiesRow(e));this.selecting==="row"?i=n:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",n)}layoutColumn(e){var t=e.getElement(),i=!1,n=this.ranges.some(r=>r.occupiesColumn(e));this.selecting==="column"?i=n:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",n)}layoutRanges(){var e,t,i;this.table.initialized&&(e=this.getActiveCell(),e&&(t=e.getElement(),i=e.row.getElement(),this.table.rtl?this.activeRangeCellElement.style.right=i.offsetWidth-t.offsetLeft-t.offsetWidth+"px":this.activeRangeCellElement.style.left=i.offsetLeft+t.offsetLeft+"px",this.activeRangeCellElement.style.top=i.offsetTop+"px",this.activeRangeCellElement.style.width=t.offsetWidth+"px",this.activeRangeCellElement.style.height=i.offsetHeight+"px",this.ranges.forEach(n=>n.layout()),this.overlay.style.visibility="visible"))}getCell(e,t){var i;return t<0&&(t=this.getTableColumns().length+t,t<0)?null:(e<0&&(e=this.getTableRows().length+e),i=this.table.rowManager.getRowFromPosition(e+1),i?i.getCells(!1,!0).filter(n=>n.column.visible)[t]:null)}getActiveCell(){return this.getCell(this.activeRange.start.row,this.activeRange.start.col)}getRowByRangePos(e){return this.getTableRows()[e]}getColumnByRangePos(e){return this.getTableColumns()[e]}getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}addRange(e,t){var i;return this.maxRanges!==!0&&this.ranges.length>=this.maxRanges&&this.ranges.shift().destroy(),i=new Rp(this.table,this,e,t),this.activeRange=i,this.ranges.push(i),this.rangeContainer.appendChild(i.element),i}resetRanges(){var e,t,i;return this.ranges.forEach(n=>n.destroy()),this.ranges=[],e=this.addRange(),this.table.rowManager.activeRows.length&&(i=this.table.rowManager.activeRows[0].cells.filter(n=>n.column.visible),t=i[this.rowHeader?1:0],t&&(e.setBounds(t),this.options("selectableRangeAutoFocus")&&this.initializeFocus(t))),e}tableDestroyed(){document.removeEventListener("mouseup",this.mouseUpEvent),this.table.rowManager.element.removeEventListener("keydown",this.keyDownEvent)}selectedRows(e){return e?this.activeRange.getRows().map(t=>t.getComponent()):this.activeRange.getRows()}selectedColumns(e){return e?this.activeRange.getColumns().map(t=>t.getComponent()):this.activeRange.getColumns()}getRowHeaderWidth(){return this.rowHeader?this.rowHeader.getElement().offsetWidth:0}isEmpty(e){return e==null||e===""}}function Hp(s,e,t,i,n,r,a){var o=a.alignEmptyValues,l=a.decimalSeparator,u=a.thousandSeparator,h=0;if(s=String(s),e=String(e),u&&(s=s.split(u).join(""),e=e.split(u).join("")),l&&(s=s.split(l).join("."),e=e.split(l).join(".")),s=parseFloat(s),e=parseFloat(e),isNaN(s))h=isNaN(e)?0:-1;else if(isNaN(e))h=1;else return s-e;return(o==="top"&&r==="desc"||o==="bottom"&&r==="asc")&&(h*=-1),h}function zp(s,e,t,i,n,r,a){var o=a.alignEmptyValues,l=0,u;if(!s)l=e?-1:0;else if(!e)l=1;else{switch(typeof a.locale){case"boolean":a.locale&&(u=this.langLocale());break;case"string":u=a.locale;break}return String(s).toLowerCase().localeCompare(String(e).toLowerCase(),u)}return(o==="top"&&r==="desc"||o==="bottom"&&r==="asc")&&(l*=-1),l}function zn(s,e,t,i,n,r,a){var o=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),l=a.format||"dd/MM/yyyy HH:mm:ss",u=a.alignEmptyValues,h=0;if(typeof o<"u"){if(o.isDateTime(s)||(l==="iso"?s=o.fromISO(String(s)):s=o.fromFormat(String(s),l)),o.isDateTime(e)||(l==="iso"?e=o.fromISO(String(e)):e=o.fromFormat(String(e),l)),!s.isValid)h=e.isValid?-1:0;else if(!e.isValid)h=1;else return s-e;return(u==="top"&&r==="desc"||u==="bottom"&&r==="asc")&&(h*=-1),h}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function Bp(s,e,t,i,n,r,a){return a.format||(a.format="dd/MM/yyyy"),zn.call(this,s,e,t,i,n,r,a)}function Np(s,e,t,i,n,r,a){return a.format||(a.format="HH:mm"),zn.call(this,s,e,t,i,n,r,a)}function Ip(s,e,t,i,n,r,a){var o=s===!0||s==="true"||s==="True"||s===1?1:0,l=e===!0||e==="true"||e==="True"||e===1?1:0;return o-l}function Vp(s,e,t,i,n,r,a){var o=a.type||"length",l=a.alignEmptyValues,u=0,h=this.table,m;a.valueMap&&(typeof a.valueMap=="string"?m=function(C){return C.map(F=>He.retrieveNestedData(h.options.nestedFieldSeparator,a.valueMap,F))}:m=a.valueMap);function v(C){var F;switch(m&&(C=m(C)),o){case"length":F=C.length;break;case"sum":F=C.reduce(function(x,R){return x+R});break;case"max":F=Math.max.apply(null,C);break;case"min":F=Math.min.apply(null,C);break;case"avg":F=C.reduce(function(x,R){return x+R})/C.length;break;case"string":F=C.join("");break}return F}if(!Array.isArray(s))u=Array.isArray(e)?-1:0;else if(!Array.isArray(e))u=1;else return o==="string"?String(v(s)).toLowerCase().localeCompare(String(v(e)).toLowerCase()):v(e)-v(s);return(l==="top"&&r==="desc"||l==="bottom"&&r==="asc")&&(u*=-1),u}function jp(s,e,t,i,n,r,a){var o=typeof s>"u"?0:1,l=typeof e>"u"?0:1;return o-l}function Wp(s,e,t,i,n,r,a){var o,l,u,h,m=0,v,C=/(\d+)|(\D+)/g,F=/\d/,x=a.alignEmptyValues,R=0;if(!s&&s!==0)R=!e&&e!==0?0:-1;else if(!e&&e!==0)R=1;else{if(isFinite(s)&&isFinite(e))return s-e;if(o=String(s).toLowerCase(),l=String(e).toLowerCase(),o===l)return 0;if(!(F.test(o)&&F.test(l)))return o>l?1:-1;for(o=o.match(C),l=l.match(C),v=o.length>l.length?l.length:o.length;m<v;)if(u=o[m],h=l[m++],u!==h)return isFinite(u)&&isFinite(h)?(u.charAt(0)==="0"&&(u="."+u),h.charAt(0)==="0"&&(h="."+h),u-h):u>h?1:-1;return o.length>l.length}return(x==="top"&&r==="desc"||x==="bottom"&&r==="asc")&&(R*=-1),R}var Yp={number:Hp,string:zp,date:Bp,time:Np,datetime:zn,boolean:Ip,array:Vp,exists:jp,alphanum:Wp};class Ui extends ke{static moduleName="sort";static sorters=Yp;constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,n){var r=this.getSort();return r.forEach(a=>{delete a.column}),n.sort=r,n}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,n;switch(typeof e.definition.sorter){case"string":Ui.sorters[e.definition.sorter]?t=Ui.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),n=document.createElement("div"),n.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":n.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":n.appendChild(this.table.options.headerSortElement);break;default:n.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(n),e.modules.sort.element=n,this.setColumnHeaderSortIcon(e,"none"),this.table.options.headerSortClickElement==="icon"&&n.addEventListener("mousedown",r=>{r.stopPropagation()}),(this.table.options.headerSortClickElement==="icon"?n:i).addEventListener("click",r=>{var a="",o=[],l=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?a=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?a=e.modules.sort.dir=="asc"?"desc":"asc":a="none";else switch(e.modules.sort.dir){case"asc":a="desc";break;case"desc":a="asc";break;default:a=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(r.shiftKey||r.ctrlKey)?(o=this.getSort(),l=o.findIndex(u=>u.field===e.getField()),l>-1?(o[l].dir=a,l=o.splice(l,1)[0],a!="none"&&o.push(l)):a!="none"&&o.push({column:e,dir:a}),this.setSort(o)):a=="none"?this.clear():this.setSort(e,a),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,n=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(r){var a;a=i.table.columnManager.findColumn(r.column),a?(r.column=a,n.push(r),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",r.column)}),i.sortList=n,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",n,r;if(t&&(t=t.getData(),n=e.getField(),n))switch(r=e.getFieldValue(t),typeof r){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(r)&&r!==""?i="number":r.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return Ui.sorters[i]}sort(e,t){var i=this,n=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,r=[],a=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",i.getSort()),t||i.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(n.forEach(function(o,l){var u;o.column&&(u=o.column.modules.sort,u&&(u.sorter||(u.sorter=i.findSorter(o.column)),o.params=typeof u.params=="function"?u.params(o.column.getComponent(),o.dir):u.params,r.push(o)),t||i.setColumnHeader(o.column,o.dir))}),r.length&&i._sortItems(e,r)):t||n.forEach(function(o,l){i.setColumnHeader(o.column,o.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(o=>{a.push(o.getComponent())}),this.dispatchExternal("dataSorted",i.getSort(),a)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,n;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);n=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof n=="object"?i.appendChild(n):i.innerHTML=n}}_sortItems(e,t){var i=t.length-1;e.sort((n,r)=>{for(var a,o=i;o>=0;o--){let l=t[o];if(a=this._sortRow(n,r,l.column,l.dir,l.params),a!==0)break}return a})}_sortRow(e,t,i,n,r){var a,o,l=n=="asc"?e:t,u=n=="asc"?t:e;return e=i.getFieldValue(l.getData()),t=i.getFieldValue(u.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",a=l.getComponent(),o=u.getComponent(),i.modules.sort.sorter.call(this,e,t,a,o,i.getComponent(),n,r)}}class Gp{constructor(e,t){this.columnCount=e,this.rowCount=t,this.columnString=[],this.columns=[],this.rows=[]}genColumns(e){var t=Math.max(this.columnCount,Math.max(...e.map(i=>i.length)));this.columnString=[],this.columns=[];for(let i=1;i<=t;i++)this.incrementChar(this.columnString.length-1),this.columns.push(this.columnString.join(""));return this.columns}genRows(e){var t=Math.max(this.rowCount,e.length);this.rows=[];for(let i=1;i<=t;i++)this.rows.push(i);return this.rows}incrementChar(e){let t=this.columnString[e];t?t!=="Z"?this.columnString[e]=String.fromCharCode(this.columnString[e].charCodeAt(0)+1):(this.columnString[e]="A",e?this.incrementChar(e-1):this.columnString.push("A")):this.columnString.push("A")}setRowCount(e){this.rowCount=e}setColumnCount(e){this.columnCount=e}}class ha{constructor(e){return this._sheet=e,new Proxy(this,{get:function(t,i,n){return typeof t[i]<"u"?t[i]:t._sheet.table.componentFunctionBinder.handle("sheet",t._sheet,i)}})}getTitle(){return this._sheet.title}getKey(){return this._sheet.key}getDefinition(){return this._sheet.getDefinition()}getData(){return this._sheet.getData()}setData(e){return this._sheet.setData(e)}clear(){return this._sheet.clear()}remove(){return this._sheet.remove()}active(){return this._sheet.active()}setTitle(e){return this._sheet.setTitle(e)}setRows(e){return this._sheet.setRows(e)}setColumns(e){return this._sheet.setColumns(e)}}class da extends Je{constructor(e,t){super(e.table),this.spreadsheetManager=e,this.definition=t,this.title=this.definition.title||"",this.key=this.definition.key||this.definition.title,this.rowCount=this.definition.rows,this.columnCount=this.definition.columns,this.data=this.definition.data||[],this.element=null,this.isActive=!1,this.grid=new Gp(this.columnCount,this.rowCount),this.defaultColumnDefinition={width:100,headerHozAlign:"center",headerSort:!1},this.columnDefinition=Object.assign(this.defaultColumnDefinition,this.options("spreadsheetColumnDefinition")),this.columnDefs=[],this.rowDefs=[],this.columnFields=[],this.columns=[],this.rows=[],this.scrollTop=null,this.scrollLeft=null,this.initialize(),this.dispatchExternal("sheetAdded",this.getComponent())}initialize(){this.initializeElement(),this.initializeColumns(),this.initializeRows()}reinitialize(){this.initializeColumns(),this.initializeRows()}initializeElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tab"),this.element.innerText=this.title,this.element.addEventListener("click",()=>{this.spreadsheetManager.loadSheet(this)})}initializeColumns(){this.grid.setColumnCount(this.columnCount),this.columnFields=this.grid.genColumns(this.data),this.columnDefs=[],this.columnFields.forEach(e=>{var t=Object.assign({},this.columnDefinition);t.field=e,t.title=e,this.columnDefs.push(t)})}initializeRows(){var e;this.grid.setRowCount(this.rowCount),e=this.grid.genRows(this.data),this.rowDefs=[],e.forEach((t,i)=>{var n={_id:t},r=this.data[i];r&&r.forEach((a,o)=>{var l=this.columnFields[o];l&&(n[l]=a)}),this.rowDefs.push(n)})}unload(){this.isActive=!1,this.scrollTop=this.table.rowManager.scrollTop,this.scrollLeft=this.table.rowManager.scrollLeft,this.data=this.getData(!0),this.element.classList.remove("tabulator-spreadsheet-tab-active")}load(){var e=!this.isActive;this.isActive=!0,this.table.blockRedraw(),this.table.setData([]),this.table.setColumns(this.columnDefs),this.table.setData(this.rowDefs),this.table.restoreRedraw(),e&&this.scrollTop!==null&&(this.table.rowManager.element.scrollLeft=this.scrollLeft,this.table.rowManager.element.scrollTop=this.scrollTop),this.element.classList.add("tabulator-spreadsheet-tab-active"),this.dispatchExternal("sheetLoaded",this.getComponent())}getComponent(){return new ha(this)}getDefinition(){return{title:this.title,key:this.key,rows:this.rowCount,columns:this.columnCount,data:this.getData()}}getData(e){var t=[],i,n,r;return this.rowDefs.forEach(a=>{var o=[];this.columnFields.forEach(l=>{o.push(a[l])}),t.push(o)}),!e&&!this.options("spreadsheetOutputFull")&&(i=t.map(a=>a.findLastIndex(o=>typeof o<"u")+1),n=Math.max(...i),r=i.findLastIndex(a=>a>0)+1,t=t.slice(0,r),t=t.map(a=>a.slice(0,n))),t}setData(e){this.data=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}clear(){this.setData([])}setTitle(e){this.title=e,this.element.innerText=e,this.dispatchExternal("sheetUpdated",this.getComponent())}setRows(e){this.rowCount=e,this.initializeRows(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}setColumns(e){this.columnCount=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}remove(){this.spreadsheetManager.removeSheet(this)}destroy(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispatchExternal("sheetRemoved",this.getComponent())}active(){this.spreadsheetManager.loadSheet(this)}}class $p extends ke{static moduleName="spreadsheet";constructor(e){super(e),this.sheets=[],this.element=null,this.registerTableOption("spreadsheet",!1),this.registerTableOption("spreadsheetRows",50),this.registerTableOption("spreadsheetColumns",50),this.registerTableOption("spreadsheetColumnDefinition",{}),this.registerTableOption("spreadsheetOutputFull",!1),this.registerTableOption("spreadsheetData",!1),this.registerTableOption("spreadsheetSheets",!1),this.registerTableOption("spreadsheetSheetTabs",!1),this.registerTableOption("spreadsheetSheetTabsElement",!1),this.registerTableFunction("setSheets",this.setSheets.bind(this)),this.registerTableFunction("addSheet",this.addSheet.bind(this)),this.registerTableFunction("getSheets",this.getSheets.bind(this)),this.registerTableFunction("getSheetDefinitions",this.getSheetDefinitions.bind(this)),this.registerTableFunction("setSheetData",this.setSheetData.bind(this)),this.registerTableFunction("getSheet",this.getSheet.bind(this)),this.registerTableFunction("getSheetData",this.getSheetData.bind(this)),this.registerTableFunction("clearSheet",this.clearSheet.bind(this)),this.registerTableFunction("removeSheet",this.removeSheetFunc.bind(this)),this.registerTableFunction("activeSheet",this.activeSheetFunc.bind(this))}initialize(){this.options("spreadsheet")&&(this.subscribe("table-initialized",this.tableInitialized.bind(this)),this.subscribe("data-loaded",this.loadRemoteData.bind(this)),this.table.options.index="_id",this.options("spreadsheetData")&&this.options("spreadsheetSheets")&&(console.warn("You cannot use spreadsheetData and spreadsheetSheets at the same time, ignoring spreadsheetData"),this.table.options.spreadsheetData=!1),this.compatibilityCheck(),this.options("spreadsheetSheetTabs")&&this.initializeTabset())}compatibilityCheck(){this.options("data")&&console.warn("Do not use the data option when working with spreadsheets, use either spreadsheetData or spreadsheetSheets to pass data into the table"),this.options("pagination")&&console.warn("The spreadsheet module is not compatible with the pagination module"),this.options("groupBy")&&console.warn("The spreadsheet module is not compatible with the row grouping module"),this.options("responsiveCollapse")&&console.warn("The spreadsheet module is not compatible with the responsive collapse module")}initializeTabset(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tabs");var e=this.options("spreadsheetSheetTabsElement");e&&!(e instanceof HTMLElement)&&(e=document.querySelector(e),e||console.warn("Unable to find element matching spreadsheetSheetTabsElement selector:",this.options("spreadsheetSheetTabsElement"))),e?e.appendChild(this.element):this.footerAppend(this.element)}tableInitialized(){this.sheets.length?this.loadSheet(this.sheets[0]):this.options("spreadsheetSheets")?this.loadSheets(this.options("spreadsheetSheets")):this.options("spreadsheetData")&&this.loadData(this.options("spreadsheetData"))}loadRemoteData(e,t,i){return console.log("data",e,t,i),Array.isArray(e)?(this.table.dataLoader.clearAlert(),this.dispatchExternal("dataLoaded",e),!e.length||Array.isArray(e[0])?this.loadData(e):this.loadSheets(e)):console.error(`Spreadsheet Loading Error - Unable to process remote data due to invalid data type
|
|
46
|
+
</svg>`,n.getElement().classList.add("tabulator-row-handle");function s(a){var o=r.element;r.open=a,o&&(r.open?(i.classList.add("open"),o.style.display=""):(i.classList.remove("open"),o.style.display="none"))}return i.addEventListener("click",function(a){a.stopImmediatePropagation(),s(!r.open),n.getTable().rowManager.adjustTableSize()}),s(r.open),i}var lE={format:{formatters:{responsiveCollapse:oE}}};class uE extends Pe{static moduleName="responsiveLayout";static moduleExtensions=lE;constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.collapseFormatter&&(this.collapseFormatter=this.collapseFormatter.bind(this.table)),this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var r=i.modules.responsive.order-t.modules.responsive.order;return r||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let r=this.columns[this.index];r?(this.hideColumn(r),this.index++):e=!1}else{let r=this.columns[this.index-1];r&&i>0&&i>=r.getWidth()?(this.showColumn(r),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i),e.calcHeight(!0)}}generateCollapsedRowData(e){var t=e.getData(),i=[],r;return this.hiddenColumns.forEach(s=>{var a=s.getFieldValue(t);if(s.definition.title&&s.field)if(s.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let o=function(u){u()};r={value:!1,data:{},getValue:function(){return a},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return s.getComponent()},getTable:()=>this.table},i.push({field:s.field,title:s.definition.title,value:s.modules.format.formatter.call(this.table.modules.format,r,s.modules.format.params,o)})}else i.push({field:s.field,title:s.definition.title,value:a})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(i=>{var r=document.createElement("tr"),s=document.createElement("td"),a=document.createElement("td"),o,u=document.createElement("strong");s.appendChild(u),this.modules.localize.bind("columns|"+i.field,function(c){u.innerHTML=c||i.title}),i.value instanceof Node?(o=document.createElement("div"),o.appendChild(i.value),a.appendChild(o)):a.innerHTML=i.value,r.appendChild(s),r.appendChild(a),t.appendChild(r)}),Object.keys(e).length?t:""}}function cE(n,e,t){var i=document.createElement("input"),r=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",a=>{a.stopPropagation()}),typeof n.getRow=="function"){var s=n.getRow();s instanceof Zn?(i.addEventListener("change",a=>{this.table.options.selectableRowsRangeMode==="click"&&r?r=!1:s.toggleSelect()}),this.table.options.selectableRowsRangeMode==="click"&&i.addEventListener("click",a=>{r=!0,this.table.modules.selectRow.handleComplexRowClick(s._row,a)}),i.checked=s.isSelected&&s.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(s,i)):i=""}else i.addEventListener("change",a=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var dE={format:{formatters:{rowSelection:cE}}};class hE extends Pe{static moduleName="selectRow";static moduleExtensions=dE;constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectableRows","highlight"),this.registerTableOption("selectableRowsRangeMode","drag"),this.registerTableOption("selectableRowsRollingSelection",!0),this.registerTableOption("selectableRowsPersistence",!0),this.registerTableOption("selectableRowsCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.deprecatedOptionsCheck(),this.table.options.selectableRows==="highlight"&&this.table.options.selectableRange&&(this.table.options.selectableRows=!1),this.table.options.selectableRows!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectableRows&&!this.table.options.selectableRowsPersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}deprecatedOptionsCheck(){}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=t.checkRowSelectability(e),r=e.getElement(),s=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",s)};e.modules.select={selected:!1},r.classList.toggle("tabulator-selectable",i),r.classList.toggle("tabulator-unselectable",!i),t.checkRowSelectability(e)&&t.table.options.selectableRows&&t.table.options.selectableRows!="highlight"&&(t.table.options.selectableRowsRangeMode==="click"?r.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(r.addEventListener("click",function(a){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),r.addEventListener("mousedown",function(a){if(a.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",s),document.body.addEventListener("keyup",s),t.toggleRow(e),!1}),r.addEventListener("mouseenter",function(a){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),r.addEventListener("mouseout",function(a){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),r=this.table.rowManager.getDisplayRowIndex(e),s=i<=r?i:r,a=i>=r?i:r,o=this.table.rowManager.getDisplayRows().slice(0),u=o.splice(s,a-s+1);t.ctrlKey||t.metaKey?(u.forEach(c=>{c!==this.lastClickedRow&&(this.table.options.selectableRows!==!0&&!this.isRowSelected(e)?this.selectedRows.length<this.table.options.selectableRows&&this.toggleRow(c):this.toggleRow(c))}),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.table.options.selectableRows!==!0&&u.length>this.table.options.selectableRows&&(u=u.slice(0,this.table.options.selectableRows)),this.selectRows(u)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableRowsCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,r;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"number":i=this.table.rowManager.findRow(e);break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(s=>{r=this._selectRow(s,!0,!0),r&&t.push(r)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectableRows)&&this.table.options.selectableRows!==!0&&!i&&this.selectedRows.length>=this.table.options.selectableRows)if(this.table.options.selectableRowsRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var r=this.table.rowManager.findRow(e);if(r){if(this.selectedRows.indexOf(r)==-1)return r.getElement().classList.add("tabulator-selected"),r.modules.select||(r.modules.select={}),r.modules.select.selected=!0,r.modules.select.checkboxEl&&(r.modules.select.checkboxEl.checked=!0),this.selectedRows.push(r),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(r,!0),this.dispatchExternal("rowSelected",r.getComponent()),this._rowSelectionChanged(t,r),r}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],r,s;switch(typeof e){case"undefined":r=Object.assign([],this.selectedRows);break;case"number":r=this.table.rowManager.findRow(e);break;case"string":r=this.table.rowManager.findRow(e),r||(r=this.table.rowManager.getRows(e));break;default:r=e;break}Array.isArray(r)?r.length&&(r.forEach(a=>{s=this._deselectRow(a,!0,!0),s&&i.push(s)}),this._rowSelectionChanged(t,[],i)):r&&this._deselectRow(r,t,!0)}_deselectRow(e,t){var i=this,r=i.table.rowManager.findRow(e),s,a;if(r){if(s=i.selectedRows.findIndex(function(o){return o==r}),s>-1)return a=r.getElement(),a&&a.classList.remove("tabulator-selected"),r.modules.select||(r.modules.select={}),r.modules.select.selected=!1,r.modules.select.checkboxEl&&(r.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(s,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(r,!1),this.dispatchExternal("rowDeselected",r.getComponent()),i._rowSelectionChanged(t,void 0,r),r}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(r=>r.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(r=>r.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0,!0);if(t)for(let r of i)this._selectRow(r,!0);else for(let r of i)this._deselectRow(r,!0)}}class fE{constructor(e){return this._range=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._range.table.componentFunctionBinder.handle("range",t._range,i)}})}getElement(){return this._range.element}getData(){return this._range.getData()}getCells(){return this._range.getCells(!0,!0)}getStructuredCells(){return this._range.getStructuredCells()}getRows(){return this._range.getRows().map(e=>e.getComponent())}getColumns(){return this._range.getColumns().map(e=>e.getComponent())}getBounds(){return this._range.getBounds()}getTopEdge(){return this._range.top}getBottomEdge(){return this._range.bottom}getLeftEdge(){return this._range.left}getRightEdge(){return this._range.right}setBounds(e,t){this._range.destroyedGuard("setBounds")&&this._range.setBounds(e&&e._cell,t&&t._cell)}setStartBound(e){this._range.destroyedGuard("setStartBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}setEndBound(e){this._range.destroyedGuard("setEndBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}clearValues(){this._range.destroyedGuard("clearValues")&&this._range.clearValues()}remove(){this._range.destroyedGuard("remove")&&this._range.destroy(!0)}}class pE extends rt{constructor(e,t,i,r){super(e),this.rangeManager=t,this.element=null,this.initialized=!1,this.initializing={start:!1,end:!1},this.destroyed=!1,this.top=0,this.bottom=0,this.left=0,this.right=0,this.table=e,this.start={row:0,col:0},this.end={row:0,col:0},this.rangeManager.rowHeader&&(this.left=1,this.right=1,this.start.col=1,this.end.col=1),this.initElement(),setTimeout(()=>{this.initBounds(i,r)})}initElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-range")}initBounds(e,t){this._updateMinMax(),e&&this.setBounds(e,t||e)}setStart(e,t){(this.start.row!==e||this.start.col!==t)&&(this.start.row=e,this.start.col=t,this.initializing.start=!0,this._updateMinMax())}setEnd(e,t){(this.end.row!==e||this.end.col!==t)&&(this.end.row=e,this.end.col=t,this.initializing.end=!0,this._updateMinMax())}setBounds(e,t,i){e&&this.setStartBound(e),this.setEndBound(t||e),this.rangeManager.layoutElement(i)}setStartBound(e){var t,i;e.type==="column"?this.rangeManager.columnSelection&&this.setStart(0,e.getPosition()-1):(t=e.row.position-1,i=e.column.getPosition()-1,e.column===this.rangeManager.rowHeader?this.setStart(t,1):this.setStart(t,i))}setEndBound(e){var t=this._getTableRows().length,i,r,s;e.type==="column"?this.rangeManager.columnSelection&&(this.rangeManager.selecting==="column"?this.setEnd(t-1,e.getPosition()-1):this.rangeManager.selecting==="cell"&&this.setEnd(0,e.getPosition()-1)):(i=e.row.position-1,r=e.column.getPosition()-1,s=e.column===this.rangeManager.rowHeader,this.rangeManager.selecting==="row"?this.setEnd(i,this._getTableColumns().length-1):this.rangeManager.selecting!=="row"&&s?this.setEnd(i,0):this.rangeManager.selecting==="column"?this.setEnd(t-1,r):this.setEnd(i,r))}_updateMinMax(){this.top=Math.min(this.start.row,this.end.row),this.bottom=Math.max(this.start.row,this.end.row),this.left=Math.min(this.start.col,this.end.col),this.right=Math.max(this.start.col,this.end.col),this.initialized?this.dispatchExternal("rangeChanged",this.getComponent()):this.initializing.start&&this.initializing.end&&(this.initialized=!0,this.dispatchExternal("rangeAdded",this.getComponent()))}_getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}_getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}layout(){var e=this.table.rowManager.renderer.vDomTop,t=this.table.rowManager.renderer.vDomBottom,i=this.table.columnManager.renderer.leftCol,r=this.table.columnManager.renderer.rightCol,s,a,o,u,c,d,p,h,f,_;this.table.options.renderHorizontal==="virtual"&&this.rangeManager.rowHeader&&(r+=1),e==null&&(e=0),t==null&&(t=1/0),i==null&&(i=0),r==null&&(r=1/0),this.overlaps(i,e,r,t)&&(s=Math.max(this.top,e),a=Math.min(this.bottom,t),o=Math.max(this.left,i),u=Math.min(this.right,r),c=this.rangeManager.getCell(s,o),d=this.rangeManager.getCell(a,u),p=c.getElement(),h=d.getElement(),f=c.row.getElement(),_=d.row.getElement(),this.element.classList.add("tabulator-range-active"),this.table.rtl?(this.element.style.right=f.offsetWidth-p.offsetLeft-p.offsetWidth+"px",this.element.style.width=p.offsetLeft+p.offsetWidth-h.offsetLeft+"px"):(this.element.style.left=f.offsetLeft+p.offsetLeft+"px",this.element.style.width=h.offsetLeft+h.offsetWidth-p.offsetLeft+"px"),this.element.style.top=f.offsetTop+"px",this.element.style.height=_.offsetTop+_.offsetHeight-f.offsetTop+"px")}atTopLeft(e){return e.row.position-1===this.top&&e.column.getPosition()-1===this.left}atBottomRight(e){return e.row.position-1===this.bottom&&e.column.getPosition()-1===this.right}occupies(e){return this.occupiesRow(e.row)&&this.occupiesColumn(e.column)}occupiesRow(e){return this.top<=e.position-1&&e.position-1<=this.bottom}occupiesColumn(e){return this.left<=e.getPosition()-1&&e.getPosition()-1<=this.right}overlaps(e,t,i,r){return!(this.left>i||e>this.right||this.top>r||t>this.bottom)}getData(){var e=[],t=this.getRows(),i=this.getColumns();return t.forEach(r=>{var s=r.getData(),a={};i.forEach(o=>{a[o.field]=s[o.field]}),e.push(a)}),e}getCells(e,t){var i=[],r=this.getRows(),s=this.getColumns();return e?i=r.map(a=>{var o=[];return a.getCells().forEach(u=>{s.includes(u.column)&&o.push(t?u.getComponent():u)}),o}):r.forEach(a=>{a.getCells().forEach(o=>{s.includes(o.column)&&i.push(t?o.getComponent():o)})}),i}getStructuredCells(){return this.getCells(!0,!0)}getRows(){return this._getTableRows().slice(this.top,this.bottom+1)}getColumns(){return this._getTableColumns().slice(this.left,this.right+1)}clearValues(){var e=this.getCells(),t=this.table.options.selectableRangeClearCellsValue;this.table.blockRedraw(),e.forEach(i=>{i.setValue(t)}),this.table.restoreRedraw()}getBounds(e){var t=this.getCells(!1,e),i={start:null,end:null};return t.length?(i.start=t[0],i.end=t[t.length-1]):console.warn("No bounds defined on range"),i}getComponent(){return this.component||(this.component=new fE(this)),this.component}destroy(e){this.destroyed=!0,this.element.remove(),e&&this.rangeManager.rangeRemoved(this),this.initialized&&this.dispatchExternal("rangeRemoved",this.getComponent())}destroyedGuard(e){return this.destroyed&&console.warn("You cannot call the "+e+" function on a destroyed range"),!this.destroyed}}var mE={rangeJumpUp:["ctrl + 38","meta + 38"],rangeJumpDown:["ctrl + 40","meta + 40"],rangeJumpLeft:["ctrl + 37","meta + 37"],rangeJumpRight:["ctrl + 39","meta + 39"],rangeExpandUp:"shift + 38",rangeExpandDown:"shift + 40",rangeExpandLeft:"shift + 37",rangeExpandRight:"shift + 39",rangeExpandJumpUp:["ctrl + shift + 38","meta + shift + 38"],rangeExpandJumpDown:["ctrl + shift + 40","meta + shift + 40"],rangeExpandJumpLeft:["ctrl + shift + 37","meta + shift + 37"],rangeExpandJumpRight:["ctrl + shift + 39","meta + shift + 39"]},gE={rangeJumpLeft:function(n){this.dispatch("keybinding-nav-range",n,"left",!0,!1)},rangeJumpRight:function(n){this.dispatch("keybinding-nav-range",n,"right",!0,!1)},rangeJumpUp:function(n){this.dispatch("keybinding-nav-range",n,"up",!0,!1)},rangeJumpDown:function(n){this.dispatch("keybinding-nav-range",n,"down",!0,!1)},rangeExpandLeft:function(n){this.dispatch("keybinding-nav-range",n,"left",!1,!0)},rangeExpandRight:function(n){this.dispatch("keybinding-nav-range",n,"right",!1,!0)},rangeExpandUp:function(n){this.dispatch("keybinding-nav-range",n,"up",!1,!0)},rangeExpandDown:function(n){this.dispatch("keybinding-nav-range",n,"down",!1,!0)},rangeExpandJumpLeft:function(n){this.dispatch("keybinding-nav-range",n,"left",!0,!0)},rangeExpandJumpRight:function(n){this.dispatch("keybinding-nav-range",n,"right",!0,!0)},rangeExpandJumpUp:function(n){this.dispatch("keybinding-nav-range",n,"up",!0,!0)},rangeExpandJumpDown:function(n){this.dispatch("keybinding-nav-range",n,"down",!0,!0)}},bE={range:function(n){var e=[],t=this.table.modules.selectRange.activeRange,i=!1,r,s,a,o,u;return u=n.length,t&&(r=t.getBounds(),s=r.start,r.start===r.end&&(i=!0),s&&(e=this.table.rowManager.activeRows.slice(),a=e.indexOf(s.row),i?o=n.length:o=e.indexOf(r.end.row)-a+1,a>-1&&(this.table.blockRedraw(),e=e.slice(a,a+o),e.forEach((c,d)=>{c.updateData(n[d%u])}),this.table.restoreRedraw()))),e}},vE={range:function(n){var e=[],t=[],i=this.table.modules.selectRange.activeRange,r=!1,s,a,o,u,c;return i&&(s=i.getBounds(),a=s.start,s.start===s.end&&(r=!0),a&&(n=n.split(`
|
|
47
|
+
`),n.forEach(function(d){e.push(d.split(" "))}),e.length&&(u=this.table.columnManager.getVisibleColumnsByIndex(),c=u.indexOf(a.column),c>-1)))?(r?o=e[0].length:o=u.indexOf(s.end.column)-c+1,u=u.slice(c,c+o),e.forEach(d=>{var p={},h=d.length;u.forEach(function(f,_){p[f.field]=d[_%h]}),t.push(p)}),t):!1}},yE={range:function(){var n=this.modules.selectRange.selectedColumns();return this.columnManager.rowHeader&&n.unshift(this.columnManager.rowHeader),n}},wE={range:function(){return this.modules.selectRange.selectedRows()}},CE={keybindings:{bindings:mE,actions:gE},clipboard:{pasteActions:bE,pasteParsers:vE},export:{columnLookups:yE,rowLookups:wE}};class EE extends Pe{static moduleName="selectRange";static moduleInitOrder=1;static moduleExtensions=CE;constructor(e){super(e),this.selecting="cell",this.mousedown=!1,this.ranges=[],this.overlay=null,this.rowHeader=null,this.layoutChangeTimeout=null,this.columnSelection=!1,this.rowSelection=!1,this.maxRanges=0,this.activeRange=!1,this.blockKeydown=!1,this.keyDownEvent=this._handleKeyDown.bind(this),this.mouseUpEvent=this._handleMouseUp.bind(this),this.registerTableOption("selectableRange",!1),this.registerTableOption("selectableRangeColumns",!1),this.registerTableOption("selectableRangeRows",!1),this.registerTableOption("selectableRangeClearCells",!1),this.registerTableOption("selectableRangeClearCellsValue",void 0),this.registerTableOption("selectableRangeAutoFocus",!0),this.registerTableFunction("getRangesData",this.getRangesData.bind(this)),this.registerTableFunction("getRanges",this.getRanges.bind(this)),this.registerTableFunction("addRange",this.addRangeFromComponent.bind(this)),this.registerComponentFunction("cell","getRanges",this.cellGetRanges.bind(this)),this.registerComponentFunction("row","getRanges",this.rowGetRanges.bind(this)),this.registerComponentFunction("column","getRanges",this.colGetRanges.bind(this))}initialize(){this.options("selectableRange")&&(this.options("selectableRows")?console.warn("SelectRange functionality cannot be used in conjunction with row selection"):(this.maxRanges=this.options("selectableRange"),this.initializeTable(),this.initializeWatchers()),this.options("columns").findIndex(e=>e.frozen)>0&&console.warn("Having frozen column in arbitrary position with selectRange option may result in unpredictable behavior."),this.options("columns").filter(e=>e.frozen)>1&&console.warn("Having multiple frozen columns with selectRange option may result in unpredictable behavior."))}initializeTable(){this.overlay=document.createElement("div"),this.overlay.classList.add("tabulator-range-overlay"),this.rangeContainer=document.createElement("div"),this.rangeContainer.classList.add("tabulator-range-container"),this.activeRangeCellElement=document.createElement("div"),this.activeRangeCellElement.classList.add("tabulator-range-cell-active"),this.overlay.appendChild(this.rangeContainer),this.overlay.appendChild(this.activeRangeCellElement),this.table.rowManager.element.addEventListener("keydown",this.keyDownEvent),this.resetRanges(),this.table.rowManager.element.appendChild(this.overlay),this.table.columnManager.element.setAttribute("tabindex",0),this.table.element.classList.add("tabulator-ranges")}initializeWatchers(){this.columnSelection=this.options("selectableRangeColumns"),this.rowSelection=this.options("selectableRangeRows"),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-mousedown",this.handleColumnMouseDown.bind(this)),this.subscribe("column-mousemove",this.handleColumnMouseMove.bind(this)),this.subscribe("column-resized",this.handleColumnResized.bind(this)),this.subscribe("column-moving",this.handleColumnMoving.bind(this)),this.subscribe("column-moved",this.handleColumnMoved.bind(this)),this.subscribe("column-width",this.layoutChange.bind(this)),this.subscribe("column-height",this.layoutChange.bind(this)),this.subscribe("column-resized",this.layoutChange.bind(this)),this.subscribe("columns-loaded",this.updateHeaderColumn.bind(this)),this.subscribe("cell-height",this.layoutChange.bind(this)),this.subscribe("cell-rendered",this.renderCell.bind(this)),this.subscribe("cell-mousedown",this.handleCellMouseDown.bind(this)),this.subscribe("cell-mousemove",this.handleCellMouseMove.bind(this)),this.subscribe("cell-click",this.handleCellClick.bind(this)),this.subscribe("cell-editing",this.handleEditingCell.bind(this)),this.subscribe("page-changed",this.redraw.bind(this)),this.subscribe("scroll-vertical",this.layoutChange.bind(this)),this.subscribe("scroll-horizontal",this.layoutChange.bind(this)),this.subscribe("data-destroy",this.tableDestroyed.bind(this)),this.subscribe("data-processed",this.resetRanges.bind(this)),this.subscribe("table-layout",this.layoutElement.bind(this)),this.subscribe("table-redraw",this.redraw.bind(this)),this.subscribe("table-destroy",this.tableDestroyed.bind(this)),this.subscribe("edit-editor-clear",this.finishEditingCell.bind(this)),this.subscribe("edit-blur",this.restoreFocus.bind(this)),this.subscribe("keybinding-nav-prev",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-next",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-left",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-right",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-up",this.keyNavigate.bind(this,"up")),this.subscribe("keybinding-nav-down",this.keyNavigate.bind(this,"down")),this.subscribe("keybinding-nav-range",this.keyNavigateRange.bind(this))}initializeColumn(e){this.columnSelection&&e.definition.headerSort&&this.options("headerSortClickElement")!=="icon"&&console.warn("Using column headerSort with selectableRangeColumns option may result in unpredictable behavior. Consider using headerSortClickElement: 'icon'."),e.modules.edit}updateHeaderColumn(){var e;this.rowSelection&&(this.rowHeader=this.table.columnManager.getVisibleColumnsByIndex()[0],this.rowHeader&&(this.rowHeader.definition.cssClass=this.rowHeader.definition.cssClass+" tabulator-range-row-header",this.rowHeader.definition.headerSort&&console.warn("Using column headerSort with selectableRangeRows option may result in unpredictable behavior"),this.rowHeader.definition.editor&&console.warn("Using column editor with selectableRangeRows option may result in unpredictable behavior"))),this.table.modules.frozenColumns&&this.table.modules.frozenColumns.active&&(e=this.table.modules.frozenColumns.getFrozenColumns(),(e.length>1||e.length===1&&e[0]!==this.rowHeader)&&console.warn("Using frozen columns that are not the range header in combination with the selectRange option may result in unpredictable behavior"))}getRanges(){return this.ranges.map(e=>e.getComponent())}getRangesData(){return this.ranges.map(e=>e.getData())}addRangeFromComponent(e,t){return e=e?e._cell:null,t=t?t._cell:null,this.addRange(e,t)}cellGetRanges(e){var t=[];return e.column===this.rowHeader?t=this.ranges.filter(i=>i.occupiesRow(e.row)):t=this.ranges.filter(i=>i.occupies(e)),t.map(i=>i.getComponent())}rowGetRanges(e){var t=this.ranges.filter(i=>i.occupiesRow(e));return t.map(i=>i.getComponent())}colGetRanges(e){var t=this.ranges.filter(i=>i.occupiesColumn(e));return t.map(i=>i.getComponent())}_handleMouseUp(e){this.mousedown=!1,document.removeEventListener("mouseup",this.mouseUpEvent)}_handleKeyDown(e){if(!this.blockKeydown&&(!this.table.modules.edit||this.table.modules.edit&&!this.table.modules.edit.currentCell)){if(e.key==="Enter"){if(this.table.modules.edit&&this.table.modules.edit.currentCell)return;this.table.modules.edit.editCell(this.getActiveCell()),e.preventDefault()}(e.key==="Backspace"||e.key==="Delete")&&this.options("selectableRangeClearCells")&&this.activeRange&&this.activeRange.clearValues()}}initializeFocus(e){var t;this.restoreFocus();try{document.selection?(t=document.body.createTextRange(),t.moveToElementText(e.getElement()),t.select()):window.getSelection&&(t=document.createRange(),t.selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}catch{}}restoreFocus(e){return this.table.rowManager.element.focus(),!0}handleColumnResized(e){var t;this.selecting!=="column"&&this.selecting!=="all"||(t=this.ranges.some(i=>i.occupiesColumn(e)),t&&this.ranges.forEach(i=>{var r=i.getColumns(!0);r.forEach(s=>{s!==e&&s.setWidth(e.width)})}))}handleColumnMoving(e,t){this.resetRanges().setBounds(t),this.overlay.style.visibility="hidden"}handleColumnMoved(e,t,i){this.activeRange.setBounds(e),this.layoutElement()}handleColumnMouseDown(e,t){e.button===2&&(this.selecting==="column"||this.selecting==="all")&&this.activeRange.occupiesColumn(t)||this.table.options.movableColumns&&this.selecting==="column"&&this.activeRange.occupiesColumn(t)||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleColumnMouseMove(e,t){t===this.rowHeader||!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}renderCell(e){var t=e.getElement(),i=this.ranges.findIndex(r=>r.occupies(e));t.classList.toggle("tabulator-range-selected",i!==-1),t.classList.toggle("tabulator-range-only-cell-selected",this.ranges.length===1&&this.ranges[0].atTopLeft(e)&&this.ranges[0].atBottomRight(e)),t.dataset.range=i}handleCellMouseDown(e,t){e.button===2&&(this.activeRange.occupies(t)||(this.selecting==="row"||this.selecting==="all")&&this.activeRange.occupiesRow(t.row))||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleCellMouseMove(e,t){!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}handleCellClick(e,t){this.initializeFocus(t)}handleEditingCell(e){this.activeRange&&this.activeRange.setBounds(e)}finishEditingCell(){this.blockKeydown=!0,this.table.rowManager.element.focus(),setTimeout(()=>{this.blockKeydown=!1},10)}keyNavigate(e,t){this.navigate(!1,!1,e),t.preventDefault()}keyNavigateRange(e,t,i,r){this.navigate(i,r,t),e.preventDefault()}navigate(e,t,i){var r=!1,s,a,o,u,c,d,p,h,f,_,k;if(this.table.modules.edit&&this.table.modules.edit.currentCell)return!1;if(this.ranges.length>1&&(this.ranges=this.ranges.filter(w=>w===this.activeRange?(w.setEnd(w.start.row,w.start.col),!0):(w.destroy(),!1))),s=this.activeRange,o={top:s.top,bottom:s.bottom,left:s.left,right:s.right},a=t?s.end:s.start,u=a.row,c=a.col,e)switch(i){case"left":c=this.findJumpCellLeft(s.start.row,a.col);break;case"right":c=this.findJumpCellRight(s.start.row,a.col);break;case"up":u=this.findJumpCellUp(a.row,s.start.col);break;case"down":u=this.findJumpCellDown(a.row,s.start.col);break}else{if(t&&(this.selecting==="row"&&(i==="left"||i==="right")||this.selecting==="column"&&(i==="up"||i==="down")))return;switch(i){case"left":c=Math.max(c-1,0);break;case"right":c=Math.min(c+1,this.getTableColumns().length-1);break;case"up":u=Math.max(u-1,0);break;case"down":u=Math.min(u+1,this.getTableRows().length-1);break}}if(this.rowHeader&&c===0&&(c=1),t||s.setStart(u,c),s.setEnd(u,c),t||(this.selecting="cell"),r=o.top!==s.top||o.bottom!==s.bottom||o.left!==s.left||o.right!==s.right,r)return d=this.getRowByRangePos(s.end.row),p=this.getColumnByRangePos(s.end.col),h=d.getElement().getBoundingClientRect(),_=p.getElement().getBoundingClientRect(),f=this.table.rowManager.getElement().getBoundingClientRect(),k=this.table.columnManager.getElement().getBoundingClientRect(),h.top>=f.top&&h.bottom<=f.bottom||(d.getElement().parentNode&&p.getElement().parentNode?this.autoScroll(s,d.getElement(),p.getElement()):d.getComponent().scrollTo(void 0,!1)),_.left>=k.left+this.getRowHeaderWidth()&&_.right<=k.right||(d.getElement().parentNode&&p.getElement().parentNode?this.autoScroll(s,d.getElement(),p.getElement()):p.getComponent().scrollTo(void 0,!1)),this.layoutElement(),!0}rangeRemoved(e){this.ranges=this.ranges.filter(t=>t!==e),this.activeRange===e&&(this.ranges.length?this.activeRange=this.ranges[this.ranges.length-1]:this.addRange()),this.layoutElement()}findJumpRow(e,t,i,r,s){return i&&(t=t.reverse()),this.findJumpItem(r,s,t,function(a){return a.getData()[e.getField()]})}findJumpCol(e,t,i,r,s){return i&&(t=t.reverse()),this.findJumpItem(r,s,t,function(a){return e.getData()[a.getField()]})}findJumpItem(e,t,i,r){var s;for(let a of i){let o=r(a);if(e){if(s=a,o)break}else if(t){if(s=a,o)break}else if(o)s=a;else break}return s}findJumpCellLeft(e,t){var i=this.getRowByRangePos(e),r=this.getTableColumns(),s=this.isEmpty(i.getData()[r[t].getField()]),a=r[t-1]?this.isEmpty(i.getData()[r[t-1].getField()]):!1,o=this.rowHeader?r.slice(1,t):r.slice(0,t),u=this.findJumpCol(i,o,!0,s,a);return u?u.getPosition()-1:t}findJumpCellRight(e,t){var i=this.getRowByRangePos(e),r=this.getTableColumns(),s=this.isEmpty(i.getData()[r[t].getField()]),a=r[t+1]?this.isEmpty(i.getData()[r[t+1].getField()]):!1,o=this.findJumpCol(i,r.slice(t+1,r.length),!1,s,a);return o?o.getPosition()-1:t}findJumpCellUp(e,t){var i=this.getColumnByRangePos(t),r=this.getTableRows(),s=this.isEmpty(r[e].getData()[i.getField()]),a=r[e-1]?this.isEmpty(r[e-1].getData()[i.getField()]):!1,o=this.findJumpRow(i,r.slice(0,e),!0,s,a);return o?o.position-1:e}findJumpCellDown(e,t){var i=this.getColumnByRangePos(t),r=this.getTableRows(),s=this.isEmpty(r[e].getData()[i.getField()]),a=r[e+1]?this.isEmpty(r[e+1].getData()[i.getField()]):!1,o=this.findJumpRow(i,r.slice(e+1,r.length),!1,s,a);return o?o.position-1:e}newSelection(e,t){var i;if(t.type==="column"){if(!this.columnSelection)return;if(t===this.rowHeader){i=this.resetRanges(),this.selecting="all";var r,s=this.getCell(-1,-1);this.rowHeader?r=this.getCell(0,1):r=this.getCell(0,0),i.setBounds(r,s);return}else this.selecting="column"}else t.column===this.rowHeader?this.selecting="row":this.selecting="cell";e.shiftKey?this.activeRange.setBounds(!1,t):e.ctrlKey?this.addRange().setBounds(t):this.resetRanges().setBounds(t)}autoScroll(e,t,i){var r=this.table.rowManager.element,s,a,o,u;typeof t>"u"&&(t=this.getRowByRangePos(e.end.row).getElement()),typeof i>"u"&&(i=this.getColumnByRangePos(e.end.col).getElement()),s={left:i.offsetLeft,right:i.offsetLeft+i.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight},a={left:r.scrollLeft+this.getRowHeaderWidth(),right:Math.ceil(r.scrollLeft+r.clientWidth),top:r.scrollTop,bottom:r.scrollTop+r.offsetHeight-this.table.rowManager.scrollbarWidth},o=a.left<s.left&&s.left<a.right&&a.left<s.right&&s.right<a.right,u=a.top<s.top&&s.top<a.bottom&&a.top<s.bottom&&s.bottom<a.bottom,o||(s.left<a.left?r.scrollLeft=s.left-this.getRowHeaderWidth():s.right>a.right&&(r.scrollLeft=Math.min(s.right-r.clientWidth,s.left-this.getRowHeaderWidth()))),u||(s.top<a.top?r.scrollTop=s.top:s.bottom>a.bottom&&(r.scrollTop=s.bottom-r.clientHeight))}layoutChange(){this.overlay.style.visibility="hidden",clearTimeout(this.layoutChangeTimeout),this.layoutChangeTimeout=setTimeout(this.layoutRanges.bind(this),200)}redraw(e){e&&(this.selecting="cell",this.resetRanges(),this.layoutElement())}layoutElement(e){var t;e?t=this.table.rowManager.getVisibleRows(!0):t=this.table.rowManager.getRows(),t.forEach(i=>{i.type==="row"&&(this.layoutRow(i),i.cells.forEach(r=>this.renderCell(r)))}),this.getTableColumns().forEach(i=>{this.layoutColumn(i)}),this.layoutRanges()}layoutRow(e){var t=e.getElement(),i=!1,r=this.ranges.some(s=>s.occupiesRow(e));this.selecting==="row"?i=r:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",r)}layoutColumn(e){var t=e.getElement(),i=!1,r=this.ranges.some(s=>s.occupiesColumn(e));this.selecting==="column"?i=r:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",r)}layoutRanges(){var e,t,i;this.table.initialized&&(e=this.getActiveCell(),e&&(t=e.getElement(),i=e.row.getElement(),this.table.rtl?this.activeRangeCellElement.style.right=i.offsetWidth-t.offsetLeft-t.offsetWidth+"px":this.activeRangeCellElement.style.left=i.offsetLeft+t.offsetLeft+"px",this.activeRangeCellElement.style.top=i.offsetTop+"px",this.activeRangeCellElement.style.width=t.offsetWidth+"px",this.activeRangeCellElement.style.height=i.offsetHeight+"px",this.ranges.forEach(r=>r.layout()),this.overlay.style.visibility="visible"))}getCell(e,t){var i;return t<0&&(t=this.getTableColumns().length+t,t<0)?null:(e<0&&(e=this.getTableRows().length+e),i=this.table.rowManager.getRowFromPosition(e+1),i?i.getCells(!1,!0).filter(r=>r.column.visible)[t]:null)}getActiveCell(){return this.getCell(this.activeRange.start.row,this.activeRange.start.col)}getRowByRangePos(e){return this.getTableRows()[e]}getColumnByRangePos(e){return this.getTableColumns()[e]}getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}addRange(e,t){var i;return this.maxRanges!==!0&&this.ranges.length>=this.maxRanges&&this.ranges.shift().destroy(),i=new pE(this.table,this,e,t),this.activeRange=i,this.ranges.push(i),this.rangeContainer.appendChild(i.element),i}resetRanges(){var e,t,i;return this.ranges.forEach(r=>r.destroy()),this.ranges=[],e=this.addRange(),this.table.rowManager.activeRows.length&&(i=this.table.rowManager.activeRows[0].cells.filter(r=>r.column.visible),t=i[this.rowHeader?1:0],t&&(e.setBounds(t),this.options("selectableRangeAutoFocus")&&this.initializeFocus(t))),e}tableDestroyed(){document.removeEventListener("mouseup",this.mouseUpEvent),this.table.rowManager.element.removeEventListener("keydown",this.keyDownEvent)}selectedRows(e){return e?this.activeRange.getRows().map(t=>t.getComponent()):this.activeRange.getRows()}selectedColumns(e){return e?this.activeRange.getColumns().map(t=>t.getComponent()):this.activeRange.getColumns()}getRowHeaderWidth(){return this.rowHeader?this.rowHeader.getElement().offsetWidth:0}isEmpty(e){return e==null||e===""}}function kE(n,e,t,i,r,s,a){var o=a.alignEmptyValues,u=a.decimalSeparator,c=a.thousandSeparator,d=0;if(n=String(n),e=String(e),c&&(n=n.split(c).join(""),e=e.split(c).join("")),u&&(n=n.split(u).join("."),e=e.split(u).join(".")),n=parseFloat(n),e=parseFloat(e),isNaN(n))d=isNaN(e)?0:-1;else if(isNaN(e))d=1;else return n-e;return(o==="top"&&s==="desc"||o==="bottom"&&s==="asc")&&(d*=-1),d}function SE(n,e,t,i,r,s,a){var o=a.alignEmptyValues,u=0,c;if(!n)u=e?-1:0;else if(!e)u=1;else{switch(typeof a.locale){case"boolean":a.locale&&(c=this.langLocale());break;case"string":c=a.locale;break}return String(n).toLowerCase().localeCompare(String(e).toLowerCase(),c)}return(o==="top"&&s==="desc"||o==="bottom"&&s==="asc")&&(u*=-1),u}function ma(n,e,t,i,r,s,a){var o=this.table.dependencyRegistry.lookup(["luxon","DateTime"],"DateTime"),u=a.format||"dd/MM/yyyy HH:mm:ss",c=a.alignEmptyValues,d=0;if(typeof o<"u"){if(o.isDateTime(n)||(u==="iso"?n=o.fromISO(String(n)):n=o.fromFormat(String(n),u)),o.isDateTime(e)||(u==="iso"?e=o.fromISO(String(e)):e=o.fromFormat(String(e),u)),!n.isValid)d=e.isValid?-1:0;else if(!e.isValid)d=1;else return n-e;return(c==="top"&&s==="desc"||c==="bottom"&&s==="asc")&&(d*=-1),d}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function xE(n,e,t,i,r,s,a){return a.format||(a.format="dd/MM/yyyy"),ma.call(this,n,e,t,i,r,s,a)}function _E(n,e,t,i,r,s,a){return a.format||(a.format="HH:mm"),ma.call(this,n,e,t,i,r,s,a)}function ME(n,e,t,i,r,s,a){var o=n===!0||n==="true"||n==="True"||n===1?1:0,u=e===!0||e==="true"||e==="True"||e===1?1:0;return o-u}function RE(n,e,t,i,r,s,a){var o=a.type||"length",u=a.alignEmptyValues,c=0,d=this.table,p;a.valueMap&&(typeof a.valueMap=="string"?p=function(f){return f.map(_=>Ke.retrieveNestedData(d.options.nestedFieldSeparator,a.valueMap,_))}:p=a.valueMap);function h(f){var _;switch(p&&(f=p(f)),o){case"length":_=f.length;break;case"sum":_=f.reduce(function(k,w){return k+w});break;case"max":_=Math.max.apply(null,f);break;case"min":_=Math.min.apply(null,f);break;case"avg":_=f.reduce(function(k,w){return k+w})/f.length;break;case"string":_=f.join("");break}return _}if(!Array.isArray(n))c=Array.isArray(e)?-1:0;else if(!Array.isArray(e))c=1;else return o==="string"?String(h(n)).toLowerCase().localeCompare(String(h(e)).toLowerCase()):h(e)-h(n);return(u==="top"&&s==="desc"||u==="bottom"&&s==="asc")&&(c*=-1),c}function TE(n,e,t,i,r,s,a){var o=typeof n>"u"?0:1,u=typeof e>"u"?0:1;return o-u}function DE(n,e,t,i,r,s,a){var o,u,c,d,p=0,h,f=/(\d+)|(\D+)/g,_=/\d/,k=a.alignEmptyValues,w=0;if(!n&&n!==0)w=!e&&e!==0?0:-1;else if(!e&&e!==0)w=1;else{if(isFinite(n)&&isFinite(e))return n-e;if(o=String(n).toLowerCase(),u=String(e).toLowerCase(),o===u)return 0;if(!(_.test(o)&&_.test(u)))return o>u?1:-1;for(o=o.match(f),u=u.match(f),h=o.length>u.length?u.length:o.length;p<h;)if(c=o[p],d=u[p++],c!==d)return isFinite(c)&&isFinite(d)?(c.charAt(0)==="0"&&(c="."+c),d.charAt(0)==="0"&&(d="."+d),c-d):c>d?1:-1;return o.length>u.length}return(k==="top"&&s==="desc"||k==="bottom"&&s==="asc")&&(w*=-1),w}var OE={number:kE,string:SE,date:xE,time:_E,datetime:ma,boolean:ME,array:RE,exists:TE,alphanum:DE};class hn extends Pe{static moduleName="sort";static sorters=OE;constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","<div class='tabulator-arrow'></div>"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,r){var s=this.getSort();return s.forEach(a=>{delete a.column}),r.sort=s,r}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,r;switch(typeof e.definition.sorter){case"string":hn.sorters[e.definition.sorter]?t=hn.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),r=document.createElement("div"),r.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":r.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":r.appendChild(this.table.options.headerSortElement);break;default:r.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(r),e.modules.sort.element=r,this.setColumnHeaderSortIcon(e,"none"),this.table.options.headerSortClickElement==="icon"&&r.addEventListener("mousedown",s=>{s.stopPropagation()}),(this.table.options.headerSortClickElement==="icon"?r:i).addEventListener("click",s=>{var a="",o=[],u=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?a=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?a=e.modules.sort.dir=="asc"?"desc":"asc":a="none";else switch(e.modules.sort.dir){case"asc":a="desc";break;case"desc":a="asc";break;default:a=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(s.shiftKey||s.ctrlKey)?(o=this.getSort(),u=o.findIndex(c=>c.field===e.getField()),u>-1?(o[u].dir=a,u=o.splice(u,1)[0],a!="none"&&o.push(u)):a!="none"&&o.push({column:e,dir:a}),this.setSort(o)):a=="none"?this.clear():this.setSort(e,a),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,r=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(s){var a;a=i.table.columnManager.findColumn(s.column),a?(s.column=a,r.push(s),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",s.column)}),i.sortList=r,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",r,s;if(t&&(t=t.getData(),r=e.getField(),r))switch(s=e.getFieldValue(t),typeof s){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(s)&&s!==""?i="number":s.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return hn.sorters[i]}sort(e,t){var i=this,r=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,s=[],a=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",i.getSort()),t||i.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(r.forEach(function(o,u){var c;o.column&&(c=o.column.modules.sort,c&&(c.sorter||(c.sorter=i.findSorter(o.column)),o.params=typeof c.params=="function"?c.params(o.column.getComponent(),o.dir):c.params,s.push(o)),t||i.setColumnHeader(o.column,o.dir))}),s.length&&i._sortItems(e,s)):t||r.forEach(function(o,u){i.setColumnHeader(o.column,o.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(o=>{a.push(o.getComponent())}),this.dispatchExternal("dataSorted",i.getSort(),a)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,r;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);r=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof r=="object"?i.appendChild(r):i.innerHTML=r}}_sortItems(e,t){var i=t.length-1;e.sort((r,s)=>{for(var a,o=i;o>=0;o--){let u=t[o];if(a=this._sortRow(r,s,u.column,u.dir,u.params),a!==0)break}return a})}_sortRow(e,t,i,r,s){var a,o,u=r=="asc"?e:t,c=r=="asc"?t:e;return e=i.getFieldValue(u.getData()),t=i.getFieldValue(c.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",a=u.getComponent(),o=c.getComponent(),i.modules.sort.sorter.call(this,e,t,a,o,i.getComponent(),r,s)}}class LE{constructor(e,t){this.columnCount=e,this.rowCount=t,this.columnString=[],this.columns=[],this.rows=[]}genColumns(e){var t=Math.max(this.columnCount,Math.max(...e.map(i=>i.length)));this.columnString=[],this.columns=[];for(let i=1;i<=t;i++)this.incrementChar(this.columnString.length-1),this.columns.push(this.columnString.join(""));return this.columns}genRows(e){var t=Math.max(this.rowCount,e.length);this.rows=[];for(let i=1;i<=t;i++)this.rows.push(i);return this.rows}incrementChar(e){let t=this.columnString[e];t?t!=="Z"?this.columnString[e]=String.fromCharCode(this.columnString[e].charCodeAt(0)+1):(this.columnString[e]="A",e?this.incrementChar(e-1):this.columnString.push("A")):this.columnString.push("A")}setRowCount(e){this.rowCount=e}setColumnCount(e){this.columnCount=e}}class Sc{constructor(e){return this._sheet=e,new Proxy(this,{get:function(t,i,r){return typeof t[i]<"u"?t[i]:t._sheet.table.componentFunctionBinder.handle("sheet",t._sheet,i)}})}getTitle(){return this._sheet.title}getKey(){return this._sheet.key}getDefinition(){return this._sheet.getDefinition()}getData(){return this._sheet.getData()}setData(e){return this._sheet.setData(e)}clear(){return this._sheet.clear()}remove(){return this._sheet.remove()}active(){return this._sheet.active()}setTitle(e){return this._sheet.setTitle(e)}setRows(e){return this._sheet.setRows(e)}setColumns(e){return this._sheet.setColumns(e)}}class xc extends rt{constructor(e,t){super(e.table),this.spreadsheetManager=e,this.definition=t,this.title=this.definition.title||"",this.key=this.definition.key||this.definition.title,this.rowCount=this.definition.rows,this.columnCount=this.definition.columns,this.data=this.definition.data||[],this.element=null,this.isActive=!1,this.grid=new LE(this.columnCount,this.rowCount),this.defaultColumnDefinition={width:100,headerHozAlign:"center",headerSort:!1},this.columnDefinition=Object.assign(this.defaultColumnDefinition,this.options("spreadsheetColumnDefinition")),this.columnDefs=[],this.rowDefs=[],this.columnFields=[],this.columns=[],this.rows=[],this.scrollTop=null,this.scrollLeft=null,this.initialize(),this.dispatchExternal("sheetAdded",this.getComponent())}initialize(){this.initializeElement(),this.initializeColumns(),this.initializeRows()}reinitialize(){this.initializeColumns(),this.initializeRows()}initializeElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tab"),this.element.innerText=this.title,this.element.addEventListener("click",()=>{this.spreadsheetManager.loadSheet(this)})}initializeColumns(){this.grid.setColumnCount(this.columnCount),this.columnFields=this.grid.genColumns(this.data),this.columnDefs=[],this.columnFields.forEach(e=>{var t=Object.assign({},this.columnDefinition);t.field=e,t.title=e,this.columnDefs.push(t)})}initializeRows(){var e;this.grid.setRowCount(this.rowCount),e=this.grid.genRows(this.data),this.rowDefs=[],e.forEach((t,i)=>{var r={_id:t},s=this.data[i];s&&s.forEach((a,o)=>{var u=this.columnFields[o];u&&(r[u]=a)}),this.rowDefs.push(r)})}unload(){this.isActive=!1,this.scrollTop=this.table.rowManager.scrollTop,this.scrollLeft=this.table.rowManager.scrollLeft,this.data=this.getData(!0),this.element.classList.remove("tabulator-spreadsheet-tab-active")}load(){var e=!this.isActive;this.isActive=!0,this.table.blockRedraw(),this.table.setData([]),this.table.setColumns(this.columnDefs),this.table.setData(this.rowDefs),this.table.restoreRedraw(),e&&this.scrollTop!==null&&(this.table.rowManager.element.scrollLeft=this.scrollLeft,this.table.rowManager.element.scrollTop=this.scrollTop),this.element.classList.add("tabulator-spreadsheet-tab-active"),this.dispatchExternal("sheetLoaded",this.getComponent())}getComponent(){return new Sc(this)}getDefinition(){return{title:this.title,key:this.key,rows:this.rowCount,columns:this.columnCount,data:this.getData()}}getData(e){var t=[],i,r,s;return this.rowDefs.forEach(a=>{var o=[];this.columnFields.forEach(u=>{o.push(a[u])}),t.push(o)}),!e&&!this.options("spreadsheetOutputFull")&&(i=t.map(a=>a.findLastIndex(o=>typeof o<"u")+1),r=Math.max(...i),s=i.findLastIndex(a=>a>0)+1,t=t.slice(0,s),t=t.map(a=>a.slice(0,r))),t}setData(e){this.data=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}clear(){this.setData([])}setTitle(e){this.title=e,this.element.innerText=e,this.dispatchExternal("sheetUpdated",this.getComponent())}setRows(e){this.rowCount=e,this.initializeRows(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}setColumns(e){this.columnCount=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}remove(){this.spreadsheetManager.removeSheet(this)}destroy(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispatchExternal("sheetRemoved",this.getComponent())}active(){this.spreadsheetManager.loadSheet(this)}}class PE extends Pe{static moduleName="spreadsheet";constructor(e){super(e),this.sheets=[],this.element=null,this.registerTableOption("spreadsheet",!1),this.registerTableOption("spreadsheetRows",50),this.registerTableOption("spreadsheetColumns",50),this.registerTableOption("spreadsheetColumnDefinition",{}),this.registerTableOption("spreadsheetOutputFull",!1),this.registerTableOption("spreadsheetData",!1),this.registerTableOption("spreadsheetSheets",!1),this.registerTableOption("spreadsheetSheetTabs",!1),this.registerTableOption("spreadsheetSheetTabsElement",!1),this.registerTableFunction("setSheets",this.setSheets.bind(this)),this.registerTableFunction("addSheet",this.addSheet.bind(this)),this.registerTableFunction("getSheets",this.getSheets.bind(this)),this.registerTableFunction("getSheetDefinitions",this.getSheetDefinitions.bind(this)),this.registerTableFunction("setSheetData",this.setSheetData.bind(this)),this.registerTableFunction("getSheet",this.getSheet.bind(this)),this.registerTableFunction("getSheetData",this.getSheetData.bind(this)),this.registerTableFunction("clearSheet",this.clearSheet.bind(this)),this.registerTableFunction("removeSheet",this.removeSheetFunc.bind(this)),this.registerTableFunction("activeSheet",this.activeSheetFunc.bind(this))}initialize(){this.options("spreadsheet")&&(this.subscribe("table-initialized",this.tableInitialized.bind(this)),this.subscribe("data-loaded",this.loadRemoteData.bind(this)),this.table.options.index="_id",this.options("spreadsheetData")&&this.options("spreadsheetSheets")&&(console.warn("You cannot use spreadsheetData and spreadsheetSheets at the same time, ignoring spreadsheetData"),this.table.options.spreadsheetData=!1),this.compatibilityCheck(),this.options("spreadsheetSheetTabs")&&this.initializeTabset())}compatibilityCheck(){this.options("data")&&console.warn("Do not use the data option when working with spreadsheets, use either spreadsheetData or spreadsheetSheets to pass data into the table"),this.options("pagination")&&console.warn("The spreadsheet module is not compatible with the pagination module"),this.options("groupBy")&&console.warn("The spreadsheet module is not compatible with the row grouping module"),this.options("responsiveCollapse")&&console.warn("The spreadsheet module is not compatible with the responsive collapse module")}initializeTabset(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tabs");var e=this.options("spreadsheetSheetTabsElement");e&&!(e instanceof HTMLElement)&&(e=document.querySelector(e),e||console.warn("Unable to find element matching spreadsheetSheetTabsElement selector:",this.options("spreadsheetSheetTabsElement"))),e?e.appendChild(this.element):this.footerAppend(this.element)}tableInitialized(){this.sheets.length?this.loadSheet(this.sheets[0]):this.options("spreadsheetSheets")?this.loadSheets(this.options("spreadsheetSheets")):this.options("spreadsheetData")&&this.loadData(this.options("spreadsheetData"))}loadRemoteData(e,t,i){return console.log("data",e,t,i),Array.isArray(e)?(this.table.dataLoader.clearAlert(),this.dispatchExternal("dataLoaded",e),!e.length||Array.isArray(e[0])?this.loadData(e):this.loadSheets(e)):console.error(`Spreadsheet Loading Error - Unable to process remote data due to invalid data type
|
|
43
48
|
Expecting: array
|
|
44
49
|
Received: `,typeof e,`
|
|
45
|
-
Data: `,e),!1}loadData(e){var t={data:e};this.loadSheet(this.newSheet(t))}destroySheets(){this.sheets.forEach(e=>{e.destroy()}),this.sheets=[],this.activeSheet=null}loadSheets(e){Array.isArray(e)||(e=[]),this.destroySheets(),e.forEach(t=>{this.newSheet(t)}),this.loadSheet(this.sheets[0])}loadSheet(e){this.activeSheet!==e&&(this.activeSheet&&this.activeSheet.unload(),this.activeSheet=e,e.load())}newSheet(e={}){var t;return e.rows||(e.rows=this.options("spreadsheetRows")),e.columns||(e.columns=this.options("spreadsheetColumns")),t=new da(this,e),this.sheets.push(t),this.element&&this.element.appendChild(t.element),t}removeSheet(e){var t=this.sheets.indexOf(e),i;this.sheets.length>1?t>-1&&(this.sheets.splice(t,1),e.destroy(),this.activeSheet===e&&(i=this.sheets[t-1]||this.sheets[0],i?this.loadSheet(i):this.activeSheet=null)):console.warn("Unable to remove sheet, at least one sheet must be active")}lookupSheet(e){return e?e instanceof da?e:e instanceof ha?e._sheet:this.sheets.find(t=>t.key===e)||!1:this.activeSheet}setSheets(e){return this.loadSheets(e),this.getSheets()}addSheet(e){return this.newSheet(e).getComponent()}getSheetDefinitions(){return this.sheets.map(e=>e.getDefinition())}getSheets(){return this.sheets.map(e=>e.getComponent())}getSheet(e){var t=this.lookupSheet(e);return t?t.getComponent():!1}setSheetData(e,t){e&&!t&&(t=e,e=!1);var i=this.lookupSheet(e);return i?i.setData(t):!1}getSheetData(e){var t=this.lookupSheet(e);return t?t.getData():!1}clearSheet(e){var t=this.lookupSheet(e);return t?t.clear():!1}removeSheetFunc(e){var t=this.lookupSheet(e);t&&this.removeSheet(t)}activeSheetFunc(e){var t=this.lookupSheet(e);return t?this.loadSheet(t):!1}}class Up extends ke{static moduleName="tooltip";constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var n=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;n&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,n),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var n,r,a;function o(l){r=l}typeof i=="function"&&(i=i(e,t.getComponent(),o)),i instanceof HTMLElement?n=i:(n=document.createElement("div"),i===!0&&(t instanceof Yi?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,l=>{n.innerHTML=i=l||t.definition.title}):i=t.definition.title),n.innerHTML=i),(i||i===0||i===!1)&&(n.classList.add("tabulator-tooltip"),n.addEventListener("mousemove",l=>l.preventDefault()),this.popupInstance=this.popup(n),typeof r=="function"&&this.popupInstance.renderCallback(r),a=this.popupInstance.containerEventCoords(e),this.popupInstance.show(a.x+15,a.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}var Kp={integer:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},alphanumeric:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(/^[a-z0-9]+$/i);return i.test(e)},max:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(s,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(s,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,n=s.getData(),r=s.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(a){var o=a.getData();o!==n&&e==r.getFieldValue(o)&&(i=!1)}),i},required:function(s,e,t){return e!==""&&e!==null&&typeof e<"u"}};class Bn extends ke{static moduleName="validate";static validators=Kp;constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var n=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return n!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,n)}),n}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var n=i.validate();n!==!0&&(t=t.concat(n))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],n;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(r=>{n=t._extractValidator(r),n&&i.push(n)}):(n=this._extractValidator(e.definition.validator),n&&i.push(n)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,n;switch(typeof e){case"string":return n=e.indexOf(":"),n>-1?(t=e.substring(0,n),i=e.substring(n+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:Bn.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var n=this,r=[],a=this.invalidCells.indexOf(t);return e&&e.forEach(o=>{o.func.call(n,t.getComponent(),i,o.params)||r.push({type:o.type,parameters:o.params})}),t.modules.validate||(t.modules.validate={}),r.length?(t.modules.validate.invalid=r,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),a==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),a>-1&&this.invalidCells.splice(a,1)),r.length?r:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}}var Nn=Object.freeze({__proto__:null,AccessorModule:_s,AjaxModule:vi,ClipboardModule:Os,ColumnCalcsModule:yi,DataTreeModule:Gc,DownloadModule:Ps,EditModule:Pn,ExportModule:Gi,FilterModule:si,FormatModule:wi,FrozenColumnsModule:If,FrozenRowsModule:Vf,GroupRowsModule:Wf,HistoryModule:As,HtmlTableImportModule:qf,ImportModule:An,InteractionModule:tp,KeybindingsModule:$i,MenuModule:np,MoveColumnsModule:rp,MoveRowsModule:Hs,MutatorModule:zs,PageModule:Hn,PersistenceModule:Ot,PopupModule:pp,PrintModule:mp,ReactiveDataModule:gp,ResizeColumnsModule:bp,ResizeRowsModule:vp,ResizeTableModule:yp,ResponsiveLayoutModule:Ep,SelectRangeModule:Ap,SelectRowModule:Mp,SortModule:Ui,SpreadsheetModule:$p,TooltipModule:Up,ValidateModule:Bn}),qp={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},rowHeader:!1,data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{},dependencies:{}};class ca{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),n=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let r in t)i.hasOwnProperty(r)||(n&&console.warn("Invalid "+this.msgType+" option:",r),i[r]=t.key);for(let r in i)r in t?i[r]=t[r]:Array.isArray(i[r])?i[r]=Object.assign([],i[r]):typeof i[r]=="object"&&i[r]!==null?i[r]=Object.assign({},i[r]):typeof i[r]>"u"&&delete i[r];return i}}class Bs extends Je{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var n=this.rows().indexOf(e),r=e.getElement(),a=0;return new Promise((o,l)=>{if(n>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&He.elVisible(r)&&(a=He.elOffset(r).top-He.elOffset(this.elementVertical).top,a>0&&a<this.elementVertical.clientHeight-r.offsetHeight))return o(),!1;switch(typeof t>"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(r.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-r.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-r.offsetTop)+r.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+r.offsetHeight;break;case"top":this.elementVertical.scrollTop=r.offsetTop;break}o()}else console.warn("Scroll Error - Row not visible"),l("Scroll Error - Row not visible")})}}class Jp extends Bs{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(n=>{i.appendChild(n.getElement())}),e.element.appendChild(i),t||e.cells.forEach(n=>{n.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class Xp extends Bs{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},n=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(r=>{var a={},o;r.visible&&(r.modules.frozen||(o=r.getWidth(),a.leftPos=n,a.rightPos=n+o,a.width=o,this.isFitData&&(a.fitDataCheck=r.modules.vdomHoz?r.modules.vdomHoz.fitDataCheck:!0),n+o>this.vDomScrollPosLeft&&n<this.vDomScrollPosRight?(this.leftCol==-1&&(this.leftCol=this.columns.length,this.vDomPadLeft=n),this.rightCol=this.columns.length):this.leftCol!==-1&&(this.vDomPadRight+=o),this.columns.push(r),r.modules.vdomHoz=a,n+=o))}),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||(!e||this.reinitChanged(i))&&this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++){let i=this.columns[t];i&&i.reinitializeWidth()}}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(n=>{!n.definition.width&&n.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let n=0;n<t.cells.length;n++){let r=t.cells[n];i.appendChild(r.getElement()),r.column.reinitializeWidth()}i.parentNode.removeChild(i),this.rerenderColumns(!1,!0)}}else this.options("layout")==="fitColumns"&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol?!0:(e.cols.forEach((i,n)=>{i!==this.columns[n]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let n=e;n<t;n++){let r=this.columns[n];r.modules.vdomHoz.leftPos+=i,r.modules.vdomHoz.rightPos+=i}}addColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);n.getElement().insertBefore(r.getElement(),n.getCell(this.columns[this.rightCol]).getElement().nextSibling),r.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var a=r.getCell(i);r.getElement().insertBefore(a.getElement(),r.getCell(this.columns[this.leftCol]).getElement()),a.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let n=this.fitDataColActualWidthCheck(i);n&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+n,this.vDomPadRight-=n)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);try{n.getElement().removeChild(r.getElement())}catch(a){console.warn("Could not removeColRight",a.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);try{n.getElement().removeChild(r.getElement())}catch(a){console.warn("Could not removeColLeft",a.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class Zp extends Je{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.rowHeader=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new ca(this.table,"column definition",la),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:Xp,basic:Jp};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i={},n=this.table.options.autoColumns==="full"?e:[e[0]],r=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(n.forEach(a=>{Object.keys(a).forEach((o,l)=>{let u=a[o],h;i[o]?i[o]!==!0&&typeof u<"u"&&(i[o].sorter=this.calculateSorterFromValue(u),i[o]=!0):(h={field:o,title:o,sorter:this.calculateSorterFromValue(u)},t.splice(l,0,h),i[o]=typeof u>"u"?h:!0)})}),r)switch(typeof r){case"function":this.table.options.columns=r.call(this.table,t);break;case"object":Array.isArray(r)?t.forEach(a=>{var o=r.find(l=>l.field===a.field);o&&Object.assign(a,o)}):t.forEach(a=>{r[a.field]&&Object.assign(a,r[a.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}calculateSorterFromValue(e){var t;switch(typeof e){case"undefined":t="string";break;case"boolean":t="boolean";break;case"number":t="number";break;case"object":Array.isArray(e)?t="array":t="string";break;default:!isNaN(e)&&e!==""?t="number":e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?t="alphanum":t="string";break}return t}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),this.dispatchExternal("columnsLoading"),this.table.options.rowHeader&&(this.rowHeader=new _t(this.table.options.rowHeader===!0?{}:this.table.options.rowHeader,this,!0),this.columns.push(this.rowHeader),this.headersElement.appendChild(this.rowHeader.getElement()),this.rowHeader.columnRendered()),e.forEach((i,n)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.subscribedExternal("columnsLoaded")&&this.dispatchExternal("columnsLoaded",this.getComponents()),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var n=new _t(e,this),r=n.getElement(),a=i&&this.findColumnIndex(i);if(t&&this.rowHeader&&(!i||i===this.rowHeader)&&(t=!1,i=this.rowHeader,a=0),i&&a>-1){var o=i.getTopColumn(),l=this.columns.indexOf(o),u=o.getElement();t?(this.columns.splice(l,0,n),u.parentNode.insertBefore(r,u)):(this.columns.splice(l+1,0,n),u.parentNode.insertBefore(r,u.nextSibling))}else t?(this.columns.unshift(n),this.headersElement.insertBefore(n.getElement(),this.headersElement.firstChild)):(this.columns.push(n),this.headersElement.appendChild(n.getElement()));return n.columnRendered(),n}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof _t)return e;if(e instanceof oa)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(n=>{t.push(n),t=t.concat(n.getColumns(!0))}),t.find(n=>n.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var n=this.table.options.nestedFieldSeparator?i.split(this.table.options.nestedFieldSeparator)[0]:i;n===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getVisibleColumnsByIndex(){return this.columnsByIndex.filter(e=>e.visible)}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(n=>{t.push(n.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,n,r){var a=e.indexOf(t),o,l=[];a>-1&&(e.splice(a,1),o=e.indexOf(i),o>-1?n&&(o=o+1):o=a,e.splice(o,0,t),r&&(l=this.chain("column-moving-rows",[t,i,n],null,[])||[],l=l.concat(this.table.rowManager.rows),l.forEach(function(u){if(u.cells.length){var h=u.cells.splice(a,1)[0];u.cells.splice(o,0,h)}})))}scrollToColumn(e,t,i){var n=0,r=e.getLeftOffset(),a=0,o=e.getElement();return new Promise((l,u)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-this.element.clientWidth/2;break;case"right":a=o.clientWidth-this.headersElement.clientWidth;break}if(!i&&r>0&&r+o.offsetWidth<this.element.clientWidth)return!1;n=r+a,n=Math.max(Math.min(n,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(n),this.scrollHorizontal(n),l()}else console.warn("Scroll Error - Column not visible"),u("Scroll Error - Column not visible")})}generateCells(e){var t=[];return this.columnsByIndex.forEach(i=>{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var n,r,a;i.visible&&(n=i.definition.width||0,r=parseInt(i.minWidth),typeof n=="string"?n.indexOf("%")>-1?a=e/100*parseInt(n):a=parseInt(n):a=n,t+=a>r?a:r)}),t}addColumn(e,t,i){return new Promise((n,r)=>{var a=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&a.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),n(a)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){He.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class Qp extends Bs{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),n=this.rows();n.forEach((r,a)=>{this.styleRow(r,a),r.initialize(!1,!0),r.type!=="group"&&(t=!1),i.appendChild(r.getElement())}),e.appendChild(i),n.forEach(r=>{r.rendered(),r.heightInitialized||r.calcHeight(!0)}),n.forEach(r=>{r.heightInitialized||r.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows(),this.rows().length||this.table.rowManager.tableEmpty()}scrollToRowNearestTop(e){var t=He.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=He.elOffset(t).top-He.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class em extends Bs{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,n=!1,r=this.table.rowManager.scrollLeft,a=this.rows(),o=this.vDomTop;o<=this.vDomBottom;o++)if(a[o]){var l=t-a[o].getElement().offsetTop;if(n===!1||Math.abs(l)<n)n=l,i=o;else break}a.forEach(u=>{u.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,n||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(r)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,n=e-this.vDomScrollPosBottom,r=this.vDomWindowBuffer*2,a=this.rows();if(this.scrollTop=e,-i>r||n>r){var o=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*a.length)),this.scrollColumns(o)}else t?(i<0&&this._addTopRow(a,-i),n<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(a,-n):this.vDomScrollPosBottom=this.scrollTop)):(n>=0&&this._addBottomRow(a,n),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(a,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,n=!1,r=0,a=0,o=this.rows();if(e)r=this.vDomTop,a=this.vDomBottom;else for(var l=this.vDomTop;l<=this.vDomBottom;l++)if(o[l])if(n)if(i-o[l].getElement().offsetTop>=0)a=l;else break;else if(t-o[l].getElement().offsetTop>=0)r=l;else if(n=!0,i-o[l].getElement().offsetTop>=0)a=l;else break;return o.slice(r,a+1)}_virtualRenderFill(e,t,i){var n=this.tableElement,r=this.elementVertical,a=0,o=0,l=0,u=0,h=0,m=0,v=this.rows(),C=v.length,F=0,x,R,M=[],k=0,_=0,p=this.table.rowManager.fixedHeight,w=this.elementVertical.clientHeight,c=this.table.options.rowHeight,y=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;n.firstChild;)n.removeChild(n.firstChild);u=(C-e+1)*this.vDomRowHeight,u<w&&(e-=Math.ceil((w-u)/this.vDomRowHeight),e<0&&(e=0)),a=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e),e-=a}if(C&&He.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,p||this.table.options.maxHeight?(c&&(_=w/c+this.vDomWindowBuffer/c),_=Math.max(this.vDomWindowMinTotalRows,Math.ceil(_))):_=C;(_==C||o<=w+this.vDomWindowBuffer||k<this.vDomWindowMinTotalRows)&&this.vDomBottom<C-1;){for(M=[],R=document.createDocumentFragment(),m=0;m<_&&this.vDomBottom<C-1;)F=this.vDomBottom+1,x=v[F],this.styleRow(x,F),x.initialize(!1,!0),!x.heightInitialized&&!this.table.options.rowHeight&&x.clearCellHeight(),R.appendChild(x.getElement()),M.push(x),this.vDomBottom++,m++;if(!M.length)break;n.appendChild(R),M.forEach(g=>{g.rendered(),g.heightInitialized||g.calcHeight(!0)}),M.forEach(g=>{g.heightInitialized||g.setCellHeight()}),M.forEach(g=>{l=g.getHeight(),k<a?h+=l:o+=l,l>this.vDomWindowBuffer&&(this.vDomWindowBuffer=l*2),k++}),y=this.table.rowManager.adjustTableSize(),w=this.elementVertical.clientHeight,y&&(p||this.table.options.maxHeight)&&(c=o/k,_=Math.max(this.vDomWindowMinTotalRows,Math.ceil(w/c+this.vDomWindowBuffer/c)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-h,this.vDomBottomPad=this.vDomBottom==C-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-o-h,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((o+h)/k),this.vDomBottomPad=this.vDomRowHeight*(C-this.vDomBottom-1),this.vDomScrollHeight=h+o+this.vDomBottomPad-w),n.style.paddingTop=this.vDomTopPad+"px",n.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+h+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-w:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-w),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-w),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,r.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,n=[],r=0,a=this.vDomTop-1,o=0,l=!0;l;)if(this.vDomTop){let u=e[a],h,m;u&&o<this.vDomMaxRenderChain?(h=u.getHeight()||this.vDomRowHeight,m=u.initialized,t>=h?(this.styleRow(u,a),i.insertBefore(u.getElement(),i.firstChild),(!u.initialized||!u.heightInitialized)&&n.push(u),u.initialize(),m||(h=u.getElement().offsetHeight,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=h*2)),t-=h,r+=h,this.vDomTop--,a--,o++):l=!1):l=!1}else l=!1;for(let u of n)u.clearCellHeight();this._quickNormalizeRowHeight(n),r&&(this.vDomTopPad-=r,this.vDomTopPad<0&&(this.vDomTopPad=a*this.vDomRowHeight),a<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=r)}_removeTopRow(e,t){for(var i=[],n=0,r=0,a=!0;a;){let o=e[this.vDomTop],l;o&&r<this.vDomMaxRenderChain?(l=o.getHeight()||this.vDomRowHeight,t>=l?(this.vDomTop++,t-=l,n+=l,i.push(o),r++):a=!1):a=!1}for(let o of i){let l=o.getElement();l.parentNode&&l.parentNode.removeChild(l)}n&&(this.vDomTopPad+=n,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?n:n+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,n=[],r=0,a=this.vDomBottom+1,o=0,l=!0;l;){let u=e[a],h,m;u&&o<this.vDomMaxRenderChain?(h=u.getHeight()||this.vDomRowHeight,m=u.initialized,t>=h?(this.styleRow(u,a),i.appendChild(u.getElement()),(!u.initialized||!u.heightInitialized)&&n.push(u),u.initialize(),m||(h=u.getElement().offsetHeight,h>this.vDomWindowBuffer&&(this.vDomWindowBuffer=h*2)),t-=h,r+=h,this.vDomBottom++,a++,o++):l=!1):l=!1}for(let u of n)u.clearCellHeight();this._quickNormalizeRowHeight(n),r&&(this.vDomBottomPad-=r,(this.vDomBottomPad<0||a==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=r)}_removeBottomRow(e,t){for(var i=[],n=0,r=0,a=!0;a;){let o=e[this.vDomBottom],l;o&&r<this.vDomMaxRenderChain?(l=o.getHeight()||this.vDomRowHeight,t>=l?(this.vDomBottom--,t-=l,n+=l,i.push(o),r++):a=!1):a=!1}for(let o of i){let l=o.getElement();l.parentNode&&l.parentNode.removeChild(l)}n&&(this.vDomBottomPad+=n,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=n)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class tm extends Je{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,n=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,n),this.dispatch("scroll-vertical",i,n),this.dispatchExternal("scrollVertical",i,n))})}findRow(e){if(typeof e=="object"){if(e instanceof Qe)return e;if(e instanceof Ls)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.type==="row"&&t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((n,r)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),n()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,n)=>{if(i&&typeof i=="object"){var r=new Qe(i,this);this.rows.push(r)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type
|
|
50
|
+
Data: `,e),!1}loadData(e){var t={data:e};this.loadSheet(this.newSheet(t))}destroySheets(){this.sheets.forEach(e=>{e.destroy()}),this.sheets=[],this.activeSheet=null}loadSheets(e){Array.isArray(e)||(e=[]),this.destroySheets(),e.forEach(t=>{this.newSheet(t)}),this.loadSheet(this.sheets[0])}loadSheet(e){this.activeSheet!==e&&(this.activeSheet&&this.activeSheet.unload(),this.activeSheet=e,e.load())}newSheet(e={}){var t;return e.rows||(e.rows=this.options("spreadsheetRows")),e.columns||(e.columns=this.options("spreadsheetColumns")),t=new xc(this,e),this.sheets.push(t),this.element&&this.element.appendChild(t.element),t}removeSheet(e){var t=this.sheets.indexOf(e),i;this.sheets.length>1?t>-1&&(this.sheets.splice(t,1),e.destroy(),this.activeSheet===e&&(i=this.sheets[t-1]||this.sheets[0],i?this.loadSheet(i):this.activeSheet=null)):console.warn("Unable to remove sheet, at least one sheet must be active")}lookupSheet(e){return e?e instanceof xc?e:e instanceof Sc?e._sheet:this.sheets.find(t=>t.key===e)||!1:this.activeSheet}setSheets(e){return this.loadSheets(e),this.getSheets()}addSheet(e){return this.newSheet(e).getComponent()}getSheetDefinitions(){return this.sheets.map(e=>e.getDefinition())}getSheets(){return this.sheets.map(e=>e.getComponent())}getSheet(e){var t=this.lookupSheet(e);return t?t.getComponent():!1}setSheetData(e,t){e&&!t&&(t=e,e=!1);var i=this.lookupSheet(e);return i?i.setData(t):!1}getSheetData(e){var t=this.lookupSheet(e);return t?t.getData():!1}clearSheet(e){var t=this.lookupSheet(e);return t?t.clear():!1}removeSheetFunc(e){var t=this.lookupSheet(e);t&&this.removeSheet(t)}activeSheetFunc(e){var t=this.lookupSheet(e);return t?this.loadSheet(t):!1}}class AE extends Pe{static moduleName="tooltip";constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var r=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;r&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,r),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var r,s,a;function o(u){s=u}typeof i=="function"&&(i=i(e,t.getComponent(),o)),i instanceof HTMLElement?r=i:(r=document.createElement("div"),i===!0&&(t instanceof un?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,u=>{r.innerHTML=i=u||t.definition.title}):i=t.definition.title),r.innerHTML=i),(i||i===0||i===!1)&&(r.classList.add("tabulator-tooltip"),r.addEventListener("mousemove",u=>u.preventDefault()),this.popupInstance=this.popup(r),typeof s=="function"&&this.popupInstance.renderCallback(s),a=this.popupInstance.containerEventCoords(e),this.popupInstance.show(a.x+15,a.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}var FE={integer:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},alphanumeric:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(/^[a-z0-9]+$/i);return i.test(e)},max:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(n,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(n,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,r=n.getData(),s=n.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(a){var o=a.getData();o!==r&&e==s.getFieldValue(o)&&(i=!1)}),i},required:function(n,e,t){return e!==""&&e!==null&&typeof e<"u"}};class ga extends Pe{static moduleName="validate";static validators=FE;constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var r=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return r!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,r)}),r}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var r=i.validate();r!==!0&&(t=t.concat(r))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],r;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(s=>{r=t._extractValidator(s),r&&i.push(r)}):(r=this._extractValidator(e.definition.validator),r&&i.push(r)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,r;switch(typeof e){case"string":return r=e.indexOf(":"),r>-1?(t=e.substring(0,r),i=e.substring(r+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:ga.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var r=this,s=[],a=this.invalidCells.indexOf(t);return e&&e.forEach(o=>{o.func.call(r,t.getComponent(),i,o.params)||s.push({type:o.type,parameters:o.params})}),t.modules.validate||(t.modules.validate={}),s.length?(t.modules.validate.invalid=s,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),a==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),a>-1&&this.invalidCells.splice(a,1)),s.length?s:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}}var ba=Object.freeze({__proto__:null,AccessorModule:Jn,AjaxModule:Fi,ClipboardModule:Xn,ColumnCalcsModule:Bi,DataTreeModule:PC,DownloadModule:Qn,EditModule:da,ExportModule:cn,FilterModule:gi,FormatModule:Ni,FrozenColumnsModule:M0,FrozenRowsModule:R0,GroupRowsModule:D0,HistoryModule:tr,HtmlTableImportModule:B0,ImportModule:fa,InteractionModule:$0,KeybindingsModule:dn,MenuModule:G0,MoveColumnsModule:Y0,MoveRowsModule:ir,MutatorModule:nr,PageModule:pa,PersistenceModule:Ht,PopupModule:tE,PrintModule:iE,ReactiveDataModule:nE,ResizeColumnsModule:rE,ResizeRowsModule:sE,ResizeTableModule:aE,ResponsiveLayoutModule:uE,SelectRangeModule:EE,SelectRowModule:hE,SortModule:hn,SpreadsheetModule:PE,TooltipModule:AE,ValidateModule:ga}),BE={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},rowHeader:!1,data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{},dependencies:{}};class _c{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),r=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let s in t)i.hasOwnProperty(s)||(r&&console.warn("Invalid "+this.msgType+" option:",s),i[s]=t.key);for(let s in i)s in t?i[s]=t[s]:Array.isArray(i[s])?i[s]=Object.assign([],i[s]):typeof i[s]=="object"&&i[s]!==null?i[s]=Object.assign({},i[s]):typeof i[s]>"u"&&delete i[s];return i}}class rr extends rt{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var r=this.rows().indexOf(e),s=e.getElement(),a=0;return new Promise((o,u)=>{if(r>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&Ke.elVisible(s)&&(a=Ke.elOffset(s).top-Ke.elOffset(this.elementVertical).top,a>0&&a<this.elementVertical.clientHeight-s.offsetHeight))return o(),!1;switch(typeof t>"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(s.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-s.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-s.offsetTop)+s.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+s.offsetHeight;break;case"top":this.elementVertical.scrollTop=s.offsetTop;break}o()}else console.warn("Scroll Error - Row not visible"),u("Scroll Error - Row not visible")})}}class NE extends rr{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(r=>{i.appendChild(r.getElement())}),e.element.appendChild(i),t||e.cells.forEach(r=>{r.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class VE extends rr{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},r=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(s=>{var a={},o;s.visible&&(s.modules.frozen||(o=s.getWidth(),a.leftPos=r,a.rightPos=r+o,a.width=o,this.isFitData&&(a.fitDataCheck=s.modules.vdomHoz?s.modules.vdomHoz.fitDataCheck:!0),r+o>this.vDomScrollPosLeft&&r<this.vDomScrollPosRight?(this.leftCol==-1&&(this.leftCol=this.columns.length,this.vDomPadLeft=r),this.rightCol=this.columns.length):this.leftCol!==-1&&(this.vDomPadRight+=o),this.columns.push(s),s.modules.vdomHoz=a,r+=o))}),this.tableElement.style.paddingLeft=this.vDomPadLeft+"px",this.tableElement.style.paddingRight=this.vDomPadRight+"px",this.initialized=!0,t||(!e||this.reinitChanged(i))&&this.reinitializeRows(),this.elementVertical.scrollLeft=this.scrollLeft)}renderRowCells(e){if(this.initialized)this.initializeRow(e);else{const t=document.createDocumentFragment();e.cells.forEach(i=>{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++){let i=this.columns[t];i&&i.reinitializeWidth()}}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(r=>{!r.definition.width&&r.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let r=0;r<t.cells.length;r++){let s=t.cells[r];i.appendChild(s.getElement()),s.column.reinitializeWidth()}i.parentNode.removeChild(i),this.rerenderColumns(!1,!0)}}else this.options("layout")==="fitColumns"&&(this.layoutRefresh(),this.rerenderColumns(!1,!0))}reinitChanged(e){var t=!0;return e.cols.length!==this.columns.length||e.leftCol!==this.leftCol||e.rightCol!==this.rightCol?!0:(e.cols.forEach((i,r)=>{i!==this.columns[r]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let r=e;r<t;r++){let s=this.columns[r];s.modules.vdomHoz.leftPos+=i,s.modules.vdomHoz.rightPos+=i}}addColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol+1];i&&i.modules.vdomHoz.leftPos<=this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var s=r.getCell(i);r.getElement().insertBefore(s.getElement(),r.getCell(this.columns[this.rightCol]).getElement().nextSibling),s.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(s=>{if(s.type!=="group"){var a=s.getCell(i);s.getElement().insertBefore(a.getElement(),s.getCell(this.columns[this.leftCol]).getElement()),a.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let r=this.fitDataColActualWidthCheck(i);r&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+r,this.vDomPadRight-=r)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var s=r.getCell(i);try{r.getElement().removeChild(s.getElement())}catch(a){console.warn("Could not removeColRight",a.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos<this.vDomScrollPosLeft?(e=!0,this.getVisibleRows().forEach(r=>{if(r.type!=="group"){var s=r.getCell(i);try{r.getElement().removeChild(s.getElement())}catch(a){console.warn("Could not removeColLeft",a.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(r=>{r.type!=="group"&&(r.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class HE extends rt{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.rowHeader=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new _c(this.table,"column definition",Ec),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:VE,basic:NE};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i={},r=this.table.options.autoColumns==="full"?e:[e[0]],s=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(r.forEach(a=>{Object.keys(a).forEach((o,u)=>{let c=a[o],d;i[o]?i[o]!==!0&&typeof c<"u"&&(i[o].sorter=this.calculateSorterFromValue(c),i[o]=!0):(d={field:o,title:o,sorter:this.calculateSorterFromValue(c)},t.splice(u,0,d),i[o]=typeof c>"u"?d:!0)})}),s)switch(typeof s){case"function":this.table.options.columns=s.call(this.table,t);break;case"object":Array.isArray(s)?t.forEach(a=>{var o=s.find(u=>u.field===a.field);o&&Object.assign(a,o)}):t.forEach(a=>{s[a.field]&&Object.assign(a,s[a.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}calculateSorterFromValue(e){var t;switch(typeof e){case"undefined":t="string";break;case"boolean":t="boolean";break;case"number":t="number";break;case"object":Array.isArray(e)?t="array":t="string";break;default:!isNaN(e)&&e!==""?t="number":e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?t="alphanum":t="string";break}return t}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),this.dispatchExternal("columnsLoading"),this.table.options.rowHeader&&(this.rowHeader=new Vt(this.table.options.rowHeader===!0?{}:this.table.options.rowHeader,this,!0),this.columns.push(this.rowHeader),this.headersElement.appendChild(this.rowHeader.getElement()),this.rowHeader.columnRendered()),e.forEach((i,r)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.subscribedExternal("columnsLoaded")&&this.dispatchExternal("columnsLoaded",this.getComponents()),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var r=new Vt(e,this),s=r.getElement(),a=i&&this.findColumnIndex(i);if(t&&this.rowHeader&&(!i||i===this.rowHeader)&&(t=!1,i=this.rowHeader,a=0),i&&a>-1){var o=i.getTopColumn(),u=this.columns.indexOf(o),c=o.getElement();t?(this.columns.splice(u,0,r),c.parentNode.insertBefore(s,c)):(this.columns.splice(u+1,0,r),c.parentNode.insertBefore(s,c.nextSibling))}else t?(this.columns.unshift(r),this.headersElement.insertBefore(r.getElement(),this.headersElement.firstChild)):(this.columns.push(r),this.headersElement.appendChild(r.getElement()));return r.columnRendered(),r}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof Vt)return e;if(e instanceof Cc)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(r=>{t.push(r),t=t.concat(r.getColumns(!0))}),t.find(r=>r.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var r=this.table.options.nestedFieldSeparator?i.split(this.table.options.nestedFieldSeparator)[0]:i;r===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getVisibleColumnsByIndex(){return this.columnsByIndex.filter(e=>e.visible)}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(r=>{t.push(r.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,r,s){var a=e.indexOf(t),o,u=[];a>-1&&(e.splice(a,1),o=e.indexOf(i),o>-1?r&&(o=o+1):o=a,e.splice(o,0,t),s&&(u=this.chain("column-moving-rows",[t,i,r],null,[])||[],u=u.concat(this.table.rowManager.rows),u.forEach(function(c){if(c.cells.length){var d=c.cells.splice(a,1)[0];c.cells.splice(o,0,d)}})))}scrollToColumn(e,t,i){var r=0,s=e.getLeftOffset(),a=0,o=e.getElement();return new Promise((u,c)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":a=-this.element.clientWidth/2;break;case"right":a=o.clientWidth-this.headersElement.clientWidth;break}if(!i&&s>0&&s+o.offsetWidth<this.element.clientWidth)return!1;r=s+a,r=Math.max(Math.min(r,this.table.rowManager.element.scrollWidth-this.table.rowManager.element.clientWidth),0),this.table.rowManager.scrollHorizontal(r),this.scrollHorizontal(r),u()}else console.warn("Scroll Error - Column not visible"),c("Scroll Error - Column not visible")})}generateCells(e){var t=[];return this.columnsByIndex.forEach(i=>{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var r,s,a;i.visible&&(r=i.definition.width||0,s=parseInt(i.minWidth),typeof r=="string"?r.indexOf("%")>-1?a=e/100*parseInt(r):a=parseInt(r):a=r,t+=a>s?a:s)}),t}addColumn(e,t,i){return new Promise((r,s)=>{var a=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&a.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),r(a)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){Ke.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class zE extends rr{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),r=this.rows();r.forEach((s,a)=>{this.styleRow(s,a),s.initialize(!1,!0),s.type!=="group"&&(t=!1),i.appendChild(s.getElement())}),e.appendChild(i),r.forEach(s=>{s.rendered(),s.heightInitialized||s.calcHeight(!0)}),r.forEach(s=>{s.heightInitialized||s.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows(),this.rows().length||this.table.rowManager.tableEmpty()}scrollToRowNearestTop(e){var t=Ke.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=Ke.elOffset(t).top-Ke.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class IE extends rr{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,r=!1,s=this.table.rowManager.scrollLeft,a=this.rows(),o=this.vDomTop;o<=this.vDomBottom;o++)if(a[o]){var u=t-a[o].getElement().offsetTop;if(r===!1||Math.abs(u)<r)r=u,i=o;else break}a.forEach(c=>{c.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,r||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(s)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,r=e-this.vDomScrollPosBottom,s=this.vDomWindowBuffer*2,a=this.rows();if(this.scrollTop=e,-i>s||r>s){var o=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*a.length)),this.scrollColumns(o)}else t?(i<0&&this._addTopRow(a,-i),r<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(a,-r):this.vDomScrollPosBottom=this.scrollTop)):(r>=0&&this._addBottomRow(a,r),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(a,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,r=!1,s=0,a=0,o=this.rows();if(e)s=this.vDomTop,a=this.vDomBottom;else for(var u=this.vDomTop;u<=this.vDomBottom;u++)if(o[u])if(r)if(i-o[u].getElement().offsetTop>=0)a=u;else break;else if(t-o[u].getElement().offsetTop>=0)s=u;else if(r=!0,i-o[u].getElement().offsetTop>=0)a=u;else break;return o.slice(s,a+1)}_virtualRenderFill(e,t,i){var r=this.tableElement,s=this.elementVertical,a=0,o=0,u=0,c=0,d=0,p=0,h=this.rows(),f=h.length,_=0,k,w,y=[],v=0,R=0,m=this.table.rowManager.fixedHeight,x=this.elementVertical.clientHeight,g=this.table.options.rowHeight,S=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;r.firstChild;)r.removeChild(r.firstChild);c=(f-e+1)*this.vDomRowHeight,c<x&&(e-=Math.ceil((x-c)/this.vDomRowHeight),e<0&&(e=0)),a=Math.min(Math.max(Math.floor(this.vDomWindowBuffer/this.vDomRowHeight),this.vDomWindowMinMarginRows),e),e-=a}if(f&&Ke.elVisible(this.elementVertical)){for(this.vDomTop=e,this.vDomBottom=e-1,m||this.table.options.maxHeight?(g&&(R=x/g+this.vDomWindowBuffer/g),R=Math.max(this.vDomWindowMinTotalRows,Math.ceil(R))):R=f;(R==f||o<=x+this.vDomWindowBuffer||v<this.vDomWindowMinTotalRows)&&this.vDomBottom<f-1;){for(y=[],w=document.createDocumentFragment(),p=0;p<R&&this.vDomBottom<f-1;)_=this.vDomBottom+1,k=h[_],this.styleRow(k,_),k.initialize(!1,!0),!k.heightInitialized&&!this.table.options.rowHeight&&k.clearCellHeight(),w.appendChild(k.getElement()),y.push(k),this.vDomBottom++,p++;if(!y.length)break;r.appendChild(w),y.forEach(C=>{C.rendered(),C.heightInitialized||C.calcHeight(!0)}),y.forEach(C=>{C.heightInitialized||C.setCellHeight()}),y.forEach(C=>{u=C.getHeight(),v<a?d+=u:o+=u,u>this.vDomWindowBuffer&&(this.vDomWindowBuffer=u*2),v++}),S=this.table.rowManager.adjustTableSize(),x=this.elementVertical.clientHeight,S&&(m||this.table.options.maxHeight)&&(g=o/v,R=Math.max(this.vDomWindowMinTotalRows,Math.ceil(x/g+this.vDomWindowBuffer/g)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-d,this.vDomBottomPad=this.vDomBottom==f-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-o-d,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((o+d)/v),this.vDomBottomPad=this.vDomRowHeight*(f-this.vDomBottom-1),this.vDomScrollHeight=d+o+this.vDomBottomPad-x),r.style.paddingTop=this.vDomTopPad+"px",r.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+d+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-x:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-x),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-x),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,s.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,r=[],s=0,a=this.vDomTop-1,o=0,u=!0;u;)if(this.vDomTop){let c=e[a],d,p;c&&o<this.vDomMaxRenderChain?(d=c.getHeight()||this.vDomRowHeight,p=c.initialized,t>=d?(this.styleRow(c,a),i.insertBefore(c.getElement(),i.firstChild),(!c.initialized||!c.heightInitialized)&&r.push(c),c.initialize(),p||(d=c.getElement().offsetHeight,d>this.vDomWindowBuffer&&(this.vDomWindowBuffer=d*2)),t-=d,s+=d,this.vDomTop--,a--,o++):u=!1):u=!1}else u=!1;for(let c of r)c.clearCellHeight();this._quickNormalizeRowHeight(r),s&&(this.vDomTopPad-=s,this.vDomTopPad<0&&(this.vDomTopPad=a*this.vDomRowHeight),a<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=s)}_removeTopRow(e,t){for(var i=[],r=0,s=0,a=!0;a;){let o=e[this.vDomTop],u;o&&s<this.vDomMaxRenderChain?(u=o.getHeight()||this.vDomRowHeight,t>=u?(this.vDomTop++,t-=u,r+=u,i.push(o),s++):a=!1):a=!1}for(let o of i){let u=o.getElement();u.parentNode&&u.parentNode.removeChild(u)}r&&(this.vDomTopPad+=r,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?r:r+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,r=[],s=0,a=this.vDomBottom+1,o=0,u=!0;u;){let c=e[a],d,p;c&&o<this.vDomMaxRenderChain?(d=c.getHeight()||this.vDomRowHeight,p=c.initialized,t>=d?(this.styleRow(c,a),i.appendChild(c.getElement()),(!c.initialized||!c.heightInitialized)&&r.push(c),c.initialize(),p||(d=c.getElement().offsetHeight,d>this.vDomWindowBuffer&&(this.vDomWindowBuffer=d*2)),t-=d,s+=d,this.vDomBottom++,a++,o++):u=!1):u=!1}for(let c of r)c.clearCellHeight();this._quickNormalizeRowHeight(r),s&&(this.vDomBottomPad-=s,(this.vDomBottomPad<0||a==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=s)}_removeBottomRow(e,t){for(var i=[],r=0,s=0,a=!0;a;){let o=e[this.vDomBottom],u;o&&s<this.vDomMaxRenderChain?(u=o.getHeight()||this.vDomRowHeight,t>=u?(this.vDomBottom--,t-=u,r+=u,i.push(o),s++):a=!1):a=!1}for(let o of i){let u=o.getElement();u.parentNode&&u.parentNode.removeChild(u)}r&&(this.vDomBottomPad+=r,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=r)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class $E extends rt{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,r=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,r),this.dispatch("scroll-vertical",i,r),this.dispatchExternal("scrollVertical",i,r))})}findRow(e){if(typeof e=="object"){if(e instanceof ot)return e;if(e instanceof Zn)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.type==="row"&&t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((r,s)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),r()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,r)=>{if(i&&typeof i=="object"){var s=new ot(i,this);this.rows.push(s)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type
|
|
46
51
|
Expecting: array
|
|
47
52
|
Received: `,typeof e,`
|
|
48
|
-
Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),n=this.activeRows.indexOf(e);n>-1&&this.activeRows.splice(n,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(r=>{var a=r.indexOf(e);a>-1&&r.splice(a,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,n){var r=this.addRowActual(e,t,i,n);return r}addRows(e,t,i,n){var r=[];return new Promise((a,o)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((l,u)=>{var h=this.addRow(l,t,i,!0);r.push(h),this.dispatch("row-added",h,l,t,i)}),this.refreshActiveData(n?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),a(r)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,n){var r=e instanceof Qe?e:new Qe(e||{},this),a=this.findAddRowPos(t),o=-1,l,u;return i||(u=this.chain("row-adding-position",[r,a],null,{index:i,top:a}),i=u.index,a=u.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[r,i,a],null,i),i&&(o=this.rows.indexOf(i)),i&&o>-1?(l=this.activeRows.indexOf(i),this.displayRowIterator(function(h){var m=h.indexOf(i);m>-1&&h.splice(a?m:m+1,0,r)}),l>-1&&this.activeRows.splice(a?l:l+1,0,r),this.rows.splice(a?o:o+1,0,r)):a?(this.displayRowIterator(function(h){h.unshift(r)}),this.activeRows.unshift(r),this.rows.unshift(r)):(this.displayRowIterator(function(h){h.push(r)}),this.activeRows.push(r),this.rows.push(r)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",r.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n||this.reRenderInPosition(),r}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(n=>{this.moveRowInArray(n,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,n){var r,a,o,l;if(t!==i&&(r=e.indexOf(t),r>-1&&(e.splice(r,1),a=e.indexOf(i),a>-1?n?e.splice(a+1,0,t):e.splice(a,0,t):e.splice(r,0,t)),e===this.getDisplayRows())){o=r<a?r:a,l=a>r?a:r+1;for(let u=o;u<=l;u++)e[u]&&this.styleRow(e[u],u)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),n=!1;return i!==!1&&i<this.displayRowsCount-1&&(n=this.getDisplayRows()[i+1]),n&&(!(n instanceof Qe)||n.type!="row")?this.nextDisplayRow(n,t):n}prevDisplayRow(e,t){var i=this.getDisplayRowIndex(e),n=!1;return i&&(n=this.getDisplayRows()[i-1]),t&&n&&(!(n instanceof Qe)||n.type!="row")?this.prevDisplayRow(n,t):n}findRowIndex(e,t){var i;return e=this.findRow(e),e&&(i=t.indexOf(e),i>-1)?i:!1}getData(e,t){var i=[],n=this.getRows(e);return n.forEach(function(r){r.type=="row"&&i.push(r.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(n){t.push(n.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,n)=>i.priority-n.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,n)=>i.priority-n.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var n=this.table,r="",a=0,o=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(a=this.dataPipeline.findIndex(l=>l.handler===e),a>-1)r="dataPipeline",t&&(a==this.dataPipeline.length-1?r="display":a++);else if(a=this.displayPipeline.findIndex(l=>l.handler===e),a>-1)r="displayPipeline",t&&(a==this.displayPipeline.length-1?r="end":a++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else r=e||"all",a=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===r&&a<this.redrawBlockRestoreConfig.index||o.indexOf(r)<o.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:i,stage:r,index:a});return}else He.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,e,r,a,i)):(this.refreshPipelines(e,r,a,i),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),n.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,r,a,i),this.dispatch("data-refreshed")}}refreshPipelines(e,t,i,n){switch(this.dispatch("data-refreshing"),(!e||!this.activeRowsPipeline[0])&&(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let r=i;r<this.dataPipeline.length;r++){let a=this.dataPipeline[r].handler(this.activeRowsPipeline[r].slice(0));this.activeRowsPipeline[r+1]=a||this.activeRowsPipeline[r].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let r=i;r<this.displayPipeline.length;r++){let a=this.displayPipeline[r].handler((r?this.getDisplayRows(r-1):this.activeRows).slice(0),n);this.setDisplayRows(a||this.getDisplayRows(r-1).slice(0),r)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach(i=>{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:em,basic:Qp};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}checkPlaceholder(){this.displayRowsCount?this._clearPlaceholder():this.tableEmpty()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(e){this.activeRows.forEach(function(t){t.normalizeHeight(e)})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let n=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const r="calc(100% - "+n+"px)";this.element.style.minHeight=t||"calc(100% - "+n+"px)",this.element.style.height=r,this.element.style.maxHeight=r}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-n+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class im extends Je{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class sm extends Je{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),n={row:["cell"],cell:["row"]};i=i.filter(r=>{var a=n[e];return r!==e&&(!a||a&&!a.includes(r))}),i.forEach(r=>{var a=this.pseudoTrackers[r].target;this.pseudoTrackers[r].target&&(this.dispatch(r+"-mouseleave",t,a),this.pseudoTrackers[r].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let n of e){let r=i+"-"+n;this.subscriptionChange(r,this.subscriptionChanged.bind(this,i,n))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var n=this.listeners[t].components,r=n.indexOf(e),a=!1;i?r===-1&&(n.push(e),a=!0):this.subscribed(e+"-"+t)||r>-1&&(n.splice(r,1),a=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),a&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,n=this.findTargets(i);n=this.bindComponents(e,n),this.triggerEvents(e,t,n),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(n).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let n of e){let r=n.classList?[...n.classList]:[];if(r.filter(l=>this.abortClasses.includes(l)).length)break;let o=r.filter(l=>i.includes(l));for(let l of o)t[this.componentMap[l]]||(t[this.componentMap[l]]=n)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),n=this.listeners[e],r={},a={},o={};for(let l of i){let u,h=t[l],m=this.previousTargets[l];if(m&&m.target===h)u=m.component;else switch(l){case"row":case"group":(n.components.includes("row")||n.components.includes("cell")||n.components.includes("group"))&&(u=this.table.rowManager.getVisibleRows(!0).find(C=>C.getElement()===h),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[l]=!1));break;case"column":n.components.includes("column")&&(u=this.table.columnManager.findColumn(h));break;case"cell":n.components.includes("cell")&&(r.row instanceof Qe?u=r.row.findCell(h):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}u&&(r[l]=u,o[l]={target:h,component:u})}return this.previousTargets=o,Object.keys(t).forEach(l=>{let u=r[l];a[l]=u}),a}triggerEvents(e,t,i){var n=this.listeners[e];for(let r in i)i[r]&&n.components.includes(r)&&this.dispatch(r+"-"+e,t,i[r])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class nm{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class rm extends Je{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,n,r,a){var o=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,r])){this.loading=!0,r||this.alertLoader(),t=this.chain("data-params",[e,i,r],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var l=this.chain("data-load",[e,t,i,r],!1,Promise.resolve([]));return l.then(u=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(u)&&typeof u=="object"&&(u=this.mapParams(u,this.objectInvert(this.table.options.dataReceiveParams)));var h=this.chain("data-loaded",[u],null,u);o==this.requestOrder?(this.clearAlert(),h!==!1&&(this.dispatchExternal("dataLoaded",h),this.table.rowManager.setData(h,n,typeof a>"u"?!n:a))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(u=>{console.error("Data Load Error: ",u),this.dispatchExternal("dataLoadError",u),r||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,n,typeof a>"u"?!n:a),Promise.resolve()}mapParams(e,t){var i={};for(let n in e)i[t.hasOwnProperty(n)?t[n]:n]=e[n];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class am{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(n=>n===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(n=>{n(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((n,r)=>{let a=n.apply(this.table,e);r||(i=a)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class om{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((n,r)=>n.priority-r.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(n=>n.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,n){var r=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((a,o)=>{r=a.callback.apply(this,t.concat([r]))}),r):typeof n=="function"?n():n}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((n,r)=>{n.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(n=>{n(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class lm extends Je{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t,i){var n="";return typeof this.options(e)<"u"?(n="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(n=n+", Please use the %c"+t+"%c option instead",this._warnUser(n,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;"),i&&(this.table.options[t]=this.table.options[e])):this._warnUser(n,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}class um extends Je{constructor(e){super(e),this.deps={},this.props={}}initialize(){this.deps=Object.assign({},this.options("dependencies"))}lookup(e,t,i){if(Array.isArray(e)){for(const r of e){var n=this.lookup(r,t,!0);if(n)break}if(n)return n;this.error(e)}else return t?this.lookupProp(e,t,i):this.lookupKey(e,i)}lookupProp(e,t,i){var n;if(this.props[e]&&this.props[e][t])return this.props[e][t];if(n=this.lookupKey(e,i),n)return this.props[e]||(this.props[e]={}),this.props[e][t]=n[t]||n,this.props[e][t]}lookupKey(e,t){var i;return this.deps[e]?i=this.deps[e]:window[e]?(this.deps[e]=window[e],i=this.deps[e]):t||this.error(e),i}error(e){console.error("Unable to find dependency",e,"Please check documentation and ensure you have imported the required library into your project")}}function hm(s,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(s),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function fa(s,e){s.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function dm(s,e){var t=0,i=this.table.rowManager.element.clientWidth,n=0,r=!1;s.forEach((a,o)=>{a.widthFixed||a.reinitializeWidth(),(this.table.options.responsiveLayout?a.modules.responsive.visible:a.visible)&&(r=a),a.visible&&(t+=a.getWidth())}),r?(n=i-t+r.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(r.setWidth(0),this.table.modules.responsiveLayout.update()),n>0?r.setWidth(n):r.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function cm(s,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,n=0,r=0,a=0,o=[],l=[],u=0,h=0,m=0;function v(F){var x;return typeof F=="string"?F.indexOf("%")>-1?x=t/100*parseInt(F):x=parseInt(F):x=F,x}function C(F,x,R,M){var k=[],_=0,p=0,w=0,c=r,y=0,g=0,b=[];function f(S){return R*(S.column.definition.widthGrow||1)}function E(S){return v(S.width)-R*(S.column.definition.widthShrink||0)}return F.forEach(function(S,D){var A=M?E(S):f(S);S.column.minWidth>=A?k.push(S):S.column.maxWidth&&S.column.maxWidth<A?(S.width=S.column.maxWidth,x-=S.column.maxWidth,c-=M?S.column.definition.widthShrink||1:S.column.definition.widthGrow||1,c&&(R=Math.floor(x/c))):(b.push(S),g+=M?S.column.definition.widthShrink||1:S.column.definition.widthGrow||1)}),k.length?(k.forEach(function(S){_+=M?S.width-S.column.minWidth:S.column.minWidth,S.width=S.column.minWidth}),p=x-_,w=g?Math.floor(p/g):p,y=C(b,p,w,M)):(y=g?x-Math.floor(x/g)*g:x,b.forEach(function(S){S.width=M?E(S):f(S)})),y}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),s.forEach(function(F){var x,R,M;F.visible&&(x=F.definition.width,R=parseInt(F.minWidth),x?(M=v(x),i+=M>R?M:R,F.definition.widthShrink&&(l.push({column:F,width:M>R?M:R}),u+=F.definition.widthShrink)):(o.push({column:F,width:0}),r+=F.definition.widthGrow||1))}),n=t-i,a=Math.floor(n/r),m=C(o,n,a,!1),o.length&&m>0&&(o[o.length-1].width+=m),o.forEach(function(F){n-=F.width}),h=Math.abs(m)+n,h>0&&u&&(m=C(l,h,Math.floor(h/u),!0)),m&&l.length&&(l[l.length-1].width-=m),o.forEach(function(F){F.column.setWidth(F.width)}),l.forEach(function(F){F.column.setWidth(F.width)})}var fm={fitData:hm,fitDataFill:fa,fitDataTable:fa,fitDataStretch:dm,fitColumns:cm};class Ns extends ke{static moduleName="layout";static modes=fm;constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;Ns.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){e.definition.widthGrow&&(e.definition.widthGrow=Number(e.definition.widthGrow)),e.definition.widthShrink&&(e.definition.widthShrink=Number(e.definition.widthShrink))}getMode(){return this.mode}layout(e){var t=this.table.columnManager.columnsByIndex.find(i=>i.definition.variableHeight||i.definition.formatter==="textarea");this.dispatch("layout-refreshing"),Ns.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),t&&this.table.rowManager.normalizeHeight(!0),this.dispatch("layout-refreshed")}}var pm={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class In extends ke{static moduleName="localize";static langs=pm;constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=He.deepClone(In.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,n){for(var r in i)typeof i[r]=="object"?(n[r]||(n[r]={}),t(i[r],n[r])):n[r]=i[r]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=He.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,n=i.split("|"),r=this._getLangElement(n,this.locale);return r||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(n){var r;i&&(r=i[n],typeof r<"u"?i=r:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}}class mm extends ke{static moduleName="comms";constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=this.table.constructor.registry.lookupTable(e),i.forEach(n=>{this.table!==n&&t.push(n)}),t}send(e,t,i,n){var r=this.getConnections(e);r.forEach(a=>{a.tableComms(this.table.element,t,i,n)}),!r.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,n){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,n);console.warn("Inter-table Comms Error - no such module:",t)}}var gm=Object.freeze({__proto__:null,CommsModule:mm,LayoutModule:Ns,LocalizeModule:In});class vt{static registry={tables:[],register(e){vt.registry.tables.push(e)},deregister(e){var t=vt.registry.tables.indexOf(e);t>-1&&vt.registry.tables.splice(t,1)},lookupTable(e,t){var i=[],n,r;if(typeof e=="string"){if(n=document.querySelectorAll(e),n.length)for(var a=0;a<n.length;a++)r=vt.registry.matchElement(n[a]),r&&i.push(r)}else typeof HTMLElement<"u"&&e instanceof HTMLElement||e instanceof vt?(r=vt.registry.matchElement(e),r&&i.push(r)):Array.isArray(e)?e.forEach(function(o){i=i.concat(vt.registry.lookupTable(o))}):t||console.warn("Table Connection Error - Invalid Selector",e);return i},matchElement(e){return vt.registry.tables.find(function(t){return e instanceof vt?t===e:t.element===e})}};static findTable(e){var t=vt.registry.lookupTable(e,!0);return Array.isArray(t)&&!t.length?!1:t}}class Ge extends vt{static moduleBindings={};static moduleExtensions={};static modulesRegistered=!1;static defaultModules=!1;constructor(){super()}static initializeModuleBinder(e){Ge.modulesRegistered||(Ge.modulesRegistered=!0,Ge._registerModules(gm,!0),e&&Ge._registerModules(e))}static _extendModule(e,t,i){if(Ge.moduleBindings[e]){var n=Ge.moduleBindings[e][t];if(n)if(typeof i=="object")for(let r in i)n[r]=i[r];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)}static _registerModules(e,t){var i=Object.values(e);t&&i.forEach(n=>{n.prototype.moduleCore=!0}),Ge._registerModule(i)}static _registerModule(e){Array.isArray(e)||(e=[e]),e.forEach(t=>{Ge._registerModuleBinding(t),Ge._registerModuleExtensions(t)})}static _registerModuleBinding(e){e.moduleName?Ge.moduleBindings[e.moduleName]=e:console.error("Unable to bind module, no moduleName defined",e.moduleName)}static _registerModuleExtensions(e){var t=e.moduleExtensions;if(e.moduleExtensions)for(let i in t){let n=t[i];if(Ge.moduleBindings[i])for(let r in n)Ge._extendModule(i,r,n[r]);else{Ge.moduleExtensions[i]||(Ge.moduleExtensions[i]={});for(let r in n)Ge.moduleExtensions[i][r]||(Ge.moduleExtensions[i][r]={}),Object.assign(Ge.moduleExtensions[i][r],n[r])}}Ge._extendModuleFromQueue(e)}static _extendModuleFromQueue(e){var t=Ge.moduleExtensions[e.moduleName];if(t)for(let i in t)Ge._extendModule(e.moduleName,i,t[i])}_bindModules(){var e=[],t=[],i=[];this.modules={};for(var n in Ge.moduleBindings){let r=Ge.moduleBindings[n],a=new r(this);this.modules[n]=a,r.prototype.moduleCore?this.modulesCore.push(a):r.moduleInitOrder?r.moduleInitOrder<0?e.push(a):t.push(a):i.push(a)}e.sort((r,a)=>r.moduleInitOrder>a.moduleInitOrder?1:-1),t.sort((r,a)=>r.moduleInitOrder>a.moduleInitOrder?1:-1),this.modulesRegular=e.concat(i.concat(t))}}class bm extends Je{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.dispatch("alert-show",t),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.dispatch("alert-hide",this.type),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class Kt extends Ge{static defaultOptions=qp;static extendModule(){Kt.initializeModuleBinder(),Kt._extendModule(...arguments)}static registerModule(){Kt.initializeModuleBinder(),Kt._registerModule(...arguments)}constructor(e,t,i){super(),Kt.initializeModuleBinder(i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new nm(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new lm(this),this.optionsList=new ca(this,"table constructor"),this.dependencyRegistry=new um(this),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),this.constructor.registry.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new Zp(this),this.rowManager=new tm(this),this.footerManager=new im(this),this.dataLoader=new rm(this),this.alertManager=new bm(this),this._bindModules(),this.options=this.optionsList.generate(Kt.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new am(this,this.options,this.options.debugEventsExternal),this.eventBus=new om(this.options.debugEventsInternal),this.interactionMonitor=new sm(this),this.dataLoader.initialize(),this.footerManager.initialize(),this.dependencyRegistry.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this.initialized=!0,this._loadInitialData().finally(()=>{this.eventBus.dispatch("table-initialized"),this.externalEvents.dispatch("tableBuilt")})}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var n=e.attributes;for(var r in n)typeof n[r]=="object"&&i.setAttribute(n[r].name,n[r].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){return this.dataLoader.load(this.options.data).finally(()=>{this.columnManager.verticalAlignHeaders()})}destroy(){var e=this.element;for(this.destroyed=!0,this.constructor.registry.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,n;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(`
|
|
49
|
-
`),n=i[0]=="Error"?i[2]:i[1],n[0]==" "?e=n.trim().split(" ")[1].split(".")[1]:e=n.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,n)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(r=>{var a=this.rowManager.findRow(r[this.options.index]);a?(t++,a.updateData(r).then(()=>{t--,t||i()}).catch(o=>{n("Update Error - Unable to update row",r,o)})):n("Update Error - Unable to find row",r)}):(console.warn("Update Error - No data provided"),n("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((n,r)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(a=>{var o=[];a.forEach(function(l){o.push(l.getComponent())}),n(o)}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((n,r)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(a=>{var o=this.rowManager.findRow(a[this.options.index]);i++,o?o.updateData(a).then(()=>{i--,t.push(o.getComponent()),i||n(t)}):this.rowManager.addRows(a).then(l=>{i--,t.push(l[0].getComponent()),i||n(t)})}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let n=this.rowManager.findRow(i,!0);if(n)t.push(n);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,n)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(n)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(n=>n[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(n=>n[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var n=this.rowManager.findRow(e);return n?this.rowManager.scrollToRow(n,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var n=this.rowManager.findRow(e);this.initGuard(),n?n.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var n=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,n).then(r=>r.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var n=this.columnManager.findColumn(e),r=this.columnManager.findColumn(t);this.initGuard(),n?r?this.columnManager.moveColumn(n,r,i):console.warn("Move Error - No matching column found:",r):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((n,r)=>{var a=this.columnManager.findColumn(e);return a?this.columnManager.scrollToColumn(a,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw(!0)}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}var Ki=Kt;class vm extends Ki{static extendModule(){Ki.initializeModuleBinder(Nn),Ki._extendModule(...arguments)}static registerModule(){Ki.initializeModuleBinder(Nn),Ki._registerModule(...arguments)}constructor(e,t,i){super(e,t,Nn)}}var ym=vm,wm=Object.defineProperty,Cm=Object.defineProperties,Em=Object.getOwnPropertyDescriptors,pa=Object.getOwnPropertySymbols,km=Object.prototype.hasOwnProperty,xm=Object.prototype.propertyIsEnumerable,ma=(s,e,t)=>e in s?wm(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t,Ei=(s,e)=>{for(var t in e||(e={}))km.call(e,t)&&ma(s,t,e[t]);if(pa)for(var t of pa(e))xm.call(e,t)&&ma(s,t,e[t]);return s},ga=(s,e)=>Cm(s,Em(e));const Mm={props:{autoscroll:{type:Boolean,default:!0}},watch:{typeAheadPointer(){this.autoscroll&&this.maybeAdjustScroll()},open(s){this.autoscroll&&s&&this.$nextTick(()=>this.maybeAdjustScroll())}},methods:{maybeAdjustScroll(){var s;const e=((s=this.$refs.dropdownMenu)==null?void 0:s.children[this.typeAheadPointer])||!1;if(e){const t=this.getDropdownViewport(),{top:i,bottom:n,height:r}=e.getBoundingClientRect();if(i<t.top)return this.$refs.dropdownMenu.scrollTop=e.offsetTop;if(n>t.bottom)return this.$refs.dropdownMenu.scrollTop=e.offsetTop-(t.height-r)}},getDropdownViewport(){return this.$refs.dropdownMenu?this.$refs.dropdownMenu.getBoundingClientRect():{height:0,top:0,bottom:0}}}},Sm={data(){return{typeAheadPointer:-1}},watch:{filteredOptions(){for(let s=0;s<this.filteredOptions.length;s++)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},open(s){s&&this.typeAheadToLastSelected()},selectedValue(){this.open&&this.typeAheadToLastSelected()}},methods:{typeAheadUp(){for(let s=this.typeAheadPointer-1;s>=0;s--)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},typeAheadDown(){for(let s=this.typeAheadPointer+1;s<this.filteredOptions.length;s++)if(this.selectable(this.filteredOptions[s])){this.typeAheadPointer=s;break}},typeAheadSelect(){const s=this.filteredOptions[this.typeAheadPointer];s&&this.selectable(s)&&this.select(s)},typeAheadToLastSelected(){this.typeAheadPointer=this.selectedValue.length!==0?this.filteredOptions.indexOf(this.selectedValue[this.selectedValue.length-1]):-1}}},Rm={props:{loading:{type:Boolean,default:!1}},data(){return{mutableLoading:!1}},watch:{search(){this.$emit("search",this.search,this.toggleLoading)},loading(s){this.mutableLoading=s}},methods:{toggleLoading(s=null){return s==null?this.mutableLoading=!this.mutableLoading:this.mutableLoading=s}}},Vn=(s,e)=>{const t=s.__vccOpts||s;for(const[i,n]of e)t[i]=n;return t},Dm={},Tm={xmlns:"http://www.w3.org/2000/svg",width:"10",height:"10"},_m=d.createElementVNode("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),Om=[_m];function Lm(s,e){return d.openBlock(),d.createElementBlock("svg",Tm,Om)}const Pm=Vn(Dm,[["render",Lm]]),Fm={},Am={xmlns:"http://www.w3.org/2000/svg",width:"14",height:"10"},Hm=d.createElementVNode("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),zm=[Hm];function Bm(s,e){return d.openBlock(),d.createElementBlock("svg",Am,zm)}const Nm=Vn(Fm,[["render",Bm]]),ba={Deselect:Pm,OpenIndicator:Nm},Im={mounted(s,{instance:e}){if(e.appendToBody){const{height:t,top:i,left:n,width:r}=e.$refs.toggle.getBoundingClientRect();let a=window.scrollX||window.pageXOffset,o=window.scrollY||window.pageYOffset;s.unbindPosition=e.calculatePosition(s,e,{width:r+"px",left:a+n+"px",top:o+i+t+"px"}),document.body.appendChild(s)}},unmounted(s,{instance:e}){e.appendToBody&&(s.unbindPosition&&typeof s.unbindPosition=="function"&&s.unbindPosition(),s.parentNode&&s.parentNode.removeChild(s))}};function Vm(s){const e={};return Object.keys(s).sort().forEach(t=>{e[t]=s[t]}),JSON.stringify(e)}let jm=0;function Wm(){return++jm}const Ym={components:Ei({},ba),directives:{appendToBody:Im},mixins:[Mm,Sm,Rm],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:s=>s},selectable:{type:Function,default:s=>!0},getOptionLabel:{type:Function,default(s){return typeof s=="object"?s.hasOwnProperty(this.label)?s[this.label]:console.warn(`[vue-select warn]: Label key "option.${this.label}" does not exist in options object ${JSON.stringify(s)}.
|
|
50
|
-
https://vue-select.org/api/props.html#getoptionlabel`):s}},getOptionKey:{type:Function,default(s){if(typeof s!="object")return s;try{return s.hasOwnProperty("id")?s.id:Vm(s)}catch(e){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.
|
|
51
|
-
https://vue-select.org/api/props.html#getoptionkey`,s,e)}}},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(s,e,t){return(e||"").toLocaleLowerCase().indexOf(t.toLocaleLowerCase())>-1}},filter:{type:Function,default(s,e){return s.filter(t=>{let i=this.getOptionLabel(t);return typeof i=="number"&&(i=i.toString()),this.filterBy(t,i,e)})}},createOption:{type:Function,default(s){return typeof this.optionList[0]=="object"?{[this.label]:s}:s}},resetOnOptionsChange:{default:!1,validator:s=>["function","boolean"].includes(typeof s)},clearSearchOnBlur:{type:Function,default:function({clearSearchOnSelect:s,multiple:e}){return s&&!e}},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:(s,e)=>s},appendToBody:{type:Boolean,default:!1},calculatePosition:{type:Function,default(s,e,{width:t,top:i,left:n}){s.style.top=i,s.style.left=n,s.style.width=t}},dropdownShouldOpen:{type:Function,default({noDrop:s,open:e,mutableLoading:t}){return s?!1:e&&!t}},uid:{type:[String,Number],default:()=>Wm()}},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 s=this.modelValue;return this.isTrackingValues&&(s=this.$data._value),s!=null&&s!==""?[].concat(s):[]},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 s={search:this.search,loading:this.loading,searching:this.searching,filteredOptions:this.filteredOptions};return{search:{attributes:Ei({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:e=>this.search=e.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:s,listFooter:s,header:ga(Ei({},s),{deselect:this.deselect}),footer:ga(Ei({},s),{deselect:this.deselect})}},childComponents(){return Ei(Ei({},ba),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 s=[].concat(this.optionList);if(!this.filterable&&!this.taggable)return s;const e=this.search.length?this.filter(s,this.search,this):s;if(this.taggable&&this.search.length){const t=this.createOption(this.search);this.optionExists(t)||e.unshift(t)}return e},isValueEmpty(){return this.selectedValue.length===0},showClearButton(){return!this.multiple&&this.clearable&&!this.open&&!this.isValueEmpty}},watch:{options(s,e){const t=()=>typeof this.resetOnOptionsChange=="function"?this.resetOnOptionsChange(s,e,this.selectedValue):this.resetOnOptionsChange;!this.taggable&&t()&&this.clearSelection(),this.modelValue&&this.isTrackingValues&&this.setInternalValueFromOptions(this.modelValue)},modelValue:{immediate:!0,handler(s){this.isTrackingValues&&this.setInternalValueFromOptions(s)}},multiple(){this.clearSelection()},open(s){this.$emit(s?"open":"close")}},created(){this.mutableLoading=this.loading},methods:{setInternalValueFromOptions(s){Array.isArray(s)?this.$data._value=s.map(e=>this.findOptionFromReducedValue(e)):this.$data._value=this.findOptionFromReducedValue(s)},select(s){this.$emit("option:selecting",s),this.isOptionSelected(s)?this.deselectFromDropdown&&(this.clearable||this.multiple&&this.selectedValue.length>1)&&this.deselect(s):(this.taggable&&!this.optionExists(s)&&(this.$emit("option:created",s),this.pushTag(s)),this.multiple&&(s=this.selectedValue.concat(s)),this.updateValue(s),this.$emit("option:selected",s)),this.onAfterSelect(s)},deselect(s){this.$emit("option:deselecting",s),this.updateValue(this.selectedValue.filter(e=>!this.optionComparator(e,s))),this.$emit("option:deselected",s)},clearSelection(){this.updateValue(this.multiple?[]:null)},onAfterSelect(s){this.closeOnSelect&&(this.open=!this.open,this.searchEl.blur()),this.clearSearchOnSelect&&(this.search="")},updateValue(s){typeof this.modelValue>"u"&&(this.$data._value=s),s!==null&&(Array.isArray(s)?s=s.map(e=>this.reduce(e)):s=this.reduce(s)),this.$emit("update:modelValue",s)},toggleDropdown(s){const e=s.target!==this.searchEl;e&&s.preventDefault();const t=[...this.deselectButtons||[],this.$refs.clearButton];if(this.searchEl===void 0||t.filter(Boolean).some(i=>i.contains(s.target)||i===s.target)){s.preventDefault();return}this.open&&e?this.searchEl.blur():this.disabled||(this.open=!0,this.searchEl.focus())},isOptionSelected(s){return this.selectedValue.some(e=>this.optionComparator(e,s))},isOptionDeselectable(s){return this.isOptionSelected(s)&&this.deselectFromDropdown},optionComparator(s,e){return this.getOptionKey(s)===this.getOptionKey(e)},findOptionFromReducedValue(s){const e=i=>JSON.stringify(this.reduce(i))===JSON.stringify(s),t=[...this.options,...this.pushedTags].filter(e);return t.length===1?t[0]:t.find(i=>this.optionComparator(i,this.$data._value))||s},closeSearchOptions(){this.open=!1,this.$emit("search:blur")},maybeDeleteValue(){if(!this.searchEl.value.length&&this.selectedValue&&this.selectedValue.length&&this.clearable){let s=null;this.multiple&&(s=[...this.selectedValue.slice(0,this.selectedValue.length-1)]),this.updateValue(s)}},optionExists(s){return this.optionList.some(e=>this.optionComparator(e,s))},normalizeOptionForSlot(s){return typeof s=="object"?s:{[this.label]:s}},pushTag(s){this.pushedTags.push(s)},onEscape(){this.search.length?this.search="":this.searchEl.blur()},onSearchBlur(){if(this.mousedown&&!this.searching)this.mousedown=!1;else{const{clearSearchOnSelect:s,multiple:e}=this;this.clearSearchOnBlur({clearSearchOnSelect:s,multiple:e})&&(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(s){const e=n=>(n.preventDefault(),!this.isComposing&&this.typeAheadSelect()),t={8:n=>this.maybeDeleteValue(),9:n=>this.onTab(),27:n=>this.onEscape(),38:n=>(n.preventDefault(),this.typeAheadUp()),40:n=>(n.preventDefault(),this.typeAheadDown())};this.selectOnKeyCodes.forEach(n=>t[n]=e);const i=this.mapKeydown(t,this);if(typeof i[s.keyCode]=="function")return i[s.keyCode](s)}}},Gm=["dir"],$m=["id","aria-expanded","aria-owns"],Um={ref:"selectedOptions",class:"vs__selected-options"},Km=["disabled","title","aria-label","onClick"],qm={ref:"actions",class:"vs__actions"},Jm=["disabled"],Xm={class:"vs__spinner"},Zm=["id"],Qm=["id","aria-selected","onMouseover","onClick"],eg={key:0,class:"vs__no-options"},tg=d.createTextVNode(" Sorry, no matching options. "),ig=["id"];function sg(s,e,t,i,n,r){const a=d.resolveDirective("append-to-body");return d.openBlock(),d.createElementBlock("div",{dir:t.dir,class:d.normalizeClass(["v-select",r.stateClasses])},[d.renderSlot(s.$slots,"header",d.normalizeProps(d.guardReactiveProps(r.scope.header))),d.createElementVNode("div",{id:`vs${t.uid}__combobox`,ref:"toggle",class:"vs__dropdown-toggle",role:"combobox","aria-expanded":r.dropdownOpen.toString(),"aria-owns":`vs${t.uid}__listbox`,"aria-label":"Search for option",onMousedown:e[1]||(e[1]=o=>r.toggleDropdown(o))},[d.createElementVNode("div",Um,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.selectedValue,(o,l)=>d.renderSlot(s.$slots,"selected-option-container",{option:r.normalizeOptionForSlot(o),deselect:r.deselect,multiple:t.multiple,disabled:t.disabled},()=>[(d.openBlock(),d.createElementBlock("span",{key:t.getOptionKey(o),class:"vs__selected"},[d.renderSlot(s.$slots,"selected-option",d.normalizeProps(d.guardReactiveProps(r.normalizeOptionForSlot(o))),()=>[d.createTextVNode(d.toDisplayString(t.getOptionLabel(o)),1)]),t.multiple?(d.openBlock(),d.createElementBlock("button",{key:0,ref_for:!0,ref:u=>n.deselectButtons[l]=u,disabled:t.disabled,type:"button",class:"vs__deselect",title:`Deselect ${t.getOptionLabel(o)}`,"aria-label":`Deselect ${t.getOptionLabel(o)}`,onClick:u=>r.deselect(o)},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.childComponents.Deselect)))],8,Km)):d.createCommentVNode("",!0)]))])),256)),d.renderSlot(s.$slots,"search",d.normalizeProps(d.guardReactiveProps(r.scope.search)),()=>[d.createElementVNode("input",d.mergeProps({class:"vs__search"},r.scope.search.attributes,d.toHandlers(r.scope.search.events)),null,16)])],512),d.createElementVNode("div",qm,[d.withDirectives(d.createElementVNode("button",{ref:"clearButton",disabled:t.disabled,type:"button",class:"vs__clear",title:"Clear Selected","aria-label":"Clear Selected",onClick:e[0]||(e[0]=(...o)=>r.clearSelection&&r.clearSelection(...o))},[(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.childComponents.Deselect)))],8,Jm),[[d.vShow,r.showClearButton]]),d.renderSlot(s.$slots,"open-indicator",d.normalizeProps(d.guardReactiveProps(r.scope.openIndicator)),()=>[t.noDrop?d.createCommentVNode("",!0):(d.openBlock(),d.createBlock(d.resolveDynamicComponent(r.childComponents.OpenIndicator),d.normalizeProps(d.mergeProps({key:0},r.scope.openIndicator.attributes)),null,16))]),d.renderSlot(s.$slots,"spinner",d.normalizeProps(d.guardReactiveProps(r.scope.spinner)),()=>[d.withDirectives(d.createElementVNode("div",Xm,"Loading...",512),[[d.vShow,s.mutableLoading]])])],512)],40,$m),d.createVNode(d.Transition,{name:t.transition},{default:d.withCtx(()=>[r.dropdownOpen?d.withDirectives((d.openBlock(),d.createElementBlock("ul",{id:`vs${t.uid}__listbox`,ref:"dropdownMenu",key:`vs${t.uid}__listbox`,class:"vs__dropdown-menu",role:"listbox",tabindex:"-1",onMousedown:e[2]||(e[2]=d.withModifiers((...o)=>r.onMousedown&&r.onMousedown(...o),["prevent"])),onMouseup:e[3]||(e[3]=(...o)=>r.onMouseUp&&r.onMouseUp(...o))},[d.renderSlot(s.$slots,"list-header",d.normalizeProps(d.guardReactiveProps(r.scope.listHeader))),(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.filteredOptions,(o,l)=>(d.openBlock(),d.createElementBlock("li",{id:`vs${t.uid}__option-${l}`,key:t.getOptionKey(o),role:"option",class:d.normalizeClass(["vs__dropdown-option",{"vs__dropdown-option--deselect":r.isOptionDeselectable(o)&&l===s.typeAheadPointer,"vs__dropdown-option--selected":r.isOptionSelected(o),"vs__dropdown-option--highlight":l===s.typeAheadPointer,"vs__dropdown-option--disabled":!t.selectable(o)}]),"aria-selected":l===s.typeAheadPointer?!0:null,onMouseover:u=>t.selectable(o)?s.typeAheadPointer=l:null,onClick:d.withModifiers(u=>t.selectable(o)?r.select(o):null,["prevent","stop"])},[d.renderSlot(s.$slots,"option",d.normalizeProps(d.guardReactiveProps(r.normalizeOptionForSlot(o))),()=>[d.createTextVNode(d.toDisplayString(t.getOptionLabel(o)),1)])],42,Qm))),128)),r.filteredOptions.length===0?(d.openBlock(),d.createElementBlock("li",eg,[d.renderSlot(s.$slots,"no-options",d.normalizeProps(d.guardReactiveProps(r.scope.noOptions)),()=>[tg])])):d.createCommentVNode("",!0),d.renderSlot(s.$slots,"list-footer",d.normalizeProps(d.guardReactiveProps(r.scope.listFooter)))],40,Zm)),[[a]]):(d.openBlock(),d.createElementBlock("ul",{key:1,id:`vs${t.uid}__listbox`,role:"listbox",style:{display:"none",visibility:"hidden"}},null,8,ig))]),_:3},8,["name"]),d.renderSlot(s.$slots,"footer",d.normalizeProps(d.guardReactiveProps(r.scope.footer)))],10,Gm)}const ng=Vn(Ym,[["render",sg]]);var rt="top",yt="bottom",wt="right",at="left",jn="auto",qi=[rt,yt,wt,at],ki="start",Ji="end",rg="clippingParents",va="viewport",Xi="popper",ag="reference",ya=qi.reduce(function(s,e){return s.concat([e+"-"+ki,e+"-"+Ji])},[]),wa=[].concat(qi,[jn]).reduce(function(s,e){return s.concat([e,e+"-"+ki,e+"-"+Ji])},[]),og="beforeRead",lg="read",ug="afterRead",hg="beforeMain",dg="main",cg="afterMain",fg="beforeWrite",pg="write",mg="afterWrite",gg=[og,lg,ug,hg,dg,cg,fg,pg,mg];function Lt(s){return s?(s.nodeName||"").toLowerCase():null}function dt(s){if(s==null)return window;if(s.toString()!=="[object Window]"){var e=s.ownerDocument;return e&&e.defaultView||window}return s}function ni(s){var e=dt(s).Element;return s instanceof e||s instanceof Element}function Ct(s){var e=dt(s).HTMLElement;return s instanceof e||s instanceof HTMLElement}function Wn(s){if(typeof ShadowRoot>"u")return!1;var e=dt(s).ShadowRoot;return s instanceof e||s instanceof ShadowRoot}function bg(s){var e=s.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},r=e.elements[t];!Ct(r)||!Lt(r)||(Object.assign(r.style,i),Object.keys(n).forEach(function(a){var o=n[a];o===!1?r.removeAttribute(a):r.setAttribute(a,o===!0?"":o)}))})}function vg(s){var e=s.state,t={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,t.popper),e.styles=t,e.elements.arrow&&Object.assign(e.elements.arrow.style,t.arrow),function(){Object.keys(e.elements).forEach(function(i){var n=e.elements[i],r=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:t[i]),o=a.reduce(function(l,u){return l[u]="",l},{});!Ct(n)||!Lt(n)||(Object.assign(n.style,o),Object.keys(r).forEach(function(l){n.removeAttribute(l)}))})}}const yg={name:"applyStyles",enabled:!0,phase:"write",fn:bg,effect:vg,requires:["computeStyles"]};function Pt(s){return s.split("-")[0]}var ri=Math.max,Is=Math.min,xi=Math.round;function Yn(){var s=navigator.userAgentData;return s!=null&&s.brands&&Array.isArray(s.brands)?s.brands.map(function(e){return e.brand+"/"+e.version}).join(" "):navigator.userAgent}function Ca(){return!/^((?!chrome|android).)*safari/i.test(Yn())}function Mi(s,e,t){e===void 0&&(e=!1),t===void 0&&(t=!1);var i=s.getBoundingClientRect(),n=1,r=1;e&&Ct(s)&&(n=s.offsetWidth>0&&xi(i.width)/s.offsetWidth||1,r=s.offsetHeight>0&&xi(i.height)/s.offsetHeight||1);var a=ni(s)?dt(s):window,o=a.visualViewport,l=!Ca()&&t,u=(i.left+(l&&o?o.offsetLeft:0))/n,h=(i.top+(l&&o?o.offsetTop:0))/r,m=i.width/n,v=i.height/r;return{width:m,height:v,top:h,right:u+m,bottom:h+v,left:u,x:u,y:h}}function Gn(s){var e=Mi(s),t=s.offsetWidth,i=s.offsetHeight;return Math.abs(e.width-t)<=1&&(t=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:s.offsetLeft,y:s.offsetTop,width:t,height:i}}function Ea(s,e){var t=e.getRootNode&&e.getRootNode();if(s.contains(e))return!0;if(t&&Wn(t)){var i=e;do{if(i&&s.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Yt(s){return dt(s).getComputedStyle(s)}function wg(s){return["table","td","th"].indexOf(Lt(s))>=0}function qt(s){return((ni(s)?s.ownerDocument:s.document)||window.document).documentElement}function Vs(s){return Lt(s)==="html"?s:s.assignedSlot||s.parentNode||(Wn(s)?s.host:null)||qt(s)}function ka(s){return!Ct(s)||Yt(s).position==="fixed"?null:s.offsetParent}function Cg(s){var e=/firefox/i.test(Yn()),t=/Trident/i.test(Yn());if(t&&Ct(s)){var i=Yt(s);if(i.position==="fixed")return null}var n=Vs(s);for(Wn(n)&&(n=n.host);Ct(n)&&["html","body"].indexOf(Lt(n))<0;){var r=Yt(n);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return n;n=n.parentNode}return null}function Zi(s){for(var e=dt(s),t=ka(s);t&&wg(t)&&Yt(t).position==="static";)t=ka(t);return t&&(Lt(t)==="html"||Lt(t)==="body"&&Yt(t).position==="static")?e:t||Cg(s)||e}function $n(s){return["top","bottom"].indexOf(s)>=0?"x":"y"}function Qi(s,e,t){return ri(s,Is(e,t))}function Eg(s,e,t){var i=Qi(s,e,t);return i>t?t:i}function xa(){return{top:0,right:0,bottom:0,left:0}}function Ma(s){return Object.assign({},xa(),s)}function Sa(s,e){return e.reduce(function(t,i){return t[i]=s,t},{})}var kg=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,Ma(typeof e!="number"?e:Sa(e,qi))};function xg(s){var e,t=s.state,i=s.name,n=s.options,r=t.elements.arrow,a=t.modifiersData.popperOffsets,o=Pt(t.placement),l=$n(o),u=[at,wt].indexOf(o)>=0,h=u?"height":"width";if(!(!r||!a)){var m=kg(n.padding,t),v=Gn(r),C=l==="y"?rt:at,F=l==="y"?yt:wt,x=t.rects.reference[h]+t.rects.reference[l]-a[l]-t.rects.popper[h],R=a[l]-t.rects.reference[l],M=Zi(r),k=M?l==="y"?M.clientHeight||0:M.clientWidth||0:0,_=x/2-R/2,p=m[C],w=k-v[h]-m[F],c=k/2-v[h]/2+_,y=Qi(p,c,w),g=l;t.modifiersData[i]=(e={},e[g]=y,e.centerOffset=y-c,e)}}function Mg(s){var e=s.state,t=s.options,i=t.element,n=i===void 0?"[data-popper-arrow]":i;n!=null&&(typeof n=="string"&&(n=e.elements.popper.querySelector(n),!n)||Ea(e.elements.popper,n)&&(e.elements.arrow=n))}const Sg={name:"arrow",enabled:!0,phase:"main",fn:xg,effect:Mg,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Si(s){return s.split("-")[1]}var Rg={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Dg(s,e){var t=s.x,i=s.y,n=e.devicePixelRatio||1;return{x:xi(t*n)/n||0,y:xi(i*n)/n||0}}function Ra(s){var e,t=s.popper,i=s.popperRect,n=s.placement,r=s.variation,a=s.offsets,o=s.position,l=s.gpuAcceleration,u=s.adaptive,h=s.roundOffsets,m=s.isFixed,v=a.x,C=v===void 0?0:v,F=a.y,x=F===void 0?0:F,R=typeof h=="function"?h({x:C,y:x}):{x:C,y:x};C=R.x,x=R.y;var M=a.hasOwnProperty("x"),k=a.hasOwnProperty("y"),_=at,p=rt,w=window;if(u){var c=Zi(t),y="clientHeight",g="clientWidth";if(c===dt(t)&&(c=qt(t),Yt(c).position!=="static"&&o==="absolute"&&(y="scrollHeight",g="scrollWidth")),c=c,n===rt||(n===at||n===wt)&&r===Ji){p=yt;var b=m&&c===w&&w.visualViewport?w.visualViewport.height:c[y];x-=b-i.height,x*=l?1:-1}if(n===at||(n===rt||n===yt)&&r===Ji){_=wt;var f=m&&c===w&&w.visualViewport?w.visualViewport.width:c[g];C-=f-i.width,C*=l?1:-1}}var E=Object.assign({position:o},u&&Rg),S=h===!0?Dg({x:C,y:x},dt(t)):{x:C,y:x};if(C=S.x,x=S.y,l){var D;return Object.assign({},E,(D={},D[p]=k?"0":"",D[_]=M?"0":"",D.transform=(w.devicePixelRatio||1)<=1?"translate("+C+"px, "+x+"px)":"translate3d("+C+"px, "+x+"px, 0)",D))}return Object.assign({},E,(e={},e[p]=k?x+"px":"",e[_]=M?C+"px":"",e.transform="",e))}function Tg(s){var e=s.state,t=s.options,i=t.gpuAcceleration,n=i===void 0?!0:i,r=t.adaptive,a=r===void 0?!0:r,o=t.roundOffsets,l=o===void 0?!0:o,u={placement:Pt(e.placement),variation:Si(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:n,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Ra(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Ra(Object.assign({},u,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}const _g={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Tg,data:{}};var js={passive:!0};function Og(s){var e=s.state,t=s.instance,i=s.options,n=i.scroll,r=n===void 0?!0:n,a=i.resize,o=a===void 0?!0:a,l=dt(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&u.forEach(function(h){h.addEventListener("scroll",t.update,js)}),o&&l.addEventListener("resize",t.update,js),function(){r&&u.forEach(function(h){h.removeEventListener("scroll",t.update,js)}),o&&l.removeEventListener("resize",t.update,js)}}const Lg={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Og,data:{}};var Pg={left:"right",right:"left",bottom:"top",top:"bottom"};function Ws(s){return s.replace(/left|right|bottom|top/g,function(e){return Pg[e]})}var Fg={start:"end",end:"start"};function Da(s){return s.replace(/start|end/g,function(e){return Fg[e]})}function Un(s){var e=dt(s),t=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:t,scrollTop:i}}function Kn(s){return Mi(qt(s)).left+Un(s).scrollLeft}function Ag(s,e){var t=dt(s),i=qt(s),n=t.visualViewport,r=i.clientWidth,a=i.clientHeight,o=0,l=0;if(n){r=n.width,a=n.height;var u=Ca();(u||!u&&e==="fixed")&&(o=n.offsetLeft,l=n.offsetTop)}return{width:r,height:a,x:o+Kn(s),y:l}}function Hg(s){var e,t=qt(s),i=Un(s),n=(e=s.ownerDocument)==null?void 0:e.body,r=ri(t.scrollWidth,t.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),a=ri(t.scrollHeight,t.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),o=-i.scrollLeft+Kn(s),l=-i.scrollTop;return Yt(n||t).direction==="rtl"&&(o+=ri(t.clientWidth,n?n.clientWidth:0)-r),{width:r,height:a,x:o,y:l}}function qn(s){var e=Yt(s),t=e.overflow,i=e.overflowX,n=e.overflowY;return/auto|scroll|overlay|hidden/.test(t+n+i)}function Ta(s){return["html","body","#document"].indexOf(Lt(s))>=0?s.ownerDocument.body:Ct(s)&&qn(s)?s:Ta(Vs(s))}function es(s,e){var t;e===void 0&&(e=[]);var i=Ta(s),n=i===((t=s.ownerDocument)==null?void 0:t.body),r=dt(i),a=n?[r].concat(r.visualViewport||[],qn(i)?i:[]):i,o=e.concat(a);return n?o:o.concat(es(Vs(a)))}function Jn(s){return Object.assign({},s,{left:s.x,top:s.y,right:s.x+s.width,bottom:s.y+s.height})}function zg(s,e){var t=Mi(s,!1,e==="fixed");return t.top=t.top+s.clientTop,t.left=t.left+s.clientLeft,t.bottom=t.top+s.clientHeight,t.right=t.left+s.clientWidth,t.width=s.clientWidth,t.height=s.clientHeight,t.x=t.left,t.y=t.top,t}function _a(s,e,t){return e===va?Jn(Ag(s,t)):ni(e)?zg(e,t):Jn(Hg(qt(s)))}function Bg(s){var e=es(Vs(s)),t=["absolute","fixed"].indexOf(Yt(s).position)>=0,i=t&&Ct(s)?Zi(s):s;return ni(i)?e.filter(function(n){return ni(n)&&Ea(n,i)&&Lt(n)!=="body"}):[]}function Ng(s,e,t,i){var n=e==="clippingParents"?Bg(s):[].concat(e),r=[].concat(n,[t]),a=r[0],o=r.reduce(function(l,u){var h=_a(s,u,i);return l.top=ri(h.top,l.top),l.right=Is(h.right,l.right),l.bottom=Is(h.bottom,l.bottom),l.left=ri(h.left,l.left),l},_a(s,a,i));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function Oa(s){var e=s.reference,t=s.element,i=s.placement,n=i?Pt(i):null,r=i?Si(i):null,a=e.x+e.width/2-t.width/2,o=e.y+e.height/2-t.height/2,l;switch(n){case rt:l={x:a,y:e.y-t.height};break;case yt:l={x:a,y:e.y+e.height};break;case wt:l={x:e.x+e.width,y:o};break;case at:l={x:e.x-t.width,y:o};break;default:l={x:e.x,y:e.y}}var u=n?$n(n):null;if(u!=null){var h=u==="y"?"height":"width";switch(r){case ki:l[u]=l[u]-(e[h]/2-t[h]/2);break;case Ji:l[u]=l[u]+(e[h]/2-t[h]/2);break}}return l}function ts(s,e){e===void 0&&(e={});var t=e,i=t.placement,n=i===void 0?s.placement:i,r=t.strategy,a=r===void 0?s.strategy:r,o=t.boundary,l=o===void 0?rg:o,u=t.rootBoundary,h=u===void 0?va:u,m=t.elementContext,v=m===void 0?Xi:m,C=t.altBoundary,F=C===void 0?!1:C,x=t.padding,R=x===void 0?0:x,M=Ma(typeof R!="number"?R:Sa(R,qi)),k=v===Xi?ag:Xi,_=s.rects.popper,p=s.elements[F?k:v],w=Ng(ni(p)?p:p.contextElement||qt(s.elements.popper),l,h,a),c=Mi(s.elements.reference),y=Oa({reference:c,element:_,placement:n}),g=Jn(Object.assign({},_,y)),b=v===Xi?g:c,f={top:w.top-b.top+M.top,bottom:b.bottom-w.bottom+M.bottom,left:w.left-b.left+M.left,right:b.right-w.right+M.right},E=s.modifiersData.offset;if(v===Xi&&E){var S=E[n];Object.keys(f).forEach(function(D){var A=[wt,yt].indexOf(D)>=0?1:-1,N=[rt,yt].indexOf(D)>=0?"y":"x";f[D]+=S[N]*A})}return f}function Ig(s,e){e===void 0&&(e={});var t=e,i=t.placement,n=t.boundary,r=t.rootBoundary,a=t.padding,o=t.flipVariations,l=t.allowedAutoPlacements,u=l===void 0?wa:l,h=Si(i),m=h?o?ya:ya.filter(function(F){return Si(F)===h}):qi,v=m.filter(function(F){return u.indexOf(F)>=0});v.length===0&&(v=m);var C=v.reduce(function(F,x){return F[x]=ts(s,{placement:x,boundary:n,rootBoundary:r,padding:a})[Pt(x)],F},{});return Object.keys(C).sort(function(F,x){return C[F]-C[x]})}function Vg(s){if(Pt(s)===jn)return[];var e=Ws(s);return[Da(s),e,Da(e)]}function jg(s){var e=s.state,t=s.options,i=s.name;if(!e.modifiersData[i]._skip){for(var n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,o=a===void 0?!0:a,l=t.fallbackPlacements,u=t.padding,h=t.boundary,m=t.rootBoundary,v=t.altBoundary,C=t.flipVariations,F=C===void 0?!0:C,x=t.allowedAutoPlacements,R=e.options.placement,M=Pt(R),k=M===R,_=l||(k||!F?[Ws(R)]:Vg(R)),p=[R].concat(_).reduce(function(U,K){return U.concat(Pt(K)===jn?Ig(e,{placement:K,boundary:h,rootBoundary:m,padding:u,flipVariations:F,allowedAutoPlacements:x}):K)},[]),w=e.rects.reference,c=e.rects.popper,y=new Map,g=!0,b=p[0],f=0;f<p.length;f++){var E=p[f],S=Pt(E),D=Si(E)===ki,A=[rt,yt].indexOf(S)>=0,N=A?"width":"height",V=ts(e,{placement:E,boundary:h,rootBoundary:m,altBoundary:v,padding:u}),B=A?D?wt:at:D?yt:rt;w[N]>c[N]&&(B=Ws(B));var j=Ws(B),$=[];if(r&&$.push(V[S]<=0),o&&$.push(V[B]<=0,V[j]<=0),$.every(function(U){return U})){b=E,g=!1;break}y.set(E,$)}if(g)for(var T=F?3:1,P=function(K){var Q=p.find(function(ie){var Y=y.get(ie);if(Y)return Y.slice(0,K).every(function(H){return H})});if(Q)return b=Q,"break"},W=T;W>0;W--){var z=P(W);if(z==="break")break}e.placement!==b&&(e.modifiersData[i]._skip=!0,e.placement=b,e.reset=!0)}}const Wg={name:"flip",enabled:!0,phase:"main",fn:jg,requiresIfExists:["offset"],data:{_skip:!1}};function La(s,e,t){return t===void 0&&(t={x:0,y:0}),{top:s.top-e.height-t.y,right:s.right-e.width+t.x,bottom:s.bottom-e.height+t.y,left:s.left-e.width-t.x}}function Pa(s){return[rt,wt,yt,at].some(function(e){return s[e]>=0})}function Yg(s){var e=s.state,t=s.name,i=e.rects.reference,n=e.rects.popper,r=e.modifiersData.preventOverflow,a=ts(e,{elementContext:"reference"}),o=ts(e,{altBoundary:!0}),l=La(a,i),u=La(o,n,r),h=Pa(l),m=Pa(u);e.modifiersData[t]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:h,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":m})}const Gg={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Yg};function $g(s,e,t){var i=Pt(s),n=[at,rt].indexOf(i)>=0?-1:1,r=typeof t=="function"?t(Object.assign({},e,{placement:s})):t,a=r[0],o=r[1];return a=a||0,o=(o||0)*n,[at,wt].indexOf(i)>=0?{x:o,y:a}:{x:a,y:o}}function Ug(s){var e=s.state,t=s.options,i=s.name,n=t.offset,r=n===void 0?[0,0]:n,a=wa.reduce(function(h,m){return h[m]=$g(m,e.rects,r),h},{}),o=a[e.placement],l=o.x,u=o.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[i]=a}const Kg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ug};function qg(s){var e=s.state,t=s.name;e.modifiersData[t]=Oa({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}const Jg={name:"popperOffsets",enabled:!0,phase:"read",fn:qg,data:{}};function Xg(s){return s==="x"?"y":"x"}function Zg(s){var e=s.state,t=s.options,i=s.name,n=t.mainAxis,r=n===void 0?!0:n,a=t.altAxis,o=a===void 0?!1:a,l=t.boundary,u=t.rootBoundary,h=t.altBoundary,m=t.padding,v=t.tether,C=v===void 0?!0:v,F=t.tetherOffset,x=F===void 0?0:F,R=ts(e,{boundary:l,rootBoundary:u,padding:m,altBoundary:h}),M=Pt(e.placement),k=Si(e.placement),_=!k,p=$n(M),w=Xg(p),c=e.modifiersData.popperOffsets,y=e.rects.reference,g=e.rects.popper,b=typeof x=="function"?x(Object.assign({},e.rects,{placement:e.placement})):x,f=typeof b=="number"?{mainAxis:b,altAxis:b}:Object.assign({mainAxis:0,altAxis:0},b),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,S={x:0,y:0};if(c){if(r){var D,A=p==="y"?rt:at,N=p==="y"?yt:wt,V=p==="y"?"height":"width",B=c[p],j=B+R[A],$=B-R[N],T=C?-g[V]/2:0,P=k===ki?y[V]:g[V],W=k===ki?-g[V]:-y[V],z=e.elements.arrow,U=C&&z?Gn(z):{width:0,height:0},K=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:xa(),Q=K[A],ie=K[N],Y=Qi(0,y[V],U[V]),H=_?y[V]/2-T-Y-Q-f.mainAxis:P-Y-Q-f.mainAxis,ee=_?-y[V]/2+T+Y+ie+f.mainAxis:W+Y+ie+f.mainAxis,X=e.elements.arrow&&Zi(e.elements.arrow),q=X?p==="y"?X.clientTop||0:X.clientLeft||0:0,oe=(D=E?.[p])!=null?D:0,ne=B+H-oe-q,me=B+ee-oe,be=Qi(C?Is(j,ne):j,B,C?ri($,me):$);c[p]=be,S[p]=be-B}if(o){var xe,je=p==="x"?rt:at,Le=p==="x"?yt:wt,Ne=c[w],se=w==="y"?"height":"width",G=Ne+R[je],Z=Ne-R[Le],re=[rt,at].indexOf(M)!==-1,te=(xe=E?.[w])!=null?xe:0,pe=re?G:Ne-y[se]-g[se]-te+f.altAxis,Me=re?Ne+y[se]+g[se]-te-f.altAxis:Z,ve=C&&re?Eg(pe,Ne,Me):Qi(C?pe:G,Ne,C?Me:Z);c[w]=ve,S[w]=ve-Ne}e.modifiersData[i]=S}}const Qg={name:"preventOverflow",enabled:!0,phase:"main",fn:Zg,requiresIfExists:["offset"]};function eb(s){return{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}}function tb(s){return s===dt(s)||!Ct(s)?Un(s):eb(s)}function ib(s){var e=s.getBoundingClientRect(),t=xi(e.width)/s.offsetWidth||1,i=xi(e.height)/s.offsetHeight||1;return t!==1||i!==1}function sb(s,e,t){t===void 0&&(t=!1);var i=Ct(e),n=Ct(e)&&ib(e),r=qt(e),a=Mi(s,n,t),o={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!t)&&((Lt(e)!=="body"||qn(r))&&(o=tb(e)),Ct(e)?(l=Mi(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=Kn(r))),{x:a.left+o.scrollLeft-l.x,y:a.top+o.scrollTop-l.y,width:a.width,height:a.height}}function nb(s){var e=new Map,t=new Set,i=[];s.forEach(function(r){e.set(r.name,r)});function n(r){t.add(r.name);var a=[].concat(r.requires||[],r.requiresIfExists||[]);a.forEach(function(o){if(!t.has(o)){var l=e.get(o);l&&n(l)}}),i.push(r)}return s.forEach(function(r){t.has(r.name)||n(r)}),i}function rb(s){var e=nb(s);return gg.reduce(function(t,i){return t.concat(e.filter(function(n){return n.phase===i}))},[])}function ab(s){var e;return function(){return e||(e=new Promise(function(t){Promise.resolve().then(function(){e=void 0,t(s())})})),e}}function ob(s){var e=s.reduce(function(t,i){var n=t[i.name];return t[i.name]=n?Object.assign({},n,i,{options:Object.assign({},n.options,i.options),data:Object.assign({},n.data,i.data)}):i,t},{});return Object.keys(e).map(function(t){return e[t]})}var Fa={placement:"bottom",modifiers:[],strategy:"absolute"};function Aa(){for(var s=arguments.length,e=new Array(s),t=0;t<s;t++)e[t]=arguments[t];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function lb(s){s===void 0&&(s={});var e=s,t=e.defaultModifiers,i=t===void 0?[]:t,n=e.defaultOptions,r=n===void 0?Fa:n;return function(o,l,u){u===void 0&&(u=r);var h={placement:"bottom",orderedModifiers:[],options:Object.assign({},Fa,r),modifiersData:{},elements:{reference:o,popper:l},attributes:{},styles:{}},m=[],v=!1,C={state:h,setOptions:function(M){var k=typeof M=="function"?M(h.options):M;x(),h.options=Object.assign({},r,h.options,k),h.scrollParents={reference:ni(o)?es(o):o.contextElement?es(o.contextElement):[],popper:es(l)};var _=rb(ob([].concat(i,h.options.modifiers)));return h.orderedModifiers=_.filter(function(p){return p.enabled}),F(),C.update()},forceUpdate:function(){if(!v){var M=h.elements,k=M.reference,_=M.popper;if(Aa(k,_)){h.rects={reference:sb(k,Zi(_),h.options.strategy==="fixed"),popper:Gn(_)},h.reset=!1,h.placement=h.options.placement,h.orderedModifiers.forEach(function(f){return h.modifiersData[f.name]=Object.assign({},f.data)});for(var p=0;p<h.orderedModifiers.length;p++){if(h.reset===!0){h.reset=!1,p=-1;continue}var w=h.orderedModifiers[p],c=w.fn,y=w.options,g=y===void 0?{}:y,b=w.name;typeof c=="function"&&(h=c({state:h,options:g,name:b,instance:C})||h)}}}},update:ab(function(){return new Promise(function(R){C.forceUpdate(),R(h)})}),destroy:function(){x(),v=!0}};if(!Aa(o,l))return C;C.setOptions(u).then(function(R){!v&&u.onFirstUpdate&&u.onFirstUpdate(R)});function F(){h.orderedModifiers.forEach(function(R){var M=R.name,k=R.options,_=k===void 0?{}:k,p=R.effect;if(typeof p=="function"){var w=p({state:h,name:M,instance:C,options:_}),c=function(){};m.push(w||c)}})}function x(){m.forEach(function(R){return R()}),m=[]}return C}}var ub=[Lg,Jg,_g,yg,Kg,Wg,Qg,Sg,Gg],hb=lb({defaultModifiers:ub});function db(s,e,{width:t}){s.style.width=t;const i=hb(e.$refs.toggle,s,{placement:e.$attrs.placement,modifiers:[{name:"offset",options:{offset:[0,-1]}},{name:"toggleClass",enabled:!0,phase:"write",fn({state:n}){e.$el.classList.toggle("drop-up",n.placement==="top")}}]});return()=>i.destroy()}const cb={class:"text-muted"},fb={key:0,class:"py-1"},pb={class:"text-wrap"},mb=["innerHTML"],gb={key:1,class:"text-muted p-0"},bb={class:"text-wrap"},vb={key:2,class:"text-muted p-0 small d-flex justify-content-center"},yb={class:"text-wrap px-2"},wb={class:"selected"},Cb=["innerHTML"],Eb={key:0,style:{"border-left-color":"rgba(88, 151, 251, 0.71)"},class:"vs__spinner"},kb={__name:"VSelect",props:{modelValue:[String,Object,Number],reduce:{type:Function,default:s=>s.id},hint:{type:String,default:""},classes:{type:Array,default:()=>[]},options:{type:Array,default:()=>[]},title:{type:String},disabled:{type:[Boolean,String],default:!1},placeholder:{type:String,default:""},multiple:{type:Boolean,default:!1},isLoading:{type:Boolean,default:!1},allowClear:{type:Boolean,default:!0},searchTimout:{type:Number,default:1e3},dropDownPlacement:{type:String,default:"bottom",validator(s,e){return["bottom","top"].includes(s)}},error:{type:[Array,String],default:null}},emits:["update:modelValue","search","blur","focus"],setup(s,{emit:e}){const t=e,i=s,n=i.multiple?[]:null;d.getCurrentInstance();const r=d.ref(n),a=Xh(l,i.searchTimout),o=d.computed(()=>{const m=Zh(i.options);return m?m.map(v=>{const C=i.modelValue;return C?{...v,disabled:v.id===C}:v}):[]});function l(m){t("search",m)}const u=m=>!(!m.id||m.disabled),h=d.computed(()=>Array.isArray(i.error)?i.error?.filter(Boolean):typeof i.error=="string"&&i.error?[i.error]:[]);return d.watch(()=>i.modelValue,m=>{r.value=i.modelValue},{deep:!0}),d.watch(()=>r.value,m=>{t("update:modelValue",m)},{deep:!0}),d.onMounted(()=>{r.value=i.modelValue}),(m,v)=>(d.openBlock(),d.createElementBlock(d.Fragment,null,[s.title?(d.openBlock(),d.createElementBlock("div",{key:0,class:d.normalizeClass(m.titleClass)},d.toDisplayString(s.title),3)):d.createCommentVNode("",!0),d.createVNode(d.unref(ng),d.mergeProps({class:"style-chooser"},m.$attrs,{modelValue:r.value,"onUpdate:modelValue":v[0]||(v[0]=C=>r.value=C),reduce:s.reduce,options:o.value,multiple:s.multiple,placeholder:s.placeholder,disabled:s.disabled,loading:s.isLoading,clearable:s.allowClear,placement:s.dropDownPlacement,appendToBody:s.dropDownPlacement==="top","calculate-position":d.unref(db),selectable:C=>u(C),"onSearch:blur":v[1]||(v[1]=C=>t("blur")),"onSearch:focus":v[2]||(v[2]=C=>t("focus")),onSearch:d.unref(a),class:[...s.classes,s.error?"not-valid":""]}),{"no-options":d.withCtx(({search:C,searching:F,loading:x})=>[d.createElementVNode("span",cb,d.toDisplayString(s.hint),1)]),option:d.withCtx(({label:C,html:F,id:x,disabled:R})=>[x?(d.openBlock(),d.createElementBlock("div",fb,[d.createElementVNode("div",pb,d.toDisplayString(C),1),F?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:F},null,8,mb)):d.createCommentVNode("",!0)])):R?(d.openBlock(),d.createElementBlock("div",gb,[d.createElementVNode("div",bb,d.toDisplayString(C)+"disabled",1)])):(d.openBlock(),d.createElementBlock("div",vb,[v[3]||(v[3]=d.createElementVNode("span",null,"-",-1)),d.createElementVNode("span",yb,d.toDisplayString(C),1),v[4]||(v[4]=d.createElementVNode("span",null,"-",-1))]))]),"selected-option":d.withCtx(({label:C,html:F})=>[d.createElementVNode("div",wb,[d.createElementVNode("div",null,d.toDisplayString(C),1),F?(d.openBlock(),d.createElementBlock("div",{key:0,innerHTML:F},null,8,Cb)):d.createCommentVNode("",!0)])]),spinner:d.withCtx(({loading:C})=>[C?(d.openBlock(),d.createElementBlock("div",Eb)):d.createCommentVNode("",!0)]),_:1},16,["modelValue","reduce","options","multiple","placeholder","disabled","loading","clearable","placement","appendToBody","calculate-position","selectable","onSearch","class"]),d.createVNode(Ii,{errors:h.value},null,8,["errors"])],64))}},xb={key:0,class:"bi bi-chevron-up"},Mb={key:1,class:"bi bi-chevron-down"},Sb=it({__name:"SubFilterToggleBtn",props:["modelValue"],emits:["update:modelValue"],setup(s,{emit:e}){const t=e,i=s,n=()=>{t("update:modelValue",!i.modelValue)};return(r,a)=>(d.openBlock(),d.createElementBlock("div",{class:"icon",onClick:n},[s.modelValue?(d.openBlock(),d.createElementBlock("i",xb)):(d.openBlock(),d.createElementBlock("i",Mb))]))}},[["__scopeId","data-v-4810f2ed"]]),Ha={gender:{MALE:1,FEMALE:2,MIXED_GENDER:3,NOT_GENDER:4},address_fields:["postal_code","region_code","district_code","locality_code","sub_locality_code","street_code","house","flat"],userRoles:{ADMIN:1,VETERINARIAN:2,SHTP:3,LOCAL_EPIZOOTOLOGIST:4,ORGANIZATION_ADMIN:5,REGIONAL_REPRESENTATIVE:6,AGENCY:7,CENTRAL_WAREHOUSE:8,DISTRICT_REPRESENTATIVE:9,COUNTERPARTY:10,VETERINARIAN_REGISTRATOR:11,LABORATORY:12,INTEGRATOR:13},timeTypes:{HOUR:1,DAY:2,WEEK:3,MONTH:4,YEAR:5},defaultTableOptions:{headerSortClickElement:"icon",printAsHtml:!0,printConfig:{},reactiveData:!0,movableColumns:!0,layout:"fitDataFill",layoutColumnsOnNewData:!0,resizableColumnFit:!0,pagination:!0,paginationMode:"remote",paginationCounter:"rows",paginationSize:10,columns:[]},customPerPageOptions:[{id:10,label:10},{id:40,label:40},{id:100,label:100},{id:150,label:150},{id:200,label:200}],bird_ids:[19,20,21,22,23,24,25],fish_ids:[38,39,40,41,42],animal_kinds:{COW:1,PIG:2,HORSE:3,BEE:4,DOG:5,CAT:6,DEER:7,MARAL:8,CAMEL:9,DONKEY:10,BISON:11,GOST:12,SHEEP:13,MULE:14,LOSHAK:15,ZEBU:16,BUFFALO:17,GRUNTING_OX:18,CHICKEN:19,DUCK:20,GOOSE:21,TURKEY:22,GUINEA_FOWL:23,QUAIL:24,OSTRICH:25,FOX:26,SABLE:27,MINK:28,FERRET:29,RABBIT:30,ARCTIC_FOX:31,RACCOON_DOG:32,NUTRIA:33,ALPACAS:34,PHEASANT:35,PEACOCK:36,RACCOON:37,STURGEON:38,SALMON:39,CARP:40,CATFISH:41,BASS:42},mask_regex:{INTEGER:"^[0-9]*$",DECIMAL:"^[0-9]{1,10}[.]?[0-9]{1}$",HUNDREDTHS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,2})$",THOUSANDS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,3})$",NO_LIMIT_AFTER_DOT:"^[0-9]{1,10}[.]?[0-9]*$",ABOVE_ONE:"^[1-9]+[0-9]*$",NO_START_SPACE:"^[^ ]+.*$",NO_SPACE:"[^ ]*"}};Object.preventExtensions(Ha);const Rb={class:"position-relative",style:{"min-height":"300px"}},Db={key:0,class:"tabulator hide-to-print sticky-bottom bg-white"},Tb={class:"row"},_b={key:0,class:"col-auto"},Ob={class:"col"},Lb={class:"tabulator-footer",ref:"footer"},Pb=["id"],Fb=["disabled"],Ab={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},Hb="",zb=d.defineComponent({__name:"Table",props:{langs:{type:Object,default:()=>({})},paginationPage:{type:Number,default:null},locale:{type:String,default:"ru"},columnHide:{type:String,default:""},columnShow:{type:String,default:""},options:{type:Object,default:()=>({})},filters:{type:[Array,Function,Object],default:()=>[]},tableData:{type:Array,default:()=>[]},showAllColumnsIfAllHidden:{type:Boolean,default:!1},parentComponent:{type:Object,default:()=>({})},selectedRowsStorage:{type:Array,default:()=>[]},isVisibleColumnSubFilter:{type:Boolean,default:null},loadMoreText:{type:String,default:"Load More"}},emits:["selectedRow","unselectedRow","updateSelectedRows","updateUnselectedRows","updateTable","onHideColumn","onShowColumn","onTableRowClick","onCellClick","onTableRowMoved","pageLoaded","savePaginationPage","updateIsVisibleColumnSubFilter"],setup(s,{emit:e}){const t=s,i=e,n=d.inject("selectedTabIndex",d.ref()),r=d.inject("selectAll",d.ref(0)),a=d.ref(""),o=d.ref(null),l=d.ref({data:[],rows:[]}),u=d.ref(new Set(t.selectedRowsStorage)),h=d.ref(!1),m=d.ref(td()),v=d.ref(null),C=d.ref(null),F=d.ref(!1),x=d.computed(()=>t.options?.paginationMode==="remote"),R=d.computed(()=>Ha.customPerPageOptions),M=d.useSlots(),k=H=>!!M[H],_=()=>{a.value=""},p=H=>!H||!H.length?[]:H.map(ee=>ee),w=()=>({}),c=()=>{if(!v.value)return;const H=v.value.querySelector(".tabulator-header");!H||t.isVisibleColumnSubFilter===null||ed(H,Sb,{modelValue:t.isVisibleColumnSubFilter,"onUpdate:modelValue":ee=>i("updateIsVisibleColumnSubFilter",ee)})},y=()=>{if(!v.value)return;const H=v.value.querySelector(".tabulator-header");H&&(H.classList.add("position-relative"),c())},g=()=>{if(!C.value)return;const H=v.value?.parentNode?.querySelector(".tabulator-footer"),ee=C.value.last_page;if(!ee||isNaN(+ee)){H&&H.classList.add("d-none");return}ee>1?H&&H.classList.remove("d-none"):H&&H.classList.add("d-none")},b=()=>{F.value=!0},f=()=>{F.value=!1},E=()=>{F.value=!1},S=()=>{h.value=!0,i("updateTable",C.value),C.value&&(C.value.setLocale(t.locale),C.value.selectRow(Array.from(u.value)))},D=H=>{setTimeout(()=>{i("savePaginationPage",H)}),x.value&&g(),r.value>0&&i("pageLoaded"),F.value=!1,y()},A=H=>{const ee=H.getData(),X=C.value?.options?.index||"id",q=ee[X]??null;q!==null&&(u.value.add(q),l.value.data.push(ee),l.value.rows.push(H),i("updateSelectedRows",{data:l.value.data,row:l.value.rows}),i("selectedRow",{data:ee,row:H}))},N=H=>{const ee=H.getData(),X=C.value?.options?.index||"id",q=ee[X]??null;if(q===null)return;u.value.delete(q);const oe=l.value.data.findIndex(ne=>ne[X]===q);oe!==-1&&(l.value.data.splice(oe,1),l.value.rows.splice(oe,1)),i("updateUnselectedRows",{data:ee,row:H}),i("unselectedRow",{data:ee,row:H})},V=function(){C.value&&C.value.selectRow(Array.from(u.value)),F.value=!0},B=(H,ee)=>{if(ee?._cell?.column?.definition?.hasCellClickHandler){i("onCellClick",H,ee);return}const X=[],q=H.target;for(let oe=0;oe<q.childNodes.length;oe++){const ne=q.childNodes[oe];ne.nodeName==="INPUT"&&ne.type==="checkbox"&&X.push("checkbox")}X.includes("checkbox")||i("onTableRowClick",H,ee._cell.row,t.parentComponent)},j=H=>{C.value&&i("onTableRowMoved",C.value.getColumnLayout())},$=()=>{setTimeout(()=>{F.value=!0})},T=()=>{setTimeout(()=>{F.value=!1,Y()})},P=()=>{h.value=!1},W=()=>{if(!v.value)return;F.value=!0;const H={...t.options,data:t.tableData,langs:t.langs||w(),columns:p(t.options.columns),dataLoaderLoading:`<img alt="" src="${Hb}">`,placeholder:"Ничего не найдено",ajaxResponse:function(ee,X,q){return this.last_page=q.last_page,q.data}};x.value&&(H.footerElement=`#tabulator-footer${m.value}`),C.value=new ym(v.value,H),C.value.on("dataLoading",b),C.value.on("dataLoaded",f),C.value.on("dataLoadError",E),C.value.on("tableBuilt",S),C.value.on("pageLoaded",D),C.value.on("rowSelected",A),C.value.on("rowDeselected",N),C.value.on("dataProcessed",V),C.value.on("cellClick",B),C.value.on("columnMoved",j),C.value.on("renderStarted",$),C.value.on("renderComplete",T),C.value.on("tableDestroyed",P)},z=H=>{if(!h.value||!H||!C.value)return;const ee=C.value.options.ajaxParams;ee&&(ee.per_page=Number(H)),C.value.options.paginationSize=Number(H),C.value.setPageSize(H)},U=()=>{if(!C.value)return;const H=640,ee=C.value.options;if(x.value)ee.ajaxParams?.per_page<H&&(ee.ajaxParams.per_page+=40),C.value.setData();else{const X=C.value.getPageSize();typeof X=="number"&&X<H&&C.value.setPageSize(X+40)}ee.paginationSize>=H&&(a.value="Необходимо воспользоваться переходом по страницам")},K=H=>{H!==""&&C.value&&(C.value.showColumn(H),i("onShowColumn",C.value.getColumnLayout()))},Q=H=>{H!==""&&C.value&&(C.value.hideColumn(H),i("onHideColumn",C.value.getColumnLayout()))},ie=H=>{C.value&&(H.filter(({visible:ee})=>!ee).length===H.length?H.map(({field:ee})=>{d.nextTick(()=>C.value?.showColumn(ee))}):H.map(({field:ee,visible:X})=>{X?C.value?.showColumn(ee):C.value?.hideColumn(ee)}))},Y=()=>{d.nextTick(()=>{if(!C.value||C.value.getPage()!==1||!t.paginationPage||t.paginationPage===C.value.getPage())return!1;C.value.setPage(t.paginationPage)})};return d.onMounted(()=>{W()}),d.onBeforeUnmount(()=>{C.value&&C.value.destroy()}),d.watch(()=>t.columnShow,H=>{H&&K(H)}),d.watch(()=>t.columnHide,H=>{H&&Q(H)}),d.watch(()=>t.filters,H=>{C.value&&C.value.setFilter(H)},{deep:!0}),d.watch(()=>t.tableData,H=>{C.value&&!x.value&&C.value.setData(H)},{deep:!1}),d.watch(n,()=>{C.value&&C.value.deselectRow()}),d.watch(r,H=>{H>0&&C.value&&C.value.selectRow()}),d.watch(()=>t.options.columns,H=>{!h.value||!C.value||!H||(!H.find(({visible:ee})=>ee)&&t.showAllColumnsIfAllHidden?ie(H):C.value.setColumns(H))},{deep:!0}),d.watch(()=>t.selectedRowsStorage,H=>{H&&(u.value=new Set(H))},{deep:!0}),d.watch(h,H=>{H&&(t.showAllColumnsIfAllHidden&&ie(t.options.columns||[]),t.tableData.length>0&&C.value?.setData(t.tableData))},{deep:!0}),(H,ee)=>(d.openBlock(),d.createElementBlock("div",Rb,[d.createElementVNode("div",{ref_key:"tableRef",ref:v},null,512),x.value?(d.openBlock(),d.createElementBlock("div",Db,[d.createElementVNode("div",Tb,[k("table-footer-left")?(d.openBlock(),d.createElementBlock("div",_b,[d.renderSlot(H.$slots,"table-footer-left")])):d.createCommentVNode("",!0),d.createElementVNode("div",Ob,[d.createElementVNode("div",Lb,[d.createElementVNode("div",{class:"tabulator-footer-contents d-flex",id:`tabulator-footer${m.value}`},[d.createElementVNode("button",{class:"btn btn-primary me-3",id:"loadMoreButton",onClick:U,disabled:F.value},[d.createTextVNode(d.toDisplayString(s.loadMoreText)+" ",1),ee[2]||(ee[2]=d.createElementVNode("i",{class:"bi bi-plus-lg"},null,-1)),F.value?(d.openBlock(),d.createElementBlock("div",Ab)):d.createCommentVNode("",!0)],8,Fb),d.createVNode(kb,{class:"me-3",style:{"min-width":"150px"},modelValue:o.value,"onUpdate:modelValue":[ee[0]||(ee[0]=X=>o.value=X),ee[1]||(ee[1]=X=>z(X))],allowClear:!1,options:R.value,dropDownPlacement:"top"},null,8,["modelValue","options"])],8,Pb)],512)])])])):d.createCommentVNode("",!0),d.createVNode(na,{message:a.value,onClearMessage:_},null,8,["message"])]))}}),Bb={class:"accordion-header",style:{background:"transparent"}},Nb=["aria-expanded","aria-controls"],Ib={key:0},Vb=["id"],jb={class:"accordion-body px-0"},Wb=it(d.defineComponent({__name:"DefaultAccordion",props:{title:{},titleFontSize:{default:16},isCollapsed:{type:Boolean,default:!0},isVisibleBorderBottom:{type:Boolean,default:!0},isCollapsedDefault:{type:Boolean,default:!0},isTitleBold:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1}},emits:["update-visibility"],setup(s,{emit:e}){const t=s,i=e,n=d.useSlots(),r=d.ref(Math.random().toString(36).substr(2,9)),a=l=>!!n[l],o=()=>{const l=!t.isCollapsed;i("update-visibility",l)};return d.watch(()=>t.isCollapsedDefault,l=>{i("update-visibility",l)},{deep:!0}),(l,u)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["accordion accordion-flush",{"w-100":l.fullWidth}]),style:{background:"transparent"}},[d.createElementVNode("div",{class:d.normalizeClass(["accordion-item",{"border-bottom":l.isVisibleBorderBottom}]),style:{background:"transparent"}},[d.createElementVNode("h2",Bb,[d.createElementVNode("button",{onClick:o,class:d.normalizeClass(["accordion-button collapsed ps-0",{visible:!l.isCollapsed,"fw-bolder":l.isTitleBold}]),style:d.normalizeStyle(`font-size:${l.titleFontSize}px;`),type:"button","aria-expanded":!l.isCollapsed,"aria-controls":`accordion-${r.value}`},d.toDisplayString(l.title),15,Nb)]),d.createVNode(d.Transition,{name:"fade"},{default:d.withCtx(()=>[a("accordion-body")?(d.openBlock(),d.createElementBlock("div",Ib,[d.withDirectives(d.createElementVNode("div",{class:"accordion-collapse collapse show",id:`accordion-${r.value}`},[d.createElementVNode("div",jb,[d.renderSlot(l.$slots,"accordion-body",{},void 0,!0)])],8,Vb),[[d.vShow,!l.isCollapsed]])])):d.createCommentVNode("",!0)]),_:3})],2)],2))}}),[["__scopeId","data-v-99bfaf08"]]);Fe.AddButton=ja,Fe.Card=ac,Fe.CardInfo=Cc,Fe.Checkbox=cd,Fe.ConfirmationModal=Xd,Fe.CustomInput=rd,Fe.DefaultAccordion=Wb,Fe.DefaultButton=Ia,Fe.DefaultDropDown=sc,Fe.DefaultModal=sa,Fe.Divider=Oc,Fe.ErrorMessageComponent=Tc,Fe.ExportButton=Ya,Fe.Flatpickr=Md,Fe.FormError=Ii,Fe.Icon=Ys,Fe.PageTitle=cc,Fe.PasswordInput=ld,Fe.PrintButton=Wa,Fe.Spinner=Qn,Fe.Table=zb,Fe.Toast=na,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
|
|
53
|
+
Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),r=this.activeRows.indexOf(e);r>-1&&this.activeRows.splice(r,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(s=>{var a=s.indexOf(e);a>-1&&s.splice(a,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,r){var s=this.addRowActual(e,t,i,r);return s}addRows(e,t,i,r){var s=[];return new Promise((a,o)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((u,c)=>{var d=this.addRow(u,t,i,!0);s.push(d),this.dispatch("row-added",d,u,t,i)}),this.refreshActiveData(r?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),a(s)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,r){var s=e instanceof ot?e:new ot(e||{},this),a=this.findAddRowPos(t),o=-1,u,c;return i||(c=this.chain("row-adding-position",[s,a],null,{index:i,top:a}),i=c.index,a=c.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[s,i,a],null,i),i&&(o=this.rows.indexOf(i)),i&&o>-1?(u=this.activeRows.indexOf(i),this.displayRowIterator(function(d){var p=d.indexOf(i);p>-1&&d.splice(a?p:p+1,0,s)}),u>-1&&this.activeRows.splice(a?u:u+1,0,s),this.rows.splice(a?o:o+1,0,s)):a?(this.displayRowIterator(function(d){d.unshift(s)}),this.activeRows.unshift(s),this.rows.unshift(s)):(this.displayRowIterator(function(d){d.push(s)}),this.activeRows.push(s),this.rows.push(s)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",s.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),r||this.reRenderInPosition(),s}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(r=>{this.moveRowInArray(r,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,r){var s,a,o,u;if(t!==i&&(s=e.indexOf(t),s>-1&&(e.splice(s,1),a=e.indexOf(i),a>-1?r?e.splice(a+1,0,t):e.splice(a,0,t):e.splice(s,0,t)),e===this.getDisplayRows())){o=s<a?s:a,u=a>s?a:s+1;for(let c=o;c<=u;c++)e[c]&&this.styleRow(e[c],c)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),r=!1;return i!==!1&&i<this.displayRowsCount-1&&(r=this.getDisplayRows()[i+1]),r&&(!(r instanceof ot)||r.type!="row")?this.nextDisplayRow(r,t):r}prevDisplayRow(e,t){var i=this.getDisplayRowIndex(e),r=!1;return i&&(r=this.getDisplayRows()[i-1]),t&&r&&(!(r instanceof ot)||r.type!="row")?this.prevDisplayRow(r,t):r}findRowIndex(e,t){var i;return e=this.findRow(e),e&&(i=t.indexOf(e),i>-1)?i:!1}getData(e,t){var i=[],r=this.getRows(e);return r.forEach(function(s){s.type=="row"&&i.push(s.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(r){t.push(r.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,r)=>i.priority-r.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,r)=>i.priority-r.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var r=this.table,s="",a=0,o=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(a=this.dataPipeline.findIndex(u=>u.handler===e),a>-1)s="dataPipeline",t&&(a==this.dataPipeline.length-1?s="display":a++);else if(a=this.displayPipeline.findIndex(u=>u.handler===e),a>-1)s="displayPipeline",t&&(a==this.displayPipeline.length-1?s="end":a++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else s=e||"all",a=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===s&&a<this.redrawBlockRestoreConfig.index||o.indexOf(s)<o.indexOf(this.redrawBlockRestoreConfig.stage)))&&(this.redrawBlockRestoreConfig={handler:e,skipStage:t,renderInPosition:i,stage:s,index:a});return}else Ke.elVisible(this.element)?i?this.reRenderInPosition(this.refreshPipelines.bind(this,e,s,a,i)):(this.refreshPipelines(e,s,a,i),e||this.table.columnManager.renderer.renderColumns(),this.renderTable(),r.options.layoutColumnsOnNewData&&this.table.columnManager.redraw(!0)):this.refreshPipelines(e,s,a,i),this.dispatch("data-refreshed")}}refreshPipelines(e,t,i,r){switch(this.dispatch("data-refreshing"),(!e||!this.activeRowsPipeline[0])&&(this.activeRowsPipeline[0]=this.rows.slice(0)),t){case"all":case"dataPipeline":for(let s=i;s<this.dataPipeline.length;s++){let a=this.dataPipeline[s].handler(this.activeRowsPipeline[s].slice(0));this.activeRowsPipeline[s+1]=a||this.activeRowsPipeline[s].slice(0)}this.setActiveRows(this.activeRowsPipeline[this.dataPipeline.length]);case"display":i=0,this.resetDisplayRows();case"displayPipeline":for(let s=i;s<this.displayPipeline.length;s++){let a=this.displayPipeline[s].handler((s?this.getDisplayRows(s-1):this.activeRows).slice(0),r);this.setDisplayRows(a||this.getDisplayRows(s-1).slice(0),s)}case"end":this.regenerateRowPositions()}this.getDisplayRows().length&&this._clearPlaceholder()}regenerateRowPositions(){var e=this.getDisplayRows(),t=1;e.forEach(i=>{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:IE,basic:zE};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}checkPlaceholder(){this.displayRowsCount?this._clearPlaceholder():this.tableEmpty()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(e){this.activeRows.forEach(function(t){t.normalizeHeight(e)})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let r=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const s="calc(100% - "+r+"px)";this.element.style.minHeight=t||"calc(100% - "+r+"px)",this.element.style.height=s,this.element.style.maxHeight=s}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-r+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class jE extends rt{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class WE extends rt{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),r={row:["cell"],cell:["row"]};i=i.filter(s=>{var a=r[e];return s!==e&&(!a||a&&!a.includes(s))}),i.forEach(s=>{var a=this.pseudoTrackers[s].target;this.pseudoTrackers[s].target&&(this.dispatch(s+"-mouseleave",t,a),this.pseudoTrackers[s].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let r of e){let s=i+"-"+r;this.subscriptionChange(s,this.subscriptionChanged.bind(this,i,r))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var r=this.listeners[t].components,s=r.indexOf(e),a=!1;i?s===-1&&(r.push(e),a=!0):this.subscribed(e+"-"+t)||s>-1&&(r.splice(s,1),a=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),a&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,r=this.findTargets(i);r=this.bindComponents(e,r),this.triggerEvents(e,t,r),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(r).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let r of e){let s=r.classList?[...r.classList]:[];if(s.filter(u=>this.abortClasses.includes(u)).length)break;let o=s.filter(u=>i.includes(u));for(let u of o)t[this.componentMap[u]]||(t[this.componentMap[u]]=r)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),r=this.listeners[e],s={},a={},o={};for(let u of i){let c,d=t[u],p=this.previousTargets[u];if(p&&p.target===d)c=p.component;else switch(u){case"row":case"group":(r.components.includes("row")||r.components.includes("cell")||r.components.includes("group"))&&(c=this.table.rowManager.getVisibleRows(!0).find(f=>f.getElement()===d),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[u]=!1));break;case"column":r.components.includes("column")&&(c=this.table.columnManager.findColumn(d));break;case"cell":r.components.includes("cell")&&(s.row instanceof ot?c=s.row.findCell(d):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}c&&(s[u]=c,o[u]={target:d,component:c})}return this.previousTargets=o,Object.keys(t).forEach(u=>{let c=s[u];a[u]=c}),a}triggerEvents(e,t,i){var r=this.listeners[e];for(let s in i)i[s]&&r.components.includes(s)&&this.dispatch(s+"-"+e,t,i[s])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class GE{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class YE extends rt{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,r,s,a){var o=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,s])){this.loading=!0,s||this.alertLoader(),t=this.chain("data-params",[e,i,s],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var u=this.chain("data-load",[e,t,i,s],!1,Promise.resolve([]));return u.then(c=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(c)&&typeof c=="object"&&(c=this.mapParams(c,this.objectInvert(this.table.options.dataReceiveParams)));var d=this.chain("data-loaded",[c],null,c);o==this.requestOrder?(this.clearAlert(),d!==!1&&(this.dispatchExternal("dataLoaded",d),this.table.rowManager.setData(d,r,typeof a>"u"?!r:a))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(c=>{console.error("Data Load Error: ",c),this.dispatchExternal("dataLoadError",c),s||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,r,typeof a>"u"?!r:a),Promise.resolve()}mapParams(e,t){var i={};for(let r in e)i[t.hasOwnProperty(r)?t[r]:r]=e[r];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class UE{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(r=>r===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(r=>{r(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((r,s)=>{let a=r.apply(this.table,e);s||(i=a)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class qE{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((r,s)=>r.priority-s.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(r=>r.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,r){var s=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((a,o)=>{s=a.callback.apply(this,t.concat([s]))}),s):typeof r=="function"?r():r}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((r,s)=>{r.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(r=>{r(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class KE extends rt{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t,i){var r="";return typeof this.options(e)<"u"?(r="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(r=r+", Please use the %c"+t+"%c option instead",this._warnUser(r,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;"),i&&(this.table.options[t]=this.table.options[e])):this._warnUser(r,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}class JE extends rt{constructor(e){super(e),this.deps={},this.props={}}initialize(){this.deps=Object.assign({},this.options("dependencies"))}lookup(e,t,i){if(Array.isArray(e)){for(const s of e){var r=this.lookup(s,t,!0);if(r)break}if(r)return r;this.error(e)}else return t?this.lookupProp(e,t,i):this.lookupKey(e,i)}lookupProp(e,t,i){var r;if(this.props[e]&&this.props[e][t])return this.props[e][t];if(r=this.lookupKey(e,i),r)return this.props[e]||(this.props[e]={}),this.props[e][t]=r[t]||r,this.props[e][t]}lookupKey(e,t){var i;return this.deps[e]?i=this.deps[e]:window[e]?(this.deps[e]=window[e],i=this.deps[e]):t||this.error(e),i}error(e){console.error("Unable to find dependency",e,"Please check documentation and ensure you have imported the required library into your project")}}function XE(n,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(n),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Mc(n,e){n.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function ZE(n,e){var t=0,i=this.table.rowManager.element.clientWidth,r=0,s=!1;n.forEach((a,o)=>{a.widthFixed||a.reinitializeWidth(),(this.table.options.responsiveLayout?a.modules.responsive.visible:a.visible)&&(s=a),a.visible&&(t+=a.getWidth())}),s?(r=i-t+s.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(s.setWidth(0),this.table.modules.responsiveLayout.update()),r>0?s.setWidth(r):s.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function QE(n,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,r=0,s=0,a=0,o=[],u=[],c=0,d=0,p=0;function h(_){var k;return typeof _=="string"?_.indexOf("%")>-1?k=t/100*parseInt(_):k=parseInt(_):k=_,k}function f(_,k,w,y){var v=[],R=0,m=0,x=0,g=s,S=0,C=0,E=[];function b(M){return w*(M.column.definition.widthGrow||1)}function T(M){return h(M.width)-w*(M.column.definition.widthShrink||0)}return _.forEach(function(M,O){var F=y?T(M):b(M);M.column.minWidth>=F?v.push(M):M.column.maxWidth&&M.column.maxWidth<F?(M.width=M.column.maxWidth,k-=M.column.maxWidth,g-=y?M.column.definition.widthShrink||1:M.column.definition.widthGrow||1,g&&(w=Math.floor(k/g))):(E.push(M),C+=y?M.column.definition.widthShrink||1:M.column.definition.widthGrow||1)}),v.length?(v.forEach(function(M){R+=y?M.width-M.column.minWidth:M.column.minWidth,M.width=M.column.minWidth}),m=k-R,x=C?Math.floor(m/C):m,S=f(E,m,x,y)):(S=C?k-Math.floor(k/C)*C:k,E.forEach(function(M){M.width=y?T(M):b(M)})),S}this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update(),this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),n.forEach(function(_){var k,w,y;_.visible&&(k=_.definition.width,w=parseInt(_.minWidth),k?(y=h(k),i+=y>w?y:w,_.definition.widthShrink&&(u.push({column:_,width:y>w?y:w}),c+=_.definition.widthShrink)):(o.push({column:_,width:0}),s+=_.definition.widthGrow||1))}),r=t-i,a=Math.floor(r/s),p=f(o,r,a,!1),o.length&&p>0&&(o[o.length-1].width+=p),o.forEach(function(_){r-=_.width}),d=Math.abs(p)+r,d>0&&c&&(p=f(u,d,Math.floor(d/c),!0)),p&&u.length&&(u[u.length-1].width-=p),o.forEach(function(_){_.column.setWidth(_.width)}),u.forEach(function(_){_.column.setWidth(_.width)})}var ek={fitData:XE,fitDataFill:Mc,fitDataTable:Mc,fitDataStretch:ZE,fitColumns:QE};class sr extends Pe{static moduleName="layout";static modes=ek;constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;sr.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){e.definition.widthGrow&&(e.definition.widthGrow=Number(e.definition.widthGrow)),e.definition.widthShrink&&(e.definition.widthShrink=Number(e.definition.widthShrink))}getMode(){return this.mode}layout(e){var t=this.table.columnManager.columnsByIndex.find(i=>i.definition.variableHeight||i.definition.formatter==="textarea");this.dispatch("layout-refreshing"),sr.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),t&&this.table.rowManager.normalizeHeight(!0),this.dispatch("layout-refreshed")}}var tk={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};class va extends Pe{static moduleName="localize";static langs=tk;constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=Ke.deepClone(va.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,r){for(var s in i)typeof i[s]=="object"?(r[s]||(r[s]={}),t(i[s],r[s])):r[s]=i[s]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=Ke.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,r=i.split("|"),s=this._getLangElement(r,this.locale);return s||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(r){var s;i&&(s=i[r],typeof s<"u"?i=s:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}}class ik extends Pe{static moduleName="comms";constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=this.table.constructor.registry.lookupTable(e),i.forEach(r=>{this.table!==r&&t.push(r)}),t}send(e,t,i,r){var s=this.getConnections(e);s.forEach(a=>{a.tableComms(this.table.element,t,i,r)}),!s.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,r){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,r);console.warn("Inter-table Comms Error - no such module:",t)}}var nk=Object.freeze({__proto__:null,CommsModule:ik,LayoutModule:sr,LocalizeModule:va});class Mt{static registry={tables:[],register(e){Mt.registry.tables.push(e)},deregister(e){var t=Mt.registry.tables.indexOf(e);t>-1&&Mt.registry.tables.splice(t,1)},lookupTable(e,t){var i=[],r,s;if(typeof e=="string"){if(r=document.querySelectorAll(e),r.length)for(var a=0;a<r.length;a++)s=Mt.registry.matchElement(r[a]),s&&i.push(s)}else typeof HTMLElement<"u"&&e instanceof HTMLElement||e instanceof Mt?(s=Mt.registry.matchElement(e),s&&i.push(s)):Array.isArray(e)?e.forEach(function(o){i=i.concat(Mt.registry.lookupTable(o))}):t||console.warn("Table Connection Error - Invalid Selector",e);return i},matchElement(e){return Mt.registry.tables.find(function(t){return e instanceof Mt?t===e:t.element===e})}};static findTable(e){var t=Mt.registry.lookupTable(e,!0);return Array.isArray(t)&&!t.length?!1:t}}class Qe extends Mt{static moduleBindings={};static moduleExtensions={};static modulesRegistered=!1;static defaultModules=!1;constructor(){super()}static initializeModuleBinder(e){Qe.modulesRegistered||(Qe.modulesRegistered=!0,Qe._registerModules(nk,!0),e&&Qe._registerModules(e))}static _extendModule(e,t,i){if(Qe.moduleBindings[e]){var r=Qe.moduleBindings[e][t];if(r)if(typeof i=="object")for(let s in i)r[s]=i[s];else console.warn("Module Error - Invalid value type, it must be an object");else console.warn("Module Error - property does not exist:",t)}else console.warn("Module Error - module does not exist:",e)}static _registerModules(e,t){var i=Object.values(e);t&&i.forEach(r=>{r.prototype.moduleCore=!0}),Qe._registerModule(i)}static _registerModule(e){Array.isArray(e)||(e=[e]),e.forEach(t=>{Qe._registerModuleBinding(t),Qe._registerModuleExtensions(t)})}static _registerModuleBinding(e){e.moduleName?Qe.moduleBindings[e.moduleName]=e:console.error("Unable to bind module, no moduleName defined",e.moduleName)}static _registerModuleExtensions(e){var t=e.moduleExtensions;if(e.moduleExtensions)for(let i in t){let r=t[i];if(Qe.moduleBindings[i])for(let s in r)Qe._extendModule(i,s,r[s]);else{Qe.moduleExtensions[i]||(Qe.moduleExtensions[i]={});for(let s in r)Qe.moduleExtensions[i][s]||(Qe.moduleExtensions[i][s]={}),Object.assign(Qe.moduleExtensions[i][s],r[s])}}Qe._extendModuleFromQueue(e)}static _extendModuleFromQueue(e){var t=Qe.moduleExtensions[e.moduleName];if(t)for(let i in t)Qe._extendModule(e.moduleName,i,t[i])}_bindModules(){var e=[],t=[],i=[];this.modules={};for(var r in Qe.moduleBindings){let s=Qe.moduleBindings[r],a=new s(this);this.modules[r]=a,s.prototype.moduleCore?this.modulesCore.push(a):s.moduleInitOrder?s.moduleInitOrder<0?e.push(a):t.push(a):i.push(a)}e.sort((s,a)=>s.moduleInitOrder>a.moduleInitOrder?1:-1),t.sort((s,a)=>s.moduleInitOrder>a.moduleInitOrder?1:-1),this.modulesRegular=e.concat(i.concat(t))}}class rk extends rt{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.dispatch("alert-show",t),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.dispatch("alert-hide",this.type),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}class ri extends Qe{static defaultOptions=BE;static extendModule(){ri.initializeModuleBinder(),ri._extendModule(...arguments)}static registerModule(){ri.initializeModuleBinder(),ri._registerModule(...arguments)}constructor(e,t,i){super(),ri.initializeModuleBinder(i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new GE(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new KE(this),this.optionsList=new _c(this,"table constructor"),this.dependencyRegistry=new JE(this),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),this.constructor.registry.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new HE(this),this.rowManager=new $E(this),this.footerManager=new jE(this),this.dataLoader=new YE(this),this.alertManager=new rk(this),this._bindModules(),this.options=this.optionsList.generate(ri.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new UE(this,this.options,this.options.debugEventsExternal),this.eventBus=new qE(this.options.debugEventsInternal),this.interactionMonitor=new WE(this),this.dataLoader.initialize(),this.footerManager.initialize(),this.dependencyRegistry.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this.initialized=!0,this._loadInitialData().finally(()=>{this.eventBus.dispatch("table-initialized"),this.externalEvents.dispatch("tableBuilt")})}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var r=e.attributes;for(var s in r)typeof r[s]=="object"&&i.setAttribute(r[s].name,r[s].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){return this.dataLoader.load(this.options.data).finally(()=>{this.columnManager.verticalAlignHeaders()})}destroy(){var e=this.element;for(this.destroyed=!0,this.constructor.registry.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,r;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(`
|
|
54
|
+
`),r=i[0]=="Error"?i[2]:i[1],r[0]==" "?e=r.trim().split(" ")[1].split(".")[1]:e=r.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,r)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(s=>{var a=this.rowManager.findRow(s[this.options.index]);a?(t++,a.updateData(s).then(()=>{t--,t||i()}).catch(o=>{r("Update Error - Unable to update row",s,o)})):r("Update Error - Unable to find row",s)}):(console.warn("Update Error - No data provided"),r("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((r,s)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(a=>{var o=[];a.forEach(function(u){o.push(u.getComponent())}),r(o)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((r,s)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(a=>{var o=this.rowManager.findRow(a[this.options.index]);i++,o?o.updateData(a).then(()=>{i--,t.push(o.getComponent()),i||r(t)}):this.rowManager.addRows(a).then(u=>{i--,t.push(u[0].getComponent()),i||r(t)})}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let r=this.rowManager.findRow(i,!0);if(r)t.push(r);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,r)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(r)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(r=>r[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(r=>r[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var r=this.rowManager.findRow(e);return r?this.rowManager.scrollToRow(r,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var r=this.rowManager.findRow(e);this.initGuard(),r?r.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var r=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,r).then(s=>s.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var r=this.columnManager.findColumn(e),s=this.columnManager.findColumn(t);this.initGuard(),r?s?this.columnManager.moveColumn(r,s,i):console.warn("Move Error - No matching column found:",s):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((r,s)=>{var a=this.columnManager.findColumn(e);return a?this.columnManager.scrollToColumn(a,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw(!0)}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}}var fn=ri;class sk extends fn{static extendModule(){fn.initializeModuleBinder(ba),fn._extendModule(...arguments)}static registerModule(){fn.initializeModuleBinder(ba),fn._registerModule(...arguments)}constructor(e,t,i){super(e,t,ba)}}var ak=sk;const ok={key:0,class:"bi bi-chevron-up"},lk={key:1,class:"bi bi-chevron-down"},uk=Ve({__name:"SubFilterToggleBtn",props:["modelValue"],emits:["update:modelValue"],setup(n,{emit:e}){const t=e,i=n,r=()=>{t("update:modelValue",!i.modelValue)};return(s,a)=>(l.openBlock(),l.createElementBlock("div",{class:"icon",onClick:r},[n.modelValue?(l.openBlock(),l.createElementBlock("i",ok)):(l.openBlock(),l.createElementBlock("i",lk))]))}},[["__scopeId","data-v-4810f2ed"]]),Rc={gender:{MALE:1,FEMALE:2,MIXED_GENDER:3,NOT_GENDER:4},address_fields:["postal_code","region_code","district_code","locality_code","sub_locality_code","street_code","house","flat"],userRoles:{ADMIN:1,VETERINARIAN:2,SHTP:3,LOCAL_EPIZOOTOLOGIST:4,ORGANIZATION_ADMIN:5,REGIONAL_REPRESENTATIVE:6,AGENCY:7,CENTRAL_WAREHOUSE:8,DISTRICT_REPRESENTATIVE:9,COUNTERPARTY:10,VETERINARIAN_REGISTRATOR:11,LABORATORY:12,INTEGRATOR:13},timeTypes:{HOUR:1,DAY:2,WEEK:3,MONTH:4,YEAR:5},defaultTableOptions:{headerSortClickElement:"icon",printAsHtml:!0,printConfig:{},reactiveData:!0,movableColumns:!0,layout:"fitDataFill",layoutColumnsOnNewData:!0,resizableColumnFit:!0,pagination:!0,paginationMode:"remote",paginationCounter:"rows",paginationSize:10,columns:[]},customPerPageOptions:[{id:10,label:10},{id:40,label:40},{id:100,label:100},{id:150,label:150},{id:200,label:200}],bird_ids:[19,20,21,22,23,24,25],fish_ids:[38,39,40,41,42],animal_kinds:{COW:1,PIG:2,HORSE:3,BEE:4,DOG:5,CAT:6,DEER:7,MARAL:8,CAMEL:9,DONKEY:10,BISON:11,GOST:12,SHEEP:13,MULE:14,LOSHAK:15,ZEBU:16,BUFFALO:17,GRUNTING_OX:18,CHICKEN:19,DUCK:20,GOOSE:21,TURKEY:22,GUINEA_FOWL:23,QUAIL:24,OSTRICH:25,FOX:26,SABLE:27,MINK:28,FERRET:29,RABBIT:30,ARCTIC_FOX:31,RACCOON_DOG:32,NUTRIA:33,ALPACAS:34,PHEASANT:35,PEACOCK:36,RACCOON:37,STURGEON:38,SALMON:39,CARP:40,CATFISH:41,BASS:42},mask_regex:{INTEGER:"^[0-9]*$",DECIMAL:"^[0-9]{1,10}[.]?[0-9]{1}$",HUNDREDTHS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,2})$",THOUSANDS:"^([0]{1}[.][0-9]{1,2}|[1-9][0-9]*[.]?[0-9]{1,3})$",NO_LIMIT_AFTER_DOT:"^[0-9]{1,10}[.]?[0-9]*$",ABOVE_ONE:"^[1-9]+[0-9]*$",NO_START_SPACE:"^[^ ]+.*$",NO_SPACE:"[^ ]*"}};Object.preventExtensions(Rc);const ck={class:"position-relative",style:{"min-height":"300px"}},dk={key:0,class:"tabulator hide-to-print sticky-bottom bg-white"},hk={class:"row"},fk={key:0,class:"col-auto"},pk={class:"col"},mk={class:"tabulator-footer",ref:"footer"},gk=["id"],bk=["disabled"],vk={key:0,class:"spinner-border spinner-border-sm",role:"status","aria-hidden":"true"},yk="",wk=l.defineComponent({__name:"Table",props:{langs:{type:Object,default:()=>({})},paginationPage:{type:Number,default:null},locale:{type:String,default:"ru"},columnHide:{type:String,default:""},columnShow:{type:String,default:""},options:{type:Object,default:()=>({})},filters:{type:[Array,Function,Object],default:()=>[]},tableData:{type:Array,default:()=>[]},showAllColumnsIfAllHidden:{type:Boolean,default:!1},parentComponent:{type:Object,default:()=>({})},selectedRowsStorage:{type:Array,default:()=>[]},isVisibleColumnSubFilter:{type:Boolean,default:null},loadMoreText:{type:String,default:"Load More"}},emits:["selectedRow","unselectedRow","updateSelectedRows","updateUnselectedRows","updateTable","onHideColumn","onShowColumn","onTableRowClick","onCellClick","onTableRowMoved","pageLoaded","savePaginationPage","updateIsVisibleColumnSubFilter"],setup(n,{emit:e}){const t=n,i=e,r=l.inject("selectedTabIndex",l.ref()),s=l.inject("selectAll",l.ref(0)),a=l.ref(""),o=l.ref(null),u=l.ref({data:[],rows:[]}),c=l.ref(new Set(t.selectedRowsStorage)),d=l.ref(!1),p=l.ref(di()),h=l.ref(null),f=l.ref(null),_=l.ref(!1),k=l.computed(()=>t.options?.paginationMode==="remote"),w=l.computed(()=>Rc.customPerPageOptions),y=l.useSlots(),v=B=>!!y[B],R=()=>{a.value=""},m=B=>!B||!B.length?[]:B.map(Q=>Q),x=()=>({}),g=()=>{if(!h.value)return;const B=h.value.querySelector(".tabulator-header");!B||t.isVisibleColumnSubFilter===null||Xi(B,uk,{modelValue:t.isVisibleColumnSubFilter,"onUpdate:modelValue":Q=>i("updateIsVisibleColumnSubFilter",Q)})},S=()=>{if(!h.value)return;const B=h.value.querySelector(".tabulator-header");B&&(B.classList.add("position-relative"),g())},C=()=>{if(!f.value)return;const B=h.value?.parentNode?.querySelector(".tabulator-footer"),Q=f.value.last_page;if(!Q||isNaN(+Q)){B&&B.classList.add("d-none");return}Q>1?B&&B.classList.remove("d-none"):B&&B.classList.add("d-none")},E=()=>{_.value=!0},b=()=>{_.value=!1},T=()=>{_.value=!1},M=()=>{d.value=!0,i("updateTable",f.value),f.value&&(f.value.setLocale(t.locale),f.value.selectRow(Array.from(c.value)))},O=B=>{setTimeout(()=>{i("savePaginationPage",B)}),k.value&&C(),s.value>0&&i("pageLoaded"),_.value=!1,S()},F=B=>{const Q=B.getData(),X=f.value?.options?.index||"id",q=Q[X]??null;q!==null&&(c.value.add(q),u.value.data.push(Q),u.value.rows.push(B),i("updateSelectedRows",{data:u.value.data,row:u.value.rows}),i("selectedRow",{data:Q,row:B}))},z=B=>{const Q=B.getData(),X=f.value?.options?.index||"id",q=Q[X]??null;if(q===null)return;c.value.delete(q);const oe=u.value.data.findIndex(se=>se[X]===q);oe!==-1&&(u.value.data.splice(oe,1),u.value.rows.splice(oe,1)),i("updateUnselectedRows",{data:Q,row:B}),i("unselectedRow",{data:Q,row:B})},$=function(){f.value&&f.value.selectRow(Array.from(c.value)),_.value=!0},H=(B,Q)=>{if(Q?._cell?.column?.definition?.hasCellClickHandler){i("onCellClick",B,Q);return}const X=[],q=B.target;for(let oe=0;oe<q.childNodes.length;oe++){const se=q.childNodes[oe];se.nodeName==="INPUT"&&se.type==="checkbox"&&X.push("checkbox")}X.includes("checkbox")||i("onTableRowClick",B,Q._cell.row,t.parentComponent)},V=B=>{f.value&&i("onTableRowMoved",f.value.getColumnLayout())},Y=()=>{setTimeout(()=>{_.value=!0})},D=()=>{setTimeout(()=>{_.value=!1,G()})},P=()=>{d.value=!1},I=()=>{if(!h.value)return;_.value=!0;const B={...t.options,data:t.tableData,langs:t.langs||x(),columns:m(t.options.columns),dataLoaderLoading:`<img alt="" src="${yk}">`,placeholder:"Ничего не найдено",ajaxResponse:function(Q,X,q){return this.last_page=q.last_page,q.data}};k.value&&(B.footerElement=`#tabulator-footer${p.value}`),f.value=new ak(h.value,B),f.value.on("dataLoading",E),f.value.on("dataLoaded",b),f.value.on("dataLoadError",T),f.value.on("tableBuilt",M),f.value.on("pageLoaded",O),f.value.on("rowSelected",F),f.value.on("rowDeselected",z),f.value.on("dataProcessed",$),f.value.on("cellClick",H),f.value.on("columnMoved",V),f.value.on("renderStarted",Y),f.value.on("renderComplete",D),f.value.on("tableDestroyed",P)},N=B=>{if(!d.value||!B||!f.value)return;const Q=f.value.options.ajaxParams;Q&&(Q.per_page=Number(B)),f.value.options.paginationSize=Number(B),f.value.setPageSize(B)},U=()=>{if(!f.value)return;const B=640,Q=f.value.options;if(k.value)Q.ajaxParams?.per_page<B&&(Q.ajaxParams.per_page+=40),f.value.setData();else{const X=f.value.getPageSize();typeof X=="number"&&X<B&&f.value.setPageSize(X+40)}Q.paginationSize>=B&&(a.value="Необходимо воспользоваться переходом по страницам")},Z=B=>{B!==""&&f.value&&(f.value.showColumn(B),i("onShowColumn",f.value.getColumnLayout()))},j=B=>{B!==""&&f.value&&(f.value.hideColumn(B),i("onHideColumn",f.value.getColumnLayout()))},ne=B=>{f.value&&(B.filter(({visible:Q})=>!Q).length===B.length?B.map(({field:Q})=>{l.nextTick(()=>f.value?.showColumn(Q))}):B.map(({field:Q,visible:X})=>{X?f.value?.showColumn(Q):f.value?.hideColumn(Q)}))},G=()=>{l.nextTick(()=>{if(!f.value||f.value.getPage()!==1||!t.paginationPage||t.paginationPage===f.value.getPage())return!1;f.value.setPage(t.paginationPage)})};return l.onMounted(()=>{I()}),l.onBeforeUnmount(()=>{f.value&&f.value.destroy()}),l.watch(()=>t.columnShow,B=>{B&&Z(B)}),l.watch(()=>t.columnHide,B=>{B&&j(B)}),l.watch(()=>t.filters,B=>{f.value&&f.value.setFilter(B)},{deep:!0}),l.watch(()=>t.tableData,B=>{f.value&&!k.value&&f.value.setData(B)},{deep:!1}),l.watch(r,()=>{f.value&&f.value.deselectRow()}),l.watch(s,B=>{B>0&&f.value&&f.value.selectRow()}),l.watch(()=>t.options.columns,B=>{!d.value||!f.value||!B||(!B.find(({visible:Q})=>Q)&&t.showAllColumnsIfAllHidden?ne(B):f.value.setColumns(B))},{deep:!0}),l.watch(()=>t.selectedRowsStorage,B=>{B&&(c.value=new Set(B))},{deep:!0}),l.watch(d,B=>{B&&(t.showAllColumnsIfAllHidden&&ne(t.options.columns||[]),t.tableData.length>0&&f.value?.setData(t.tableData))},{deep:!0}),(B,Q)=>(l.openBlock(),l.createElementBlock("div",ck,[l.createElementVNode("div",{ref_key:"tableRef",ref:h},null,512),k.value?(l.openBlock(),l.createElementBlock("div",dk,[l.createElementVNode("div",hk,[v("table-footer-left")?(l.openBlock(),l.createElementBlock("div",fk,[l.renderSlot(B.$slots,"table-footer-left")])):l.createCommentVNode("",!0),l.createElementVNode("div",pk,[l.createElementVNode("div",mk,[l.createElementVNode("div",{class:"tabulator-footer-contents d-flex",id:`tabulator-footer${p.value}`},[l.createElementVNode("button",{class:"btn btn-primary me-3",id:"loadMoreButton",onClick:U,disabled:_.value},[l.createTextVNode(l.toDisplayString(n.loadMoreText)+" ",1),Q[2]||(Q[2]=l.createElementVNode("i",{class:"bi bi-plus-lg"},null,-1)),_.value?(l.openBlock(),l.createElementBlock("div",vk)):l.createCommentVNode("",!0)],8,bk),l.createVNode(Xt,{class:"me-3",style:{"min-width":"150px"},modelValue:o.value,"onUpdate:modelValue":[Q[0]||(Q[0]=X=>o.value=X),Q[1]||(Q[1]=X=>N(X))],allowClear:!1,options:w.value,dropDownPlacement:"top"},null,8,["modelValue","options"])],8,gk)],512)])])])):l.createCommentVNode("",!0),l.createVNode(vc,{message:a.value,onClearMessage:R},null,8,["message"])]))}}),Ck={class:"r3-table-count__wrapper px-3"},Ek={class:"r3-table-count__label pe-2"},kk={class:"r3-table-count__value"},Sk=Ve(l.defineComponent({__name:"TableCount",props:{label:{default:""},count:{default:0},defaultLabel:{default:"-"},defaultCount:{default:"-"},size:{default:"medium"},showSeparator:{type:Boolean,default:!0}},setup(n){const e=n,t=l.computed(()=>e.label||e.defaultLabel),i=l.computed(()=>e.count===null||e.count===void 0||e.count===""?e.defaultCount:e.count);return(r,s)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["r3-table-count",[`r3-table-count--${r.size}`]])},[l.createElementVNode("div",Ck,[l.createElementVNode("span",Ek,l.toDisplayString(t.value)+":",1),l.createElementVNode("span",kk,l.toDisplayString(i.value),1)])],2))}}),[["__scopeId","data-v-51c6483c"]]),xk=Ve(l.defineComponent({__name:"ColumnSubFilter",props:{tableRefEl:{default:void 0},columnField:{default:""},mountedComponent:{default:void 0},dataProps:{default:()=>({})},table:{default:void 0},isVisible:{type:Boolean,default:!1}},setup(n){const e=n;function t(){if(!e?.tableRefEl)return!1;const i=`[tabulator-field='${e.columnField}']`,r=e.tableRefEl?.querySelector(i);if(!e.table||!r)return!1;if(e.isVisible&&r&&e.mountedComponent)return Xi(r,e.mountedComponent,e.dataProps),!1;Xi(r,null,{},!0)}return l.watch(()=>e,()=>{t()},{deep:!0}),l.onMounted(()=>{t()}),(i,r)=>null}}),[["__scopeId","data-v-0ddbb5a3"]]),_k=Ve(l.defineComponent({__name:"TableAppliedFiltersStorage",props:{tableName:{},filters:{}},emits:["update:filters"],setup(n,{expose:e,emit:t}){const i=n,r=t,s=l.computed(()=>"default-page"),a=l.toRef(i,"filters");function o(){let h=localStorage.getItem("filters"),f=h?JSON.parse(h):{};f={...ii(f),[s.value]:{[i.tableName]:d(a.value)}};const _=JSON.stringify(f);return localStorage.setItem("filters",_),h=localStorage.getItem("filters"),h?JSON.parse(h):{}}function u(h){return!(!h||!h[s.value]||!h[s.value][i.tableName])}function c(h){const f=JSON.parse(h);return u(f)?(h=localStorage.getItem("filters")||"{}",JSON.parse(h)):o()}function d(h){const f={};for(const[_,k]of Object.entries(h))f[_]=ii(k._value||k);return f}function p(){let h=localStorage.getItem("filters");if(!h)return r("update:filters",{}),!1;let f=c(h);if(!f[s.value]||!f[s.value][i.tableName])return r("update:filters",{}),!1;const _=d(f[s.value][i.tableName]);return r("update:filters",{..._}),!0}return e({getFilters:p,saveFilters:o}),(h,f)=>l.createCommentVNode("",!0)}}),[["__scopeId","data-v-08a5ac04"]]),Mk={class:"row pt-3"},Rk={class:"col-12"},Tk=["onClick"],Dk=Ve(l.defineComponent({__name:"TableQuickFilterComponent",props:{filterList:{},defaultSelected:{default:""}},emits:["emitSelected"],setup(n,{emit:e}){const t=e,i=r=>{t("emitSelected",r)};return(r,s)=>(l.openBlock(),l.createElementBlock("div",Mk,[l.createElementVNode("div",Rk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.filterList,(a,o)=>(l.openBlock(),l.createElementBlock("button",{onClick:u=>i(a.name),class:l.normalizeClass(["btn filter-item",{active:r.defaultSelected===a.name,disabled:a.disabled}]),key:o},l.toDisplayString(a.title),11,Tk))),128))])]))}}),[["__scopeId","data-v-cdf25b7c"]]),Ok={key:0,class:"col-4 mb-2"},Lk={class:"form-check"},Pk=["onUpdate:modelValue","checked","id","onChange"],Ak=["for"],Fk=["innerHTML"],Bk={class:"col-auto"},Nk={class:"col-auto ps-0"},Vk={class:"col-auto ps-0"},Hk=Ve(l.defineComponent({__name:"EditTableColumns",props:{title:{default:"Данные для отображения в таблице"},modalVisibility:{type:Boolean,default:!1},columns:{default:()=>[]},applyText:{default:"Применить"},selectAllText:{default:"Выбрать все"},unselectAllText:{default:"Снять все"}},emits:["emitModalVisibility","columnVisibilityChange","apply","selectAll","unselectAll"],setup(n,{emit:e}){const t=n,i=e,r=l.computed(()=>t.columns.some(d=>!d.visible)),s=d=>{i("emitModalVisibility",d)},a=(d,p)=>{i("columnVisibilityChange",d,p)},o=()=>{i("apply")},u=()=>{i("selectAll")},c=()=>{i("unselectAll")};return(d,p)=>(l.openBlock(),l.createBlock(mc,{title:d.title,"modal-visibility":d.modalVisibility,onEmitModalVisibility:s},{"modal-body":l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(d.columns,(h,f)=>(l.openBlock(),l.createElementBlock(l.Fragment,{key:f},[h.title?(l.openBlock(),l.createElementBlock("div",Ok,[l.createElementVNode("div",Lk,[l.withDirectives(l.createElementVNode("input",{"onUpdate:modelValue":_=>h.visible=_,checked:h.visible,class:"form-check-input",type:"checkbox",id:h.field,ref_for:!0,ref:"editColumns",onChange:_=>a(_,h.field)},null,40,Pk),[[l.vModelCheckbox,h.visible]]),l.createElementVNode("label",{class:"form-check-label",for:h.field},[l.createElementVNode("span",{innerHTML:h.title},null,8,Fk)],8,Ak)])])):l.createCommentVNode("",!0)],64))),128))]),"modal-footer":l.withCtx(()=>[l.createElementVNode("div",Bk,[l.createElementVNode("button",{type:"button",class:"btn btn-primary px-4",onClick:o},l.toDisplayString(d.applyText),1)]),l.createElementVNode("div",Nk,[l.createElementVNode("div",Vk,[r.value?(l.openBlock(),l.createElementBlock("button",{key:0,type:"button",class:"btn btn-light",onClick:u},l.toDisplayString(d.selectAllText),1)):l.createCommentVNode("",!0),r.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("button",{key:1,type:"button",class:"btn btn-light",onClick:c},l.toDisplayString(d.unselectAllText),1))])])]),_:1},8,["title","modal-visibility"]))}}),[["__scopeId","data-v-0faf3a19"]]),zk={"data-test":"ToggleAllTableRowButtons",class:"toggle-all-rows-controls"},Ik={key:2,class:"selected-count"},$k=Ve(l.defineComponent({__name:"ToggleAllTableRowButtons",props:{selectedRows:{default:()=>[]},selectAllText:{default:"Выбрать все"},unselectAllText:{default:"Снять все"},selectedText:{default:"Выбрано"},showCount:{type:Boolean,default:!0}},emits:["selectAll","unselectAll"],setup(n,{emit:e}){const t=e,i=()=>{t("selectAll")},r=()=>{t("unselectAll")};return(s,a)=>(l.openBlock(),l.createElementBlock("div",zk,[s.selectedRows.length>0?(l.openBlock(),l.createElementBlock("button",{key:0,class:"btn btn-light me-3",onClick:r},l.toDisplayString(s.unselectAllText),1)):l.createCommentVNode("",!0),s.selectedRows.length===0?(l.openBlock(),l.createElementBlock("button",{key:1,class:"btn btn-primary me-3",onClick:i},l.toDisplayString(s.selectAllText),1)):l.createCommentVNode("",!0),s.showCount?(l.openBlock(),l.createElementBlock("div",Ik,l.toDisplayString(s.selectedText)+": "+l.toDisplayString(s.selectedRows.length),1)):l.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-010ff090"]]),jk={class:"row pt-3"},Wk={class:"col-12"},Gk=["onClick"],Yk=Ve(l.defineComponent({__name:"MultipleQuickFilterComponent",props:{filterList:{},defaultSelected:{default:()=>({})}},emits:["emitSelected"],setup(n,{emit:e}){const t=n,i=e,r=s=>{t.filterList[s].disabled||(t.filterList[s].value=!t.filterList[s].value,i("emitSelected",t.filterList))};return l.watch(()=>t.defaultSelected,s=>{s&&Object.keys(s).length>0&&t.filterList.forEach((a,o)=>{const u=Object.keys(s)[o];u&&s[u]!==void 0&&(a.value=s[u])})},{immediate:!0}),(s,a)=>(l.openBlock(),l.createElementBlock("div",jk,[l.createElementVNode("div",Wk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.filterList,(o,u)=>(l.openBlock(),l.createElementBlock("button",{onClick:c=>r(u),class:l.normalizeClass(["btn filter-item",{active:s.filterList[u].value,disabled:s.filterList[u].disabled}]),key:u},l.toDisplayString(o.title),11,Gk))),128))])]))}}),[["__scopeId","data-v-1a1bfba2"]]),Uk=["title"],qk=Ve(l.defineComponent({__name:"QuestionIcon",props:{title:{default:""},size:{default:"md"},color:{default:"#999999"},iconClass:{default:""},tooltipPosition:{default:"top"},clickToShow:{type:Boolean,default:!0}},setup(n){const e=n,t=l.ref(),i=l.ref(!1),r=l.computed(()=>({color:e.color})),s=l.computed(()=>{switch(e.size){case"sm":return"question-icon--sm";case"lg":return"question-icon--lg";default:return"question-icon--md"}}),a=l.computed(()=>`question-tooltip--${e.tooltipPosition}`),o=()=>{e.clickToShow&&e.title&&(i.value=!i.value)},u=c=>{t.value&&!t.value.contains(c.target)&&(i.value=!1)};return l.onMounted(()=>{e.clickToShow&&document.addEventListener("click",u)}),l.onUnmounted(()=>{e.clickToShow&&document.removeEventListener("click",u)}),(c,d)=>(l.openBlock(),l.createElementBlock("div",{class:"question-icon-wrapper",ref_key:"wrapperRef",ref:t},[l.createElementVNode("i",{class:l.normalizeClass(["bi bi-question-circle-fill question-icon",[c.iconClass,s.value]]),title:c.title,style:l.normalizeStyle(r.value),onClick:o},null,14,Uk),i.value&&c.title?(l.openBlock(),l.createElementBlock("div",{key:0,class:l.normalizeClass(["question-tooltip",a.value])},[l.createTextVNode(l.toDisplayString(c.title)+" ",1),d[0]||(d[0]=l.createElementVNode("div",{class:"question-tooltip-arrow"},null,-1))],2)):l.createCommentVNode("",!0)],512))}}),[["__scopeId","data-v-2c102103"]]),Kk={class:"container-fluid rounded overflow-hidden bg-light"},Jk={class:"row w-100"},Xk={class:"text-secondary"},Zk={class:"d-flex py-3 px-2 onlyPrint"},Qk={class:"row w-100"},e1={class:"text-secondary"},t1={class:"row"},i1=Ve(l.defineComponent({__name:"FilterValuesPanel",props:{filterValues:{default:null},filterTitles:{}},emits:["showFilter"],setup(n,{emit:e}){const t=n,i=l.ref(!1),r=l.ref([]);return l.computed(()=>t.filterValues?Object.entries(t.filterValues).filter(([s,a])=>a).map(([s,a])=>({name:t.filterTitles[s]||s,value:String(a),key:s})):[]),l.watch(()=>t.filterValues,s=>{if(!s){r.value=[];return}r.value=Object.entries(s).filter(([a,o])=>o).map(([a,o])=>({name:t.filterTitles[a]||a,value:String(o),key:a}))},{deep:!0,immediate:!0}),(s,a)=>(l.openBlock(),l.createElementBlock("div",Kk,[l.createElementVNode("div",{style:l.normalizeStyle({overflow:"hidden",maxHeight:i.value?"initial":"83px"}),class:"d-flex py-3 px-2 noPrint"},[l.createElementVNode("div",Jk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(o,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["mb-2",u===r.value.length-1?"col":"col-auto"]),key:o.key},[l.createElementVNode("div",Xk,l.toDisplayString(o.name)+":",1),l.createElementVNode("div",null,[l.createElementVNode("strong",null,l.toDisplayString(o.value),1)])],2))),128))]),l.createElementVNode("div",null,[l.createElementVNode("div",{role:"button",class:"expand-btn expand-btn-right rounded",onClick:a[0]||(a[0]=o=>s.$emit("showFilter"))},[...a[2]||(a[2]=[l.createElementVNode("i",{class:"bi bi-chevron-right i-hidden"},null,-1)])])])],4),l.createElementVNode("div",Zk,[l.createElementVNode("div",Qk,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(r.value,(o,u)=>(l.openBlock(),l.createElementBlock("div",{class:l.normalizeClass(["mb-2",u===r.value.length-1?"col":"col-auto"]),key:o.key},[l.createElementVNode("div",e1,l.toDisplayString(o.name)+":",1),l.createElementVNode("div",null,[l.createElementVNode("strong",null,l.toDisplayString(o.value),1)])],2))),128))])]),l.createElementVNode("div",t1,[l.createElementVNode("div",{role:"button",class:"expand-btn expand-btn-bottom hide-to-print",onClick:a[1]||(a[1]=o=>i.value=!i.value)},[l.createElementVNode("i",{class:l.normalizeClass({"bi lh-normal":!0,"bi-chevron-down":!i.value,"bi-chevron-up":i.value})},null,2)])])]))}}),[["__scopeId","data-v-9dc91069"]]),Tc=(n={})=>{n.hasOwnProperty("KEY")||(n.KEY="tables");const{KEY:e}=n;function t(a,o){const u=localStorage.getItem(e);let c=JSON.parse(u);return c={...c,[a]:o},localStorage.setItem(e,JSON.stringify(c)),!0}function i(a){return a?(localStorage.setItem(e,JSON.stringify(a)),!0):!1}function r(a){const o=localStorage.getItem(e),u=JSON.parse(o);return u?.hasOwnProperty(a)&&delete u[a],i(u),!0}function s(a){const o=localStorage.getItem(e);return(JSON.parse(o)||{})[a]||null}return{setItemStorage:t,removeItemStorage:r,getItemStorage:s}},n1=({localStorageKey:n=null,getAjaxUrl:e,getAjaxResponse:t,getColumns:i,tableOptions:r,initialFilters:s=()=>({empty:"empty"}),initialFilterTitles:a=()=>({empty:"empty"}),selectedQuickFilter:o=null})=>{const u=l.ref({}),c=l.ref(0),d=l.ref(""),p=l.ref(""),h=l.ref({}),f=l.ref(!1),_=l.ref(!1),k=l.ref(s()),{setItemStorage:w,removeItemStorage:y,getItemStorage:v}=Tc();async function R(){k.value=s(),h.value={}}function m(D){if(!n)return!1;w(n,D)}const x=l.readonly({...a()});function g(D,P){h.value[D]=P}const S=l.computed(()=>Object.values(h.value).some(Boolean));function C(){c.value+=1}function E(D){if(!n)return!1;w(n,T(D))}async function b(){await F(),C(),f.value=!1}function T(D){return D.map(I=>{let N=JSON.parse(JSON.stringify(I));return I.visible===!1&&(delete N.width,delete N.minWidth),N})}function M(D){if(!n)return!1;w(n,T(D))}function O(){const D={};for(const[P,I]of Object.entries({...k.value}))!I||I?.length<1||Array.isArray(I)&&(I[0]===null||I[0]===void 0||I[0]==="")||(D[P]=I);return D}async function F(){const D=e(),P=await t(),I=V();r.value={...r.value,ajaxURL:D,ajaxResponse:P,columns:I,ajaxParams:{...r.value.ajaxParams,per_page:r.value.paginationSize}}}const z=l.computed(()=>{let D=[];return r.value.columns.map(P=>{P.title&&D.push(P.visible)}),D.includes(!1)});async function $(D,P){D.target.checked==!1?(d.value=P,p.value=""):(p.value=P,d.value="")}async function H(){y(n),r.value.columns=V()}function V(){const D=v(n);return D||i({selectedQuickFilter:o?.value})}async function Y(){y(n),r.value.columns.map(D=>D.visible=!1),M(r.value.columns)}return l.provide("setFilterParamsStrings",g),l.provide("selectedFilterTitles",x),l.provide("tableFilters",k),l.provide("filterModalVisibility",f),l.provide("resetFilters",R),l.provide("applyFilters",b),l.provide("editTableColumnsModalVisibility",_),l.provide("tableOptions",r),l.provide("editTableColumnVisibility",$),l.provide("isTableCoumnsHidden",z),l.provide("unselectAllTableColumnCheckboxes",Y),l.provide("selectAllTableColumnCheckboxes",H),{selectAllTableColumnCheckboxes:H,unselectAllTableColumnCheckboxes:Y,isTableCoumnsHidden:z,editTableColumnVisibility:$,fetchData:F,onHideColumn:M,getFilterData:O,applyFilters:b,reRenderTable:C,resetFilters:R,onTableRowMoved:m,onShowColumn:E,table:u,tableKey:c,columnHide:d,columnShow:p,selectedFilterTitles:x,setFilterParamsStrings:g,filterParamsStrings:h,isSelectedFiltersVisible:S,filterModalVisibility:f,editTableColumnsModalVisibility:_,tableFilters:k,tableOptions:r}};Ce.AddButton=Ca,Ce.AddressForm=ry,Ce.AgeFromAgeTo=vy,Ce.BooleanCheckbox=lc,Ce.Card=pw,Ce.CardInfo=kw,Ce.Checkbox=cg,Ce.ClearFormButton=jc,Ce.CollapseButton=Vc,Ce.ColumnSubFilter=xk,Ce.ConfirmationModal=Wy,Ce.CustomInput=$n,Ce.DefaultAccordion=oC,Ce.DefaultButton=Pc,Ce.DefaultDropDown=bc,Ce.DefaultModal=pc,Ce.Divider=gc,Ce.EditTableColumns=Hk,Ce.EditTableColumnsModalComponent=mc,Ce.ErrorMessageComponent=tC,Ce.ExportButton=Hc,Ce.ExportComponent=Od,Ce.FilterValuesPanel=i1,Ce.Flatpickr=Vv,Ce.FormError=hi,Ce.HeaderSearchForm=$v,Ce.Icon=cr,Ce.KindCheckboxesAccordion=yC,Ce.MultiCheckbox=wv,Ce.MultiInput=xv,Ce.MultipleQuickFilterComponent=Yk,Ce.PageCard=Uw,Ce.PageTitle=dw,Ce.PasswordInput=ag,Ce.PrintButton=zc,Ce.QuestionIcon=qk,Ce.Spinner=ur,Ce.Table=wk,Ce.TableAppliedFiltersStorage=_k,Ce.TableCount=Sk,Ce.TableFilterModalComponent=Zy,Ce.TableQuickFilterComponent=Dk,Ce.Toast=vc,Ce.ToggleAllTableRowButtons=$k,Ce.ToggleButtons=Yc,Ce.VSelect=Xt,Ce.helpers=eg,Ce.useTableDefault=n1,Ce.useTableStorage=Tc,Object.defineProperty(Ce,Symbol.toStringTag,{value:"Module"})}));
|