@kizmann/pico-js 2.0.3 → 2.0.4

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.
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pi=e():t.pi=e()}(self,()=>(()=>{"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={};function r(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(e),t.d(e,{Any:()=>De,Arr:()=>ye,Cookie:()=>Pe,Data:()=>re,Dom:()=>he,Element:()=>ce,Event:()=>Me,For:()=>fe,Hash:()=>we,Locale:()=>Oe,Map:()=>ae,Mix:()=>ve,Now:()=>de,Num:()=>ge,Obj:()=>be,Route:()=>se,Run:()=>pe,Str:()=>me,UUID:()=>ke,browser:()=>Qt,device:()=>te,go:()=>Zt});class i{static timeout(t,e=0,r=null){let s=i.$idler.native;return null==r&&(r=we.make(12)),s[r="t-"+r]=setInterval(()=>{t()},e),r}static interval(t,e=0,r=null){let s=i.$idler.native;return null==r&&(r=we.make(12)),s[r="i-"+r]=setInterval(()=>{t()},e),r}static clear(t,e="native"){if(ve.isArr(t))return ye.each(t,t=>this.clear(t,e)),this;let r=i.$idler[e];return!1===/^i-/.test(t)&&clearInterval(r[t]),!1===/^t-/.test(t)&&clearTimeout(r[t]),this}static wait(t,e=0,r=500){let i,s;s=this.timeout(()=>{this.clear([i,s])},e*r),i=this.interval(()=>{t()&&this.clear([i,s])},e)}static frame(t,...e){return requestAnimationFrame(function(){t(...e)}),this}static async(t,...e){return setTimeout(()=>{t(...e)}),this}static delay(t,e=0,...r){let i=setTimeout(()=>{this.async(t,...r)},e);return()=>clearTimeout(i)}static debounce(t,e=100,r=null){let s=i.$idler.debounce;return null==r&&(r=we.make(12)),(...i)=>{s[r]&&clearTimeout(s[r]),s[r]=setTimeout(()=>{this.frame(t,...i)},e)}}static throttle(t,e=100,r=null){let s,n=i.$idler.throttle;return null==r&&(r=we.make(12)),(...i)=>{n[r]&&clearTimeout(n[r]),n[r]=setTimeout(()=>{s=!1},e),s||(this.frame(t,...i),s=!0)}}static framerate(t,e=30){let r=0;return(...i)=>{Date.now()-r<=1e3/e||(this.frame(t,...i),r=Date.now())}}static framebuffer(t,e,r=1e3){return(s,...n)=>{ye.replace(i.$buffer,{key:e,cb:t,order:r,args:[s,...n],active:!0},{key:e}),s.preventDefault(),i.runFramebuffer()}}static runFramebuffer(){if(this.$timer.func&&this.$timer.func(),this.$timer.func=this.delay(()=>{this.runFramebuffer()},50),Date.now()-this.$timer.date<=50)return;this.$timer.func&&this.$timer.func(),this.$timer.date=Date.now();let t=ye.filter(this.$buffer,{active:!0});0!==t.length&&this.frame(()=>{ye.each(ye.sort(t,"order"),t=>{t.cb(...t.args),t.active=!1})})}}r(i,"$idler",{native:{},debounce:{},throttle:{}}),r(i,"$timer",{date:0,func:null}),r(i,"$buffer",[]);const s=i;var n;function o(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 l{static get(t,e){return ve.isStr(t)||(t=ve.str(t)),ve.isInt(e)&&(e=ve.int(e)),t.charAt(e)}static set(t,e,r=""){return ve.isStr(t)||(t=ve.str(t)),ve.isInt(e)&&(e=ve.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){ve.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){ve.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=ve.str(t).match(e);return ve.isEmpty(i)?[]:ve.isFunc(r)?r(i):i}static regex(t){return ve.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return ve.str(t).toUpperCase()}static ucfirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lc(t){return ve.str(t).toLowerCase()}static lcfirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static cc(t){return ye.each(fe.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return fe.slugify(t)}static sc(t){return fe.slugify(t).replace("-","_")}static pc(t){return ye.each(fe.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=ve.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return ve.str(t).slice(e,r)}static string(t,e="-",r=!1){return ve.isEmpty(t)?e:(t=ve.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return ve.isEmpty(t)?i:ve.bool(t)?e:r}static number(t,e=null,r=null,i={}){return ve.isNum(t)?(null==r&&(r=Oe.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(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),ve.num(t).toLocaleString(r,i)):t}static integer(t,e=0,r="0"){return ve.isNum(t)?(ve.isInt(t)||(t=ve.int(t)),t=ve.int(t),e?ve.str(t).padStart(e,r):ve.str(t)):t}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return ve.isDate(t)||(t=de.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 ve.isRef(t)?t:("params"===e&&(t=fe.parseParams(t)),"options"===e&&(t=fe.parseOptions(t)),ve.isRef(t)||(t=JSON.parse(t)),r?ve.vals(t):t)}static stringify(t,e="options"){return ve.isStr(t)?t:"params"===e?fe.castParams(t):"options"===e?fe.castOptions(t):JSON.stringify(t)}}a(l,"upper",(n=l).uc),a(l,"lower",n.lc),a(l,"camelcase",n.cc),a(l,"kebabcase",n.kc),a(l,"snakecase",n.sc),a(l,"pascalcase",n.pc),l.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),me.regex(...t)),l.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),me.pascalcase(...t)),l.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),fe.slugify(...t)),l.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),fe.castOptions(...t)),l.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),fe.parseOptions(...t)),l.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),fe.castParams(...t)),l.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),fe.parseParams(...t)),l.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),fe.filesize(...t)),l.real=()=>{console.error("Str.real() is not implemented anymore.")},l.array=()=>{console.error("Str.array() is not implemented anymore.")};const u=l;function c(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 h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(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 f{static fixed(t,e=2){return ve.isNum(t)||(t=ve.num(t)),t.toFixed(e)}static float(t){return ve.isNum(t)||(t=ve.num(t)),parseFloat(t)}static int(t){return ve.isNum(t)||(t=ve.num(t)),parseInt(t)}static ceil(t){return ve.isNum(t)||(t=ve.num(t)),Math.ceil(t)}static floor(t){return ve.isNum(t)||(t=ve.num(t)),Math.floor(t)}static round(t){return ve.isNum(t)||(t=ve.num(t)),Math.round(t)}static combine(t){return ye.reduce(t,(t,e)=>t+e,0)}static subtract(t){return ye.reduce(t,(t,e)=>t-e,0)}static decade(t){return ve.isNum(t)||(t=ve.num(t)),10*Math.floor(t/10)}static matrix(t,e=10,r=[]){let i=0;for(let e=20;e>=0;e--)t>=(i=Math.pow(2,e))&&(r.push(i),t-=i);return r}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[h(h({},i),t),h(h({},i),e)];let s=Math.PI*this.float(t.lat)/180,n=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,a=this.combine([Math.sin(s)*Math.sin(n),Math.cos(s)*Math.cos(n)*Math.cos(o)]);return a=180*Math.acos(a>1?1:a)/Math.PI*60*1.1515,r?1.609344*a:a}}f.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),me.number(t,e[2]||null)),f.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),we.number(...t));const p=f;class m{static all(t){return ve.isArr(t)?t:[t]}static get(t,e,r=null){return ve.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 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(!ve.isPrim(e))return-1!==this.findIndex(t,e);return ve.isArr(t)||(t=[t]),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return ve.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){let[i,s]=[ve.isArr(t),ve.keys(t)],n=t=>i?parseInt(t):t,o=new Array(s.length);for(let r=0;r<s.length;r++)o[r]=e(t[s[r]],n(s[r]));return null!=r?r:o}static map(t,e){let[r,i]=[ve.isArr(t),ve.keys(t)],s=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],s(r));return t}static recursive(t,e,r,i=[]){return null==t?t:this.map(t,s=>(this.recursive(s[e],e,r,[...i,t]),r(s,i)))}static filterIndex(t,e=null){return null==e&&(e=t=>!ve.isEmpty(t)),ve.keys(t).filter(r=>ve.isFunc(e)?e.call({},t[r],r):ve.isRef(e)?this.includes(t[r],e):e===t[r])}static filter(t,e=null){return null==e&&(e=t=>!ve.isEmpty(t)),ve.vals(t).filter((r,i)=>ve.isFunc(e)?e.call({},r,i):ve.isRef(e)?this.includes(r,e):e===t[i])}static findIndex(t,e=null,r=-1){null==e&&(e=t=>!ve.isEmpty(t));for(let r=0;r<t.length;r++){if(ve.isFunc(e)&&e.call({},t[r],r))return r;if(ve.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 ve.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=ve.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=ve.keys(t).sort((t,r)=>ve.compare(be.get(t,e),be.get(r,e))),i=[];for(const e of r)i.push(t[e]);return i}static sortPrim(t){let e=ve.keys(t).sort((t,e)=>ve.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(parseInt(e),r)}static splice(t,e,r=1,...i){return t.splice(parseInt(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(ve.isPrim(t))return t;if(ve.isObj(t))return be.clone(t);if(!ve.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]=be.get(t[i],e);return r}static reduce(t,e,r){return ve.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(ve.isObj(e))return be.includes(t,e);if(!ve.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let s=0;!1===r&&s<i;s++)r||=this.has(t,e[s]);return r}static contains(t,e){let r=!0;for(let i of ve.vals(e))r&&=-1!==ve.vals(t).indexOf(i);return r}static matches(t,e){if(ve.isObj(e))return be.matches(t,e);if(!ve.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let s=0;!0===r&&s<i;s++)r&&=this.has(t,e[s]);return r}}m.removeIndex=(...t)=>(console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),Arr.unset(...t)),m.sortString=(...t)=>(console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),Arr.sortPrim(...t)),m.push=(...t)=>(console.warn("Arr.push() is deprecated, use Arr.append() instead."),Arr.append(...t)),m.concat=(...t)=>(console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),Arr.merge(...t)),m.equal=(...t)=>(console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),Arr.matches(...t)),m.diffrence=(...t)=>(console.warn("Arr.diffrence() is deprecated, use Arr.diff() instead."),Arr.diff(...t)),m.intersect=(...t)=>(console.warn("Arr.intersect() is deprecated, use Arr.isect() instead."),Arr.isect(...t));const g=m;class y{static keyoptim(t,e=!1,r=null){return null===r&&(r=ve.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=ve.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[s,n,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[s];for(;null!=t&&n<o;)t=t[e[n++]];return null!=t&&void 0!==t[s]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=ve.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e];let n=0,o=(e=this.keyoptim(e,i,s)).length;if(0===o)return r;for(;null!=t&&n<o;)t=t[e[n++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=ve.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,s)).length)return t;let n=t;for(let t,i,s=0;s<e.length;s++)t=i=String(e[s]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==n[t]&&(n[t]=t===i?{}:[]),t!==i&&ye.insert(e,s+1,n[t].length),e.length-1===s&&(n[t]=r),n=n[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=ve.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[s,n,o,a]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=a&&n<o;)a=a[e[n++]];return null==a||delete a[s],t}static empty(t,e){return ve.isEmpty(this.get(t,e))}static remove(t,e){if(!ve.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 ve.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){let r={};for(let i of ve.keys(t))r[i]=e(t[i],i);return r}static filterIndex(t,e=null){return ye.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 ve.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 ve.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return ye.each(ve.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(ve.isPrim(t))return t;if(ve.isArr(t))return ye.clone(t);if(!ve.isObj(t))return t;let r={};for(let e of ve.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)=>{ye.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)=>{ye.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(ve.isArr(e))return ye.includes(t,e);if(!ve.isObj(e))return t===e;let r=ve.keys(e),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i=this.includes(t[r[n]],e[r[n]]);return i}static matches(t,e){if(ve.isArr(e))return ye.matches(t,e);if(!ve.isObj(t))return t===e;let r=ye.unique([...ve.keys(e),...ve.keys(t)]),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i&&=this.matches(t[r[n]],e[r[n]]);return i}}y.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),ve.vals(...t)),y.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),ye.find(...t)),y.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),ye.findIndex(...t)),y.sort=(...t)=>(console.warn("Obj.sort() is deprecated, use Arr.sort() instead."),ye.sort(...t)),y.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Arr.sortDeep() instead."),ye.sortDeep(...t));const b=y;var v;function w(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 M={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class O{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.getPrototypeOf(t)===Object.prototype}static isArr(t){return null!=t&&Object.getPrototypeOf(t)===Array.prototype}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||M.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.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!Zt().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&&!ye.has(e,i)&&(r[i]=t[i]);return r}static class(t,e=[]){return e=ye.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=ye.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return be.each(be.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 ve.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 Oe.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"),ye.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)}}w(O,"isPrimitive",(v=O).isPrim),w(O,"isString",v.isStr),w(O,"isNumber",v.isNum),w(O,"isInteger",v.isInt),w(O,"isBoolean",v.isBool),w(O,"isFunction",v.isFunc),w(O,"isReference",v.isRef),w(O,"isObject",v.isObj),w(O,"isArray",v.isArr),w(O,"isIterable",v.isIter),w(O,"length",v.len),w(O,"array",v.arr),w(O,"string",v.str),w(O,"number",v.num),w(O,"integer",v.int),w(O,"boolean",v.bool),O.global=function(...t){return console.warn("Mix.global() is deprecated, use go() instead."),Zt(...t)},O.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),ve.isObj(...t)},O.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),ve.num(...t)},O.delay=function(...t){return console.warn("Mix.delay() is deprecated, use Run.delay() instead."),pe.delay(...t)},O.async=function(...t){return console.warn("Mix.async() is deprecated, use Run.async() instead."),pe.async(...t)},O.debounce=function(...t){return console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),pe.debounce(...t)},O.throttle=function(...t){return console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),pe.throttle(...t)},O.framerate=function(...t){return console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),pe.framerate(...t)},O.convertString=function(...t){return console.warn("Mix.convertString() is deprecated, use Str.string() instead."),me.string(...t)},O.convertDatetime=function(...t){return console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),me.date(...t)},O.convertBool=function(...t){return console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),me.boolean(...t)},O.convertBoolean=function(...t){return console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),me.boolean(...t)};const P=O;const D=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],k=["8","9","a","b"],$=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class j{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+=we.radix(e);for(const t of Object.keys(r))i=me.set(i,t,r[t]);return i}static uuid(t=4){let e="";for(let t=0;t<31;t++)e+=15===t?we.radix(k.length,k):we.radix(D.length,D);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||$],i="";for(let e=0;e<t;e++)i+=we.radix(r.length,r);return i}}var N,S,x;N=j,x=["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"],(S=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+""}(S="RADIX"))in N?Object.defineProperty(N,S,{value:x,enumerable:!0,configurable:!0,writable:!0}):N[S]=x;const Y=j;class I{static bind(t,e,r={},i=!1){return ve.isArr(t)?ye.each(t,t=>this.bind(t,...arguments),this):(ve.isPrim(r)&&(r={id:r}),this.$events=ye.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){return ve.isArr(t)?ye.each(t,t=>this.unbind(t,...arguments),this):(ve.isPrim(e)&&(e={id:e}),ye.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return ye.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){if(ve.isArr(t))return ye.each(t,t=>this.pause(t,...arguments),this);let r=ye.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!0),this}static unpause(t,e={}){if(ve.isArr(t))return ye.each(t,t=>this.pause(t,...arguments),this);let r=ye.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}(I,"$events",[]);const E=I;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 T{static has(t=void 0){return void 0===t||ve.has(T.$text,t)}static get(t=void 0,e=null){return void 0===t?T.$text:be.get(T.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?T.$text=t:be.set(T.$text,t,e)}static code(t=null){return ve.isNull(t)?ve.isNull(Oe.$code)?(Oe.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),Oe.$code):Oe.$code:Oe.$code=t}static collator(){return ve.isNull(Oe.$sort)?(Oe.$sort=new Intl.Collator(Oe.code(),{numeric:!0,sensitivity:"base"}),Oe.$sort):Oe.$sort}static replace(t,e=null){return null==e||be.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=be.get(T.$text,t,t),Oe.replace(t,e)}static choice(t,e=0,r={}){return t=be.get(T.$text,t,t),void 0===r.count&&(r.count=e),t=Oe.countpick(t.split("|"),e),Oe.replace(t,r)}static countpick(t,e){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]}}A(T,"$text",{}),A(T,"$sort",null),A(T,"$code","en");const H=T;function F(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 C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach(function(e){L(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function L(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 G={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class R{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(G.entry);if(null==e)return this.$cookie;return ye.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)?ve.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?fe.parseOptions(this.$cookie[t]):ve.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof de||(r=de.make(r||"+7 days")),i=C({expires:r.toUTC(),path:"/"},i),ve.isRef(e)&&(e=fe.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let s=t+"="+e.replaceAll(";","{:}");return ye.each(i,(t,e)=>{s+=`;${e}=${t}`}),globalThis.document.cookie=s,this}static forget(t,e={}){e=C({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return ye.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}L(R,"$cookie",null);const W=R;class B{static filterNodes(t,e=1){return ye.filter(ve.nodes(t),t=>t.nodeType===e)}static getNodePoint(t,e){let r=null;return null!=he.doc().elementsFromPoint&&(r=document.elementsFromPoint(t,e)),null!=he.doc().msElementsFromPoint&&(r=document.msElementsFromPoint(t,e)),r}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i,clientX:s,clientY:n}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=he.getNodePoint(s,n)),ve.isArr(r)&&(r=ye.first(r)),null==r&&(r=e.target),r.closest(t)}}class q{static _constructFinder(t){return"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=ve.nodes(t)),t}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?he.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?he.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?he.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=ve.nodes(this.el.childNodes);return-1===t?r:ye.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=he.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>he.find(e).is(t)),ye.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!he.find(e).is(t)),ye.filter(this.els,t)}find(t){if(null==this.el)return he.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return ve.isStr(r)&&(r=e.querySelectorAll(t)),he.find(r)}get(t=-1){let e=this.els;return-1===t?e:ye.get(e,t)}first(t=0){return this.get(t)}last(t=1){return ye.get(this.els,this.els.length-t)}each(t){return ye.each(this.els,t)}loopParent(t,e=null){null==e&&(e=he.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?he.find(null):t}child(t,e=1){for(let t of this.els)if(t.nodeType===e)return he.find(t);return he.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:ye.filter(r,e=>he.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}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return he.find(e);return he.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return he.find(e);return he.find(null)}length(){return this.els.length}is(t){if(this.el===t)return!0;if(null==this.el)return!1;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 null!=this.find(t)}}q.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},q.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},q.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},q.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},q.prototype.getNot=()=>{console.error("Dom.getNot() is not implemented anymore.")};class X{}class U{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class V{}!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}(V,"events",[]);class z{bind(t,e,r,i=null,s=!1,n={}){return ve.isPrim(n)&&(n={id:n}),he.events=ye.append(he.events,{el:t,event:e,cb:r,selector:i,pause:s,options:n}),t.addEventListener(e,r,n),this}unbind(t,e,r=null,i={}){ve.isPrim(i)&&(i={id:i});let s=ye.filterIndex(he.events,{el:t,event:e,selector:r,options:i});if(0===s.length)return;return ye.each(s.reverse(),r=>{var i;t.removeEventListener(...(i=he.events[r],[e,i.cb,i.options]))}),ye.splices(he.events,s),this}on(t,e,r={},i=!1,s=null){if(ve.isPrim(r)&&(r={id:r}),ve.isArr(t))return ye.each(t,t=>this.on(t,...arguments)),this;let n=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,n,s,i,r)}),this}off(t,e=null,r={}){return ve.isArr(t)?(ye.each(t,t=>this.off(t,...arguments)),this):(ve.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}once(t,e,r={}){return r.id=we.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},s=!1){return this.on(t,function(t){let i=he.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,s,e),this}fire(t){let e=new Event(t);return this.each(t=>{t.dispatchEvent(e)}),this}}z.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},z.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},z.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},z.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class J{static make(t,e={}){t instanceof he&&(t=t.el),ve.isStr(t)&&(t=document.createElement(t)),t=be.assign(t,e);let r=new he(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}}class _{prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return he.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 he.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(el,e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class K{static getDomState(){return document.readyState}static isDomReady(){return"complete"===he.getDomState()}static isDomComplete(){let t=he.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let i=()=>{pe.delay(t,e)},[s,n]=[he.find(document),"DOMContentLoaded"],o=he.isDomReady;return o()?(pe.wait(()=>{if(o())return i(),!0},10,r),this):(s.on(n,i),this)}static complete(t,e=0,r=6e3){let i=()=>{pe.delay(t,e)},[s,n]=[he.find(document),"load"],o=he.isDomComplete;return o()?(pe.wait(()=>{if(o())return i(),!0},10,r),this):(s.on(n,i),this)}}K.required=()=>{console.error("Dom.required() is not implemented anymore.")};class Z{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 pe.wait(()=>{if(r.call(this))return t(),!0},10,e),this}}function Q(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 tt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(r),!0).forEach(function(e){et(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return 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}class rt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),ve.num(t,0)}}class it{margin(t=null,e=0){let r=this.computed(),i={top:he.num(r.marginTop),right:he.num(r.marginRight),bottom:he.num(r.marginBottom),left:he.num(r.marginLeft)};return null==t?i:be.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:he.num(r.paddingTop),right:he.num(r.paddingRight),bottom:he.num(r.paddingBottom),left:he.num(r.paddingLeft)};return null==t?i:be.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:he.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=he.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:he.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=he.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:be.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=he.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:he.body().scrollWidth-t.left-e,bottom:he.body().scrollHeight-t.top-r};return tt(tt({},t),i)}getOffset(t=null){null==t&&(t=he.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=he.num(t.offsetTop,0),r.left+=he.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=he.find(t),s={top:0,left:0,bottom:0,right:0};return e=t=>{s.top+=he.num(t.offsetTop,0),s.left+=he.num(t.offsetLeft,0)},i.loopOffset(e),s=this.calcOffset(s,i.scrollWidth(),i.scrollHeight()),{top:r.top-s.top,bottom:r.bottom-s.bottom,left:r.left-s.left,right:r.right-s.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:be.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=he.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=he.num(t.scrollTop||t.pageYOffset||0),r.left+=he.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=he.num(t.scrollTop||t.pageYOffset||0),i.left+=he.num(t.scrollLeft||t.pageXOffset||0)},he.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}it.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},it.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},it.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function st(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 nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach(function(e){ot(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function ot(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{}class lt{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return ve.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(ve.isArr(e)&&(e=e.join(" ")),ve.isObj(e)&&(e=fe.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:be.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 ve.isStr(r)&&(r=fe.parseOptions(r)),ve.isUndef(t)?r:(e&&(t=nt(nt({},r),t)),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 ve.isStr(r)&&(r=r.split(" ")),ve.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 ve.isArr(t)||(t=[t]),ye.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>he.find(e).addClass(t));let e=this.el.className.split(" ");return ve.isStr(t)&&(t=t.split(" ")),e=ye.append(e,...t),this.el.className=ye.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>he.find(e).remClass(t));let e=this.el.className.split(" ");return ve.isStr(t)&&(t=t.split(" ")),e=ye.diff(e,t),this.el.className=ye.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>he.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=>he.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}lt.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},lt.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function ut(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 ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach(function(e){ht(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(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 dt{static inviewMaxY(t,e=null){if(ve.isString(t)&&(t={el:t}),!(t=ct(ct({},{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 he.find(t.el).each(t=>{(t=>he.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:ye.first(i)}static inviewMaxX(t,e=null){if(ve.isString(t)&&(t={el:t}),!(t=ct(ct({},{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 he.find(t.el).each(t=>{(t=>he.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:ye.first(i)}}class ft{viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[he.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}=he.find(t).viewoffY(),[i,s]=[he.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("left")+e,this.scroll("left")+e],a=Math.max(0,o+i-n+e);return a>s&&(a=Math.min(s,i+s-a)),Math.max(0,a)}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]=[he.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}=he.find(t).viewoffY(),[i,s]=[he.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("top")+e,this.scroll("top")+e],a=Math.max(0,o+i-n+e);return a>s&&(a=Math.min(s,i+s-a)),Math.min(Math.max(0,a),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}}ft.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},ft.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class pt{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=he.doc().title),document.title=Oe.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}(pt,"$meta",{}),pt.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),he.setMetaTitle(t));class mt{}class gt{}class yt{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}function bt(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 vt=[function(t){return be.each(ve.class(B),(e,r)=>{t[r]=e}),be.each(ve.proto(q),(e,r)=>{t.prototype[r]=e}),t.init.push(q._constructFinder),t},function(t){return be.each(ve.class(K),(e,r)=>{t[r]=e}),be.each(ve.proto(Z),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(X),(e,r)=>{t[r]=e}),be.each(ve.proto(U),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(V),(e,r)=>{t[r]=e}),be.each(ve.proto(z),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(J),(e,r)=>{t[r]=e}),be.each(ve.proto(_),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(rt),(e,r)=>{t[r]=e}),be.each(ve.proto(it),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(at),(e,r)=>{t[r]=e}),be.each(ve.proto(lt),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(dt),(e,r)=>{t[r]=e}),be.each(ve.proto(ft),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(pt),(e,r)=>{t[r]=e}),be.each(ve.proto(mt),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.class(gt),(e,r)=>{t[r]=e}),be.each(ve.proto(yt),(e,r)=>{t.prototype[r]=e}),t}];class wt{constructor(t,...e){bt(this,"el",null),bt(this,"els",[]),ye.each(he.init,r=>{t=r.call(this,t,...e)}),t instanceof he&&(t=t.el),ve.isArr(t)||(t=[t]),this.el=t[0],this.els=t}static find(t,...e){return new he(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:{}}}bt(wt,"init",[]);const Mt=function(){let t=wt;for(const e of vt)t=e.call(t,t);return t},Ot={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 Pt{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){ve.isNum(t)||(t=ve.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)+ve.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-ve.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return ve.isEmpty(t)||be.each(Ot,(e,r)=>{me.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=de.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"])}}PicoNowGridInstance.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},PicoNowGridInstance.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},PicoNowGridInstance.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},PicoNowGridInstance.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},PicoNowGridInstance.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},PicoNowGridInstance.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},PicoNowGridInstance.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},PicoNowGridInstance.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},PicoNowGridInstance.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},PicoNowGridInstance.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},PicoNowGridInstance.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},PicoNowGridInstance.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},PicoNowGridInstance.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},PicoNowGridInstance.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},PicoNowGridInstance.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},PicoNowGridInstance.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const Dt={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},kt={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class $t{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in kt)t=me.replace(t,kt[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return ve.isTime(t)&&(e="HH:mm:ss"),ve.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):ve.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 kt)this.set(me.extract(t,kt[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return be.has(Dt,t)&&(t=Oe.trans(Dt[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",()=>me.integer(this.year(),4))).replace("MM",()=>me.integer(this.month(),2))).replace("DD",()=>me.integer(this.date(),2))).replace("HH",()=>me.integer(this.hour(),2))).replace("mm",()=>me.integer(this.minute(),2))).replace("ss",()=>me.integer(this.second(),2))).replace("YY",()=>me.integer(this.shortyear(),2))).replace("X",()=>me.integer(this.time()))).replace("x",()=>me.integer(this.time()/1e3))}code(t="X"){return ve.int(this.format(t))}}class jt{before(t=null,e="x"){return this.code(e)<de.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)>de.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 de||(t=de.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=[de.make(t),de.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class Nt{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),ye.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),ye.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),ye.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")}}Nt.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},Nt.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},Nt.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},Nt.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},Nt.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},Nt.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class St{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 xt{range(t=null,e="date"){let r="YYYYMMDD";/^months?$/.test(e)&&(r="YYYYMM"),/^years?$/.test(e)&&(r="YYYY");let i=[],s=[this.clone(),de.make(t)];s[0].afterDate(s[1])&&(s=s.reverse()),s[1].add(1,e);for(let t=s[0];!t.equal(s[1],r);t=t.next(e))ye.append(i,t);return i}}xt.prototype.getDatesRange=function(...t){return console.warn("NowRange.getDatesRange() is deprecated, use NowRange.range() instead."),this.range(...t)};const Yt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],It=["January","February","March","April","May","June","July","August","September","October","November","December"];class Et{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(!Yt[e])throw new Error(`Invalid day number "${e}".`);let r=Oe.trans(Yt[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!It[e])throw new Error(`Invalid month number "${e}".`);let r=Oe.trans(It[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 Tt=[function(t){return be.each(ve.proto(Pt),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.proto($t),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.proto(jt),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.proto(Nt),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.proto(St),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.proto(xt),(e,r)=>{t.prototype[r]=e}),t},function(t){return be.each(ve.proto(Et),(e,r)=>{t.prototype[r]=e}),t}];class Ht{constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){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,ve.isNix(r)&&(this.input=r),this.value=t,ve.isStr(r)&&this.parse(r,e),ye.each(de.init,t=>{el=t.call(this,el,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new de(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(t=!1){return new de(new Date(this.value),null,t)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}At(Ht,"init",[]),Ht.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const Ft=function(){let t=Ht;for(const e of Tt)t=e.call(t,t);return t},Ct=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>ve.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>ve.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>ve.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>ve.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Lt=[{match:t=>ve.isArr(t),parse:t=>JSON.stringify(t)}];class Gt{static keyed(t,e=null){return ve.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!ve.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)),ve.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 ve.str(t)}}const Rt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Wt{static castParams(t={}){if(ve.isEmpty(t))return"";return ye.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!ve.isRef(e))return ve.str(t)+"="+fe.casted(e,!0);return ye.each(e,(r,i)=>this.castParam(ve.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(ve.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Rt.entry);if(null==e)return{};const[r,i]=[fe.keyed,fe.parsed];return ye.reduce(Array.from(e),(t,{groups:e})=>be.set(t,r(e.key),i(e.val)),{})}}const Bt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class qt{static castOptions(t={},e=!0){if(ve.isEmpty(t))return"";return ye.each(t,(t,r)=>this.castOption(r,t,null,e)).join(";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let s=i?": ":":";return ve.isObj(e)?ye.map(e,(e,r)=>this.castOption(r,e,t)).join(";"):ve.str(t)+s+fe.casted(e,!1)}static parseOptions(t){if(ve.isEmpty(t))return{};let e=t.matchAll(Bt.entry);if(null==e)return{};const[r,i]=[fe.keyed,fe.parsed];return ye.reduce(Array.from(e),(t,{groups:e})=>be.set(t,r(e.key),i(e.val)),{})}}const Xt=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Ut{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),ye.each(Xt,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const Vt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class zt{static filesize(t,e=1){ve.isNum(t)||(t=ve.num(t,0));let r=r=>ge.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<Vt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+Vt[e];return r(Vt.length)}}const Jt=[function(t){return be.each(ve.class(Gt),(e,r)=>{t[r]=e}),t},function(t){return be.each(ve.class(Wt),(e,r)=>{t[r]=e}),t},function(t){return be.each(ve.class(qt),(e,r)=>{t[r]=e}),t},function(t){return be.each(ve.class(Ut),(e,r)=>{t[r]=e}),t},function(t){return be.each(ve.class(zt),(e,r)=>{t[r]=e}),t}];class _t{static extend(t){t.call({},this)}}const Kt=function(){let t=_t;for(const e of Jt)t=e.call(t,t);return t};function Zt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function Qt(){const t=Zt();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 te(){const t=Zt();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}class ee{static has(t){return be.has(this.$data,ye.first(t))}static set(t,e){let[r,i]=[null,ye.first(t)];be.has(this.$data,i)&&(r=be.get(this.$data,i)),ve.isEqual(r,e)||(be.set(this.$data,i,e),Me.fire("store:"+i,e,i))}static unset(t){be.unset(this.$data,[...ye.first(t)])}static get(t,e=null,r=!1){let i=ye.first(t);if(!be.has(this.$data,i)&&!r)return e;be.has(this.$data,i)&&r&&be.set(this.$data,i,e);let s=be.get(this.$data,i,e);return ve.isObj(s)?be.clone(s):s}static find(t,e,r=null){let i=ye.first(t);if(!1===be.has(this.$data,i))return r;if(!1===be.has(e,"id"))return r;let s=ye.findIndex(this.get(i),{id:e.id});return-1===s?r:this.get(i+"."+s)}static replace(t,e){let r=ye.first(t);if(!1===be.has(this.$data,r))return;if(!1===be.has(e,"id"))return;let i=ye.findIndex(this.get(r),{id:ge.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,ye.concat(this.get(t,[]),e))}static remove(t,...e){this.set(t,ye.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}(ee,"$data",{});const re=ee;class ie{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),i=Oe.replace(i,e),ve.isEmpty(r)||(i+="?"+fe.castParams(e)),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}(ie,"$routes",{});const se=ie;function ne(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 oe{constructor(t,e={}){if(ne(this,"map",null),ne(this,"markers",{}),ne(this,"cluster",null),ne(this,"clusterFilter",null),ne(this,"clusterOptions",{}),!globalThis.google)throw new Error("Google Maps is required for pi.Map");let r=be.only(e,["lat","lng"]);be.has(e,"styles")||(e.styles=Map.mapStyle),e=be.assign({gestureHandling:"cooperative",scrollwheel:null,zoom:12,center:r},be.except(e,["lat","lng"])),this.map=new globalThis.google.maps.Map(he.find(t).get(0),e)}static setMapStyle(t=[]){return Map.mapStyle=t,this}static setMarkerStyle(t,e={},r={}){if(!globalThis.google)throw new Error("Google Maps is required for pi.Map");if(!be.has(e,"default"))return console.error("Marker style requires default property");be.has(e,"width")||(e.width=45),be.has(e,"height")||(e.height=45);let i={},s=new globalThis.google.maps.Size(e.width,e.height),n=new globalThis.google.maps.Point(0,0),o=new globalThis.google.maps.Point(e.width/2,e.height);return i.default={url:e.default,size:s,origin:n,anchor:o,scaledSize:s},be.has(e,"hover")&&(i.hover=be.assign({},i.default,{url:e.hover})),be.has(i,"hover")||(i.hover=i.default),be.has(e,"active")&&(i.active=be.assign({},i.default,{url:e.active})),be.has(i,"active")||(i.active=i.default),be.each(r,(t,e)=>{i[e]=be.assign({},i.default,{url:t})}),be.set(Map.markerStyles,t,i),this}clusterMarkers(t={},e=null,r=!0){if(!this.cluster&&!r)return;if(void 0===globalThis.MarkerClusterer)return console.error("Google Maps Cluster library not laoded!");be.has(t,"imagePath")||be.has(t,"styles")||(t.imagePath="//developers.google.com/maps/documentation/javascript/examples/markerclusterer/m"),this.cluster&&this.cluster.clearMarkers(),ve.isFunction(e)&&(this.clusterFilter=e);let i=ye.filter(this.markers,t=>{let e=this.getMarkerVisibility(t.key);return ve.isFunction(this.clusterFilter)?e&&this.clusterFilter.call(this,t):e});this.cluster=new globalThis.MarkerClusterer(this.map,ye.each(i,t=>t.marker),this.clusterOptions=t)}styleMarker(t,e=null){let r=be.get(this.markers,t);if(ve.isEmpty(r))return console.error(`Marker "${t}" not found`);ve.isEmpty(e)&&(e=this.getInfoVisibility(t)?"active":"default"),be.has(Map.markerStyles,[r.style,e])&&r.marker.setIcon(be.get(Map.markerStyles,[r.style,e]))}getMarker(t){return be.get(this.markers,t)}getMarkerVisibility(t,e=!1){let r=be.get(this.markers,t);return ve.isEmpty(r)?e:r.marker.getVisible()}getMarkerPositon(t,e=null){let r=be.get(this.markers,t);return ve.isEmpty(r)?e:r.marker.getPosition()}toggleMarker(t){let e=be.get(this.markers,t);return ve.isEmpty(e)?console.error(`Marker "${t}" not found`):e.marker.getVisible()?this.hideMarker(t):this.showMarker(t)}showMarker(t){let e=be.get(this.markers,t);if(ve.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!e.marker.getVisible();return r&&e.marker.setVisible(!0),r}hideMarker(t){let e=be.get(this.markers,t);if(ve.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!!e.marker.getVisible();return r&&e.marker.setVisible(!1),this.closeInfo(t),r}enterMarker(t){let e=be.get(this.markers,t);if(ve.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="hover";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}leaveMarker(t){let e=be.get(this.markers,t);if(ve.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="default";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}getInfoVisibility(t,e=!1){let r=be.get(this.markers,t);return ve.isEmpty(r)||!be.has(r,"info")?e:!!r.info.getMap()}toggleInfo(t){let e=be.get(this.markers,t);return ve.isEmpty(e)?console.error(`Marker "${t}" not found`):e.info.getMap()?this.closeInfo(t):this.openInfo(t)}openInfo(t){let e=be.get(this.markers,t);if(ve.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!be.has(e,"info"))return!0;let r=!e.info.getMap();return Map.closeInfoWindows&&be.each(ve.keys(this.markers),this.closeInfo.bind(this)),r&&e.info.open(this.map,e.marker),ve.isFunction(e.onOpen)&&e.onOpen(e),this.styleMarker(t,"active"),r}closeInfo(t){let e=be.get(this.markers,t);if(ve.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!be.has(e,"info"))return!1;let r=!!e.info.getMap();return r&&e.info.close(),ve.isFunction(e.onClose)&&e.onClose(e),this.styleMarker(t,"default"),r}createMarker(t=null,e={}){ve.isEmpty(t)&&(t=we.uuid());let r={key:t};return be.has(e,"visible")||(e.visible=!0),r.extras=be.except(e,["map","position","lat","lng","html","style","visible","onOpen","onClose"]),be.has(e,"map")||(e.map=this.map),be.has(e,"position")||(e.position=be.only(e,["lat","lng"])),be.has(e,"style")&&(r.style=e.style),r.marker=new globalThis.google.maps.Marker(e),e.visible||r.marker.setVisible(!1),be.assign(r,{onOpen:be.get(e,"onOpen"),onClose:be.get(e,"onClose")}),be.set(this.markers,t,r),this.clusterMarkers(this.clusterOptions,null,!1),be.has(e,"html")?(be.has(r,"style")||(r.style="default"),this.styleMarker(t),r.marker.addListener("mouseover",()=>this.enterMarker(t)),r.marker.addListener("mouseout",()=>this.leaveMarker(t)),r.info=new globalThis.google.maps.InfoWindow({content:'<div class="gw-i-html">'+be.get(e,"html")+"</div>"}),r.marker.addListener("click",()=>this.toggleInfo(t)),r.info.addListener("closeclick",()=>this.closeInfo(t)),r.info.addListener("domready",()=>Me.fire("MapsDomReady")),be.set(this.markers,t,r),be.get(this.markers,t)):be.get(this.markers,t)}setMarkerPosition(t,e={}){let r=be.get(this.markers,t);if(ve.isEmpty(r))return console.error(`Marker "${t}" not found`);r.marker.setPosition(e)}setMarkerByAddress(t,e){return this.getLocationByAddress(e,e=>{this.setMarkerPosition(t,be.get(e,"0.geometry.location",{}))})}getLocationByAddress(t,e=null){let r=new globalThis.google.maps.Geocoder;return new Promise((i,s)=>{r.geocode({address:t},(t,r)=>{"OK"===r&&(e(t),i(t)),"OK"!==r&&s(t)})})}showMarkers(t=null){let e=this.markers;return ve.isEmpty(t)||(e=be.filter(this.markers,t)),Map.hideMarkers&&be.each(ve.keys(this.markers),this.hideMarker.bind(this)),be.each(e,t=>this.showMarker(t.key)),this.clusterMarkers(this.clusterOptions,null,!1),this}getMarkerBoundry(t=null){let e=this.markers;ve.isEmpty(t)||(e=be.filter(this.markers,t));let r=new globalThis.google.maps.LatLngBounds;return be.each(e,t=>{t.marker.getVisible()&&r.extend(t.marker.getPosition())}),r}focusMarkers(t=null,e=14,r=15){let i=this.getMarkerBoundry(t);return this.map.setCenter(i.getCenter()),this.map.fitBounds(i,r),this.map.getZoom()>e&&this.map.setZoom(e),this}renderDirections(t){let e=new globalThis.google.maps.DirectionsService,r=new globalThis.google.maps.DirectionsRenderer;be.has(t,"map")||(t.map=this.map),be.has(t,"travelMode")||(t.travelMode="DRIVING"),r.setMap(t.map),be.has(t,"panel")&&!he.find(t.panel).empty()&&r.setPanel(he.find(t.panel).get(0)),t=be.only(t,["origin","destination","travelMode"]);return new Promise((i,s)=>{e.route(t,(t,e)=>{"OK"===e&&(r.setDirections(t),i(t)),"OK"!==e&&s(t)})})}}ne(oe,"mapStyle",[]),ne(oe,"markerStyles",{}),ne(oe,"hideMarkers",!0),ne(oe,"closeInfoWindows",!0);const ae=oe;function le(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 ue{static listen(){document.addEventListener("scroll",ue.scroll),ue.scroll()}static scroll(){ye.each(this.invi,(t,e)=>{he.find(t.el).inviewY()&&(ye.removeIndex(this.invi,e),t.cb())})}static alias(t,e){return be.set(this.inis,t,e),this}static bind(t,e,r={}){let i=he.find(e),s=this.getPrefix(t);i.addClass(s);let n=be.get(this.inis,t,null);if(ve.isEmpty(n))return console.error(`Element "${t}" is not defined.`);let o=(t,e)=>{let r=new n(t.get(0),e);return ue.runs.push({el:t.get(0),prefix:s,deamon:r}),t.data(s,r),void 0!==r.bind?r.bind(t.get(0),e):r};return he.ready(()=>o.call({},i,r)),this}static unbind(t,e,r={}){let i=he.find(e),s=this.getPrefix(t),n=be.get(this.inis,t,null);if(ve.isEmpty(n))return console.error(`Element "${t}" is not defined.`);return((t,e)=>{let r=t.data(s);if(void 0!==r.unbind)return r.unbind(t.get(0),e)}).call({},i,r),ye.remove(ue.runs,{el:i.get(0)}),this}static observe(t,e=!1){let r=this.getPrefix(t),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:[r]},s=()=>{let i=ue.getPrefix(t),s=ye.filter(this.runs,{prefix:r});ye.each(s,({el:i})=>{let s=me.objectify(he.find(i).attr(r));if(e&&ve.isEmpty(s)&&(s={_plain:he.find(i).attr(r)}),be.pluck(s,"inview",!1)&&ye.remove(this.invi,{el:i}),!document.body.contains(i))return this.unbind(t,i,s)}),he.find(`[${r}]:not(.${i})`).each(i=>{let s=me.objectify(he.find(i).attr(r));e&&ve.isEmpty(s)&&(s={_plain:he.find(i).attr(r)});let n=()=>{this.bind(t,i,s)};be.pluck(s,"inview",!1)?this.bindInview(i,n):n()})};return he.find(document.body).observer(s)(document.body,i),he.find(document.body).on("dom.change",s),this}static bindInview(t,e){ye.add(this.invi,{el:t,cb:e},{el:t})}static unbindInview(t,e){ye.remove(this.invi,{el:t,cb:e},{el:t})}static getPrefix(t){return t?this.prefix+"-"+t:this.prefix}static setPrefix(t){this.prefix=t}}le(ue,"prefix","js"),le(ue,"mount","mount"),le(ue,"inis",{}),le(ue,"runs",[]),le(ue,"invi",[]);const ce=ue,he=Mt(),de=Ft(),fe=Kt(),pe=s,me=u,ge=p,ye=g,be=b,ve=P,we=Y,Me=E,Oe=H,Pe=W,De=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>ve[e](...t)}}),ke=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),Y.make()};return e})());
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.pi=e():t.pi=e()}(self,()=>(()=>{"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={};function r(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(e),t.d(e,{Any:()=>pe,Arr:()=>g,Cookie:()=>B,Data:()=>re,Dom:()=>he,Element:()=>ce,Event:()=>A,For:()=>fe,Hash:()=>Y,Locale:()=>H,Map:()=>le,Mix:()=>D,Now:()=>de,Num:()=>p,Obj:()=>b,Route:()=>se,Run:()=>s,Str:()=>u,UUID:()=>me,browser:()=>Qt,device:()=>te,go:()=>Zt});class i{static timeout(t,e=0,r=null){let s=i.$idler.native;return null==r&&(r=Y.make(12)),s[r="t-"+r]=setInterval(()=>{t()},e),r}static interval(t,e=0,r=null){let s=i.$idler.native;return null==r&&(r=Y.make(12)),s[r="i-"+r]=setInterval(()=>{t()},e),r}static clear(t,e="native"){if(D.isArr(t))return g.each(t,t=>this.clear(t,e)),this;let r=i.$idler[e];return!1===/^i-/.test(t)&&clearInterval(r[t]),!1===/^t-/.test(t)&&clearTimeout(r[t]),this}static wait(t,e=0,r=500){let i,s;s=this.timeout(()=>{this.clear([i,s])},e*r),i=this.interval(()=>{t()&&this.clear([i,s])},e)}static frame(t,...e){return requestAnimationFrame(function(){t(...e)}),this}static async(t,...e){return setTimeout(()=>{t(...e)}),this}static delay(t,e=0,...r){let i=setTimeout(()=>{this.async(t,...r)},e);return()=>clearTimeout(i)}static debounce(t,e=100,r=null){let s=i.$idler.debounce;return null==r&&(r=Y.make(12)),(...i)=>{s[r]&&clearTimeout(s[r]),s[r]=setTimeout(()=>{this.frame(t,...i)},e)}}static throttle(t,e=100,r=null){let s,n=i.$idler.throttle;return null==r&&(r=Y.make(12)),(...i)=>{n[r]&&clearTimeout(n[r]),n[r]=setTimeout(()=>{s=!1},e),s||(this.frame(t,...i),s=!0)}}static framerate(t,e=30){let r=0;return(...i)=>{Date.now()-r<=1e3/e||(this.frame(t,...i),r=Date.now())}}static framebuffer(t,e,r=1e3){return(s,...n)=>{g.replace(i.$buffer,{key:e,cb:t,order:r,args:[s,...n],active:!0},{key:e}),s.preventDefault(),i.runFramebuffer()}}static runFramebuffer(){if(this.$timer.func&&this.$timer.func(),this.$timer.func=this.delay(()=>{this.runFramebuffer()},50),Date.now()-this.$timer.date<=50)return;this.$timer.func&&this.$timer.func(),this.$timer.date=Date.now();let t=g.filter(this.$buffer,{active:!0});0!==t.length&&this.frame(()=>{g.each(g.sort(t,"order"),t=>{t.cb(...t.args),t.active=!1})})}}r(i,"$idler",{native:{},debounce:{},throttle:{}}),r(i,"$timer",{date:0,func:null}),r(i,"$buffer",[]);const s=i;var n;function o(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 l(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 a{static get(t,e){return D.isStr(t)||(t=D.str(t)),D.isInt(e)&&(e=D.int(e)),t.charAt(e)}static set(t,e,r=""){return D.isStr(t)||(t=D.str(t)),D.isInt(e)&&(e=D.int(e)),t.substring(0,e)+r+t.substring(e+r.length)}static replace(t,e,r=null){D.isNull(r)&&(r=t);let i=r.indexOf(e);return-1===i?t:this.set(t,i,e)}static extract(t,e,r=null){D.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=D.str(t).match(e);return D.isEmpty(i)?[]:D.isFunc(r)?r(i):i}static regex(t){return D.str(t).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}static uc(t){return D.str(t).toUpperCase()}static ucfirst(t){return t.charAt(0).toUpperCase()+t.slice(1)}static lc(t){return D.str(t).toLowerCase()}static lcfirst(t){return t.charAt(0).toLowerCase()+t.slice(1)}static cc(t){return g.each(fe.slugify(t).split("-"),(t,e)=>e?this.ucfirst(t):t).join("")}static kc(t){return fe.slugify(t)}static sc(t){return fe.slugify(t).replace("-","_")}static pc(t){return g.each(fe.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=D.str(t).indexOf(e);return-1===i?r:[i,i+e.length]}static slice(t,e,r){return D.str(t).slice(e,r)}static string(t,e="-",r=!1){return D.isEmpty(t)?e:(t=D.str(t),r?t:t.replace(/<[^>]*>?/gm,""))}static boolean(t,e="Yes",r="No",i="-"){return D.isEmpty(t)?i:D.bool(t)?e:r}static number(t,e=null,r=null,i={}){return D.isNum(t)?(null==r&&(r=H.code()),i=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(e){l(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(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),D.num(t).toLocaleString(r,i)):t}static integer(t,e=0,r="0"){return D.isNum(t)?(D.isInt(t)||(t=D.int(t)),t=D.int(t),e?D.str(t).padStart(e,r):D.str(t)):t}static datetime(t,e="YYYY-MM-DD HH:mm:ss",r="-"){return D.isDate(t)||(t=de.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 D.isRef(t)?t:("params"===e&&(t=fe.parseParams(t)),"options"===e&&(t=fe.parseOptions(t)),D.isRef(t)||(t=JSON.parse(t)),r?D.vals(t):t)}static stringify(t,e="options"){return D.isStr(t)?t:"params"===e?fe.castParams(t):"options"===e?fe.castOptions(t):JSON.stringify(t)}}l(a,"upper",(n=a).uc),l(a,"lower",n.lc),l(a,"camelcase",n.cc),l(a,"kebabcase",n.kc),l(a,"snakecase",n.sc),l(a,"pascalcase",n.pc),a.regexEscape=(...t)=>(console.warn("Str.regexEscape() is deprecated, use Str.regex() instead."),u.regex(...t)),a.humancase=(...t)=>(console.warn("Str.humancase() is deprecated, use Str.pascalcase() instead."),u.pascalcase(...t)),a.slugify=(...t)=>(console.warn("Str.slugify() is deprecated, use For.slugify() instead."),fe.slugify(...t)),a.options=(...t)=>(console.warn("Str.options() is deprecated, use For.castOptions() instead."),fe.castOptions(...t)),a.fromOptions=(...t)=>(console.warn("Str.fromOptions() is deprecated, use For.parseOptions() instead."),fe.parseOptions(...t)),a.params=(...t)=>(console.warn("Str.params() is deprecated, use For.castParams() instead."),fe.castParams(...t)),a.fromParams=(...t)=>(console.warn("Str.fromParams() is deprecated, use For.parseParams() instead."),fe.parseParams(...t)),a.filesize=(...t)=>(console.warn("Str.filesize() is deprecated, use For.filesize() instead."),fe.filesize(...t)),a.real=()=>{console.error("Str.real() is not implemented anymore.")},a.array=()=>{console.error("Str.array() is not implemented anymore.")};const u=a;function c(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 h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?c(Object(r),!0).forEach(function(e){d(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function d(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 f{static fixed(t,e=2){return D.isNum(t)||(t=D.num(t)),t.toFixed(e)}static float(t){return D.isNum(t)||(t=D.num(t)),parseFloat(t)}static int(t){return D.isNum(t)||(t=D.num(t)),parseInt(t)}static ceil(t){return D.isNum(t)||(t=D.num(t)),Math.ceil(t)}static floor(t){return D.isNum(t)||(t=D.num(t)),Math.floor(t)}static round(t){return D.isNum(t)||(t=D.num(t)),Math.round(t)}static combine(t){return g.reduce(t,(t,e)=>t+e,0)}static subtract(t){return g.reduce(t,(t,e)=>t-e,0)}static decade(t){return D.isNum(t)||(t=D.num(t)),10*Math.floor(t/10)}static matrix(t,e=10,r=[]){let i=0;for(let e=20;e>=0;e--)t>=(i=Math.pow(2,e))&&(r.push(i),t-=i);return r}static distance(t,e,r=!1){let i={lat:0,lng:0};[t,e]=[h(h({},i),t),h(h({},i),e)];let s=Math.PI*this.float(t.lat)/180,n=Math.PI*this.float(e.lat)/180,o=(this.float(t.lng)-this.float(e.lng))/180,l=this.combine([Math.sin(s)*Math.sin(n),Math.cos(s)*Math.cos(n)*Math.cos(o)]);return l=180*Math.acos(l>1?1:l)/Math.PI*60*1.1515,r?1.609344*l:l}}f.format=(t,...e)=>(console.warn("Num.format() is deprecated, use Str.number() instead."),u.number(t,e[2]||null)),f.random=(...t)=>(console.warn("Num.random() is deprecated, use Hash.number() instead."),Y.number(...t));const p=f;class m{static all(t){return D.isArr(t)?t:[t]}static get(t,e,r=null){return D.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 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(!D.isPrim(e))return-1!==this.findIndex(t,e);return D.isArr(t)||(t=[t]),-1!==t.findIndex(t=>t==e)}static unique(t){let e={};for(const r of t)e[r]=!0;return D.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){let[i,s]=[D.isArr(t),D.keys(t)],n=t=>i?parseInt(t):t,o=new Array(s.length);for(let r=0;r<s.length;r++)o[r]=e(t[s[r]],n(s[r]));return null!=r?r:o}static map(t,e){let[r,i]=[D.isArr(t),D.keys(t)],s=t=>r?parseInt(t):t;for(let r of i)t[r]=e(t[r],s(r));return t}static recursive(t,e,r,i=[]){return null==t?t:this.map(t,s=>(this.recursive(s[e],e,r,[...i,t]),r(s,i)))}static filterIndex(t,e=null){return null==e&&(e=t=>!D.isEmpty(t)),D.keys(t).filter(r=>D.isFunc(e)?e.call({},t[r],r):D.isRef(e)?this.includes(t[r],e):e===t[r])}static filter(t,e=null){return null==e&&(e=t=>!D.isEmpty(t)),D.vals(t).filter((r,i)=>D.isFunc(e)?e.call({},r,i):D.isRef(e)?this.includes(r,e):e===t[i])}static findIndex(t,e=null,r=-1){null==e&&(e=t=>!D.isEmpty(t));for(let r=0;r<t.length;r++){if(D.isFunc(e)&&e.call({},t[r],r))return r;if(D.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 D.isFunc(e)?this.sortFunc(t,e):null!=e?this.sortDeep(t,e):this.sortPrim(t)}static sortFunc(t,e){let r=D.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=D.keys(t).sort((t,r)=>D.compare(b.get(t,e),b.get(r,e))),i=[];for(const e of r)i.push(t[e]);return i}static sortPrim(t){let e=D.keys(t).sort((t,e)=>D.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(parseInt(e),r)}static splice(t,e,r=1,...i){return t.splice(parseInt(e),r,...i)}static splices(t,e,r=1){return this.each(e,e=>{this.splice(t,e,r)}),t}static clone(t){if(D.isPrim(t))return t;if(D.isObj(t))return b.clone(t);if(!D.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]=b.get(t[i],e);return r}static reduce(t,e,r){return D.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(D.isObj(e))return b.includes(t,e);if(!D.isArr(e))return t===e;let[r,i]=[!1,e.length];if(0===i)return!0;for(let s=0;!1===r&&s<i;s++)r||=this.has(t,e[s]);return r}static contains(t,e){let r=!0;for(let i of D.vals(e))r&&=-1!==D.vals(t).indexOf(i);return r}static matches(t,e){if(D.isObj(e))return b.matches(t,e);if(!D.isArr(t))return t===e;e=this.unique(e);let[r,i]=[!0,e.length];if(t.length!==e.length)return!1;for(let s=0;!0===r&&s<i;s++)r&&=this.has(t,e[s]);return r}}m.removeIndex=(...t)=>(console.warn("Arr.removeIndex() is deprecated, use Arr.unset() instead."),Arr.unset(...t)),m.sortString=(...t)=>(console.warn("Arr.sortString() is deprecated, use Arr.sortPrim() instead."),Arr.sortPrim(...t)),m.push=(...t)=>(console.warn("Arr.push() is deprecated, use Arr.append() instead."),Arr.append(...t)),m.concat=(...t)=>(console.warn("Arr.concat() is deprecated, use Arr.merge() instead."),Arr.merge(...t)),m.equal=(...t)=>(console.warn("Arr.equal() is deprecated, use Arr.matches() instead."),Arr.matches(...t)),m.diffrence=(...t)=>(console.warn("Arr.diffrence() is deprecated, use Arr.diff() instead."),Arr.diff(...t)),m.intersect=(...t)=>(console.warn("Arr.intersect() is deprecated, use Arr.isect() instead."),Arr.isect(...t));const g=m;class y{static keyoptim(t,e=!1,r=null){return null===r&&(r=D.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=D.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[s,n,o]=[e.pop(),0,e.length];if(0===o)return void 0!==t[s];for(;null!=t&&n<o;)t=t[e[n++]];return null!=t&&void 0!==t[s]}static get(t,e,r=null,i=!1){if(null==t||null==e)return r;"number"==typeof e&&(e=D.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e];let n=0,o=(e=this.keyoptim(e,i,s)).length;if(0===o)return r;for(;null!=t&&n<o;)t=t[e[n++]];return null==t?r:t}static set(t,e,r,i=!1){if(null==e)return t;"number"==typeof e&&(e=D.str(e));const s="string"==typeof e;if(s&&t&&void 0!==t[e])return t[e]=r,t;if(0===(e=this.keyoptim(e,i,s)).length)return t;let n=t;for(let t,i,s=0;s<e.length;s++)t=i=String(e[s]),-1!==i.indexOf("[]")&&(t=i.replace("[]","")),null==n[t]&&(n[t]=t===i?{}:[]),t!==i&&g.insert(e,s+1,n[t].length),e.length-1===s&&(n[t]=r),n=n[t];return t}static unset(t,e,r=!1){if(null==e)return t;"number"==typeof e&&(e=D.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[s,n,o,l]=[e.pop(),0,e.length,t];if(0===o)return t;for(;null!=l&&n<o;)l=l[e[n++]];return null==l||delete l[s],t}static empty(t,e){return D.isEmpty(this.get(t,e))}static remove(t,e){if(!D.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 D.keys(t))i[r]=e(t[r],r);return null!=r?r:i}static map(t,e){let r={};for(let i of D.keys(t))r[i]=e(t[i],i);return r}static filterIndex(t,e=null){return g.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 D.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 D.keys(t))this.flattenForm(t[e],i(e),r);return r}static unpack(t,e={}){return g.each(D.keys(t),r=>{this.set(e,r,t[r])}),e}static assign(...t){return Object.assign(...t)}static clone(t,e=null){if(D.isPrim(t))return t;if(D.isArr(t))return g.clone(t);if(!D.isObj(t))return t;let r={};for(let e of D.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)=>{g.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)=>{g.has(e,r)||(i[r]=t)}),null==r?i:this.assign(i,r)}static includes(t,e){if(D.isArr(e))return g.includes(t,e);if(!D.isObj(e))return t===e;let r=D.keys(e),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i=this.includes(t[r[n]],e[r[n]]);return i}static matches(t,e){if(D.isArr(e))return g.matches(t,e);if(!D.isObj(t))return t===e;let r=g.unique([...D.keys(e),...D.keys(t)]),[i,s]=[!0,r.length];for(let n=0;!0===i&&n<s;n++)i&&=this.matches(t[r[n]],e[r[n]]);return i}}y.values=(...t)=>(console.warn("Obj.values() is deprecated, use Mix.vals() instead."),D.vals(...t)),y.find=(...t)=>(console.warn("Obj.find() is deprecated, use Arr.find() instead."),g.find(...t)),y.findIndex=(...t)=>(console.warn("Obj.findIndex() is deprecated, use Arr.findIndex() instead."),g.findIndex(...t)),y.sort=(...t)=>(console.warn("Obj.sort() is deprecated, use Arr.sort() instead."),g.sort(...t)),y.sortString=(...t)=>(console.warn("Obj.sortString() is deprecated, use Arr.sortDeep() instead."),g.sortDeep(...t));const b=y;var v;function w(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 M={iso:/^\d{4}-\d{2}-\d{2}[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/};class O{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.getPrototypeOf(t)===Object.prototype}static isArr(t){return null!=t&&Object.getPrototypeOf(t)===Array.prototype}static isIter(t){return!this.isArr(t)&&(!!this.isRef(t)&&this.isFunc(t.entries))}static isIsoDate(t){return t instanceof Date||M.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.isIter(t)&&(t=this.iter(t)),Object.keys(t))}static vals(t){if(null==t)return[];if(this.isIter(t)&&(t=this.iter(t)),this.isArr(t)||!Zt().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&&!g.has(e,i)&&(r[i]=t[i]);return r}static class(t,e=[]){return e=g.merge(e,["length","name","prototype","constructor"]),this.props(t,e)}static proto(t,e=[]){return e=g.merge(e,["constructor"]),this.props(t.prototype,e)}static form(t){let e=new FormData;return b.each(b.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 D.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 H.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"),g.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)}}w(O,"isPrimitive",(v=O).isPrim),w(O,"isString",v.isStr),w(O,"isNumber",v.isNum),w(O,"isInteger",v.isInt),w(O,"isBoolean",v.isBool),w(O,"isFunction",v.isFunc),w(O,"isReference",v.isRef),w(O,"isObject",v.isObj),w(O,"isArray",v.isArr),w(O,"isIterable",v.isIter),w(O,"length",v.len),w(O,"array",v.arr),w(O,"string",v.str),w(O,"number",v.num),w(O,"integer",v.int),w(O,"boolean",v.bool),O.global=function(...t){return console.warn("Mix.global() is deprecated, use go() instead."),Zt(...t)},O.isPlain=function(...t){return console.warn("Mix.isPlain() is deprecated, use Mix.isObj() instead."),D.isObj(...t)},O.float=function(...t){return console.warn("Mix.float() is deprecated, use Mix.num() instead."),D.num(...t)},O.delay=function(...t){return console.warn("Mix.delay() is deprecated, use Run.delay() instead."),s.delay(...t)},O.async=function(...t){return console.warn("Mix.async() is deprecated, use Run.async() instead."),s.async(...t)},O.debounce=function(...t){return console.warn("Mix.debounce() is deprecated, use Run.debounce() instead."),s.debounce(...t)},O.throttle=function(...t){return console.warn("Mix.throttle() is deprecated, use Run.throttle() instead."),s.throttle(...t)},O.framerate=function(...t){return console.warn("Mix.framerate() is deprecated, use Run.framerate() instead."),s.framerate(...t)},O.convertString=function(...t){return console.warn("Mix.convertString() is deprecated, use Str.string() instead."),u.string(...t)},O.convertDatetime=function(...t){return console.warn("Mix.convertDatetime() is deprecated, use Str.date() instead."),u.date(...t)},O.convertBool=function(...t){return console.warn("Mix.convertBool() is deprecated, use Str.boolean() instead."),u.boolean(...t)},O.convertBoolean=function(...t){return console.warn("Mix.convertBoolean() is deprecated, use Str.boolean() instead."),u.boolean(...t)};const D=O;const k=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","A","B","C","D","E","F"],P=["8","9","a","b"],$=["@","#","$","%","^","&","*","(",")","_","+","-","=","[","]","{","}",";",":",",",".","/","<",">","?"];class j{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=u.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(P.length,P):this.radix(k.length,k);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||$],i="";for(let e=0;e<t;e++)i+=this.radix(r.length,r);return i}}var S,x,N;S=j,N=["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"],(x=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+""}(x="RADIX"))in S?Object.defineProperty(S,x,{value:N,enumerable:!0,configurable:!0,writable:!0}):S[x]=N;const Y=j;class E{static bind(t,e,r={},i=!1){return D.isArr(t)?g.each(t,t=>this.bind(t,...arguments),this):(D.isPrim(r)&&(r={id:r}),this.$events=g.append(this.$events,{event:t,cb:e,options:r,paused:i}),this)}static unbind(t,e={}){return D.isArr(t)?g.each(t,t=>this.unbind(t,...arguments),this):(D.isPrim(e)&&(e={id:e}),g.remove(this.$events,{event:t,options:e}),this)}static fire(t,...e){let r=this.$events.filter(e=>e.event===t);return g.each(r,t=>{t.paused||t.cb.call({},...e)}),this}static pause(t,e={}){if(D.isArr(t))return g.each(t,t=>this.pause(t,...arguments),this);let r=g.find(this.$events,{event:t,options:e});return null!=r&&(r.paused=!0),this}static unpause(t,e={}){if(D.isArr(t))return g.each(t,t=>this.pause(t,...arguments),this);let r=g.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 A=E;function T(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 I{static has(t=void 0){return void 0===t||D.has(I.$text,t)}static get(t=void 0,e=null){return void 0===t?I.$text:b.get(I.$text,t,e)}static set(t=void 0,e=void 0){return void 0===e?I.$text=t:b.set(I.$text,t,e)}static code(t=null){return D.isNull(t)?D.isNull(H.$code)?(H.$code=(navigator.language||"en-US").replace(/-[A-Z]+$/,""),H.$code):H.$code:H.$code=t}static collator(){return D.isNull(H.$sort)?(H.$sort=new Intl.Collator(H.code(),{numeric:!0,sensitivity:"base"}),H.$sort):H.$sort}static replace(t,e=null){return null==e||b.each(e,(e,r)=>{t=t.replace(new RegExp(":"+r,"g"),e)}),t}static trans(t,e=null){return t=b.get(I.$text,t,t),H.replace(t,e)}static choice(t,e=0,r={}){return t=b.get(I.$text,t,t),void 0===r.count&&(r.count=e),t=H.countpick(t.split("|"),e),H.replace(t,r)}static countpick(t,e){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]}}T(I,"$text",{}),T(I,"$sort",null),T(I,"$code","en");const H=I;function F(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 C(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?F(Object(r),!0).forEach(function(e){L(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function L(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 R={entry:/(?<=^|;)\s*(?<key>.*?)\s*=\s*(?<value>[^;$]+)/g};class W{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(R.entry);if(null==e)return this.$cookie;return g.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)?D.bool(this.$cookie[t]):/^obj(ext)?$/.test(r)?fe.parseOptions(this.$cookie[t]):D.str(this.$cookie[t])}static set(t,e,r=null,i={}){this.$cookie||this.parse(),r instanceof de||(r=de.make(r||"+7 days")),i=C({expires:r.toUTC(),path:"/"},i),D.isRef(e)&&(e=fe.castOptions(e,!1)),null!=e&&(this.$cookie[t]=e);let s=t+"="+e.replaceAll(";","{:}");return g.each(i,(t,e)=>{s+=`;${e}=${t}`}),globalThis.document.cookie=s,this}static forget(t,e={}){e=C({expires:"Thu, 01 Jan 1970 00:00:01 GMT",path:"/"},e),this.$cookie[t]&&delete this.$cookie[t];let r=`${t}=null`;return g.each(e,(t,e)=>{r+=`;${e}=${t}`}),globalThis.document.cookie=r,this}}L(W,"$cookie",null);const B=W;class G{static filterNodes(t,e=1){return g.filter(D.nodes(t),t=>t.nodeType===e)}static getNodePoint(t,e){let r=null;return null!=he.doc().elementsFromPoint&&(r=document.elementsFromPoint(t,e)),null!=he.doc().msElementsFromPoint&&(r=document.msElementsFromPoint(t,e)),r}static getNodeEvent(t,e={}){let r=e.srcElement;null==r&&(r=e.target);let{type:i,clientX:s,clientY:n}=e;return/^(drag[a-z]*|drop$)/.test(i)&&(r=he.getNodePoint(s,n)),D.isArr(r)&&(r=g.first(r)),null==r&&(r=e.target),r.closest(t)}}class q{static _constructFinder(t){return"string"==typeof t&&(t=document.querySelectorAll(t)),t instanceof NodeList&&(t=D.nodes(t)),t}getNodeType(t=-1){return this.el?this.el.nodeType:t}getNodeParent(t=null){return this.el?he.find(this.el.parentNode):t}getNodePrev(t=null){return this.el?he.find(this.el.previousSibling):t}getNodeNext(t=null){return this.el?he.find(this.el.nextSibling):t}getNodeChilds(t=-1,e=[]){if(!this.el)return e;let r=D.nodes(this.el.childNodes);return-1===t?r:g.filter(r,e=>e.nodeType===t)}sanatize(t=1){return this.els=he.filterNodes(this.els,t),this}filter(t){return"function"!=typeof t&&(t=e=>he.find(e).is(t)),g.filter(this.els,t)}except(t){return"function"!=typeof t&&(t=e=>!he.find(e).is(t)),g.filter(this.els,t)}find(t){if(null==this.el)return he.find(null);let e=this.el;e instanceof Window&&(e=document.body);let r=t;return D.isStr(r)&&(r=e.querySelectorAll(t)),he.find(r)}get(t=-1){let e=this.els;return-1===t?e:g.get(e,t)}first(t=0){return this.get(t)}last(t=1){return g.get(this.els,this.els.length-t)}each(t){return g.each(this.els,t)}loopParent(t,e=null){null==e&&(e=he.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?he.find(null):t}child(t,e=1){for(let t of this.els)if(t.nodeType===e)return he.find(t);return he.find(null)}childs(t=null,e=1){let r=this.getNodeChilds(e);return null==t?r:g.filter(r,e=>he.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}prev(t=1){let e=this.getNodePrev();for(;null!=e;e=e.getNodePrev())if(e.getNodeType()===t)return he.find(e);return he.find(null)}next(t=1){let e=this.getNodeNext();for(;null!=e;e=e.getNodeNext())if(e.getNodeType()===t)return he.find(e);return he.find(null)}length(){return this.els.length}is(t){if(this.el===t)return!0;if(null==this.el)return!1;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 null!=this.find(t)}}q.prototype.isParent=function(...t){return console.warn("Dom.isParent() is deprecated, use Dom.above() instead."),this.above(...t)},q.prototype.previous=function(){return console.warn("Dom.previous() is deprecated, use Dom.prev() instead."),this.prev()},q.prototype.where=function(...t){return console.warn("Dom.where() is deprecated, use Dom.filter() instead."),this.filter(...t)},q.prototype.not=function(...t){return console.warn("Dom.not() is deprecated, use Dom.except() instead."),this.except(...t)},q.prototype.getNot=()=>{console.error("Dom.getNot() is not implemented anymore.")};class X{}class U{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}class V{}!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}(V,"events",[]);class z{bind(t,e,r,i=null,s=!1,n={}){return D.isPrim(n)&&(n={id:n}),he.events=g.append(he.events,{el:t,event:e,cb:r,selector:i,pause:s,options:n}),t.addEventListener(e,r,n),this}unbind(t,e,r=null,i={}){D.isPrim(i)&&(i={id:i});let s=g.filterIndex(he.events,{el:t,event:e,selector:r,options:i});if(0===s.length)return;return g.each(s.reverse(),r=>{var i;t.removeEventListener(...(i=he.events[r],[e,i.cb,i.options]))}),g.splices(he.events,s),this}on(t,e,r={},i=!1,s=null){if(D.isPrim(r)&&(r={id:r}),D.isArr(t))return g.each(t,t=>this.on(t,...arguments)),this;let n=t=>{e.call(t.target,t,t.target)};return this.each(e=>{this.bind(e,t,n,s,i,r)}),this}off(t,e=null,r={}){return D.isArr(t)?(g.each(t,t=>this.off(t,...arguments)),this):(D.isObj(e)&&(r=e,e=null),this.each(i=>{this.unbind(i,t,e,r)}),this)}once(t,e,r={}){return r.id=Y.make(24),this.on(t,i=>{e(i),this.off(t,r)},r),this}live(t,e,r,i={},s=!1){return this.on(t,function(t){let i=he.getNodeEvent(e,t);null!=i&&r.call({},t,i)},i,s,e),this}fire(t){let e=new Event(t);return this.each(t=>{t.dispatchEvent(e)}),this}}z.prototype.one=function(...t){return console.warn("Dom.one() is deprecated, use Dom.once() instead."),this.once(...t)},z.prototype.delayed=function(){console.error("Dom.delayed() is not implemented anymore.")},z.prototype.pause=function(){console.error("Dom.pause() is not implemented anymore.")},z.prototype.unpause=function(){console.error("Dom.unpause() is not implemented anymore.")};class J{static make(t,e={}){t instanceof he&&(t=t.el),D.isStr(t)&&(t=document.createElement(t)),t=b.assign(t,e);let r=new he(t);return e.class&&r.class(e.class),e.html&&r.html(e.html),r}}class _{prepend(t){return this.each(e=>{null!=e.prepend&&e.prepend(t)}),this}prependTo(t){return he.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 he.find(t).each(t=>{null!=t.append&&t.append(this.el)}),this}replace(t){return this.parent().each(el,e=>{e.insertBefore(t,e),e.removeChild(e)}),this}}class K{static getDomState(){return document.readyState}static isDomReady(){return"complete"===he.getDomState()}static isDomComplete(){let t=he.getDomState();return"complete"===t||"interactive"===t}static ready(t,e=0,r=6e3){let i=()=>{s.delay(t,e)},[n,o]=[he.find(document),"DOMContentLoaded"],l=he.isDomReady;return l()?(s.wait(()=>{if(l())return i(),!0},10,r),this):(n.on(o,i),this)}static complete(t,e=0,r=6e3){let i=()=>{s.delay(t,e)},[n,o]=[he.find(document),"load"],l=he.isDomComplete;return l()?(s.wait(()=>{if(l())return i(),!0},10,r),this):(n.on(o,i),this)}}K.required=()=>{console.error("Dom.required() is not implemented anymore.")};class Z{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}}function Q(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 tt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Q(Object(r),!0).forEach(function(e){et(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Q(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return 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}class rt{static num(t){return"string"==typeof t&&(t=t.replace(/(^\s+|\s$|px)/g,"")),D.num(t,0)}}class it{margin(t=null,e=0){let r=this.computed(),i={top:he.num(r.marginTop),right:he.num(r.marginRight),bottom:he.num(r.marginBottom),left:he.num(r.marginLeft)};return null==t?i:b.get(i,t,e)}padding(t=null,e=0){let r=this.computed(),i={top:he.num(r.paddingTop),right:he.num(r.paddingRight),bottom:he.num(r.paddingBottom),left:he.num(r.paddingLeft)};return null==t?i:b.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:he.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=he.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:he.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=he.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:b.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=he.body());for(let r=this.el;r&&r!==e;r=r.offsetParent)t.call({},r);return this}calcOffset(t,e,r){let i={right:he.body().scrollWidth-t.left-e,bottom:he.body().scrollHeight-t.top-r};return tt(tt({},t),i)}getOffset(t=null){null==t&&(t=he.body());let e,r={top:0,left:0,bottom:0,right:0};if(null==this.el)return r;e=t=>{r.top+=he.num(t.offsetTop,0),r.left+=he.num(t.offsetLeft,0)},this.loopOffset(e),r=this.calcOffset(r,this.width(),this.height());let i=he.find(t),s={top:0,left:0,bottom:0,right:0};return e=t=>{s.top+=he.num(t.offsetTop,0),s.left+=he.num(t.offsetLeft,0)},i.loopOffset(e),s=this.calcOffset(s,i.scrollWidth(),i.scrollHeight()),{top:r.top-s.top,bottom:r.bottom-s.bottom,left:r.left-s.left,right:r.right-s.right}}scroll(t=null,e=null){let r=this.getScroll(e);return null==t?r:b.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=he.win());let e,r={top:0,left:0};if(null==this.el)return r;e=t=>{r.top+=he.num(t.scrollTop||t.pageYOffset||0),r.left+=he.num(t.scrollLeft||t.pageXOffset||0)},this.loopParent(e);let i={top:0,left:0};return e=t=>{i.top+=he.num(t.scrollTop||t.pageYOffset||0),i.left+=he.num(t.scrollLeft||t.pageXOffset||0)},he.find(t).loopParent(e),{top:r.top-i.top,left:r.left-i.left}}}it.prototype.loopOffsetParent=function(...t){return console.warn("Dom.loopOffsetParent() is deprecated, use Dom.loopOffset() instead."),this.loopOffset(...t)},it.prototype.scrollTopGlobal=function(){return console.warn("Dom.scrollTopGlobal() is deprecated, use Dom.scroll('top') instead."),this.scroll("top",null)},it.prototype.scrollLeftGlobal=function(){return console.warn("Dom.scrollLeftGlobal() is deprecated, use Dom.scroll('left') instead."),this.scroll("left",null)};function st(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 nt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?st(Object(r),!0).forEach(function(e){ot(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):st(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function ot(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 lt{}class at{attr(t,e=void 0,r=null){if(null==this.el)return e?this:r;let i=this.el.getAttribute(t);return D.isUndef(e)?i||r:null===e?(this.el.removeAttribute(t),i):(D.isArr(e)&&(e=e.join(" ")),D.isObj(e)&&(e=fe.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:b.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 D.isStr(r)&&(r=fe.parseOptions(r)),D.isUndef(t)?r:(e&&(t=nt(nt({},r),t)),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 D.isStr(r)&&(r=r.split(" ")),D.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 D.isArr(t)||(t=[t]),g.isect(this.class(),t).length>0}addClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>he.find(e).addClass(t));let e=this.el.className.split(" ");return D.isStr(t)&&(t=t.split(" ")),e=g.append(e,...t),this.el.className=g.unique(e).join(" "),this}remClass(t){if(null==this.el)return this;if(this.els.length>1)return this.each(e=>he.find(e).remClass(t));let e=this.el.className.split(" ");return D.isStr(t)&&(t=t.split(" ")),e=g.diff(e,t),this.el.className=g.unique(e).join(" "),this}toggleClass(t){return this.els.length>1?this.each(e=>he.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=>he.find(e).stateClass(t)):e?this.addClass(t):this.remClass(t)}}at.prototype.css=function(...t){return console.warn("Dom.css() is deprecated, use Dom.style() instead."),this.style(...t)},at.prototype.removeClass=function(...t){return console.warn("Dom.removeClass() is deprecated, use Dom.remClass() instead."),this.remClass(...t)};function ut(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 ct(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ut(Object(r),!0).forEach(function(e){ht(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ut(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 dt{static inviewMaxY(t,e=null){if(D.isString(t)&&(t={el:t}),!(t=ct(ct({},{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 he.find(t.el).each(t=>{(t=>he.find(t).isInviewY(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:g.first(i)}static inviewMaxX(t,e=null){if(D.isString(t)&&(t={el:t}),!(t=ct(ct({},{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 he.find(t.el).each(t=>{(t=>he.find(t).isInviewX(...r))(t)&&(e&&e(t),i.push(t))}),t.multiple?i:g.first(i)}}class ft{viewoffX(){if(null==this.el)return{top:0,bot:0};let[t,e]=[he.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}=he.find(t).viewoffY(),[i,s]=[he.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("left")+e,this.scroll("left")+e],l=Math.max(0,o+i-n+e);return l>s&&(l=Math.min(s,i+s-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]=[he.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}=he.find(t).viewoffY(),[i,s]=[he.win().innerHeight-r-e,this.height()],[n,o]=[this.offset("top")+e,this.scroll("top")+e],l=Math.max(0,o+i-n+e);return l>s&&(l=Math.min(s,i+s-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}}ft.prototype.inviewHeight=function(...t){return console.warn("Dom.inviewHeight() is deprecated, use Dom.inviewY() instead."),this.inviewY(...t)},ft.prototype.inviewWidth=function(...t){return console.warn("Dom.inviewWidth() is deprecated, use Dom.inviewX() instead."),this.inviewX(...t)};class pt{static setMetaTitle(t,e=":value - :title"){return this.$meta.title||(this.$meta.title=he.doc().title),document.title=H.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}(pt,"$meta",{}),pt.title=t=>(console.warn("Dom.title() is deprecated, use Dom.setMetaTitle() instead."),he.setMetaTitle(t));class mt{}class gt{}class yt{value(t=void 0){return void 0===t?this.el.value:(this.each(e=>{e.value=t}),this)}}function bt(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 vt=[function(t){return b.each(D.class(G),(e,r)=>{t[r]=e}),b.each(D.proto(q),(e,r)=>{t.prototype[r]=e}),t.init.push(q._constructFinder),t},function(t){return b.each(D.class(K),(e,r)=>{t[r]=e}),b.each(D.proto(Z),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(X),(e,r)=>{t[r]=e}),b.each(D.proto(U),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(V),(e,r)=>{t[r]=e}),b.each(D.proto(z),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(J),(e,r)=>{t[r]=e}),b.each(D.proto(_),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(rt),(e,r)=>{t[r]=e}),b.each(D.proto(it),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(lt),(e,r)=>{t[r]=e}),b.each(D.proto(at),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(dt),(e,r)=>{t[r]=e}),b.each(D.proto(ft),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(pt),(e,r)=>{t[r]=e}),b.each(D.proto(mt),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.class(gt),(e,r)=>{t[r]=e}),b.each(D.proto(yt),(e,r)=>{t.prototype[r]=e}),t}];class wt{constructor(t,...e){bt(this,"el",null),bt(this,"els",[]),g.each(he.init,r=>{t=r.call(this,t,...e)}),t instanceof he&&(t=t.el),D.isArr(t)||(t=[t]),this.el=t[0],this.els=t}static find(t,...e){return new he(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:{}}}bt(wt,"init",[]);const Mt=function(){let t=wt;for(const e of vt)t=e.call(t,t);return t},Ot={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 Dt{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){D.isNum(t)||(t=D.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)+D.int(t),e),this}sub(t,e="day"){return/^days?$/i.test(e)&&(e="date"),this.set(this.get(e)-D.int(t),e),this}isModifible(t){return/^(\s*[+-][0-9]+\s?[a-z]+\s*)+$/i.test(t)}modify(t){return D.isEmpty(t)||b.each(Ot,(e,r)=>{u.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=de.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"])}}Dt.prototype.addSecond=function(t){return console.warn("Now.addSecond() is deprecated, use Now.add(value, 'second') instead."),this.add(t,"second")},Dt.prototype.subSecond=function(t){return console.warn("Now.subSecond() is deprecated, use Now.sub(value, 'second') instead."),this.sub(t,"second")},Dt.prototype.addMinute=function(t){return console.warn("Now.addMinute() is deprecated, use Now.add(value, 'minute') instead."),this.add(t,"minute")},Dt.prototype.subMinute=function(t){return console.warn("Now.subMinute() is deprecated, use Now.sub(value, 'minute') instead."),this.sub(t,"minute")},Dt.prototype.addHour=function(t){return console.warn("Now.addHour() is deprecated, use Now.add(value, 'hour') instead."),this.add(t,"hour")},Dt.prototype.subHour=function(t){return console.warn("Now.subHour() is deprecated, use Now.sub(value, 'hour') instead."),this.sub(t,"hour")},Dt.prototype.addDates=function(t){return console.warn("Now.addDates() is deprecated, use Now.add(value, 'date') instead."),this.add(t,"date")},Dt.prototype.subDates=function(t){return console.warn("Now.subDates() is deprecated, use Now.sub(value, 'date') instead."),this.sub(t,"date")},Dt.prototype.addMonths=function(t){return console.warn("Now.addMonths() is deprecated, use Now.add(value, 'month') instead."),this.add(t,"month")},Dt.prototype.subMonths=function(t){return console.warn("Now.subMonths() is deprecated, use Now.sub(value, 'month') instead."),this.sub(t,"month")},Dt.prototype.addYears=function(t){return console.warn("Now.addYears() is deprecated, use Now.add(value, 'year') instead."),this.add(t,"year")},Dt.prototype.subYears=function(t){return console.warn("Now.subYears() is deprecated, use Now.sub(value, 'year') instead."),this.sub(t,"year")},Dt.prototype.addDecades=function(t){return console.warn("Now.addDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.add(10*t,"year")},Dt.prototype.subDecades=function(t){return console.warn("Now.subDecades() is deprecated, use Now.grid(10 * value, 'year') instead."),this.sub(10*t,"year")},Dt.prototype.humanDay=function(){return console.warn("Now.humanDay() is deprecated, use Now.day() instead."),this.day()},Dt.prototype.humanMonth=function(){return console.warn("Now.humanMonth() is deprecated, use Now.month() instead."),this.month()};const kt={L:"DD/MM/YYYY",LL:"MMMM DD, YYYY",LLL:"MMMM DD, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},Pt={second:"ss",minute:"mm",hour:"HH",date:"DD",month:"MM",year:"YYYY"};class $t{isParsable(t,e="YYYY-MM-DD HH:mm:ss"){for(const r in Pt)t=u.replace(t,Pt[r],e);return t===e}parse(t,e="YYYY-MM-DD HH:mm:ss"){return D.isTime(t)&&(e="HH:mm:ss"),D.isDate(t)&&(e="YYYY-MM-DD"),this.isModifible(t)?this.modify(t):D.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 Pt)this.set(u.extract(t,Pt[r],e),r);return this}format(t="YYYY-MM-DD HH:mm:ss"){return b.has(kt,t)&&(t=H.trans(kt[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",()=>u.integer(this.year(),4))).replace("MM",()=>u.integer(this.month(),2))).replace("DD",()=>u.integer(this.date(),2))).replace("HH",()=>u.integer(this.hour(),2))).replace("mm",()=>u.integer(this.minute(),2))).replace("ss",()=>u.integer(this.second(),2))).replace("YY",()=>u.integer(this.shortyear(),2))).replace("X",()=>u.integer(this.time()))).replace("x",()=>u.integer(this.time()/1e3))}code(t="X"){return D.int(this.format(t))}}class jt{before(t=null,e="x"){return this.code(e)<de.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)>de.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 de||(t=de.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=[de.make(t),de.make(e)];return i[0].after(i[1],r)&&(i=i.reverse()),this.after(i[0],r)&&this.before(i[1],r)}}class St{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),g.make(60/t,e=>this.clone().second(e*t))}getMinutesGrid(t=1){return null==t&&(t=1),g.make(60/t,e=>this.clone().minute(e*t))}getHoursGrid(t=1){return null==t&&(t=1),g.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")}}St.prototype.getYears=function(){return console.warn("Now.getYears() is deprecated, use Now.grid('years') instead."),this.grid("years")},St.prototype.getMonths=function(){return console.warn("Now.getMonths() is deprecated, use Now.grid('months') instead."),this.grid("months")},St.prototype.getDates=function(){return console.warn("Now.getDates() is deprecated, use Now.grid('dates') instead."),this.grid("dates")},St.prototype.getHours=function(){return console.warn("Now.getHours() is deprecated, use Now.grid('hours') instead."),this.grid("hours")},St.prototype.getMinutes=function(){return console.warn("Now.getMinutes() is deprecated, use Now.grid('minutes') instead."),this.grid("minutes")},St.prototype.getSeconds=function(){return console.warn("Now.getSeconds() is deprecated, use Now.grid('seconds') instead."),this.grid("seconds")};class xt{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=[],s=[this.clone(),de.make(t)];s[0].afterDate(s[1])&&(s=s.reverse()),s[1].add(1,e);for(let t=s[0];!t.equal(s[1],r);t=t.next(e))g.append(i,t);return i}}Nt.prototype.getDatesRange=function(...t){return console.warn("NowRange.getDatesRange() is deprecated, use NowRange.range() instead."),this.range(...t)};const Yt=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Et=["January","February","March","April","May","June","July","August","September","October","November","December"];class At{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(!Yt[e])throw new Error(`Invalid day number "${e}".`);let r=H.trans(Yt[e]);return null!=t&&(r=r.substring(0,t)),r}getHumanMonth(t=null){let e=this.day()-1;if(!Et[e])throw new Error(`Invalid month number "${e}".`);let r=H.trans(Et[e]);return null!=t&&(r=r.substring(0,t)),r}}function Tt(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=[function(t){return b.each(D.proto(Dt),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.proto($t),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.proto(jt),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.proto(St),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.proto(xt),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.proto(Nt),(e,r)=>{t.prototype[r]=e}),t},function(t){return b.each(D.proto(At),(e,r)=>{t.prototype[r]=e}),t}];class Ht{constructor(t=null,e="YYYY-MM-DD HH:mm:ss"){Tt(this,"input",null),Tt(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,D.isNix(r)&&(this.input=r),this.value=t,D.isStr(r)&&this.parse(r,e),g.each(de.init,t=>{el=t.call(this,el,e)}),this}static extend(t){t.call({},this)}static make(t=null,e="YYYY-MM-DD HH:mm:ss"){return new de(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(t=!1){return new de(new Date(this.value),null,t)}valid(){return!isNaN(this.input)}toDate(){return this.value}toUTC(){return this.value.toUTCString()}}Tt(Ht,"init",[]),Ht.prototype.resetTime=function(){return console.warn("Now.resetTime() is deprecated, use Now.reset({ time: true }) instead."),this.reset({time:!0})};const Ft=function(){let t=Ht;for(const e of It)t=e.call(t,t);return t},Ct=[{match:t=>/^(null|undefined)$/i.test(t),parse:t=>D.null(t)},{match:t=>/^(true|false|yes|no)$/i.test(t),parse:t=>D.bool(t)},{match:t=>/^-?[0-9]+$/.test(t),parse:t=>D.int(t)},{match:t=>/^-?[0-9]+\.[0-9]+$/.test(t),parse:t=>D.num(t)},{match:t=>/^[{\[].*?[}\]]$/.test(t),parse:t=>JSON.parse(t)}],Lt=[{match:t=>D.isArr(t),parse:t=>JSON.stringify(t)}];class Rt{static keyed(t,e=null){return D.isStr(t)?-1===t.indexOf("[")?t:t.replace(/\[([^\]]+)\]/g,".$1"):e}static parsed(t,e=null,r=[]){if(!D.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)),D.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 D.str(t)}}const Wt={entry:/(?<=^|&|\?)(\s*(?<key>.*?)\s*=\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=&|$)/g};class Bt{static castParams(t={}){if(D.isEmpty(t))return"";return g.each(t,(t,e)=>this.castParam(e,t)).join("&")}static castParam(t,e,r=null){if(null!=r&&(t=r+"["+t+"]"),!D.isRef(e))return D.str(t)+"="+fe.casted(e,!0);return g.each(e,(r,i)=>this.castParam(D.isArr(e)?"":i,r,t)).join("&")}static parseParams(t){if(D.isEmpty(t))return{};let e=(t=decodeURIComponent(t)).matchAll(Wt.entry);if(null==e)return{};const[r,i]=[fe.keyed,fe.parsed];return g.reduce(Array.from(e),(t,{groups:e})=>b.set(t,r(e.key),i(e.val)),{})}}const Gt={entry:/(^|;)(\s*(?<key>.*?)\s*:\s*(?<val>".*?"|'.*?'|.*?)\s*)(?=;|$)/g};class qt{static castOptions(t={},e=!0){if(D.isEmpty(t))return"";return g.each(t,(t,r)=>this.castOption(r,t,null,e)).join(";")+";"}static castOption(t,e,r=null,i=!0){null!=r&&(t=r+"."+t);let s=i?": ":":";return D.isObj(e)?g.map(e,(e,r)=>this.castOption(r,e,t)).join(";"):D.str(t)+s+fe.casted(e,!1)}static parseOptions(t){if(D.isEmpty(t))return{};let e=t.matchAll(Gt.entry);if(null==e)return{};const[r,i]=[fe.keyed,fe.parsed];return g.reduce(Array.from(e),(t,{groups:e})=>b.set(t,r(e.key),i(e.val)),{})}}const Xt=[["à","a"],["á","a"],["â","a"],["è","e"],["é","e"],["ê","e"],["ì","i"],["í","i"],["ï","i"],["î","i"],["ò","o"],["ó","o"],["ô","o"],["ù","u"],["ú","u"],["û","u"],["ñ","n"],["ç","c"],[".","-"],["·","-"],["/","-"],["_","-"],[",","-"],[":","-"],[";","-"],["ä","ae"],["ö","oe"],["ü","ue"],["ß","ss"]];class Ut{static slugify(t){return t=String(t).replace(/(^\s+|\s+$)/g,"").toLowerCase(),g.each(Xt,e=>{t=t.replaceAll(e[0],e[1])}),t.replace(/[^a-z0-9-\s]+/g,"").replace(/\s+/g,"-").replace(/-+/g,"-")}}const Vt=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];class zt{static filesize(t,e=1){D.isNum(t)||(t=D.num(t,0));let r=r=>p.fixed(t/Math.pow(1e3,r),e);for(let e=0;e<Vt.length;e++)if(t<=Math.pow(1e3,e+1))return r(e)+" "+Vt[e];return r(Vt.length)}}const Jt=[function(t){return b.each(D.class(Rt),(e,r)=>{t[r]=e}),t},function(t){return b.each(D.class(Bt),(e,r)=>{t[r]=e}),t},function(t){return b.each(D.class(qt),(e,r)=>{t[r]=e}),t},function(t){return b.each(D.class(Ut),(e,r)=>{t[r]=e}),t},function(t){return b.each(D.class(zt),(e,r)=>{t[r]=e}),t}];class _t{static extend(t){t.call({},this)}}const Kt=function(){let t=_t;for(const e of Jt)t=e.call(t,t);return t};function Zt(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:{}}function Qt(){const t=Zt();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 te(){const t=Zt();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}class ee{static has(t){return b.has(this.$data,g.first(t))}static set(t,e){let[r,i]=[null,g.first(t)];b.has(this.$data,i)&&(r=b.get(this.$data,i)),D.isEqual(r,e)||(b.set(this.$data,i,e),A.fire("store:"+i,e,i))}static unset(t){b.unset(this.$data,[...g.first(t)])}static get(t,e=null,r=!1){let i=g.first(t);if(!b.has(this.$data,i)&&!r)return e;b.has(this.$data,i)&&r&&b.set(this.$data,i,e);let s=b.get(this.$data,i,e);return D.isObj(s)?b.clone(s):s}static find(t,e,r=null){let i=g.first(t);if(!1===b.has(this.$data,i))return r;if(!1===b.has(e,"id"))return r;let s=g.findIndex(this.get(i),{id:e.id});return-1===s?r:this.get(i+"."+s)}static replace(t,e){let r=g.first(t);if(!1===b.has(this.$data,r))return;if(!1===b.has(e,"id"))return;let i=g.findIndex(this.get(r),{id:p.int(e.id)});-1!==i&&this.set(r+"."+i,e)}static add(t,...e){this.set(t,g.concat(this.get(t,[]),e))}static remove(t,...e){this.set(t,g.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}(ee,"$data",{});const re=ee;class ie{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),i=H.replace(i,e),D.isEmpty(r)||(i+="?"+fe.castParams(e)),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}(ie,"$routes",{});const se=ie;function ne(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 oe{constructor(t,e={}){if(ne(this,"map",null),ne(this,"markers",{}),ne(this,"cluster",null),ne(this,"clusterFilter",null),ne(this,"clusterOptions",{}),!globalThis.google)throw new Error("Google Maps is required for pi.Map");let r=b.only(e,["lat","lng"]);b.has(e,"styles")||(e.styles=Map.mapStyle),e=b.assign({gestureHandling:"cooperative",scrollwheel:null,zoom:12,center:r},b.except(e,["lat","lng"])),this.map=new globalThis.google.maps.Map(he.find(t).get(0),e)}static setMapStyle(t=[]){return Map.mapStyle=t,this}static setMarkerStyle(t,e={},r={}){if(!globalThis.google)throw new Error("Google Maps is required for pi.Map");if(!b.has(e,"default"))return console.error("Marker style requires default property");b.has(e,"width")||(e.width=45),b.has(e,"height")||(e.height=45);let i={},s=new globalThis.google.maps.Size(e.width,e.height),n=new globalThis.google.maps.Point(0,0),o=new globalThis.google.maps.Point(e.width/2,e.height);return i.default={url:e.default,size:s,origin:n,anchor:o,scaledSize:s},b.has(e,"hover")&&(i.hover=b.assign({},i.default,{url:e.hover})),b.has(i,"hover")||(i.hover=i.default),b.has(e,"active")&&(i.active=b.assign({},i.default,{url:e.active})),b.has(i,"active")||(i.active=i.default),b.each(r,(t,e)=>{i[e]=b.assign({},i.default,{url:t})}),b.set(Map.markerStyles,t,i),this}clusterMarkers(t={},e=null,r=!0){if(!this.cluster&&!r)return;if(void 0===globalThis.MarkerClusterer)return console.error("Google Maps Cluster library not laoded!");b.has(t,"imagePath")||b.has(t,"styles")||(t.imagePath="//developers.google.com/maps/documentation/javascript/examples/markerclusterer/m"),this.cluster&&this.cluster.clearMarkers(),D.isFunction(e)&&(this.clusterFilter=e);let i=g.filter(this.markers,t=>{let e=this.getMarkerVisibility(t.key);return D.isFunction(this.clusterFilter)?e&&this.clusterFilter.call(this,t):e});this.cluster=new globalThis.MarkerClusterer(this.map,g.each(i,t=>t.marker),this.clusterOptions=t)}styleMarker(t,e=null){let r=b.get(this.markers,t);if(D.isEmpty(r))return console.error(`Marker "${t}" not found`);D.isEmpty(e)&&(e=this.getInfoVisibility(t)?"active":"default"),b.has(Map.markerStyles,[r.style,e])&&r.marker.setIcon(b.get(Map.markerStyles,[r.style,e]))}getMarker(t){return b.get(this.markers,t)}getMarkerVisibility(t,e=!1){let r=b.get(this.markers,t);return D.isEmpty(r)?e:r.marker.getVisible()}getMarkerPositon(t,e=null){let r=b.get(this.markers,t);return D.isEmpty(r)?e:r.marker.getPosition()}toggleMarker(t){let e=b.get(this.markers,t);return D.isEmpty(e)?console.error(`Marker "${t}" not found`):e.marker.getVisible()?this.hideMarker(t):this.showMarker(t)}showMarker(t){let e=b.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!e.marker.getVisible();return r&&e.marker.setVisible(!0),r}hideMarker(t){let e=b.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r=!!e.marker.getVisible();return r&&e.marker.setVisible(!1),this.closeInfo(t),r}enterMarker(t){let e=b.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="hover";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}leaveMarker(t){let e=b.get(this.markers,t);if(D.isEmpty(e))return console.error(`Marker "${t}" not found`);let r="default";return this.getInfoVisibility(t)&&(r="active"),this.styleMarker(t,r),this}getInfoVisibility(t,e=!1){let r=b.get(this.markers,t);return D.isEmpty(r)||!b.has(r,"info")?e:!!r.info.getMap()}toggleInfo(t){let e=b.get(this.markers,t);return D.isEmpty(e)?console.error(`Marker "${t}" not found`):e.info.getMap()?this.closeInfo(t):this.openInfo(t)}openInfo(t){let e=b.get(this.markers,t);if(D.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!b.has(e,"info"))return!0;let r=!e.info.getMap();return Map.closeInfoWindows&&b.each(D.keys(this.markers),this.closeInfo.bind(this)),r&&e.info.open(this.map,e.marker),D.isFunction(e.onOpen)&&e.onOpen(e),this.styleMarker(t,"active"),r}closeInfo(t){let e=b.get(this.markers,t);if(D.isEmpty(e))return console.error(`InfoWindow "${t}" not found`);if(!b.has(e,"info"))return!1;let r=!!e.info.getMap();return r&&e.info.close(),D.isFunction(e.onClose)&&e.onClose(e),this.styleMarker(t,"default"),r}createMarker(t=null,e={}){D.isEmpty(t)&&(t=Y.uuid());let r={key:t};return b.has(e,"visible")||(e.visible=!0),r.extras=b.except(e,["map","position","lat","lng","html","style","visible","onOpen","onClose"]),b.has(e,"map")||(e.map=this.map),b.has(e,"position")||(e.position=b.only(e,["lat","lng"])),b.has(e,"style")&&(r.style=e.style),r.marker=new globalThis.google.maps.Marker(e),e.visible||r.marker.setVisible(!1),b.assign(r,{onOpen:b.get(e,"onOpen"),onClose:b.get(e,"onClose")}),b.set(this.markers,t,r),this.clusterMarkers(this.clusterOptions,null,!1),b.has(e,"html")?(b.has(r,"style")||(r.style="default"),this.styleMarker(t),r.marker.addListener("mouseover",()=>this.enterMarker(t)),r.marker.addListener("mouseout",()=>this.leaveMarker(t)),r.info=new globalThis.google.maps.InfoWindow({content:'<div class="gw-i-html">'+b.get(e,"html")+"</div>"}),r.marker.addListener("click",()=>this.toggleInfo(t)),r.info.addListener("closeclick",()=>this.closeInfo(t)),r.info.addListener("domready",()=>A.fire("MapsDomReady")),b.set(this.markers,t,r),b.get(this.markers,t)):b.get(this.markers,t)}setMarkerPosition(t,e={}){let r=b.get(this.markers,t);if(D.isEmpty(r))return console.error(`Marker "${t}" not found`);r.marker.setPosition(e)}setMarkerByAddress(t,e){return this.getLocationByAddress(e,e=>{this.setMarkerPosition(t,b.get(e,"0.geometry.location",{}))})}getLocationByAddress(t,e=null){let r=new globalThis.google.maps.Geocoder;return new Promise((i,s)=>{r.geocode({address:t},(t,r)=>{"OK"===r&&(e(t),i(t)),"OK"!==r&&s(t)})})}showMarkers(t=null){let e=this.markers;return D.isEmpty(t)||(e=b.filter(this.markers,t)),Map.hideMarkers&&b.each(D.keys(this.markers),this.hideMarker.bind(this)),b.each(e,t=>this.showMarker(t.key)),this.clusterMarkers(this.clusterOptions,null,!1),this}getMarkerBoundry(t=null){let e=this.markers;D.isEmpty(t)||(e=b.filter(this.markers,t));let r=new globalThis.google.maps.LatLngBounds;return b.each(e,t=>{t.marker.getVisible()&&r.extend(t.marker.getPosition())}),r}focusMarkers(t=null,e=14,r=15){let i=this.getMarkerBoundry(t);return this.map.setCenter(i.getCenter()),this.map.fitBounds(i,r),this.map.getZoom()>e&&this.map.setZoom(e),this}renderDirections(t){let e=new globalThis.google.maps.DirectionsService,r=new globalThis.google.maps.DirectionsRenderer;b.has(t,"map")||(t.map=this.map),b.has(t,"travelMode")||(t.travelMode="DRIVING"),r.setMap(t.map),b.has(t,"panel")&&!he.find(t.panel).empty()&&r.setPanel(he.find(t.panel).get(0)),t=b.only(t,["origin","destination","travelMode"]);return new Promise((i,s)=>{e.route(t,(t,e)=>{"OK"===e&&(r.setDirections(t),i(t)),"OK"!==e&&s(t)})})}}ne(oe,"mapStyle",[]),ne(oe,"markerStyles",{}),ne(oe,"hideMarkers",!0),ne(oe,"closeInfoWindows",!0);const le=oe;function ae(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 ue{static listen(){document.addEventListener("scroll",ue.scroll),ue.scroll()}static scroll(){g.each(this.invi,(t,e)=>{he.find(t.el).inviewY()&&(g.removeIndex(this.invi,e),t.cb())})}static alias(t,e){return b.set(this.inis,t,e),this}static bind(t,e,r={}){let i=he.find(e),s=this.getPrefix(t);i.addClass(s);let n=b.get(this.inis,t,null);if(D.isEmpty(n))return console.error(`Element "${t}" is not defined.`);let o=(t,e)=>{let r=new n(t.get(0),e);return ue.runs.push({el:t.get(0),prefix:s,deamon:r}),t.data(s,r),void 0!==r.bind?r.bind(t.get(0),e):r};return he.ready(()=>o.call({},i,r)),this}static unbind(t,e,r={}){let i=he.find(e),s=this.getPrefix(t),n=b.get(this.inis,t,null);if(D.isEmpty(n))return console.error(`Element "${t}" is not defined.`);return((t,e)=>{let r=t.data(s);if(void 0!==r.unbind)return r.unbind(t.get(0),e)}).call({},i,r),g.remove(ue.runs,{el:i.get(0)}),this}static observe(t,e=!1){let r=this.getPrefix(t),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:[r]},s=()=>{let i=ue.getPrefix(t),s=g.filter(this.runs,{prefix:r});g.each(s,({el:i})=>{let s=u.objectify(he.find(i).attr(r));if(e&&D.isEmpty(s)&&(s={_plain:he.find(i).attr(r)}),b.pluck(s,"inview",!1)&&g.remove(this.invi,{el:i}),!document.body.contains(i))return this.unbind(t,i,s)}),he.find(`[${r}]:not(.${i})`).each(i=>{let s=u.objectify(he.find(i).attr(r));e&&D.isEmpty(s)&&(s={_plain:he.find(i).attr(r)});let n=()=>{this.bind(t,i,s)};b.pluck(s,"inview",!1)?this.bindInview(i,n):n()})};return he.find(document.body).observer(s)(document.body,i),he.find(document.body).on("dom.change",s),this}static bindInview(t,e){g.add(this.invi,{el:t,cb:e},{el:t})}static unbindInview(t,e){g.remove(this.invi,{el:t,cb:e},{el:t})}static getPrefix(t){return t?this.prefix+"-"+t:this.prefix}static setPrefix(t){this.prefix=t}}ae(ue,"prefix","js"),ae(ue,"mount","mount"),ae(ue,"inis",{}),ae(ue,"runs",[]),ae(ue,"invi",[]);const ce=ue,he=Mt(),de=Ft(),fe=Kt(),pe=new Proxy({},{get:function(t,e){return console.warn(`Any.${e} is deprecated, use Mix.${e}() instead.`),(...t)=>D[e](...t)}}),me=function(){return console.warn("UUID() is deprecated, use Hash.make() instead."),Y.make()};return e})());
2
2
  //# sourceMappingURL=pico-js.esm.js.map