@kizmann/pico-js 2.0.9 → 2.0.11
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/pico-js.browser.js +1 -1
- package/dist/pico-js.browser.js.map +1 -1
- package/dist/pico-js.esm.js +1 -1
- package/dist/pico-js.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/dom/DomAttribute.ts +8 -2
- package/src/dom/DomEvent.ts +19 -12
- package/src/dom/DomFinder.ts +21 -6
- package/src/dom/DomGlobal.ts +8 -4
- package/src/dom/DomMeta.ts +1 -0
- package/src/dom/DomObserver.ts +0 -1
- package/src/dom/DomPopover.ts +39 -0
- package/src/dom/DomRectangle.ts +8 -0
- package/src/format/FormatFile.ts +1 -2
- package/src/format/FormatOption.ts +0 -1
- package/src/format/FormatParam.ts +0 -1
- package/src/now/NowDefault.ts +80 -32
- package/src/now/NowGrid.ts +30 -12
- package/src/now/NowMatch.ts +1 -1
- package/src/now/NowRange.ts +5 -2
- package/src/now/NowWalker.ts +0 -1
- package/src/tool/scope.ts +6 -0
- package/src/utils/Array.ts +130 -21
- package/src/utils/Dom.ts +1 -1
- package/src/utils/Locale.ts +3 -3
- package/src/utils/Mixed.ts +59 -13
- package/src/utils/Now.ts +5 -2
- package/src/utils/Number.ts +8 -2
- package/src/utils/Object.ts +26 -5
- package/src/utils/Signal.ts +1 -1
- package/src/utils/String.ts +24 -18
- package/src/wip/Map.ts +131 -101
- package/types/dom/DomEvent.d.ts +1 -1
- package/types/dom/DomGlobal.d.ts +4 -0
- package/types/dom/DomPopover.d.ts +39 -0
- package/types/dom/DomRectangle.d.ts +8 -0
- package/types/tool/scope.d.ts +6 -0
- package/types/utils/Array.d.ts +55 -4
- package/types/utils/Locale.d.ts +1 -1
- package/types/utils/Mixed.d.ts +10 -0
- package/types/utils/Object.d.ts +9 -0
package/dist/pico-js.browser.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={},r={};function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.r(r),t.d(r,{Any:()=>ie,Arr:()=>v,Cookie:()=>G,Data:()=>te,Dom:()=>Rt,Event:()=>ne,For:()=>Qt,Hash:()=>A,Locale:()=>C,Mix:()=>M,Now:()=>ht,Num:()=>m,Obj:()=>O,Route:()=>re,Run:()=>s,Signal:()=>I,Str:()=>c,UUID:()=>se,browser:()=>J,device:()=>z,go:()=>U,trait:()=>_});class n{static interval(t,e=0){const r=setInterval(()=>{t()},e);return()=>clearInterval(r)}static clear(t){return M.isArr(t)?v.each(t,t=>this.clear(t),this):M.isFunc(t)?(t(),this):(clearTimeout(t),clearInterval(t),this)}static tryin(t){try{t()}catch(t){}return this}static wait(t,e=0,r=500){let i,n;return n=setTimeout(()=>{this.clear([i,n])},e*r),i=setInterval(()=>{t()&&this.clear([n,i])},e),()=>clearInterval(i)}static frame(t){const e=requestAnimationFrame(()=>{t()});return()=>cancelAnimationFrame(e)}static async(t){const e=setTimeout(()=>{t()});return()=>clearTimeout(e)}static delay(t,e=0){let r=setTimeout(()=>{t()},e);return()=>clearTimeout(r)}static debounce(t,e=100){let r=null;return(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{this.frame(()=>t(...i))},e)}}static throttle(t,e=100){let r,i=null;return(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{r=!1},e),r||(this.frame(()=>t(...n)),r=!0)}}static framerate(t,e=30,r=!0){let i,n=0,s=1e3/e;const o=(...e)=>{if(clearTimeout(i),Date.now()-n<=s)return r&&(i=setTimeout(o,s+1));this.frame(()=>t(...e)),n=Date.now()};return o}static framebuffer(t,e,r=1e3){const i={key:e,cb:t,priority:r,args:[],active:!1};return v.add(this.$buffer,i),(t,...e)=>{/^drag/.test(t.type)&&t.preventDefault(),O.assign(i,{args:[t,...e],active:!0}),this.runFramebuffer()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{this.runFramebuffer()},50),Date.now()-this.$timer<50)return;this.$idler&&clearTimeout(this.$idler),this.$timer=Date.now();let t=v.filter(this.$buffer,{active:!0});0!==t.length&&(t=v.sort(t,"priority"),v.each(t.reverse(),t=>{t.cb(...t.args),t.active=!1}))}}i(n,"$idler",null),i(n,"$timer",0),i(n,"$buffer",[]);const s=n;var o;function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class u{static get(t,e){return M.isStr(t)||(t=M.str(t)),M.isInt(e)&&(e=M.int(e)),t.charAt(e)}static set(t,e,r=""){return M.isStr(t)||(t=M.str(t)),M.isInt(e)&&(e=M.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){M.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){M.isNull(r)&&(r=t);let i=this.range(r,e);return null===i?null:this.slice(t,...i)}static match(t,e,r=null){let i=M.str(t).match(e);return M.isEmpty(i)?[]:M.isFunc(r)?r(i):i}static regex(t){return M.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return M.str(t).toUpperCase()}static ucfirst(t){return M.str(t).charAt(0).toUpperCase()+t.slice(1)}static lc(t){return M.str(t).toLowerCase()}static lcfirst(t){return M.str(t).charAt(0).toLowerCase()+t.slice(1)}static cc(t){return v.each(Qt.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return Qt.slugify(t)}static sc(t){return Qt.slugify(t).replace("-","_")}static pc(t){return v.each(Qt.slugify(t).split("-"),t=>this.ucfirst(t)).join("")}static has(t,e){return-1!==this.lc(t).indexOf(this.lc(e))}static range(t,e,r=null){let i=M.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return M.str(t).slice(e,r)}static string(t,e="-",r=!1){return M.isEmpty(t)?e:(t=M.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return M.isEmpty(t)?i:M.bool(t)?e:r}static number(t,e=null,r=null,i={}){return M.isNum(t)?(null==r&&(r=C.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({maximumFractionDigits:12},i),null!=e&&(i.minimumFractionDigits=e,i.maximumFractionDigits=e),M.num(t).toLocaleString(r,i)):M.str(t)}static integer(t,e=0,r="0"){return M.isNum(t)?(M.isInt(t)||(t=M.int(t)),t=M.int(t),e?M.str(t).padStart(e,r):M.str(t)):M.str(t)}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return M.isDate(t)||(t=ht.make(t)),t.valid()?t.format(e):r}static date(t,e="YYYY-MM-DD",r="-"){return this.datetime(t,e,r)}static time(t,e="HH:mm:ss",r="-"){return this.datetime(t,e,r)}static objectify(t,e="options",r=!1){return M.isRef(t)?t:("params"===e&&(t=Qt.parseParams(t)),"options"===e&&(t=Qt.parseOptions(t)),M.isRef(t)||(t=JSON.parse(t)),r?M.vals(t):t)}static stringify(t,e="options"){return M.isStr(t)?t:"params"===e?Qt.castParams(t):"options"===e?Qt.castOptions(t):JSON.stringify(t)}}a(u,"upper",(o=u).uc),a(u,"lower",o.lc),a(u,"camelcase",o.cc),a(u,"kebabcase",o.kc),a(u,"snakecase",o.sc),a(u,"pascalcase",o.pc),u.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),c.regex(...t)),u.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),c.pc(...t)),u.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),Qt.slugify(...t)),u.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),Qt.castOptions(...t)),u.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),Qt.parseOptions(...t)),u.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),Qt.castParams(...t)),u.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),Qt.parseParams(...t)),u.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),Qt.filesize(...t)),u.real=()=>{console.error("Str.real() is not implemented anymore.")},u.array=()=>{console.error("Str.array() is not implemented anymore.")};const c=u;function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(e){f(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{static fixed(t,e=2){return M.isNum(t)||(t=M.num(t)),t.toFixed(e)}static float(t){return M.isNum(t)||(t=M.num(t)),parseFloat(t)}static int(t){return M.isNum(t)||(t=M.num(t)),parseInt(t)}static ceil(t){return M.isNum(t)||(t=M.num(t)),Math.ceil(t)}static floor(t){return M.isNum(t)||(t=M.num(t)),Math.floor(t)}static round(t){return M.isNum(t)||(t=M.num(t)),Math.round(t)}static combine(t){return v.reduce(t,(t,e)=>t+e,0)}static subtract(t){return v.reduce(t,(t,e)=>t-e,0)}static decade(t){return M.isNum(t)||(t=M.num(t)),10*Math.floor(t/10)}static matrix(t,e=[]){M.isNum(t)||(t=M.num(t));let r=0;for(let i=20;i>=0;i--)t>=(r=Math.pow(2,i))&&(e.push(r),t-=r);return e}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[d(d({},i),t),d(d({},i),e)];let n=Math.PI*this.float(t.lat)/180,s=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(n)*Math.sin(s),Math.cos(n)*Math.cos(s)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}p.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),c.number(t,e[2]||null)),p.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),A.number(...t));const m=p;var g;function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class b{static all(t){return M.isArr(t)?t:[t]}static get(t,e,r=null){return M.isArr(t)?t&&t[e]?t[e]:r:t}static set(t,e,r){return this.splice(t,e,1,r)}static unset(t,e){return this.splice(t,e,1)}static prev(t,e){return M.isEmpty(t)||!M.isArr(t)?0:e-1<0?t.length-1:e-1}static next(t,e){return M.isEmpty(t)||!M.isArr(t)||e+1>t.length?0:e+1}static make(t,e=null){let r=new Array(t);null==e&&(e=t=>t);for(let i=0;i<t;i++)r[i]="function"==typeof e?e(i):e;return r}static has(t,e){if(!M.isPrim(e))return-1!==this.findIndex(t,e);return M.isRef(t)||(t=[t]),M.isArr(t)||(t=M.vals(t)),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return M.keys(e)}static lengths(t,...e){let r=t.length;for(let t=0;t<e.length;t++)if(e[t].length!==r)return!1;return!0}static first(t,e=null){return this.get(t,0,e)}static second(t,e=null){return this.get(t,2,e)}static third(t,e=null){return this.get(t,2,e)}static last(t,e=null){return this.get(t,t.length-1,e)}static each(t,e,r=null){if(M.isObj(t))return this.eachObj(t,e,r);null==t&&(t=[]);let i=new Array(t.length);for(let r=0;r<t.length;r++)i[r]=e(t[r],r);return null!=r?r:i}static eachObj(t,e,r=null){if(M.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=M.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[M.isArr(t),M.keys(t)],n=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],n(r));return t}static recursive(t,e,r,i=[]){let n=t=>i=>this.recursive(i,e,r,t);return M.isArr(t)?this.map(t,n(i)):(M.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],null==t||(M.isObj(t[e])&&(t[e]=n(i)(t[e])),M.isArr(t[e])&&(t[e]=this.map(t[e],n(i)))),t)}static cascade(t,e,r,i=[],n={}){if(null==t)return n;if(M.isObj(t))return this.cascade(t[r],e,r);const s=t=>this.cascade(t[e],e,r,n[t[r]],n);return this.each(t,t=>{n[t[r]]=[...i,t[r]],s(t)}),n}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!M.isEmpty(t)),M.keys(t).filter(r=>M.isFunc(e)?e.call({},t[r],r):M.isRef(e)?this.includes(t[r],e):e===t[r]))}static filterRemove(t,e=null){if(null==t)return t;let r=this.filterIndex(t,e);return 0===r.length?t:this.splices(t,r)}static filter(t,e=null){return null==t?[]:(null==e&&(e=t=>!M.isEmpty(t)),M.vals(t).filter((r,i)=>M.isFunc(e)?e.call({},r,i):M.isRef(e)?this.includes(r,e):e===t[i]))}static findIndex(t,e=null,r=-1){if(null==t)return r;null==e&&(e=t=>!M.isEmpty(t));for(let r=0;r<t.length;r++){if(M.isFunc(e)&&e.call({},t[r],r))return r;if(M.isRef(e)&&this.includes(t[r],e))return r;if(e===t[r])return r}return r}static find(t,e=null,r=null){let i=this.findIndex(t,e);return-1===i?r:t[i]}static sort(t,e=null){return M.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=M.keys(t).sort((r,i)=>e.call({},t[r],t[i])),i=[];for(const e of r)i.push(t[e]);return i}static sortDeep(t,e){let r=t=>O.get(t,e),i=M.keys(t).sort((e,i)=>M.compare(r(t[e]),r(t[i]))),n=[];for(const e of i)n.push(t[e]);return n}static sortPrim(t){let e=M.keys(t).sort((t,e)=>M.compare(t,e)),r=[];for(const i of e)r.push(t[i]);return r}static merge(t,...e){return t.concat(...e)}static prepend(t,...e){return t.unshift(...e),t}static append(t,...e){return t.push(...e),t}static add(t,e,r=null){return null==r&&(r=e),-1!==this.findIndex(t,r)||t.push(e),t}static replace(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1!==i&&this.splice(t,i,1),t.push(e),t}static remove(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i||this.splice(t,i,1),t}static toggle(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i?(t.push(e),t):(this.splice(t,i,1),t)}static insert(t,e,r){return this.splice(t,e,0,r),t}static slice(t,e,r=1){return t.slice(M.num(e),r)}static splice(t,e,r=1,...i){return t.splice(M.num(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(M.isPrim(t))return t;if(M.isObj(t))return O.clone(t);if(!M.isArr(t))return t;let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.clone(t[r]);return e}static diff(...t){return t.reduce((t,e)=>t.filter(t=>!e.includes(t)))}static isect(...t){return t.reduce((t,e)=>t.filter(t=>e.includes(t)))}static extract(t,e){let r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=O.get(t[i],e);return r}static reduce(t,e,r){return M.vals(t).reduce(e,r)}static chunk(t,e=10){let r=[];for(let i=0;i<t.length;i+=e)r.push(t.slice(i,i+e));return r}static includes(t,e){if(M.isObj(e))return O.includes(t,e);if(!M.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let n=0;!1===r&&n<i;n++)r||=this.has(t,e[n]);return r}static contains(t,e){let r=!0;for(let i of M.vals(e))r&&=-1!==M.vals(t).indexOf(i);return r}static matches(t,e){if(M.isObj(e))return O.matches(t,e);if(!M.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let n=0;!0===r&&n<i;n++)r&&=this.has(t,e[n]);return r}}y(b,"diffrence",(g=b).diff),y(b,"intersect",g.isect),b.removeIndex=function(...t){return console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),this.unset(...t)},b.sortString=function(...t){return console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),this.sortPrim(...t)},b.push=function(...t){return console.warn("Arr.push() is deprecated, use Arr.append() instead."),this.append(...t)},b.concat=function(...t){return console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),this.merge(...t)},b.equal=function(...t){return console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),this.matches(...t)};const v=b;class w{static keyoptim(t,e=!1,r=null){return null===r&&(r=M.isStr(t)),!r&&e&&(t=t.join(".")),r||e?t.split("."):t}static has(t,e,r=!1){if(null==t||null==e)return!1;"number"==typeof e&&(e=M.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return void 0!==t[e];e=this.keyoptim(e,r,i);let[n,s,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[n];for(;null!=t&&s<o;)t=t[e[s++]];return null!=t&&void 0!==t[n]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=M.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e];let s=0,o=(e=this.keyoptim(e,i,n)).length;if(0===o)return r;for(;null!=t&&s<o;)t=t[e[s++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=M.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,n)).length)return t;let s=t;for(let t,i,n=0;n<e.length;n++)t=i=String(e[n]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==s[t]&&(s[t]=t===i?{}:[]),t!==i&&v.insert(e,n+1,s[t].length),e.length-1===n&&(s[t]=r),s=s[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=M.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return delete t[e],t;e=this.keyoptim(e,r,i);let[n,s,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&s<o;)l=l[e[s++]];return null==l||delete l[n],t}static empty(t,e){return M.isEmpty(this.get(t,e))}static remove(t,e){if(!M.isArr(e))return t;for(let r of e)this.unset(t,r);return t}static each(t,e,r=null){let i={};for(let r of M.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of M.keys(t))t[r]=e(t[r],r);return t}static filterIndex(t,e=null){return v.filterIndex(t,e)}static filter(t,e=null){let r={};for(let i of this.filterIndex(t,e))r[i]=t[i];return r}static flatten(t,e="",r={}){if("object"!=typeof t)return r[e]=t;""!==e&&(e+=".");for(let i of M.keys(t))this.flatten(t[i],e+i,r);return r}static flattenForm(t,e="",r={}){if("object"!=typeof t)return r[e]=t;let i=t=>e?`${e}[${t}]`:t;for(let e of M.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return v.each(M.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(M.isPrim(t))return t;if(M.isArr(t))return v.clone(t);if(!M.isObj(t))return t;let r={};for(let e of M.keys(t))r[e]=this.clone(t[e]);return null!=e?this.assign(r,e):r}static pluck(t,e,r=null){let i=this.get(t,e,r);return this.unset(t,e),i}static only(t,e,r=null){let i={};return this.each(t,(t,r)=>{v.has(e,r)&&(i[r]=t)}),null==r?i:this.assign(i,r)}static except(t,e,r=null){let i={};return this.each(t,(t,r)=>{v.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(M.isArr(e))return v.includes(t,e);if(!M.isObj(e))return t===e;let r=M.keys(e),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i=this.includes(t[r[s]],e[r[s]]);return i}static matches(t,e){if(M.isArr(e))return v.matches(t,e);if(!M.isObj(t))return t===e;let r=v.unique([...M.keys(e),...M.keys(t)]),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i&&=this.matches(t[r[s]],e[r[s]]);return i}static sort(t,e){let r=v.sort(t,e);return v.each(r,(e,r)=>{t[r]._key=r}),r}}w.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Obj.sort() instead."),w.sort(...t)),w.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),M.vals(...t)),w.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),v.find(...t)),w.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),v.findIndex(...t));const O=w;var D;function j(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const P={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class ${static isEmpty(t){return null==t||("string"==typeof t?""===t:"number"!=typeof t&&("boolean"!=typeof t&&(this.isArr(t)?0===t.length:0===this.len(t))))}static isNull(t){return null===t}static isUndef(t){return void 0===t}static isNix(t){return null==t}static isPrim(t){return"string"==typeof t||"number"==typeof t}static isStr(t){return"string"==typeof t}static isNum(t){return"number"==typeof t||!!this.isStr(t)&&/^-?[0-9]+(\.[0-9]+)?$/.test(t)}static isInt(t){return!!this.isNum(t)&&(this.isStr(t)?/^-?[0-9]+$/.test(t):parseInt(t)===parseFloat(t))}static isBool(t){return"boolean"==typeof t||!!this.isStr(t)&&/^(true|false)$/.test(t)}static isFunc(t){return"function"==typeof t}static isRef(t){return null!=t&&"object"==typeof t}static isObj(t){return null!=t&&("object"==typeof t&&t.constructor===Object)}static isArr(t){return null!=t&&("object"==typeof t&&t.constructor===Array)}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||P.iso.test(t)}static isDate(t){return t instanceof Date||/^\d{4}-\d{2}-\d{2}$/.test(t)}static isTime(t){return t instanceof Date||/^\d{2}:\d{2}:\d{2}$/.test(t)}static isEqual(t,e){return t instanceof Node?t.isEqualNode(e):this.isRef(t)?Object.is(t,e):t===e}static iter(t){if(null==t)return{};let e={};for(const[r,i]of t.entries())e[r]=i;return e}static keys(t){return null==t?[]:(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!U().chrome)return Object.values(t);let e=this.keys(t);for(let r=0;r<e.length;r++)e[r]=t[e[r]];return e}static nodes(t){return Array.prototype.slice.call(t)}static props(t,e=[]){let r={};for(const i of Object.getOwnPropertyNames(t))e.length&&!v.has(e,i)&&(r[i]=t[i]);return r}static extend(t,e,r=["constructor"]){if(null==e)return{};let i=Object.getPrototypeOf(e);for(const n of Object.getOwnPropertyNames(e)){if(!r.length||v.has(r,n))continue;let s=Object.getOwnPropertyDescriptor(i,n);s||(s=Object.getOwnPropertyDescriptor(e,n)),s||s.get||s.set||(t[n]=e[n]),s&&(s.get||s.set)&&Object.defineProperty(t,n,s)}return t}static class(t,e=[]){return e=v.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=v.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return O.each(O.flattenForm(t),(t,r)=>{e.append(r,t)}),e}static each(t,e){if(!this.isRef(t))throw new Error("Iterate non object");for(let r of M.keys(t))e(t[r],r);return this}static len(t){return this.isArr(t)?t.length:this.isRef(t)?this.keys(t).length:this.string(t).length}static compare(t,e){return C.collator().compare(t,e)}static null(t,e=null){return"null"===t||this.isEmpty(t)?null:e}static arr(t){return this.isArr(t)?t:this.isStr(t)?(t=t.replace(/^@?\[?(.*?)]$/g,"$1"),v.each(t.split(","),t=>t.replace(/(^"|^'|'$|"$)/g,""))):[t]}static str(t){return this.isNix(t)||void 0===t.toString?String(t):t.toString()}static num(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),t):e}static int(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),Math.round(t)):e}static bool(t){return this.isRef(t)?!!this.vals(t).length:this.isNum(t)?0!==this.num(t):/^(true|yes)$/i.test(t)}}j($,"isPrimitive",(D=$).isPrim),j($,"isString",D.isStr),j($,"isNumber",D.isNum),j($,"isInteger",D.isInt),j($,"isBoolean",D.isBool),j($,"isFunction",D.isFunc),j($,"isReference",D.isRef),j($,"isObject",D.isObj),j($,"isArray",D.isArr),j($,"isIterable",D.isIter),j($,"length",D.len),j($,"array",D.arr),j($,"string",D.str),j($,"number",D.num),j($,"integer",D.int),j($,"boolean",D.bool),$.global=function(...t){return console.warn("Mix.global() is deprecated, use go() instead."),U(...t)},$.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),M.isObj(...t)},$.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),M.num(...t)},$.delay=function(...t){return console.warn("Mix.delay() is deprecated, use Run.delay() instead."),s.delay(...t)},$.async=function(...t){return console.warn("Mix.async() is deprecated, use Run.async() instead."),s.async(...t)},$.debounce=function(...t){return console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),s.debounce(...t)},$.throttle=function(...t){return console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),s.throttle(...t)},$.framerate=function(...t){return console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),s.framerate(...t)},$.convertString=function(...t){return console.warn("Mix.convertString() is deprecated, use Str.string() instead."),c.string(...t)},$.convertDatetime=function(...t){return console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),c.date(...t)},$.convertBool=function(...t){return console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),c.boolean(...t)},$.convertBoolean=function(...t){return console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),c.boolean(...t)};const M=$;const x=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],N=["8","9","a","b"],S=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class Y{static radix(t=60,e=null){return(e||this.RADIX)[this.number(t-1)]}static number(t=1024,e=0){return Math.floor(Math.random()*(t-e+1))+e}static make(t=6,e=62,r={}){let i="";for(let r=0;r<t;r++)i+=this.radix(e);for(const t of Object.keys(r))i=c.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?this.radix(N.length,N):this.radix(x.length,x);return e.substring(0,8)+"-"+e.substring(8,12)+"-"+t+e.substring(12,15)+"-"+e.substring(15,19)+"-"+e.substring(19,31)}static password(t=24,e=null){let r=[...this.RADIX,...e||S],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var T,k,H;T=Y,H=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],(k=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(k="RADIX"))in T?Object.defineProperty(T,k,{value:H,enumerable:!0,configurable:!0,writable:!0}):T[k]=H;const A=Y;class E{static bind(t,e,r={},i=!1){const n=[e,r,i];return M.isArr(t)?v.each(t,t=>this.bind(t,...n),this):(M.isPrim(r)&&(r={id:r}),this.$events=v.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){const r=[e];return M.isArr(t)?v.each(t,t=>this.unbind(t,...r),this):(M.isPrim(e)&&(e={id:e}),v.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return v.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){const r=[e];if(M.isArr(t))return v.each(t,t=>this.pause(t,...r),this);let i=v.find(this.$events,{event:t,options:e});return null!=i&&(i.paused=!0),this}static unpause(t,e={}){if(M.isArr(t))return v.each(t,t=>this.pause(t,...arguments),this);let r=v.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!1),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(E,"$events",[]);const I=E;function F(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class R{static has(t=void 0){return void 0===t||O.has(R.$text,t)}static get(t=void 0,e=null){return void 0===t?R.$text:O.get(R.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?R.$text=t:O.set(R.$text,t,e)}static code(t=null){return M.isNull(t)?M.isNull(C.$code)?(C.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),C.$code):C.$code:C.$code=t}static collator(){return M.isNull(C.$sort)?(C.$sort=new Intl.Collator(C.code(),{numeric:!0,sensitivity:"base"}),C.$sort):C.$sort}static replace(t,e=null){return null==e||O.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=O.get(R.$text,t,t),C.replace(t,e)}static choice(t,e=0,r={}){return t=O.get(R.$text,t,t),void 0===r.count&&(r.count=e),t=C.countpick(t.split("|"),e),C.replace(t,r)}static countpick(t,e=0){let r=t.length;return 3===r&&0===e?t[0]:3===r&&1===e?t[1]:3===r&&e>=2?t[2]:2===r&&1===e?t[0]:2===r&&1!==e?t[1]:t[0]}}F(R,"$text",{}),F(R,"$sort",void 0),F(R,"$code","en");const C=R;function L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function W(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?L(Object(r),!0).forEach(function(e){X(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function X(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const q={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class B{static global(){return null==globalThis.document?"":globalThis.document.cookie||""}static parse(t=!1){if(!t&&this.$cookie)return this.$cookie;this.$cookie={};let e=this.global().matchAll(q.entry);if(null==e)return this.$cookie;return v.each(Array.from(e),({groups:t})=>{this.$cookie[t.key]=t.value.replaceAll("{:}",";")}),this.$cookie}static get(t,e=null,r="string"){return this.$cookie||this.parse(),null==this.$cookie[t]?e:/^bool(ean)?$/.test(r)||/^num(ber)?$/.test(r)||/^int(eger)?$/.test(r)?M.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?Qt.parseOptions(this.$cookie[t]):M.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof ht||(r=ht.make(r||"+7 days")),i=W({expires:r.toUTC(),path:"/"},i),M.isRef(e)&&(e=Qt.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let n=t+"="+M.str(e).replaceAll(";","{:}");return v.each(i,(t,e)=>{n+=`;${e}=${t}`}),globalThis.document.cookie=n,this}static forget(t,e={}){e=W({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return v.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}X(B,"$cookie",void 0);const G=B;function U(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function J(){const t=U();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.safari&&(r.safari=/Safari\//.test(e)),null==r.firefox&&(r.firefox=/Firefox\//.test(e)),null==r.edge&&(r.edge=/Edge\//.test(e)),null==r.chrome&&(r.chrome=/Chrome\//.test(e)),t.piuag=r}function z(){const t=U();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.win&&(r.win=/Windows/.test(e)),null==r.osx&&(r.osx=/Macintosh|Mac OS X/.test(e)),null==r.gnu&&(r.gnu=/Linux/.test(e)),null==r.ios&&(r.ios=/iPhone|iPad|iPod/.test(e)),null==r.oid&&(r.oid=/Android/.test(e)),t.piudv=r}function _(t){const e=t[0];return v.each(t.slice(1),t=>{v.each(M.class(t),(t,r)=>{e[r]=t}),v.each(M.proto(t),(t,r)=>{e.prototype[r]=t})}),e}const Z={second:/([+-])([0-9]+)\s?seconds?/i,minute:/([+-])([0-9]+)\s?minutes?/i,hour:/([+-])([0-9]+)\s?hours?/i,date:/([+-])([0-9]+)\s?days?/i,month:/([+-])([0-9]+)\s?months?/i,year:/([+-])([0-9]+)\s?years?/i};class K{static test(t){return t instanceof Date}get(t){return"time"===t?this.value.getTime():/^seconds?$/i.test(t)?this.value.getSeconds():/^minutes?$/i.test(t)?this.value.getMinutes():/^hours?$/i.test(t)?this.value.getHours():/^days?$/i.test(t)?this.value.getDay():/^dates?$/i.test(t)?this.value.getDate():/^months?$/i.test(t)?this.value.getMonth()+1:/^years?$/i.test(t)?this.value.getFullYear():this}set(t,e){M.isNum(t)||(t=M.int(t));let r=this.value.getDay();return"day"===e&&(t=t+1-(r||7)),"time"===e&&this.value.setTime(t),/^seconds?$/i.test(e)&&this.value.setSeconds(t),/^minutes?$/i.test(e)&&this.value.setMinutes(t),/^hours?$/i.test(e)&&this.value.setHours(t),/^days?$/i.test(e)&&this.add(t,"date"),/^dates?$/i.test(e)&&this.value.setDate(t),/^months?$/i.test(e)&&this.value.setMonth(t-1),/^years?$/i.test(e)&&this.value.setFullYear(t),this}time(t=null){return null==t?this.get("time"):this.set(t,"time")}second(t=null){return null==t?this.get("second"):this.set(t,"second")}minute(t=null){return null==t?this.get("minute"):this.set(t,"minute")}hour(t=null){return null==t?this.get("hour"):this.set(t,"hour")}day(t=null){return null==t?this.get("day"):this.set(t,"day")}date(t=null){return null==t?this.get("date"):this.set(t,"date")}month(t=null){return null==t?this.get("month"):this.set(t,"month")}year(t=null){return null==t?this.get("year"):this.set(t,"year")}shortyear(){return this.get("year").toString().slice(-2)}add(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)+M.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-M.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return M.isEmpty(t)||O.each(Z,(e,r)=>{c.match(t,e,([t,e,i])=>{"+"===e?this.add(i,r):this.sub(i,r)})}),this}apply(t,e="YYYY-MM-DD HH:mm:ss",r=[]){t=ht.make(t,e);for(const e of r)this.set(t.get(e),e);return this}applyDate(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["date","month","year"])}applyTime(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["hour","minute","second"])}}K.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},K.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},K.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},K.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},K.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},K.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},K.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},K.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},K.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},K.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},K.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},K.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},K.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},K.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},K.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},K.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Q={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm",LT:"HH:mm",LTS:"HH:mm:ss",LTSD:"DD/MM/YYYY HH:mm:ss"},V={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class tt{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in V)t=c.replace(t,V[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return M.isTime(t)&&(e="HH:mm:ss"),M.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):M.isIsoDate(t)?(this.value=new Date(t),this):this.parseFormat(t,e)}parseFormat(t,e){if(!this.isParsable(t,e))return this.value=new Date(NaN),this;for(const r in V)this.set(c.extract(t,V[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return O.has(Q,t)&&(t=C.$text[t]??Q[t]),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("dddd",()=>this.human("day"))).replace("ddd",()=>this.human("day",3))).replace("dd",()=>this.human("day",2))).replace("MMMM",()=>this.human("month"))).replace("MMM",()=>this.human("month",3))).replace("YYYY",()=>c.integer(this.year(),4))).replace("MM",()=>c.integer(this.month(),2))).replace("DD",()=>c.integer(this.date(),2))).replace("HH",()=>c.integer(this.hour(),2))).replace("mm",()=>c.integer(this.minute(),2))).replace("ss",()=>c.integer(this.second(),2))).replace("YY",()=>c.integer(this.shortyear(),2))).replace("X",()=>c.integer(this.time()))).replace("x",()=>c.integer(this.time()/1e3))}code(t="X"){return M.int(this.format(t))}}class et{before(t=null,e="x"){return this.code(e)<ht.make(t).code(e)}beforeDate(t=null,e="YYYYMMDD"){return this.before(t,e)}beforeTime(t=null,e="HHmmss"){return this.before(t,e)}after(t=null,e="x"){return this.code(e)>ht.make(t).code(e)}afterDate(t=null,e="YYYYMMDD"){return this.after(t,e)}afterTime(t=null,e="HHmmss"){return this.after(t,e)}equal(t=null,e="x"){return t instanceof ht||(t=ht.make(t)),this.code(e)===t.clone().code(e)}equalDate(t=null,e="YYYYMMDD"){return this.equal(t,e)}equalTime(t=null,e="HHmmss"){return this.equal(t,e)}between(t=null,e=null,r="YYYYMMDD"){let i=[ht.make(t),ht.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class rt{grid(t="day"){if(/^seconds?$/i.test(t))return this.getSecondsGrid();if(/^minutes?$/i.test(t))return this.getMinutesGrid();if(/^hours?$/i.test(t))return this.getHoursGrid();if(/^days?$/i.test(t))return this.getDaysGrid();if(/^dates?$/i.test(t))return this.getDatesGrid();if(/^months?$/i.test(t))return this.getMonthsGrid();if(/^years?$/i.test(t))return this.getYearsGrid();if(/^decades?$/i.test(t))return this.getDecadesGrid();throw new Error(`Invalid grid scope type "${t}".`)}getSecondsGrid(t=1){return null==t&&(t=1),v.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),v.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),v.make(24/t,e=>this.clone().hour(e*t))}getDaysGrid(){let t=[this.first("date").first("day"),this.last("date").last("day")];return t[0].range(t[1],"date")}getDatesGrid(){let t=[this.first("date"),this.last("date")];return t[0].range(t[1],"date")}getMonthsGrid(){let t=[this.first("month"),this.last("month")];return t[0].range(t[1],"month")}getYearsGrid(){let t=[this.first("year"),this.clone().last("year")];return t[0].range(t[1],"year")}getDecadesGrid(){let t=[this.first("decade"),this.clone().last("decade")];return t[0].range(t[1],"decade")}}rt.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},rt.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},rt.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},rt.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},rt.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},rt.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class it{prev(t="date"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().sub(10,"year"):this.clone().sub(1,t)}next(t="day"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().add(10,"year"):this.clone().add(1,t)}prevSecond(){return this.prev("second")}nextSecond(){return this.next("second")}prevMinute(){return this.prev("minute")}nextMinute(){return this.next("minute")}prevHour(){return this.prev("hour")}nextHour(){return this.next("hour")}prevDate(){return this.prev("date")}nextDate(){return this.next("date")}prevMonth(){return this.prev("month")}nextMonth(){return this.next("month")}prevYear(){return this.prev("year")}nextYear(){return this.next("year")}prevDecade(){return this.prev("decade")}nextDecade(){return this.next("decade")}first(t="date"){if(/^seconds?$/i.test(t))return this.firstSecond();if(/^minutes?$/i.test(t))return this.firstMinute();if(/^hours?$/i.test(t))return this.firstHour();if(/^days?$/i.test(t))return this.firstDay();if(/^dates?$/i.test(t))return this.firstDate();if(/^months?$/i.test(t))return this.firstMonth();if(/^years?$/i.test(t))return this.firstYear();if(/^decades?$/i.test(t))return this.firstDecade();throw new Error(`Invalid first scope type "${t}".`)}last(t="date"){if(/^seconds?$/i.test(t))return this.lastSecond();if(/^minutes?$/i.test(t))return this.lastMinute();if(/^hours?$/i.test(t))return this.lastHour();if(/^days?$/i.test(t))return this.lastDay();if(/^dates?$/i.test(t))return this.lastDate();if(/^months?$/i.test(t))return this.lastMonth();if(/^years?$/i.test(t))return this.lastYear();if(/^decades?$/i.test(t))return this.lastDecade();throw new Error(`Invalid last scope type "${t}".`)}firstSecond(){return this.clone().set(0,"second")}lastSecond(){return this.clone().set(59,"second")}firstMinute(){return this.clone().set(0,"minute")}lastMinute(){return this.clone().set(59,"minute")}firstHour(){return this.clone().set(0,"hour")}lastHour(){return this.clone().set(23,"hour")}firstDay(){return this.clone().set(0,"day")}lastDay(){return this.clone().set(6,"day")}firstDate(){return this.clone().set(1,"date")}lastDate(){return this.clone().next("month").set(0,"date")}firstMonth(){return this.clone().set(1,"month")}lastMonth(){return this.clone().set(12,"month")}nthYear(t=0){let e=10*Math.floor(this.year()/10);return this.clone().set(e+t,"year")}firstYear(){return this.nthYear(0)}lastYear(){return this.nthYear(9)}nthDecade(t=0){let e=100*Math.floor(this.year()/100);return this.clone().set(e+10*t,"year")}firstDecade(){return this.nthDecade(0)}lastDecade(){return this.nthDecade(9)}}class nt{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],n=[this.clone(),ht.make(t)];n[0].afterDate(n[1])&&(n=n.reverse()),n[1].add(1,e);for(let t=n[0];!t.equal(n[1],r);t=t.next(e))v.append(i,t);return i}}nt.prototype.getDatesRange=function(...t){return console.warn("Now.getDatesRange() is deprecated, use Now.range() instead."),this.range(...t)};const st=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ot=["January","February","March","April","May","June","July","August","September","October","November","December"];class lt{human(t="day",e=null){return/^days?$/i.test(t)?this.getHumanDay(e):/^months?$/i.test(t)?this.getHumanMonth(e):this.get(t)}getHumanDay(t=null){let e=this.day()-1;if(!st[e])throw new Error(`Invalid day number "${e}".`);let r=C.trans(st[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!ot[e])throw new Error(`Invalid month number "${e}".`);let r=C.trans(ot[e]);return null!=t&&(r=r.substring(0,t)),r}}function at(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ut=[K,tt,et,rt,it,nt,lt];class ct extends(_(ut)){constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){super(),at(this,"input",null),at(this,"value",null),"now"===t&&(t=null);let r=t;return t&&t.toDate&&(t=t.toDate()),t instanceof Date||(t=new Date),this.input=t,M.isNix(r)&&(this.input=r),this.value=t,M.isStr(r)&&this.parse(r,e),v.each(ht.init,t=>{t.call(this,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new ht(t,e)}reset(t=null){return null==t&&(t={month:!0,day:!0,time:!0}),t.month&&this.value.setMonth(0),t.day&&this.value.setDate(1),t.time&&this.value.setHours(0,0,0),this}clone(){return new ht(new Date(this.value),null)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}at(ct,"init",[]),ct.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const ht=ct;class dt{static filterNodes(t,e=1){return v.filter(M.nodes(t),t=>t.nodeType===e)}static getNodePoint(t){t.touches?.[0]&&(t=t.touches[0]);let[e,r]=[null,[t.clientX,t.clientY]];return null!=Rt.doc().elementsFromPoint&&(e=document.elementsFromPoint(r[0],r[1])),null!=Rt.doc().msElementsFromPoint&&(e=document.msElementsFromPoint(r[0],r[1])),e}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=Rt.getNodePoint(e)),M.isArr(r)&&(r=v.first(r)),null==r&&(r=e.target),r.closest(t)}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?Rt.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?Rt.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?Rt.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=M.nodes(this.el.childNodes);return-1===t?r:v.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=Rt.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>Rt.find(e).is(t)),v.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!Rt.find(e).is(t)),v.filter(this.els,t)}find(t){if(null==this.el)return Rt.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return M.isStr(r)&&(r=e.querySelectorAll(t)),Rt.find(r)}get(t=-1){let e=this.els;return-1===t?e:v.get(e,t)}first(t=0){return this.get(t)}last(t=1){return v.get(this.els,this.els.length-t)}each(t){return v.each(this.els,t)}loopParent(t,e=null){null==e&&(e=Rt.win());for(let r=this.el;r&&r!==e;r=r.parentNode)t.call({},r);return this}parent(){let t=this.getNodeParent();return null==t?Rt.find(null):t}child(t=null,e=1){for(let r of this.childs(t,e))return Rt.find(r);return Rt.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:v.filter(r,e=>Rt.find(e).is(t))}closest(t){if(this.el===t)return this.el;for(let e=this;null!=e.el;e=e.getNodeParent())if(e.is(t))return e.el;return null}upnode(t){return Rt.find(this.closest(t))}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return Rt.find(e);return Rt.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return Rt.find(e);return Rt.find(null)}length(){return this.els.length}is(t,e=!1){if(this.el===t)return!0;if(null==this.el)return e;for(let e of this.parent().find(t).get())if(e===this.el)return!0;return!1}matches(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.find(t).get())if(e===this.el)return!0;return!1}empty(){return this.length()<1||null==this.el}visible(){return null!=this.el&&this.el.is(":visible")}above(t){return this.parent().is(t)}inside(t){return null!=this.closest(t)}contains(t){return this.el.contains(t)}}dt.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},dt.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},dt.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},dt.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},dt.prototype.getNot=()=>{console.error("Dom.getNot() is not implemented anymore.")};class ft{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class pt{bind(t,e,r,i=null,n=!1,s={}){M.isPrim(s)&&(s={id:s}),Rt.$events=v.append(Rt.$events,{el:t,event:e,cb:r,selector:i,pause:n,options:s}),console.log(this.els,t);try{t.addEventListener(e,r,s)}catch(e){console.log("ERRROR",this.els,t,e)}return this}unbind(t,e,r=null,i={}){M.isPrim(i)&&(i={id:i});let n=v.filterIndex(Rt.$events,{el:t,event:e,selector:r,options:i});if(0===n.length)return this;return v.each(n.reverse(),r=>{var i;t.removeEventListener(...(i=Rt.$events[r],[e,i.cb,i.options]))}),v.splices(Rt.$events,n),this}on(t,e,r={},i=!1,n=null){M.isPrim(r)&&(r={id:r});const s=[e,r,i,n];if(M.isArr(t))return v.each(t,t=>this.on(t,...s)),this;let o=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,o,n,i,r)}),this}off(t,e=null,r={}){M.isPrim(r)&&(r={id:r});const i=[e,r];return M.isArr(t)?(v.each(t,t=>this.off(t,...i)),this):(M.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}optoff(t={}){return s.async(()=>{v.filterRemove(Rt.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),this}once(t,e,r={}){return r.id=A.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},n=!1){return this.on(t,function(t){let i=Rt.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,n,e),this}fire(t,e={}){let r=new CustomEvent(t,{detail:e});return this.each(t=>{t.dispatchEvent(r)}),this}pointerdown(t=1){const e=this.rect(),[r,i]=[e.left+e.width/2,e.top+e.height/2],n=new PointerEvent("pointerdown",{view:window,bubbles:!0,cancelable:!0,buttons:1,clientX:r,clientY:i});return this.each(t=>{t.dispatchEvent(n)}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(pt,"$events",[]),pt.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},pt.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},pt.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},pt.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class mt{static make(t,e={}){t instanceof Rt&&(t=t.el),M.isStr(t)&&(t=document.createElement(t)),t=O.assign(t,e);let r=new Rt(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return Rt.find(t).each(t=>{null!=t.prepend&&t.prepend(this.el)}),this}append(t){return this.each(e=>{null!=e.append&&e.append(t)}),this}appendTo(t){return Rt.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class gt{static getDomState(){return document.readyState}static isDomReady(){return"complete"===Rt.getDomState()}static isDomComplete(){let t=Rt.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,n,o]=[A.make(),Rt.find(document),"DOMContentLoaded"],l=()=>{s.delay(t,e),n.off(o,null,{id:i})},a=Rt.isDomReady;return a()?(s.wait(()=>{if(a())return l(),!0},10,r),this):(n.on(o,l,{id:i}),this)}static complete(t,e=0,r=6e3){let i=()=>{s.delay(t,e)},[n,o]=[Rt.find(document),"load"],l=Rt.isDomComplete;return l()?(s.wait(()=>{l()&&i()},10,r),this):(n.on(o,i),this)}isNodeComplete(){return null!=this.el&&(!!this.el.naturalWidth||(!!this.el.naturalHeight||!!this.el.complete))}loaded(t,e=6e3){if(!this.el)return this;let r=this.isNodeComplete;return s.wait(()=>{if(r.call(this))return t(),!0},10,e),this}}gt.required=()=>{console.error("Dom.required() is not implemented anymore.")};function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach(function(e){vt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function vt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class wt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),M.num(t,0)}rect(t={left:0,top:0,width:0,height:0}){if(!this.el.getBoundingClientRect)return t;const e=this.el.getBoundingClientRect();return null==e?t:e.toJSON()}margin(t=null,e=0){let r=this.computed(),i={top:Rt.num(r.marginTop),right:Rt.num(r.marginRight),bottom:Rt.num(r.marginBottom),left:Rt.num(r.marginLeft)};return null==t?i:O.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:Rt.num(r.paddingTop),right:Rt.num(r.paddingRight),bottom:Rt.num(r.paddingBottom),left:Rt.num(r.paddingLeft)};return null==t?i:O.get(i,t,e)}height(){return null==this.el?0:this.el instanceof Window?this.el.innerHeight:this.el.offsetHeight}clientHeight(){return null==this.el?0:Rt.num(this.computed("height",0))}scrollHeight(){return null==this.el?0:this.el.scrollHeight}innerHeight(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerHeight;let t=this.padding();return this.el.offsetHeight-t.top-t.bottom}realHeight(t={}){let e="auto";return this.actual(()=>e=this.height(),t),e}evaluateHeight(t=null,e=!0){null===(t=Rt.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerHeight()},{display:"none"}),!0===e&&this.style({height:r+"px"}),r}width(){return null==this.el?0:this.el instanceof Window?this.el.innerWidth:this.el.offsetWidth}clientWidth(){return null==this.el?0:Rt.num(this.computed("width",0))}scrollWidth(){return null==this.el?0:this.el.scrollWidth}innerWidth(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerWidth;let t=this.padding();return this.el.offsetWidth-t.left-t.right}realWidth(t={}){let e="auto";return this.actual(()=>e=this.width(),t),e}evaluateWidth(t=null,e=!0){null===(t=Rt.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerWidth()},{display:"none"}),!0===e&&this.style({width:r+"px"}),r}offset(t=null,e=null){let r=this.getOffset(e);return null==t?r:O.get(r,t,0)}offsetTop(t=null){return this.offset("top",t)}offsetBottom(t=null){return this.offset("bottom",t)}offsetLeft(t=null){return this.offset("left",t)}offsetRight(t=null){return this.offset("right",t)}loopOffset(t,e=null){null==e&&(e=Rt.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:Rt.body().scrollWidth-t.left-e,bottom:Rt.body().scrollHeight-t.top-r};return bt(bt({},t),i)}getOffset(t=null){null==t&&(t=Rt.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=Rt.num(t.offsetTop,0),r.left+=Rt.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=Rt.find(t),n={top:0,left:0,bottom:0,right:0};return e=t=>{n.top+=Rt.num(t.offsetTop,0),n.left+=Rt.num(t.offsetLeft,0)},i.loopOffset(e),n=this.calcOffset(n,i.scrollWidth(),i.scrollHeight()),{top:r.top-n.top,bottom:r.bottom-n.bottom,left:r.left-n.left,right:r.right-n.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:O.get(r,t,0)}scrollTop(t=null,e=null){return null==t?this.scroll("top",e):(this.each(e=>{e.scrollTop=t}),this)}scrollLeft(t=null,e=null){return null==t||this.each(e=>{e.scrollLeft=t}),this.scroll("left",e)}getScroll(t=null){null==t&&(t=Rt.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=Rt.num(t.scrollTop||t.pageYOffset||0),r.left+=Rt.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=Rt.num(t.scrollTop||t.pageYOffset||0),i.left+=Rt.num(t.scrollLeft||t.pageXOffset||0)},Rt.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}wt.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},wt.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},wt.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function Ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Pt{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return M.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(M.isArr(e)&&(e=e.join(" ")),M.isObj(e)&&(e=Qt.castOptions(e)),this.el.setAttribute(t,e),this)}data(t,e=void 0,r=null){return this.attr("data-"+t,e,r)}computed(t=null,e=null){if(null==this.el)return e;if(1!==this.getNodeType())return e;let r=getComputedStyle(this.el);return null==t?r:O.get(r,t,e)}style(t=void 0,e=!0){if(null==this.el)return this;if(null===t)return this.attr("style",null);let r=this.attr("style",void 0,{});return M.isStr(r)&&(r=Qt.parseOptions(r)),M.isUndef(t)?r:(e&&(t=Dt(Dt({},r),t)),t.translate&&(t.transform=`translate3d(${t.translate.join(",")}, 0)`),delete t.translate,M.isNum(t.top)&&(t.top+="px"),M.isNum(t.left)&&(t.left+="px"),M.isNum(t.width)&&(t.width+="px"),M.isNum(t.height)&&(t.height+="px"),this.attr("style",t),this)}class(t=void 0,e=!1){if(null==this.el)return this;if(null===t)return this.attr("class","");let r=this.attr("class",void 0,[]);return M.isStr(r)&&(r=r.split(" ")),M.isUndef(t)?r:(e&&(t=[...r,...t]),this.attr("class",t),this)}html(t=void 0){return void 0===t?this.el.innerHTML:(this.each(e=>{e.innerHTML=t}),this)}actual(t,e=null){let r=this.attr("style");this.style(e);let i=t(this.el,this.el);return this.attr("style",r),i}hasClass(t){return M.isArr(t)||(t=[t]),v.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Rt.find(e).addClass(t));let e=this.el.className.split(" ");return M.isStr(t)&&(t=t.split(" ")),e=v.append(e,...t),this.el.className=v.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Rt.find(e).remClass(t));let e=this.el.className.split(" ");return M.isStr(t)&&(t=t.split(" ")),e=v.diff(e,t),this.el.className=v.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>Rt.find(e).toggleClass(t)):this.hasClass(t)?this.remClass(t):this.addClass(t)}stateClass(t,e=!0){return this.els.length>1?this.each(e=>Rt.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}Pt.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},Pt.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function $t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(r),!0).forEach(function(e){xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function xt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Nt{static inviewMaxY(t,e=null){if(M.isString(t)&&(t={el:t}),!(t=Mt(Mt({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewY() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Rt.find(t.el).each(t=>{(t=>Rt.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:v.first(i)}static inviewMaxX(t,e=null){if(M.isString(t)&&(t={el:t}),!(t=Mt(Mt({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewX() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Rt.find(t.el).each(t=>{(t=>Rt.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:v.first(i)}viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[Rt.win().innerWidth,this.width()],[r,i]=[this.offset("left"),this.parent().scroll("left")];return{left:Math.max(0,r-i),right:Math.max(0,t-(r+e-i))}}inviewX(t=null){let{left:e,right:r}=Rt.find(t).viewoffY(),[i,n]=[Rt.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.max(0,l)}inratioX(t=null){return 1/this.width()*this.inviewX(t)}isInviewX(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewX(r)>t:this.inratioX(r)>t}viewoffY(){if(null==this.el)return{top:0,bottom:0};let[t,e]=[Rt.win().innerHeight,this.height()],[r,i]=[this.offset("top"),this.parent().scroll("top")];return{top:Math.max(0,r-i),bottom:Math.max(0,t-(r+e-i))}}inviewY(t=null){let{top:e,bottom:r}=Rt.find(t).viewoffY(),[i,n]=[Rt.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.min(Math.max(0,l),i)}inratioY(t=null){return 1/this.height()*this.inviewY(t)}isInviewY(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewY(r)>t:this.inratioY(r)>t}}Nt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},Nt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class St{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=Rt.doc().title),document.title=C.replace(e,{value:t,title:this.$meta.title}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(St,"$meta",{}),St.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),Rt.setMetaTitle(t));class Yt{}function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tt(Object(r),!0).forEach(function(e){Ht(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function Ht(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class At{popover(t,e="botttom-center",r={}){return/^(top|bottom)-/.test(e)?this.popoverY(t,e,r):/^(left|right)-/.test(e)?this.popoverX(t,e,r):void 0}popoverY(t,e="bottom-center",r={}){t=Rt.find(t);let[i,n]=[t.rect(),this.rect()];r.x&&(i=kt(kt({},i),{},{left:r.x,width:1})),r.y&&(i=kt(kt({},i),{},{top:r.y,height:1})),r.width;let[s,o]=[{x:0,y:0},i.width-n.width];/^top-/.test(e)&&(s.y=i.top-n.height),/^bottom-/.test(e)&&(s.y=i.top+i.height),/-start$/.test(e)&&(s.x=i.left),/-center$/.test(e)&&(s.x=i.left+.5*o),/-end$/.test(e)&&(s.x=i.left+o);let l=e;/^top-/.test(e)&&(l=l.replace(/^top-/,"bottom-")),/^bottom-/.test(e)&&(l=l.replace(/^bottom-/,"top-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y||s.y<0;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverY(t,l,c);return u&&r.offset&&(s=r.offset),s.y<0&&(s.y=0),s.y+n.height>a.height&&(s.y=a.height-n.height),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverX(t,e="left-center",r={}){t=Rt.find(t);let[i,n]=[t.rect(),this.rect()];r.height;let[s,o]=[{x:0,y:0},i.height-n.height];/^left-/.test(e)&&(s.x=i.left-n.width),/^right-/.test(e)&&(s.x=i.left+i.width),/-start$/.test(e)&&(s.y=i.top),/-center/.test(e)&&(s.y=i.top+.5*o),/-end/.test(e)&&(s.y=i.top+o);let l=e;/^left-/.test(e)&&(l=l.replace(/^left-/,"right-")),/^right-/.test(e)&&(l=l.replace(/^right-/,"left-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverX(t,l,c);return u&&r.offset&&(s=r.offset),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverNormalize(t,e,r,i){const n=Rt.find(document.body).scroll();t.y<0&&(t.y=0),t.y+e.height>i.y&&(t.y=i.y-e.height),t.x<0&&(t.x=0);const s=document.body.clientWidth;return t.x+e.width>i.x&&(t.x=i.x-e.width-(i.x-s)),t={x:t.x+n.left,y:t.y+n.top},O.each(t,(e,r)=>{t[r]=Math.round(e)}),t.self={width:e.width,height:e.height},t.rect={width:r.width,height:r.height},t}}function Et(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const It=[dt,gt,ft,pt,mt,wt,Pt,Nt,St,Yt,At];class Ft extends(_(It)){constructor(t,...e){return super(t,...e),Et(this,"el",null),Et(this,"els",[]),"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=M.nodes(t)),t instanceof Rt&&(t=t.el),M.isArr(t)||(t=[t]),this.el=t[0],this.els=t,this}static find(t,...e){return new Rt(t,...e)}static extend(t){t.call({},this)}static win(){return null==globalThis.window?{}:window}static doc(){return null==globalThis.document?{}:document}static body(){return this.doc().body?this.doc().body:{}}}Et(Ft,"init",[]);const Rt=Ft,Ct=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>M.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>M.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>M.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>M.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Lt=[{match:t=>M.isArr(t),parse:t=>JSON.stringify(t)}];class Wt{static keyed(t,e=null){return M.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!M.isStr(t))return e;t=t.replace(/(^"|^'|'$|"$)/g,"");for(let e of r)if(e.match(t))return e.parse(t);for(let e of Ct)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),M.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Lt)if(e.match(t))return e.parse(t);return M.str(t)}}const Xt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class qt{static castParams(t={}){if(M.isEmpty(t))return"";return v.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!M.isRef(e))return M.str(t)+"="+Qt.casted(e,!0);return v.each(e,(r,i)=>this.castParam(M.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(M.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Xt.entry);if(null==e)return{};const[r,i]=[Qt.keyed,Qt.parsed];return v.reduce(Array.from(e),(t,{groups:e})=>O.set(t,r(e.key),i(e.val)),{})}}const Bt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Gt{static castOptions(t={},e=!0){if(M.isEmpty(t))return"";return v.each(t,(t,r)=>this.castOption(r,t,null,e)).join(e?"; ":";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let n=i?": ":":";return M.isObj(e)?v.map(e,(e,r)=>this.castOption(r,e,t,i)).join(i?"; ":";"):M.str(t)+n+Qt.casted(e,!1)}static parseOptions(t){if(M.isEmpty(t))return{};let e=t.matchAll(Bt.entry);if(null==e)return{};const[r,i]=[Qt.keyed,Qt.parsed];return v.reduce(Array.from(e),(t,{groups:e})=>O.set(t,r(e.key),i(e.val)),{})}}const Ut=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Jt{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),v.each(Ut,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const zt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class _t{static filesize(t,e=1){M.isNum(t)||(t=M.num(t,0));let r=r=>m.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<zt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+zt[e];return r(zt.length)}}const Zt=[Wt,qt,Gt,Jt,_t];class Kt extends(_(Zt)){static extend(t){t.call({},this)}}const Qt=Kt;class Vt{static has(t){return O.has(this.$data,v.first(t))}static set(t,e){let[r,i]=[null,v.first(t)];O.has(this.$data,i)&&(r=O.get(this.$data,i)),M.isEqual(r,e)||(O.set(this.$data,i,e),I.fire("store:"+i,e,i))}static unset(t){O.unset(this.$data,[...v.first(t)])}static get(t,e=null,r=!1){let i=v.first(t);if(!O.has(this.$data,i)&&!r)return e;O.has(this.$data,i)&&r&&O.set(this.$data,i,e);let n=O.get(this.$data,i,e);return M.isObj(n)?O.clone(n):n}static find(t,e,r=null){let i=v.first(t);if(!1===O.has(this.$data,i))return r;if(!1===O.has(e,"id"))return r;let n=v.findIndex(this.get(i),{id:e.id});return-1===n?r:this.get(i+"."+n)}static replace(t,e){let r=v.first(t);if(!1===O.has(this.$data,r))return;if(!1===O.has(e,"id"))return;let i=v.findIndex(this.get(r),{id:m.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,v.merge(this.get(t,[]),e))}static remove(t,...e){this.set(t,v.diff(this.get(t,[]),e))}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Vt,"$data",{});const te=Vt;class ee{static set(t,e){this.$routes[t]=e}static get(t,e=null,r=null){let i=t;return/^https?:\/\//.test(i)||(i=this.$routes[t]||t),O.each(e,(t,e)=>{i=i.replace(new RegExp("{"+e+"}","g"),t)}),M.isEmpty(r)||(i+="?"+Qt.castParams(r)),i}static goto(t,e=null,r=null){window.location.href=this.get(t,e,r)}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ee,"$routes",{});const re=ee,ie=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>M[e](...t)}}),ne=new Proxy({},{get:function(t,e){return console.warn(`Event.${e} is deprecated, use Signal.${e}() instead.`),(...t)=>I[e](...t)}}),se=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),A.make()};globalThis.pi=r,globalThis.addEventListener&&globalThis.addEventListener("beforeunload",()=>{v.map(Rt.$events,({el:t,cb:e,event:r})=>(t.removeEventListener(r,e),null))});var oe=window;for(var le in e)oe[le]=e[le];e.__esModule&&Object.defineProperty(oe,"__esModule",{value:!0})})();
|
|
1
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var i in r)t.o(r,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:r[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={},r={};function i(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}t.r(r),t.d(r,{Any:()=>ie,Arr:()=>v,Cookie:()=>G,Data:()=>te,Dom:()=>Ct,Event:()=>ne,For:()=>Qt,Hash:()=>H,Locale:()=>R,Mix:()=>M,Now:()=>ht,Num:()=>m,Obj:()=>O,Route:()=>re,Run:()=>s,Signal:()=>I,Str:()=>c,UUID:()=>se,browser:()=>J,device:()=>z,go:()=>U,trait:()=>_});class n{static interval(t,e=0){const r=setInterval(()=>{t()},e);return()=>clearInterval(r)}static clear(t){return M.isArr(t)?v.each(t,t=>this.clear(t),this):M.isFunc(t)?(t(),this):(clearTimeout(t),clearInterval(t),this)}static tryin(t){try{t()}catch(t){}return this}static wait(t,e=0,r=500){let i,n;return n=setTimeout(()=>{this.clear([i,n])},e*r),i=setInterval(()=>{t()&&this.clear([n,i])},e),()=>clearInterval(i)}static frame(t){const e=requestAnimationFrame(()=>{t()});return()=>cancelAnimationFrame(e)}static async(t){const e=setTimeout(()=>{t()});return()=>clearTimeout(e)}static delay(t,e=0){let r=setTimeout(()=>{t()},e);return()=>clearTimeout(r)}static debounce(t,e=100){let r=null;return(...i)=>{r&&clearTimeout(r),r=setTimeout(()=>{this.frame(()=>t(...i))},e)}}static throttle(t,e=100){let r,i=null;return(...n)=>{i&&clearTimeout(i),i=setTimeout(()=>{r=!1},e),r||(this.frame(()=>t(...n)),r=!0)}}static framerate(t,e=30,r=!0){let i,n=0,s=1e3/e;const o=(...e)=>{if(clearTimeout(i),Date.now()-n<=s)return r&&(i=setTimeout(o,s+1));this.frame(()=>t(...e)),n=Date.now()};return o}static framebuffer(t,e,r=1e3){const i={key:e,cb:t,priority:r,args:[],active:!1};return v.add(this.$buffer,i),(t,...e)=>{/^drag/.test(t.type)&&t.preventDefault(),O.assign(i,{args:[t,...e],active:!0}),this.runFramebuffer()}}static runFramebuffer(){if(this.$idler&&clearTimeout(this.$idler),this.$idler=setTimeout(()=>{this.runFramebuffer()},50),Date.now()-this.$timer<50)return;this.$idler&&clearTimeout(this.$idler),this.$timer=Date.now();let t=v.filter(this.$buffer,{active:!0});0!==t.length&&(t=v.sort(t,"priority"),v.each(t.reverse(),t=>{t.cb(...t.args),t.active=!1}))}}i(n,"$idler",null),i(n,"$timer",0),i(n,"$buffer",[]);const s=n;var o;function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function a(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class u{static get(t,e){return M.isStr(t)||(t=M.str(t)),M.isInt(e)&&(e=M.int(e)),t.charAt(e)}static set(t,e,r=""){return M.isStr(t)||(t=M.str(t)),M.isInt(e)&&(e=M.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){M.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){M.isNull(r)&&(r=t);let i=this.range(r,e);return null===i?null:this.slice(t,...i)}static match(t,e,r=null){let i=M.str(t).match(e);return M.isEmpty(i)?[]:M.isFunc(r)?r(i):i}static regex(t){return M.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return M.str(t).toUpperCase()}static ucfirst(t){return M.str(t).charAt(0).toUpperCase()+t.slice(1)}static lc(t){return M.str(t).toLowerCase()}static lcfirst(t){return M.str(t).charAt(0).toLowerCase()+t.slice(1)}static cc(t){return v.each(Qt.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return Qt.slugify(t)}static sc(t){return Qt.slugify(t).replace("-","_")}static pc(t){return v.each(Qt.slugify(t).split("-"),t=>this.ucfirst(t)).join("")}static has(t,e){return-1!==this.lc(t).indexOf(this.lc(e))}static range(t,e,r=null){let i=M.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return M.str(t).slice(e,r)}static string(t,e="-",r=!1){return M.isEmpty(t)?e:(t=M.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return M.isEmpty(t)?i:M.bool(t)?e:r}static number(t,e=null,r=null,i={}){return M.isNum(t)?(null==r&&(r=R.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}({maximumFractionDigits:12},i),null!=e&&(i.minimumFractionDigits=e,i.maximumFractionDigits=e),M.num(t).toLocaleString(r,i)):M.str(t)}static integer(t,e=0,r="0"){return M.isNum(t)?(M.isInt(t)||(t=M.int(t)),t=M.int(t),e?M.str(t).padStart(e,r):M.str(t)):M.str(t)}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return M.isDate(t)||(t=ht.make(t)),t.valid()?t.format(e):r}static date(t,e="YYYY-MM-DD",r="-"){return this.datetime(t,e,r)}static time(t,e="HH:mm:ss",r="-"){return this.datetime(t,e,r)}static objectify(t,e="options",r=!1){return M.isRef(t)?t:("params"===e&&(t=Qt.parseParams(t)),"options"===e&&(t=Qt.parseOptions(t)),M.isRef(t)||(t=JSON.parse(t)),r?M.vals(t):t)}static stringify(t,e="options"){return M.isStr(t)?t:"params"===e?Qt.castParams(t):"options"===e?Qt.castOptions(t):JSON.stringify(t)}}a(u,"upper",(o=u).uc),a(u,"lower",o.lc),a(u,"camelcase",o.cc),a(u,"kebabcase",o.kc),a(u,"snakecase",o.sc),a(u,"pascalcase",o.pc),u.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),c.regex(...t)),u.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),c.pc(...t)),u.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),Qt.slugify(...t)),u.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),Qt.castOptions(...t)),u.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),Qt.parseOptions(...t)),u.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),Qt.castParams(...t)),u.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),Qt.parseParams(...t)),u.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),Qt.filesize(...t)),u.real=()=>{console.error("Str.real() is not implemented anymore.")},u.array=()=>{console.error("Str.array() is not implemented anymore.")};const c=u;function h(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function d(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?h(Object(r),!0).forEach(function(e){f(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class p{static fixed(t,e=2){return M.isNum(t)||(t=M.num(t)),t.toFixed(e)}static float(t){return M.isNum(t)||(t=M.num(t)),parseFloat(t)}static int(t){return M.isNum(t)||(t=M.num(t)),parseInt(t)}static ceil(t){return M.isNum(t)||(t=M.num(t)),Math.ceil(t)}static floor(t){return M.isNum(t)||(t=M.num(t)),Math.floor(t)}static round(t){return M.isNum(t)||(t=M.num(t)),Math.round(t)}static combine(t){return v.reduce(t,(t,e)=>t+e,0)}static subtract(t){return v.reduce(t,(t,e)=>t-e,0)}static decade(t){return M.isNum(t)||(t=M.num(t)),10*Math.floor(t/10)}static matrix(t,e=[]){M.isNum(t)||(t=M.num(t));let r=0;for(let i=20;i>=0;i--)t>=(r=Math.pow(2,i))&&(e.push(r),t-=r);return e}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[d(d({},i),t),d(d({},i),e)];let n=Math.PI*this.float(t.lat)/180,s=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(n)*Math.sin(s),Math.cos(n)*Math.cos(s)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}p.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),c.number(t,e[2]||null)),p.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),H.number(...t));const m=p;var g;function y(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class b{static all(t){return M.isArr(t)?t:[t]}static get(t,e,r=null){return M.isArr(t)?t&&t[e]?t[e]:r:t}static set(t,e,r){return this.splice(t,e,1,r)}static unset(t,e){return this.splice(t,e,1)}static prev(t,e){return M.isEmpty(t)||!M.isArr(t)?0:e-1<0?t.length-1:e-1}static next(t,e){return M.isEmpty(t)||!M.isArr(t)||e+1>t.length?0:e+1}static make(t,e=null){let r=new Array(t);null==e&&(e=t=>t);for(let i=0;i<t;i++)r[i]="function"==typeof e?e(i):e;return r}static has(t,e){if(!M.isPrim(e))return-1!==this.findIndex(t,e);return M.isRef(t)||(t=[t]),M.isArr(t)||(t=M.vals(t)),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return M.keys(e)}static lengths(t,...e){let r=t.length;for(let t=0;t<e.length;t++)if(e[t].length!==r)return!1;return!0}static first(t,e=null){return this.get(t,0,e)}static second(t,e=null){return this.get(t,2,e)}static third(t,e=null){return this.get(t,2,e)}static last(t,e=null){return this.get(t,t.length-1,e)}static each(t,e,r=null){if(M.isObj(t))return this.eachObj(t,e,r);null==t&&(t=[]);let i=new Array(t.length);for(let r=0;r<t.length;r++)i[r]=e(t[r],r);return null!=r?r:i}static eachObj(t,e,r=null){if(M.isArr(t))return this.each(t,e,r);null==t&&(t={});let i=M.keys(t).map(r=>e(t[r],r));return null!=r?r:i}static map(t,e){let[r,i]=[M.isArr(t),M.keys(t)],n=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],n(r));return t}static recursive(t,e,r,i=[]){let n=t=>i=>this.recursive(i,e,r,t);return M.isArr(t)?this.map(t,n(i)):(M.isObj(t)&&(t=r(t,i)??t),i=[...this.clone(i),t],null==t||(M.isObj(t[e])&&(t[e]=n(i)(t[e])),M.isArr(t[e])&&(t[e]=this.map(t[e],n(i)))),t)}static cascade(t,e,r,i=[],n=[]){let s=t=>i=>this.cascade(i,e,r,t,n);return M.isArr(t)?(this.each(t,s(i)),n):(M.isObj(t)&&n.push(r(t,i)),i=[...this.clone(i),t],null==t||(M.isObj(t[e])&&n.push(s(i)(t[e])),M.isArr(t[e])&&this.each(t[e],s(i))),n)}static cascadeFind(t,e,r){if(null==t)return null;let i=null;return this.cascade(t,e,(t,e)=>{null==i&&(i=((t,e)=>r(t,e)?[...e,t]:null)(t,e))}),i}static cascadeMap(t,e,r){let i={};return null==t?i:(i=this.cascade(t,e,(t,e)=>({[t[r]]:[...this.extract(e,r),t[r]]})),O.assign(...i))}static filterIndex(t,e=null){return null==t?[]:(null==e&&(e=t=>!M.isEmpty(t)),M.keys(t).filter(r=>M.isFunc(e)?e.call({},t[r],r):M.isRef(e)?this.includes(t[r],e):e===t[r]))}static filterRemove(t,e=null){if(null==t)return t;let r=this.filterIndex(t,e);return 0===r.length?t:this.splices(t,r)}static filter(t,e=null){return null==t?[]:(null==e&&(e=t=>!M.isEmpty(t)),M.vals(t).filter((r,i)=>M.isFunc(e)?e.call({},r,i):M.isRef(e)?this.includes(r,e):e===t[i]))}static findIndex(t,e=null,r=-1){if(null==t)return r;null==e&&(e=t=>!M.isEmpty(t));for(let r=0;r<t.length;r++){if(M.isFunc(e)&&e.call({},t[r],r))return r;if(M.isRef(e)&&this.includes(t[r],e))return r;if(e===t[r])return r}return r}static find(t,e=null,r=null){let i=this.findIndex(t,e);return-1===i?r:t[i]}static sort(t,e=null){return M.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=M.keys(t).sort((r,i)=>e.call({},t[r],t[i])),i=[];for(const e of r)i.push(t[e]);return i}static sortDeep(t,e){let r=t=>O.get(t,e),i=M.keys(t).sort((e,i)=>M.compare(r(t[e]),r(t[i]))),n=[];for(const e of i)n.push(t[e]);return n}static sortPrim(t){let e=M.keys(t).sort((t,e)=>M.compare(t,e)),r=[];for(const i of e)r.push(t[i]);return r}static merge(t,...e){return t.concat(...e)}static prepend(t,...e){return t.unshift(...e),t}static append(t,...e){return t.push(...e),t}static add(t,e,r=null){return null==r&&(r=e),-1!==this.findIndex(t,r)||t.push(e),t}static replace(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1!==i&&this.splice(t,i,1),t.push(e),t}static remove(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i||this.splice(t,i,1),t}static toggle(t,e,r=null){null==r&&(r=e);let i=this.findIndex(t,r);return-1===i?(t.push(e),t):(this.splice(t,i,1),t)}static insert(t,e,r){return this.splice(t,e,0,r),t}static slice(t,e,r=1){return t.slice(M.num(e),r)}static splice(t,e,r=1,...i){return t.splice(M.num(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(M.isPrim(t))return t;if(M.isObj(t))return O.clone(t);if(!M.isArr(t))return t;let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=this.clone(t[r]);return e}static diff(...t){return t.reduce((t,e)=>t.filter(t=>!e.includes(t)))}static isect(...t){return t.reduce((t,e)=>t.filter(t=>e.includes(t)))}static extract(t,e){let r=new Array(t.length);for(let i=0;i<t.length;i++)r[i]=O.get(t[i],e);return r}static reduce(t,e,r){return M.vals(t).reduce(e,r)}static chunk(t,e=10){let r=[];for(let i=0;i<t.length;i+=e)r.push(t.slice(i,i+e));return r}static includes(t,e){if(M.isObj(e))return O.includes(t,e);if(!M.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let n=0;!1===r&&n<i;n++)r||=this.has(t,e[n]);return r}static contains(t,e){let r=!0;for(let i of M.vals(e))r&&=-1!==M.vals(t).indexOf(i);return r}static matches(t,e){if(M.isObj(e))return O.matches(t,e);if(!M.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let n=0;!0===r&&n<i;n++)r&&=this.has(t,e[n]);return r}}y(b,"diffrence",(g=b).diff),y(b,"intersect",g.isect),b.removeIndex=(...t)=>(console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),b.unset(...t)),b.sortString=(...t)=>(console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),b.sortPrim(...t)),b.push=(...t)=>(console.warn("Arr.push() is deprecated, use Arr.append() instead."),b.append(...t)),b.concat=(...t)=>(console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),b.merge(...t)),b.equal=(...t)=>(console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),b.matches(...t));const v=b;class w{static keyoptim(t,e=!1,r=null){return null===r&&(r=M.isStr(t)),!r&&e&&(t=t.join(".")),r||e?t.split("."):t}static has(t,e,r=!1){if(null==t||null==e)return!1;"number"==typeof e&&(e=M.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return void 0!==t[e];e=this.keyoptim(e,r,i);let[n,s,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[n];for(;null!=t&&s<o;)t=t[e[s++]];return null!=t&&void 0!==t[n]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=M.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e];let s=0,o=(e=this.keyoptim(e,i,n)).length;if(0===o)return r;for(;null!=t&&s<o;)t=t[e[s++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=M.str(e));const n="string"==typeof e;if(n&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,n)).length)return t;let s=t;for(let t,i,n=0;n<e.length;n++)t=i=String(e[n]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==s[t]&&(s[t]=t===i?{}:[]),t!==i&&v.insert(e,n+1,s[t].length),e.length-1===n&&(s[t]=r),s=s[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=M.str(e));const i="string"==typeof e;if(i&&t&&void 0!==t[e])return delete t[e],t;e=this.keyoptim(e,r,i);let[n,s,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&s<o;)l=l[e[s++]];return null==l||delete l[n],t}static empty(t,e){return M.isEmpty(this.get(t,e))}static remove(t,e){if(!M.isArr(e))return t;for(let r of e)this.unset(t,r);return t}static each(t,e,r=null){let i={};for(let r of M.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){for(let r of M.keys(t))t[r]=e(t[r],r);return t}static filterIndex(t,e=null){return v.filterIndex(t,e)}static filter(t,e=null){let r={};for(let i of this.filterIndex(t,e))r[i]=t[i];return r}static flatten(t,e="",r={}){if("object"!=typeof t)return r[e]=t;""!==e&&(e+=".");for(let i of M.keys(t))this.flatten(t[i],e+i,r);return r}static flattenForm(t,e="",r={}){if("object"!=typeof t)return r[e]=t;let i=t=>e?`${e}[${t}]`:t;for(let e of M.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return v.each(M.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(M.isPrim(t))return t;if(M.isArr(t))return v.clone(t);if(!M.isObj(t))return t;let r={};for(let e of M.keys(t))r[e]=this.clone(t[e]);return null!=e?this.assign(r,e):r}static pluck(t,e,r=null){let i=this.get(t,e,r);return this.unset(t,e),i}static only(t,e,r=null){let i={};return this.each(t,(t,r)=>{v.has(e,r)&&(i[r]=t)}),null==r?i:this.assign(i,r)}static except(t,e,r=null){let i={};return this.each(t,(t,r)=>{v.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(M.isArr(e))return v.includes(t,e);if(!M.isObj(e))return t===e;let r=M.keys(e),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i=this.includes(t[r[s]],e[r[s]]);return i}static matches(t,e){if(M.isArr(e))return v.matches(t,e);if(!M.isObj(t))return t===e;let r=v.unique([...M.keys(e),...M.keys(t)]),[i,n]=[!0,r.length];for(let s=0;!0===i&&s<n;s++)i&&=this.matches(t[r[s]],e[r[s]]);return i}static sort(t,e){let r=v.sort(t,e);return v.each(r,(e,r)=>{t[r]._key=r}),r}}w.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Obj.sort() instead."),w.sort(...t)),w.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),M.vals(...t)),w.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),v.find(...t)),w.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),v.findIndex(...t));const O=w;var D;function j(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const P={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class ${static isEmpty(t){return null==t||("string"==typeof t?""===t:"number"!=typeof t&&("boolean"!=typeof t&&(this.isArr(t)?0===t.length:0===this.len(t))))}static isNull(t){return null===t}static isUndef(t){return void 0===t}static isNix(t){return null==t}static isPrim(t){return"string"==typeof t||"number"==typeof t}static isStr(t){return"string"==typeof t}static isNum(t){return"number"==typeof t||!!this.isStr(t)&&/^-?[0-9]+(\.[0-9]+)?$/.test(t)}static isInt(t){return!!this.isNum(t)&&(this.isStr(t)?/^-?[0-9]+$/.test(t):parseInt(t)===parseFloat(t))}static isBool(t){return"boolean"==typeof t||!!this.isStr(t)&&/^(true|false)$/.test(t)}static isFunc(t){return"function"==typeof t}static isRef(t){return null!=t&&"object"==typeof t}static isObj(t){return null!=t&&("object"==typeof t&&t.constructor===Object)}static isArr(t){return null!=t&&("object"==typeof t&&t.constructor===Array)}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||P.iso.test(t)}static isDate(t){return t instanceof Date||/^\d{4}-\d{2}-\d{2}$/.test(t)}static isTime(t){return t instanceof Date||/^\d{2}:\d{2}:\d{2}$/.test(t)}static isEqual(t,e){return t instanceof Node?t.isEqualNode(e):this.isRef(t)?Object.is(t,e):t===e}static iter(t){if(null==t)return{};let e={};for(const[r,i]of t.entries())e[r]=i;return e}static keys(t){return null==t?[]:(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isFunc(t.toJSON)&&(t=t.toJSON()),this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!U().chrome)return Object.values(t);let e=this.keys(t);for(let r=0;r<e.length;r++)e[r]=t[e[r]];return e}static nodes(t){return Array.prototype.slice.call(t)}static props(t,e=[]){let r={};for(const i of Object.getOwnPropertyNames(t))e.length&&!v.has(e,i)&&(r[i]=t[i]);return r}static extend(t,e,r=["constructor"]){if(null==e)return{};let i=Object.getPrototypeOf(e);for(const n of Object.getOwnPropertyNames(e)){if(!r.length||v.has(r,n))continue;let s=Object.getOwnPropertyDescriptor(i,n);s||(s=Object.getOwnPropertyDescriptor(e,n)),s||s.get||s.set||(t[n]=e[n]),s&&(s.get||s.set)&&Object.defineProperty(t,n,s)}return t}static class(t,e=[]){return e=v.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=v.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return O.each(O.flattenForm(t),(t,r)=>{e.append(r,t)}),e}static each(t,e){if(!this.isRef(t))throw new Error("Iterate non object");for(let r of M.keys(t))e(t[r],r);return this}static len(t){return this.isArr(t)?t.length:this.isRef(t)?this.keys(t).length:this.string(t).length}static compare(t,e){return R.collator().compare(t,e)}static null(t,e=null){return"null"===t||this.isEmpty(t)?null:e}static arr(t){return this.isArr(t)?t:this.isStr(t)?(t=t.replace(/^@?\[?(.*?)]$/g,"$1"),v.each(t.split(","),t=>t.replace(/(^"|^'|'$|"$)/g,""))):[t]}static str(t){return this.isNix(t)||void 0===t.toString?String(t):t.toString()}static num(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),t):e}static int(t,e=NaN){return this.isPrim(t)?(this.isStr(t)&&(t=parseFloat(t)),Math.round(t)):e}static bool(t){return this.isRef(t)?!!this.vals(t).length:this.isNum(t)?0!==this.num(t):/^(true|yes)$/i.test(t)}}j($,"isPrimitive",(D=$).isPrim),j($,"isString",D.isStr),j($,"isNumber",D.isNum),j($,"isInteger",D.isInt),j($,"isBoolean",D.isBool),j($,"isFunction",D.isFunc),j($,"isReference",D.isRef),j($,"isObject",D.isObj),j($,"isArray",D.isArr),j($,"isIterable",D.isIter),j($,"length",D.len),j($,"array",D.arr),j($,"string",D.str),j($,"number",D.num),j($,"integer",D.int),j($,"boolean",D.bool),$.global=(...t)=>(console.warn("Mix.global() is deprecated, use go() instead."),U(...t)),$.isPlain=(...t)=>(console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),M.isObj(...t)),$.float=(...t)=>(console.warn("Mix.float() is deprecated, use Mix.num() instead."),M.num(...t)),$.delay=(...t)=>(console.warn("Mix.delay() is deprecated, use Run.delay() instead."),s.delay(...t)),$.async=(...t)=>(console.warn("Mix.async() is deprecated, use Run.async() instead."),s.async(...t)),$.debounce=(...t)=>(console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),s.debounce(...t)),$.throttle=(...t)=>(console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),s.throttle(...t)),$.framerate=(...t)=>(console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),s.framerate(...t)),$.convertString=(...t)=>(console.warn("Mix.convertString() is deprecated, use Str.string() instead."),c.string(...t)),$.convertDatetime=(...t)=>(console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),c.date(...t)),$.convertBool=(...t)=>(console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),c.boolean(...t)),$.convertBoolean=(...t)=>(console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),c.boolean(...t));const M=$;const x=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],N=["8","9","a","b"],S=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class Y{static radix(t=60,e=null){return(e||this.RADIX)[this.number(t-1)]}static number(t=1024,e=0){return Math.floor(Math.random()*(t-e+1))+e}static make(t=6,e=62,r={}){let i="";for(let r=0;r<t;r++)i+=this.radix(e);for(const t of Object.keys(r))i=c.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?this.radix(N.length,N):this.radix(x.length,x);return e.substring(0,8)+"-"+e.substring(8,12)+"-"+t+e.substring(12,15)+"-"+e.substring(15,19)+"-"+e.substring(19,31)}static password(t=24,e=null){let r=[...this.RADIX,...e||S],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var T,k,A;T=Y,A=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],(k=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(k="RADIX"))in T?Object.defineProperty(T,k,{value:A,enumerable:!0,configurable:!0,writable:!0}):T[k]=A;const H=Y;class E{static bind(t,e,r={},i=!1){const n=[e,r,i];return M.isArr(t)?v.each(t,t=>this.bind(t,...n),this):(M.isPrim(r)&&(r={id:r}),this.$events=v.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){const r=[e];return M.isArr(t)?v.each(t,t=>this.unbind(t,...r),this):(M.isPrim(e)&&(e={id:e}),v.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return v.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){const r=[e];if(M.isArr(t))return v.each(t,t=>this.pause(t,...r),this);let i=v.find(this.$events,{event:t,options:e});return null!=i&&(i.paused=!0),this}static unpause(t,e={}){if(M.isArr(t))return v.each(t,t=>this.pause(t,...arguments),this);let r=v.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!1),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(E,"$events",[]);const I=E;function F(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class C{static has(t=void 0){return void 0===t||O.has(C.$text,t)}static get(t=void 0,e=null){return void 0===t?C.$text:O.get(C.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?C.$text=t:O.set(C.$text,t,e)}static code(t=null){return M.isNull(t)?M.isNull(R.$code)?(R.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),R.$code):R.$code:R.$code=t}static collator(){return null!=R.$sort||(R.$sort=new Intl.Collator(R.code(),{numeric:!0,sensitivity:"base"})),R.$sort}static replace(t,e=null){return null==e||O.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=O.get(C.$text,t,t),R.replace(t,e)}static choice(t,e=0,r={}){return t=O.get(C.$text,t,t),void 0===r.count&&(r.count=e),t=R.countpick(t.split("|"),e),R.replace(t,r)}static countpick(t,e=0){let r=t.length;return 3===r&&0===e?t[0]:3===r&&1===e?t[1]:3===r&&e>=2?t[2]:2===r&&1===e?t[0]:2===r&&1!==e?t[1]:t[0]}}F(C,"$text",{}),F(C,"$sort",null),F(C,"$code","en");const R=C;function L(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function W(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?L(Object(r),!0).forEach(function(e){X(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):L(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function X(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const q={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class B{static global(){return null==globalThis.document?"":globalThis.document.cookie||""}static parse(t=!1){if(!t&&this.$cookie)return this.$cookie;this.$cookie={};let e=this.global().matchAll(q.entry);if(null==e)return this.$cookie;return v.each(Array.from(e),({groups:t})=>{this.$cookie[t.key]=t.value.replaceAll("{:}",";")}),this.$cookie}static get(t,e=null,r="string"){return this.$cookie||this.parse(),null==this.$cookie[t]?e:/^bool(ean)?$/.test(r)||/^num(ber)?$/.test(r)||/^int(eger)?$/.test(r)?M.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?Qt.parseOptions(this.$cookie[t]):M.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof ht||(r=ht.make(r||"+7 days")),i=W({expires:r.toUTC(),path:"/"},i),M.isRef(e)&&(e=Qt.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let n=t+"="+M.str(e).replaceAll(";","{:}");return v.each(i,(t,e)=>{n+=`;${e}=${t}`}),globalThis.document.cookie=n,this}static forget(t,e={}){e=W({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return v.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}X(B,"$cookie",void 0);const G=B;function U(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function J(){const t=U();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.safari&&(r.safari=/Safari\//.test(e)),null==r.firefox&&(r.firefox=/Firefox\//.test(e)),null==r.edge&&(r.edge=/Edge\//.test(e)),null==r.chrome&&(r.chrome=/Chrome\//.test(e)),t.piuag=r}function z(){const t=U();if(!t.navigator)return;let[e,r]=[t.navigator.userAgent,{}];null==r.win&&(r.win=/Windows/.test(e)),null==r.osx&&(r.osx=/Macintosh|Mac OS X/.test(e)),null==r.gnu&&(r.gnu=/Linux/.test(e)),null==r.ios&&(r.ios=/iPhone|iPad|iPod/.test(e)),null==r.oid&&(r.oid=/Android/.test(e)),t.piudv=r}function _(t){const e=t[0];return v.each(t.slice(1),t=>{v.each(M.class(t),(t,r)=>{e[r]=t}),v.each(M.proto(t),(t,r)=>{e.prototype[r]=t})}),e}const Z={second:/([+-])([0-9]+)\s?seconds?/i,minute:/([+-])([0-9]+)\s?minutes?/i,hour:/([+-])([0-9]+)\s?hours?/i,date:/([+-])([0-9]+)\s?days?/i,month:/([+-])([0-9]+)\s?months?/i,year:/([+-])([0-9]+)\s?years?/i};class K{static test(t){return t instanceof Date}get(t){return"time"===t?this.value.getTime():/^seconds?$/i.test(t)?this.value.getSeconds():/^minutes?$/i.test(t)?this.value.getMinutes():/^hours?$/i.test(t)?this.value.getHours():/^days?$/i.test(t)?this.value.getDay():/^dates?$/i.test(t)?this.value.getDate():/^months?$/i.test(t)?this.value.getMonth()+1:/^years?$/i.test(t)?this.value.getFullYear():this}set(t,e){M.isNum(t)||(t=M.int(t));let r=this.value.getDay();return"day"===e&&(t=t+1-(r||7)),"time"===e&&this.value.setTime(t),/^seconds?$/i.test(e)&&this.value.setSeconds(t),/^minutes?$/i.test(e)&&this.value.setMinutes(t),/^hours?$/i.test(e)&&this.value.setHours(t),/^days?$/i.test(e)&&this.add(t,"date"),/^dates?$/i.test(e)&&this.value.setDate(t),/^months?$/i.test(e)&&this.value.setMonth(t-1),/^years?$/i.test(e)&&this.value.setFullYear(t),this}time(t=null){return null==t?this.get("time"):this.set(t,"time")}second(t=null){return null==t?this.get("second"):this.set(t,"second")}minute(t=null){return null==t?this.get("minute"):this.set(t,"minute")}hour(t=null){return null==t?this.get("hour"):this.set(t,"hour")}day(t=null){return null==t?this.get("day"):this.set(t,"day")}date(t=null){return null==t?this.get("date"):this.set(t,"date")}month(t=null){return null==t?this.get("month"):this.set(t,"month")}year(t=null){return null==t?this.get("year"):this.set(t,"year")}shortyear(){return this.get("year").toString().slice(-2)}add(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)+M.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-M.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return M.isEmpty(t)||O.each(Z,(e,r)=>{c.match(t,e,([t,e,i])=>{"+"===e?this.add(i,r):this.sub(i,r)})}),this}apply(t,e="YYYY-MM-DD HH:mm:ss",r=[]){t=ht.make(t,e);for(const e of r)this.set(t.get(e),e);return this}applyDate(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["date","month","year"])}applyTime(t,e="YYYY-MM-DD HH:mm:ss"){return this.apply(t,e,["hour","minute","second"])}}K.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},K.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},K.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},K.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},K.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},K.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},K.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},K.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},K.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},K.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},K.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},K.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},K.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},K.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},K.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},K.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Q={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm",LT:"HH:mm",LTS:"HH:mm:ss",LTSD:"DD/MM/YYYY HH:mm:ss"},V={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class tt{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in V)t=c.replace(t,V[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return M.isTime(t)&&(e="HH:mm:ss"),M.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):M.isIsoDate(t)?(this.value=new Date(t),this):this.parseFormat(t,e)}parseFormat(t,e){if(!this.isParsable(t,e))return this.value=new Date(NaN),this;for(const r in V)this.set(c.extract(t,V[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return O.has(Q,t)&&(t=R.$text[t]??Q[t]),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("dddd",()=>this.human("day"))).replace("ddd",()=>this.human("day",3))).replace("dd",()=>this.human("day",2))).replace("MMMM",()=>this.human("month"))).replace("MMM",()=>this.human("month",3))).replace("YYYY",()=>c.integer(this.year(),4))).replace("MM",()=>c.integer(this.month(),2))).replace("DD",()=>c.integer(this.date(),2))).replace("HH",()=>c.integer(this.hour(),2))).replace("mm",()=>c.integer(this.minute(),2))).replace("ss",()=>c.integer(this.second(),2))).replace("YY",()=>c.integer(this.shortyear(),2))).replace("X",()=>c.integer(this.time()))).replace("x",()=>c.integer(this.time()/1e3))}code(t="X"){return M.int(this.format(t))}}class et{before(t=null,e="x"){return this.code(e)<ht.make(t).code(e)}beforeDate(t=null,e="YYYYMMDD"){return this.before(t,e)}beforeTime(t=null,e="HHmmss"){return this.before(t,e)}after(t=null,e="x"){return this.code(e)>ht.make(t).code(e)}afterDate(t=null,e="YYYYMMDD"){return this.after(t,e)}afterTime(t=null,e="HHmmss"){return this.after(t,e)}equal(t=null,e="x"){return t instanceof ht||(t=ht.make(t)),this.code(e)===t.clone().code(e)}equalDate(t=null,e="YYYYMMDD"){return this.equal(t,e)}equalTime(t=null,e="HHmmss"){return this.equal(t,e)}between(t=null,e=null,r="YYYYMMDD"){let i=[ht.make(t),ht.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class rt{grid(t="day"){if(/^seconds?$/i.test(t))return this.getSecondsGrid();if(/^minutes?$/i.test(t))return this.getMinutesGrid();if(/^hours?$/i.test(t))return this.getHoursGrid();if(/^days?$/i.test(t))return this.getDaysGrid();if(/^dates?$/i.test(t))return this.getDatesGrid();if(/^months?$/i.test(t))return this.getMonthsGrid();if(/^years?$/i.test(t))return this.getYearsGrid();if(/^decades?$/i.test(t))return this.getDecadesGrid();throw new Error(`Invalid grid scope type "${t}".`)}getSecondsGrid(t=1){return null==t&&(t=1),v.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),v.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),v.make(24/t,e=>this.clone().hour(e*t))}getDaysGrid(){let t=[this.first("date").first("day"),this.last("date").last("day")];return t[0].range(t[1],"date")}getDatesGrid(){let t=[this.first("date"),this.last("date")];return t[0].range(t[1],"date")}getMonthsGrid(){let t=[this.first("month"),this.last("month")];return t[0].range(t[1],"month")}getYearsGrid(){let t=[this.first("year"),this.clone().last("year")];return t[0].range(t[1],"year")}getDecadesGrid(){let t=[this.first("decade"),this.clone().last("decade")];return t[0].range(t[1],"decade")}}rt.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},rt.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},rt.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},rt.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},rt.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},rt.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class it{prev(t="date"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().sub(10,"year"):this.clone().sub(1,t)}next(t="day"){return/^days?$/i.test(t)&&(t="date"),/^decades?$/i.test(t)?this.clone().add(10,"year"):this.clone().add(1,t)}prevSecond(){return this.prev("second")}nextSecond(){return this.next("second")}prevMinute(){return this.prev("minute")}nextMinute(){return this.next("minute")}prevHour(){return this.prev("hour")}nextHour(){return this.next("hour")}prevDate(){return this.prev("date")}nextDate(){return this.next("date")}prevMonth(){return this.prev("month")}nextMonth(){return this.next("month")}prevYear(){return this.prev("year")}nextYear(){return this.next("year")}prevDecade(){return this.prev("decade")}nextDecade(){return this.next("decade")}first(t="date"){if(/^seconds?$/i.test(t))return this.firstSecond();if(/^minutes?$/i.test(t))return this.firstMinute();if(/^hours?$/i.test(t))return this.firstHour();if(/^days?$/i.test(t))return this.firstDay();if(/^dates?$/i.test(t))return this.firstDate();if(/^months?$/i.test(t))return this.firstMonth();if(/^years?$/i.test(t))return this.firstYear();if(/^decades?$/i.test(t))return this.firstDecade();throw new Error(`Invalid first scope type "${t}".`)}last(t="date"){if(/^seconds?$/i.test(t))return this.lastSecond();if(/^minutes?$/i.test(t))return this.lastMinute();if(/^hours?$/i.test(t))return this.lastHour();if(/^days?$/i.test(t))return this.lastDay();if(/^dates?$/i.test(t))return this.lastDate();if(/^months?$/i.test(t))return this.lastMonth();if(/^years?$/i.test(t))return this.lastYear();if(/^decades?$/i.test(t))return this.lastDecade();throw new Error(`Invalid last scope type "${t}".`)}firstSecond(){return this.clone().set(0,"second")}lastSecond(){return this.clone().set(59,"second")}firstMinute(){return this.clone().set(0,"minute")}lastMinute(){return this.clone().set(59,"minute")}firstHour(){return this.clone().set(0,"hour")}lastHour(){return this.clone().set(23,"hour")}firstDay(){return this.clone().set(0,"day")}lastDay(){return this.clone().set(6,"day")}firstDate(){return this.clone().set(1,"date")}lastDate(){return this.clone().next("month").set(0,"date")}firstMonth(){return this.clone().set(1,"month")}lastMonth(){return this.clone().set(12,"month")}nthYear(t=0){let e=10*Math.floor(this.year()/10);return this.clone().set(e+t,"year")}firstYear(){return this.nthYear(0)}lastYear(){return this.nthYear(9)}nthDecade(t=0){let e=100*Math.floor(this.year()/100);return this.clone().set(e+10*t,"year")}firstDecade(){return this.nthDecade(0)}lastDecade(){return this.nthDecade(9)}}class nt{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],n=[this.clone(),ht.make(t)];n[0].afterDate(n[1])&&(n=n.reverse()),n[1].add(1,e);for(let t=n[0];!t.equal(n[1],r);t=t.next(e))v.append(i,t);return i}}nt.prototype.getDatesRange=function(...t){return console.warn("Now.getDatesRange() is deprecated, use Now.range() instead."),this.range(...t)};const st=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ot=["January","February","March","April","May","June","July","August","September","October","November","December"];class lt{human(t="day",e=null){return/^days?$/i.test(t)?this.getHumanDay(e):/^months?$/i.test(t)?this.getHumanMonth(e):this.get(t)}getHumanDay(t=null){let e=this.day()-1;if(!st[e])throw new Error(`Invalid day number "${e}".`);let r=R.trans(st[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!ot[e])throw new Error(`Invalid month number "${e}".`);let r=R.trans(ot[e]);return null!=t&&(r=r.substring(0,t)),r}}function at(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const ut=[K,tt,et,rt,it,nt,lt];class ct extends(_(ut)){constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){super(),at(this,"input",null),at(this,"value",null),"now"===t&&(t=null);let r=t;return t&&t.toDate&&(t=t.toDate()),t instanceof Date||(t=new Date),this.input=t,M.isNix(r)&&(this.input=r),this.value=t,M.isStr(r)&&this.parse(r,e),v.each(ht.init,t=>{t.call(this,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new ht(t,e)}reset(t=null){return null==t&&(t={month:!0,day:!0,time:!0}),t.month&&this.value.setMonth(0),t.day&&this.value.setDate(1),t.time&&this.value.setHours(0,0,0),this}clone(){return new ht(new Date(this.value),null)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}at(ct,"init",[]),ct.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const ht=ct;class dt{static filterNodes(t,e=1){return v.filter(M.nodes(t),t=>t.nodeType===e)}static getNodePoint(t){t.touches?.[0]&&(t=t.touches[0]);let[e,r]=[null,[t.clientX,t.clientY]];return null!=Ct.doc().elementsFromPoint&&(e=document.elementsFromPoint(r[0],r[1])),null!=Ct.doc().msElementsFromPoint&&(e=document.msElementsFromPoint(r[0],r[1])),e}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=Ct.getNodePoint(e)),M.isArr(r)&&(r=v.first(r)),null==r&&(r=e.target),r.closest(t)}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?Ct.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?Ct.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?Ct.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=M.nodes(this.el.childNodes);return-1===t?r:v.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=Ct.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>Ct.find(e).is(t)),v.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!Ct.find(e).is(t)),v.filter(this.els,t)}find(t){if(null==this.el)return Ct.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return M.isStr(r)&&(r=e.querySelectorAll(t)),Ct.find(r)}get(t=-1){let e=this.els;return-1===t?e:v.get(e,t)}first(t=0){return this.get(t)}last(t=1){return v.get(this.els,this.els.length-t)}each(t){return v.each(this.els,t)}loopParent(t,e=null){null==e&&(e=Ct.win());for(let r=this.el;r&&r!==e;r=r.parentNode)t.call({},r);return this}parent(){let t=this.getNodeParent();return null==t?Ct.find(null):t}child(t=null,e=1){for(let r of this.childs(t,e))return Ct.find(r);return Ct.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:v.filter(r,e=>Ct.find(e).is(t))}closest(t){if(this.el===t)return this.el;for(let e=this;null!=e.el;e=e.getNodeParent())if(e.is(t))return e.el;return null}upnode(t){return Ct.find(this.closest(t))}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return Ct.find(e);return Ct.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return Ct.find(e);return Ct.find(null)}length(){return this.els.length}is(t,e=!1){if(this.el===t)return!0;if(null==this.el)return e;for(let e of this.parent().find(t).get())if(e===this.el)return!0;return!1}matches(t){if(this.el===t)return!0;if(null==this.el)return!1;for(let e of this.find(t).get())if(e===this.el)return!0;return!1}empty(){return this.length()<1||null==this.el}visible(){return null!=this.el&&this.el.is(":visible")}above(t){return this.parent().is(t)}inside(t){return null!=this.closest(t)}contains(t){return this.el.contains(t)}}dt.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},dt.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},dt.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},dt.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},dt.prototype.getNot=function(){console.error("Dom.getNot() is not implemented anymore.")};class ft{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class pt{bind(t,e,r,i=null,n=!1,s={}){return M.isPrim(s)&&(s={id:s}),Ct.$events=v.append(Ct.$events,{el:t,event:e,cb:r,selector:i,pause:n,options:s}),t.addEventListener(e,r,s),this}unbind(t,e,r=null,i={}){M.isPrim(i)&&(i={id:i});let n=v.filterIndex(Ct.$events,{el:t,event:e,selector:r,options:i});if(0===n.length)return this;return v.each(n.reverse(),r=>{var i;t.removeEventListener(...(i=Ct.$events[r],[e,i.cb,i.options]))}),v.splices(Ct.$events,n),this}on(t,e,r={},i=!1,n=null){M.isPrim(r)&&(r={id:r});const s=[e,r,i,n];if(M.isArr(t))return v.each(t,t=>this.on(t,...s)),this;let o=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,o,n,i,r)}),this}off(t,e=null,r={}){M.isPrim(r)&&(r={id:r});const i=[e,r];return M.isArr(t)?(v.each(t,t=>this.off(t,...i)),this):(M.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}optoff(t={}){return s.async(()=>{v.filterRemove(Ct.$events,{options:t})}),this.each(t=>{t&&t.removeAllListeners()}),this}once(t,e,r={}){return r.id=H.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},n=!1){return this.on(t,function(t){let i=Ct.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,n,e),this}fire(t,e={}){let r=new CustomEvent(t,{detail:e});return this.each(t=>{t.dispatchEvent(r)}),this}pointerdown(t=1){const e=this.rect(),[r,i]=[e.left+e.width/2,e.top+e.height/2],n=new PointerEvent("pointerdown",{view:window,bubbles:!0,cancelable:!0,buttons:1,clientX:r,clientY:i});return this.each(t=>{t.dispatchEvent(n)}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(pt,"$events",[]),pt.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},pt.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},pt.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},pt.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class mt{static make(t,e={}){t instanceof Ct&&(t=t.el),M.isStr(t)&&(t=document.createElement(t)),t=O.assign(t,e);let r=new Ct(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return Ct.find(t).each(t=>{null!=t.prepend&&t.prepend(this.el)}),this}append(t){return this.each(e=>{null!=e.append&&e.append(t)}),this}appendTo(t){return Ct.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class gt{static getDomState(){return document.readyState}static isDomReady(){return"complete"===Ct.getDomState()}static isDomComplete(){let t=Ct.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let[i,n,o]=[H.make(),Ct.find(document),"DOMContentLoaded"],l=()=>{s.delay(t,e),n.off(o,null,{id:i})},a=Ct.isDomReady;return a()?(s.wait(()=>{if(a())return l(),!0},10,r),this):(n.on(o,l,{id:i}),this)}static complete(t,e=0,r=6e3){let i=()=>{s.delay(t,e)},[n,o]=[Ct.find(document),"load"],l=Ct.isDomComplete;return l()?(s.wait(()=>{l()&&i()},10,r),this):(n.on(o,i),this)}isNodeComplete(){return null!=this.el&&(!!this.el.naturalWidth||(!!this.el.naturalHeight||!!this.el.complete))}loaded(t,e=6e3){if(!this.el)return this;let r=this.isNodeComplete;return s.wait(()=>{if(r.call(this))return t(),!0},10,e),this}static required(){console.error("Dom.required() is not implemented anymore.")}}function yt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?yt(Object(r),!0).forEach(function(e){vt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function vt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class wt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),M.num(t,0)}rect(t={left:0,top:0,width:0,height:0}){if(!this.el.getBoundingClientRect)return t;const e=this.el.getBoundingClientRect();return null==e?t:e.toJSON()}margin(t=null,e=0){let r=this.computed(),i={top:Ct.num(r.marginTop),right:Ct.num(r.marginRight),bottom:Ct.num(r.marginBottom),left:Ct.num(r.marginLeft)};return null==t?i:O.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:Ct.num(r.paddingTop),right:Ct.num(r.paddingRight),bottom:Ct.num(r.paddingBottom),left:Ct.num(r.paddingLeft)};return null==t?i:O.get(i,t,e)}height(){return null==this.el?0:this.el instanceof Window?this.el.innerHeight:this.el.offsetHeight}clientHeight(){return null==this.el?0:Ct.num(this.computed("height",0))}scrollHeight(){return null==this.el?0:this.el.scrollHeight}innerHeight(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerHeight;let t=this.padding();return this.el.offsetHeight-t.top-t.bottom}realHeight(t={}){let e="auto";return this.actual(()=>e=this.height(),t),e}evaluateHeight(t=null,e=!0){null===(t=Ct.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerHeight()},{display:"none"}),!0===e&&this.style({height:r+"px"}),r}width(){return null==this.el?0:this.el instanceof Window?this.el.innerWidth:this.el.offsetWidth}clientWidth(){return null==this.el?0:Ct.num(this.computed("width",0))}scrollWidth(){return null==this.el?0:this.el.scrollWidth}innerWidth(){if(null==this.el)return 0;if(this.el instanceof Window)return this.el.innerWidth;let t=this.padding();return this.el.offsetWidth-t.left-t.right}realWidth(t={}){let e="auto";return this.actual(()=>e=this.width(),t),e}evaluateWidth(t=null,e=!0){null===(t=Ct.find(t))&&(t=this.parent());let r="auto";return this.actual(()=>{r=t.innerWidth()},{display:"none"}),!0===e&&this.style({width:r+"px"}),r}offset(t=null,e=null){let r=this.getOffset(e);return null==t?r:O.get(r,t,0)}offsetTop(t=null){return this.offset("top",t)}offsetBottom(t=null){return this.offset("bottom",t)}offsetLeft(t=null){return this.offset("left",t)}offsetRight(t=null){return this.offset("right",t)}loopOffset(t,e=null){null==e&&(e=Ct.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:Ct.body().scrollWidth-t.left-e,bottom:Ct.body().scrollHeight-t.top-r};return bt(bt({},t),i)}getOffset(t=null){null==t&&(t=Ct.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=Ct.num(t.offsetTop,0),r.left+=Ct.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=Ct.find(t),n={top:0,left:0,bottom:0,right:0};return e=t=>{n.top+=Ct.num(t.offsetTop,0),n.left+=Ct.num(t.offsetLeft,0)},i.loopOffset(e),n=this.calcOffset(n,i.scrollWidth(),i.scrollHeight()),{top:r.top-n.top,bottom:r.bottom-n.bottom,left:r.left-n.left,right:r.right-n.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:O.get(r,t,0)}scrollTop(t=null,e=null){return null==t?this.scroll("top",e):(this.each(e=>{e.scrollTop=t}),this)}scrollLeft(t=null,e=null){return null==t||this.each(e=>{e.scrollLeft=t}),this.scroll("left",e)}getScroll(t=null){null==t&&(t=Ct.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=Ct.num(t.scrollTop||t.pageYOffset||0),r.left+=Ct.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=Ct.num(t.scrollTop||t.pageYOffset||0),i.left+=Ct.num(t.scrollLeft||t.pageXOffset||0)},Ct.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}wt.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},wt.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},wt.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function Ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function Dt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ot(Object(r),!0).forEach(function(e){jt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ot(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function jt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Pt{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return M.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(M.isArr(e)&&(e=e.join(" ")),M.isObj(e)&&(e=Qt.castOptions(e)),this.el.setAttribute(t,e),this)}data(t,e=void 0,r=null){return this.attr("data-"+t,e,r)}computed(t=null,e=null){if(null==this.el)return e;if(1!==this.getNodeType())return e;let r=getComputedStyle(this.el);return null==t?r:O.get(r,t,e)}style(t=void 0,e=!0){if(null==this.el)return this;if(null===t)return this.attr("style",null);let r=this.attr("style",void 0,{});return M.isStr(r)&&(r=Qt.parseOptions(r)),M.isUndef(t)?r:(e&&(t=Dt(Dt({},r),t)),t.translate&&(t.transform=`translate3d(${t.translate.join(",")}, 0)`),delete t.translate,M.isNum(t.top)&&(t.top+="px"),M.isNum(t.left)&&(t.left+="px"),M.isNum(t.width)&&(t.width+="px"),M.isNum(t.height)&&(t.height+="px"),this.attr("style",t),this)}class(t=void 0,e=!1){if(null==this.el)return this;if(null===t)return this.attr("class","");let r=this.attr("class",void 0,[]);return M.isStr(r)&&(r=r.split(" ")),M.isUndef(t)?r:(e&&(t=[...r,...t]),this.attr("class",t),this)}html(t=void 0){return void 0===t?this.el.innerHTML:(this.each(e=>{e.innerHTML=t}),this)}actual(t,e=null){let r=this.attr("style");this.style(e);let i=t(this.el,this.el);return this.attr("style",r),i}hasClass(t){return M.isArr(t)||(t=[t]),v.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Ct.find(e).addClass(t));let e=this.el.className.split(" ");return M.isStr(t)&&(t=t.split(" ")),e=v.append(e,...t),this.el.className=v.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>Ct.find(e).remClass(t));let e=this.el.className.split(" ");return M.isStr(t)&&(t=t.split(" ")),e=v.diff(e,t),this.el.className=v.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>Ct.find(e).toggleClass(t)):this.hasClass(t)?this.remClass(t):this.addClass(t)}stateClass(t,e=!0){return this.els.length>1?this.each(e=>Ct.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}Pt.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},Pt.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function $t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function Mt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(r),!0).forEach(function(e){xt(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function xt(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Nt{static inviewMaxY(t,e=null){if(M.isString(t)&&(t={el:t}),!(t=Mt(Mt({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewY() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Ct.find(t.el).each(t=>{(t=>Ct.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:v.first(i)}static inviewMaxX(t,e=null){if(M.isString(t)&&(t={el:t}),!(t=Mt(Mt({},{boundry:null,multiple:!1,threshold:0,mode:"ratio"}),t)).el)throw new Error("Dom.inviewX() requires an element.");let r=[t.threshold,t.mode,t.boundry],i=[];return Ct.find(t.el).each(t=>{(t=>Ct.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:v.first(i)}viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[Ct.win().innerWidth,this.width()],[r,i]=[this.offset("left"),this.parent().scroll("left")];return{left:Math.max(0,r-i),right:Math.max(0,t-(r+e-i))}}inviewX(t=null){let{left:e,right:r}=Ct.find(t).viewoffY(),[i,n]=[Ct.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.max(0,l)}inratioX(t=null){return 1/this.width()*this.inviewX(t)}isInviewX(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewX(r)>t:this.inratioX(r)>t}viewoffY(){if(null==this.el)return{top:0,bottom:0};let[t,e]=[Ct.win().innerHeight,this.height()],[r,i]=[this.offset("top"),this.parent().scroll("top")];return{top:Math.max(0,r-i),bottom:Math.max(0,t-(r+e-i))}}inviewY(t=null){let{top:e,bottom:r}=Ct.find(t).viewoffY(),[i,n]=[Ct.win().innerHeight-r-e,this.height()],[s,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-s+e);return l>n&&(l=Math.min(n,i+n-l)),Math.min(Math.max(0,l),i)}inratioY(t=null){return 1/this.height()*this.inviewY(t)}isInviewY(t=.1,e="ratio",r=null){return"pixel"===e?this.inviewY(r)>t:this.inratioY(r)>t}}Nt.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},Nt.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class St{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=Ct.doc().title),document.title=R.replace(e,{value:t,title:this.$meta.title}),this}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(St,"$meta",{}),St.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),Ct.setMetaTitle(t));class Yt{}function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function kt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Tt(Object(r),!0).forEach(function(e){At(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function At(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Ht{popover(t,e="botttom-center",r={}){return/^(top|bottom)-/.test(e)?this.popoverY(t,e,r):/^(left|right)-/.test(e)?this.popoverX(t,e,r):void 0}popoverY(t,e="bottom-center",r={}){t=Ct.find(t);let[i,n]=[t.rect(),this.rect()];r.x&&(i=kt(kt({},i),{},{left:r.x,width:1})),r.y&&(i=kt(kt({},i),{},{top:r.y,height:1})),r.width;let[s,o]=[{x:0,y:0},i.width-n.width];/^top-/.test(e)&&(s.y=i.top-n.height),/^bottom-/.test(e)&&(s.y=i.top+i.height),/-start$/.test(e)&&(s.x=i.left),/-center$/.test(e)&&(s.x=i.left+.5*o),/-end$/.test(e)&&(s.x=i.left+o);let l=e;/^top-/.test(e)&&(l=l.replace(/^top-/,"bottom-")),/^bottom-/.test(e)&&(l=l.replace(/^bottom-/,"top-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y||s.y<0;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverY(t,l,c);return u&&r.offset&&(s=r.offset),s.y<0&&(s.y=0),s.y+n.height>a.height&&(s.y=a.height-n.height),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverX(t,e="left-center",r={}){t=Ct.find(t);let[i,n]=[t.rect(),this.rect()];r.height;let[s,o]=[{x:0,y:0},i.height-n.height];/^left-/.test(e)&&(s.x=i.left-n.width),/^right-/.test(e)&&(s.x=i.left+i.width),/-start$/.test(e)&&(s.y=i.top),/-center/.test(e)&&(s.y=i.top+.5*o),/-end/.test(e)&&(s.y=i.top+o);let l=e;/^left-/.test(e)&&(l=l.replace(/^left-/,"right-")),/^right-/.test(e)&&(l=l.replace(/^right-/,"left-"));let a={x:window.innerWidth,y:window.innerHeight},u=s.y+n.height>a.y;s.y<0&&(u=!0);const c=kt(kt({},r),{},{offset:s});if(u&&!r.offset)return this.popoverX(t,l,c);return u&&r.offset&&(s=r.offset),u&&(e="auto"),kt(kt({},this.popoverNormalize(s,n,i,a)),{},{position:e})}popoverNormalize(t,e,r,i){const n=Ct.find(document.body).scroll();t.y<0&&(t.y=0),t.y+e.height>i.y&&(t.y=i.y-e.height),t.x<0&&(t.x=0);const s=document.body.clientWidth;return t.x+e.width>i.x&&(t.x=i.x-e.width-(i.x-s)),t={x:t.x+n.left,y:t.y+n.top},O.each(t,(e,r)=>{t[r]=Math.round(e)}),t.self={width:e.width,height:e.height},t.rect={width:r.width,height:r.height},t}}function Et(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const It=[dt,gt,ft,pt,mt,wt,Pt,Nt,St,Yt,Ht];class Ft extends(_(It)){constructor(t,...e){return super(t,...e),Et(this,"el",null),Et(this,"els",[]),"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=M.nodes(t)),t instanceof Ct&&(t=t.el),M.isArr(t)||(t=[t]),this.el=t[0],this.els=t,this}static find(t,...e){return new Ct(t,...e)}static extend(t){t.call({},this)}static win(){return null==globalThis.window?{}:window}static doc(){return null==globalThis.document?{}:document}static body(){return this.doc().body?this.doc().body:{}}}Et(Ft,"init",[]);const Ct=Ft,Rt=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>M.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>M.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>M.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>M.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Lt=[{match:t=>M.isArr(t),parse:t=>JSON.stringify(t)}];class Wt{static keyed(t,e=null){return M.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!M.isStr(t))return e;t=t.replace(/(^"|^'|'$|"$)/g,"");for(let e of r)if(e.match(t))return e.parse(t);for(let e of Rt)if(e.match(t))return e.parse(t);return t}static casted(t,e=!1,r=[]){if(e&&(t=encodeURI(t)),M.isStr(t))return t;for(let e of r)if(e.match(t))return e.parse(t);for(let e of Lt)if(e.match(t))return e.parse(t);return M.str(t)}}const Xt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class qt{static castParams(t={}){if(M.isEmpty(t))return"";return v.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!M.isRef(e))return M.str(t)+"="+Qt.casted(e,!0);return v.each(e,(r,i)=>this.castParam(M.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(M.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Xt.entry);if(null==e)return{};const[r,i]=[Qt.keyed,Qt.parsed];return v.reduce(Array.from(e),(t,{groups:e})=>O.set(t,r(e.key),i(e.val)),{})}}const Bt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class Gt{static castOptions(t={},e=!0){if(M.isEmpty(t))return"";return v.each(t,(t,r)=>this.castOption(r,t,null,e)).join(e?"; ":";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let n=i?": ":":";return M.isObj(e)?v.map(e,(e,r)=>this.castOption(r,e,t,i)).join(i?"; ":";"):M.str(t)+n+Qt.casted(e,!1)}static parseOptions(t){if(M.isEmpty(t))return{};let e=t.matchAll(Bt.entry);if(null==e)return{};const[r,i]=[Qt.keyed,Qt.parsed];return v.reduce(Array.from(e),(t,{groups:e})=>O.set(t,r(e.key),i(e.val)),{})}}const Ut=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Jt{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),v.each(Ut,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const zt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class _t{static filesize(t,e=1){M.isNum(t)||(t=M.num(t,0));let r=r=>m.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<zt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+zt[e];return r(zt.length)}}const Zt=[Wt,qt,Gt,Jt,_t];class Kt extends(_(Zt)){static extend(t){t.call({},this)}}const Qt=Kt;class Vt{static has(t){return O.has(this.$data,v.first(t))}static set(t,e){let[r,i]=[null,v.first(t)];O.has(this.$data,i)&&(r=O.get(this.$data,i)),M.isEqual(r,e)||(O.set(this.$data,i,e),I.fire("store:"+i,e,i))}static unset(t){O.unset(this.$data,[...v.first(t)])}static get(t,e=null,r=!1){let i=v.first(t);if(!O.has(this.$data,i)&&!r)return e;O.has(this.$data,i)&&r&&O.set(this.$data,i,e);let n=O.get(this.$data,i,e);return M.isObj(n)?O.clone(n):n}static find(t,e,r=null){let i=v.first(t);if(!1===O.has(this.$data,i))return r;if(!1===O.has(e,"id"))return r;let n=v.findIndex(this.get(i),{id:e.id});return-1===n?r:this.get(i+"."+n)}static replace(t,e){let r=v.first(t);if(!1===O.has(this.$data,r))return;if(!1===O.has(e,"id"))return;let i=v.findIndex(this.get(r),{id:m.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,v.merge(this.get(t,[]),e))}static remove(t,...e){this.set(t,v.diff(this.get(t,[]),e))}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(Vt,"$data",{});const te=Vt;class ee{static set(t,e){this.$routes[t]=e}static get(t,e=null,r=null){let i=t;return/^https?:\/\//.test(i)||(i=this.$routes[t]||t),O.each(e,(t,e)=>{i=i.replace(new RegExp("{"+e+"}","g"),t)}),M.isEmpty(r)||(i+="?"+Qt.castParams(r)),i}static goto(t,e=null,r=null){window.location.href=this.get(t,e,r)}}!function(t,e,r){(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r}(ee,"$routes",{});const re=ee,ie=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>M[e](...t)}}),ne=new Proxy({},{get:function(t,e){return console.warn(`Event.${e} is deprecated, use Signal.${e}() instead.`),(...t)=>I[e](...t)}}),se=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),H.make()};globalThis.pi=r,globalThis.addEventListener&&globalThis.addEventListener("beforeunload",()=>{v.map(Ct.$events,({el:t,cb:e,event:r})=>(t.removeEventListener(r,e),null))});var oe=window;for(var le in e)oe[le]=e[le];e.__esModule&&Object.defineProperty(oe,"__esModule",{value:!0})})();
|
|
2
2
|
//# sourceMappingURL=pico-js.browser.js.map
|