SmartCane/laravel_app/public/build/assets/app-f1d6b98f.js
Martin Folkerts 1e841a0aa6 wip
2024-06-18 09:17:57 +02:00

20 lines
304 KiB
JavaScript

const Xs="modulepreload",Qs=function(s){return"/build/"+s},Bo={},ta=function(a,e,l){if(!e||e.length===0)return a();const f=document.getElementsByTagName("link");return Promise.all(e.map(p=>{if(p=Qs(p),p in Bo)return;Bo[p]=!0;const g=p.endsWith(".css"),E=g?'[rel="stylesheet"]':"";if(!!l)for(let C=f.length-1;C>=0;C--){const D=f[C];if(D.href===p&&(!g||D.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${E}`))return;const U=document.createElement("link");if(U.rel=g?"stylesheet":Xs,g||(U.as="script",U.crossOrigin=""),U.href=p,document.head.appendChild(U),g)return new Promise((C,D)=>{U.addEventListener("load",C),U.addEventListener("error",()=>D(new Error(`Unable to preload CSS for ${p}`)))})})).then(()=>a()).catch(p=>{const g=new Event("vite:preloadError",{cancelable:!0});if(g.payload=p,window.dispatchEvent(g),!g.defaultPrevented)throw p})};function ns(s,a){return function(){return s.apply(a,arguments)}}const{toString:ea}=Object.prototype,{getPrototypeOf:uo}=Object,gr=(s=>a=>{const e=ea.call(a);return s[e]||(s[e]=e.slice(8,-1).toLowerCase())})(Object.create(null)),Ne=s=>(s=s.toLowerCase(),a=>gr(a)===s),vr=s=>a=>typeof a===s,{isArray:ni}=Array,Mi=vr("undefined");function na(s){return s!==null&&!Mi(s)&&s.constructor!==null&&!Mi(s.constructor)&&ve(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const is=Ne("ArrayBuffer");function ia(s){let a;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?a=ArrayBuffer.isView(s):a=s&&s.buffer&&is(s.buffer),a}const ra=vr("string"),ve=vr("function"),rs=vr("number"),yr=s=>s!==null&&typeof s=="object",oa=s=>s===!0||s===!1,cr=s=>{if(gr(s)!=="object")return!1;const a=uo(s);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in s)&&!(Symbol.iterator in s)},sa=Ne("Date"),aa=Ne("File"),ua=Ne("Blob"),ca=Ne("FileList"),ha=s=>yr(s)&&ve(s.pipe),la=s=>{let a;return s&&(typeof FormData=="function"&&s instanceof FormData||ve(s.append)&&((a=gr(s))==="formdata"||a==="object"&&ve(s.toString)&&s.toString()==="[object FormData]"))},fa=Ne("URLSearchParams"),da=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ai(s,a,{allOwnKeys:e=!1}={}){if(s===null||typeof s>"u")return;let l,f;if(typeof s!="object"&&(s=[s]),ni(s))for(l=0,f=s.length;l<f;l++)a.call(null,s[l],l,s);else{const p=e?Object.getOwnPropertyNames(s):Object.keys(s),g=p.length;let E;for(l=0;l<g;l++)E=p[l],a.call(null,s[E],E,s)}}function os(s,a){a=a.toLowerCase();const e=Object.keys(s);let l=e.length,f;for(;l-- >0;)if(f=e[l],a===f.toLowerCase())return f;return null}const ss=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),as=s=>!Mi(s)&&s!==ss;function to(){const{caseless:s}=as(this)&&this||{},a={},e=(l,f)=>{const p=s&&os(a,f)||f;cr(a[p])&&cr(l)?a[p]=to(a[p],l):cr(l)?a[p]=to({},l):ni(l)?a[p]=l.slice():a[p]=l};for(let l=0,f=arguments.length;l<f;l++)arguments[l]&&Ai(arguments[l],e);return a}const pa=(s,a,e,{allOwnKeys:l}={})=>(Ai(a,(f,p)=>{e&&ve(f)?s[p]=ns(f,e):s[p]=f},{allOwnKeys:l}),s),ma=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),_a=(s,a,e,l)=>{s.prototype=Object.create(a.prototype,l),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:a.prototype}),e&&Object.assign(s.prototype,e)},ga=(s,a,e,l)=>{let f,p,g;const E={};if(a=a||{},s==null)return a;do{for(f=Object.getOwnPropertyNames(s),p=f.length;p-- >0;)g=f[p],(!l||l(g,s,a))&&!E[g]&&(a[g]=s[g],E[g]=!0);s=e!==!1&&uo(s)}while(s&&(!e||e(s,a))&&s!==Object.prototype);return a},va=(s,a,e)=>{s=String(s),(e===void 0||e>s.length)&&(e=s.length),e-=a.length;const l=s.indexOf(a,e);return l!==-1&&l===e},ya=s=>{if(!s)return null;if(ni(s))return s;let a=s.length;if(!rs(a))return null;const e=new Array(a);for(;a-- >0;)e[a]=s[a];return e},ba=(s=>a=>s&&a instanceof s)(typeof Uint8Array<"u"&&uo(Uint8Array)),wa=(s,a)=>{const l=(s&&s[Symbol.iterator]).call(s);let f;for(;(f=l.next())&&!f.done;){const p=f.value;a.call(s,p[0],p[1])}},xa=(s,a)=>{let e;const l=[];for(;(e=s.exec(a))!==null;)l.push(e);return l},Ca=Ne("HTMLFormElement"),Pa=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,l,f){return l.toUpperCase()+f}),Fo=(({hasOwnProperty:s})=>(a,e)=>s.call(a,e))(Object.prototype),Ta=Ne("RegExp"),us=(s,a)=>{const e=Object.getOwnPropertyDescriptors(s),l={};Ai(e,(f,p)=>{let g;(g=a(f,p,s))!==!1&&(l[p]=g||f)}),Object.defineProperties(s,l)},Sa=s=>{us(s,(a,e)=>{if(ve(s)&&["arguments","caller","callee"].indexOf(e)!==-1)return!1;const l=s[e];if(ve(l)){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+e+"'")})}})},ka=(s,a)=>{const e={},l=f=>{f.forEach(p=>{e[p]=!0})};return ni(s)?l(s):l(String(s).split(a)),e},La=()=>{},Ea=(s,a)=>(s=+s,Number.isFinite(s)?s:a),qr="abcdefghijklmnopqrstuvwxyz",Zo="0123456789",cs={DIGIT:Zo,ALPHA:qr,ALPHA_DIGIT:qr+qr.toUpperCase()+Zo},Ma=(s=16,a=cs.ALPHA_DIGIT)=>{let e="";const{length:l}=a;for(;s--;)e+=a[Math.random()*l|0];return e};function Oa(s){return!!(s&&ve(s.append)&&s[Symbol.toStringTag]==="FormData"&&s[Symbol.iterator])}const Da=s=>{const a=new Array(10),e=(l,f)=>{if(yr(l)){if(a.indexOf(l)>=0)return;if(!("toJSON"in l)){a[f]=l;const p=ni(l)?[]:{};return Ai(l,(g,E)=>{const S=e(g,f+1);!Mi(S)&&(p[E]=S)}),a[f]=void 0,p}}return l};return e(s,0)},Aa=Ne("AsyncFunction"),Ia=s=>s&&(yr(s)||ve(s))&&ve(s.then)&&ve(s.catch),O={isArray:ni,isArrayBuffer:is,isBuffer:na,isFormData:la,isArrayBufferView:ia,isString:ra,isNumber:rs,isBoolean:oa,isObject:yr,isPlainObject:cr,isUndefined:Mi,isDate:sa,isFile:aa,isBlob:ua,isRegExp:Ta,isFunction:ve,isStream:ha,isURLSearchParams:fa,isTypedArray:ba,isFileList:ca,forEach:Ai,merge:to,extend:pa,trim:da,stripBOM:ma,inherits:_a,toFlatObject:ga,kindOf:gr,kindOfTest:Ne,endsWith:va,toArray:ya,forEachEntry:wa,matchAll:xa,isHTMLForm:Ca,hasOwnProperty:Fo,hasOwnProp:Fo,reduceDescriptors:us,freezeMethods:Sa,toObjectSet:ka,toCamelCase:Pa,noop:La,toFiniteNumber:Ea,findKey:os,global:ss,isContextDefined:as,ALPHABET:cs,generateString:Ma,isSpecCompliantForm:Oa,toJSONObject:Da,isAsyncFn:Aa,isThenable:Ia};function ft(s,a,e,l,f){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",a&&(this.code=a),e&&(this.config=e),l&&(this.request=l),f&&(this.response=f)}O.inherits(ft,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const hs=ft.prototype,ls={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{ls[s]={value:s}});Object.defineProperties(ft,ls);Object.defineProperty(hs,"isAxiosError",{value:!0});ft.from=(s,a,e,l,f,p)=>{const g=Object.create(hs);return O.toFlatObject(s,g,function(S){return S!==Error.prototype},E=>E!=="isAxiosError"),ft.call(g,s.message,a,e,l,f),g.cause=s,g.name=s.name,p&&Object.assign(g,p),g};const Ra=null;function eo(s){return O.isPlainObject(s)||O.isArray(s)}function fs(s){return O.endsWith(s,"[]")?s.slice(0,-2):s}function Ho(s,a,e){return s?s.concat(a).map(function(f,p){return f=fs(f),!e&&p?"["+f+"]":f}).join(e?".":""):a}function Na(s){return O.isArray(s)&&!s.some(eo)}const za=O.toFlatObject(O,{},null,function(a){return/^is[A-Z]/.test(a)});function br(s,a,e){if(!O.isObject(s))throw new TypeError("target must be an object");a=a||new FormData,e=O.toFlatObject(e,{metaTokens:!0,dots:!1,indexes:!1},!1,function(T,R){return!O.isUndefined(R[T])});const l=e.metaTokens,f=e.visitor||C,p=e.dots,g=e.indexes,S=(e.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(a);if(!O.isFunction(f))throw new TypeError("visitor must be a function");function U(I){if(I===null)return"";if(O.isDate(I))return I.toISOString();if(!S&&O.isBlob(I))throw new ft("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(I)||O.isTypedArray(I)?S&&typeof Blob=="function"?new Blob([I]):Buffer.from(I):I}function C(I,T,R){let F=I;if(I&&!R&&typeof I=="object"){if(O.endsWith(T,"{}"))T=l?T:T.slice(0,-2),I=JSON.stringify(I);else if(O.isArray(I)&&Na(I)||(O.isFileList(I)||O.endsWith(T,"[]"))&&(F=O.toArray(I)))return T=fs(T),F.forEach(function(Q,_t){!(O.isUndefined(Q)||Q===null)&&a.append(g===!0?Ho([T],_t,p):g===null?T:T+"[]",U(Q))}),!1}return eo(I)?!0:(a.append(Ho(R,T,p),U(I)),!1)}const D=[],Z=Object.assign(za,{defaultVisitor:C,convertValue:U,isVisitable:eo});function J(I,T){if(!O.isUndefined(I)){if(D.indexOf(I)!==-1)throw Error("Circular reference detected in "+T.join("."));D.push(I),O.forEach(I,function(F,V){(!(O.isUndefined(F)||F===null)&&f.call(a,F,O.isString(V)?V.trim():V,T,Z))===!0&&J(F,T?T.concat(V):[V])}),D.pop()}}if(!O.isObject(s))throw new TypeError("data must be an object");return J(s),a}function jo(s){const a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(l){return a[l]})}function co(s,a){this._pairs=[],s&&br(s,this,a)}const ds=co.prototype;ds.append=function(a,e){this._pairs.push([a,e])};ds.toString=function(a){const e=a?function(l){return a.call(this,l,jo)}:jo;return this._pairs.map(function(f){return e(f[0])+"="+e(f[1])},"").join("&")};function Ba(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function ps(s,a,e){if(!a)return s;const l=e&&e.encode||Ba,f=e&&e.serialize;let p;if(f?p=f(a,e):p=O.isURLSearchParams(a)?a.toString():new co(a,e).toString(l),p){const g=s.indexOf("#");g!==-1&&(s=s.slice(0,g)),s+=(s.indexOf("?")===-1?"?":"&")+p}return s}class Fa{constructor(){this.handlers=[]}use(a,e,l){return this.handlers.push({fulfilled:a,rejected:e,synchronous:l?l.synchronous:!1,runWhen:l?l.runWhen:null}),this.handlers.length-1}eject(a){this.handlers[a]&&(this.handlers[a]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(a){O.forEach(this.handlers,function(l){l!==null&&a(l)})}}const Uo=Fa,ms={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Za=typeof URLSearchParams<"u"?URLSearchParams:co,Ha=typeof FormData<"u"?FormData:null,ja=typeof Blob<"u"?Blob:null,Ua=(()=>{let s;return typeof navigator<"u"&&((s=navigator.product)==="ReactNative"||s==="NativeScript"||s==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),Wa=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Re={isBrowser:!0,classes:{URLSearchParams:Za,FormData:Ha,Blob:ja},isStandardBrowserEnv:Ua,isStandardBrowserWebWorkerEnv:Wa,protocols:["http","https","file","blob","url","data"]};function qa(s,a){return br(s,new Re.classes.URLSearchParams,Object.assign({visitor:function(e,l,f,p){return Re.isNode&&O.isBuffer(e)?(this.append(l,e.toString("base64")),!1):p.defaultVisitor.apply(this,arguments)}},a))}function Ya(s){return O.matchAll(/\w+|\[(\w*)]/g,s).map(a=>a[0]==="[]"?"":a[1]||a[0])}function Va(s){const a={},e=Object.keys(s);let l;const f=e.length;let p;for(l=0;l<f;l++)p=e[l],a[p]=s[p];return a}function _s(s){function a(e,l,f,p){let g=e[p++];const E=Number.isFinite(+g),S=p>=e.length;return g=!g&&O.isArray(f)?f.length:g,S?(O.hasOwnProp(f,g)?f[g]=[f[g],l]:f[g]=l,!E):((!f[g]||!O.isObject(f[g]))&&(f[g]=[]),a(e,l,f[g],p)&&O.isArray(f[g])&&(f[g]=Va(f[g])),!E)}if(O.isFormData(s)&&O.isFunction(s.entries)){const e={};return O.forEachEntry(s,(l,f)=>{a(Ya(l),f,e,0)}),e}return null}function Ja(s,a,e){if(O.isString(s))try{return(a||JSON.parse)(s),O.trim(s)}catch(l){if(l.name!=="SyntaxError")throw l}return(e||JSON.stringify)(s)}const ho={transitional:ms,adapter:["xhr","http"],transformRequest:[function(a,e){const l=e.getContentType()||"",f=l.indexOf("application/json")>-1,p=O.isObject(a);if(p&&O.isHTMLForm(a)&&(a=new FormData(a)),O.isFormData(a))return f&&f?JSON.stringify(_s(a)):a;if(O.isArrayBuffer(a)||O.isBuffer(a)||O.isStream(a)||O.isFile(a)||O.isBlob(a))return a;if(O.isArrayBufferView(a))return a.buffer;if(O.isURLSearchParams(a))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),a.toString();let E;if(p){if(l.indexOf("application/x-www-form-urlencoded")>-1)return qa(a,this.formSerializer).toString();if((E=O.isFileList(a))||l.indexOf("multipart/form-data")>-1){const S=this.env&&this.env.FormData;return br(E?{"files[]":a}:a,S&&new S,this.formSerializer)}}return p||f?(e.setContentType("application/json",!1),Ja(a)):a}],transformResponse:[function(a){const e=this.transitional||ho.transitional,l=e&&e.forcedJSONParsing,f=this.responseType==="json";if(a&&O.isString(a)&&(l&&!this.responseType||f)){const g=!(e&&e.silentJSONParsing)&&f;try{return JSON.parse(a)}catch(E){if(g)throw E.name==="SyntaxError"?ft.from(E,ft.ERR_BAD_RESPONSE,this,null,this.response):E}}return a}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Re.classes.FormData,Blob:Re.classes.Blob},validateStatus:function(a){return a>=200&&a<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],s=>{ho.headers[s]={}});const lo=ho,Ga=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Ka=s=>{const a={};let e,l,f;return s&&s.split(`
`).forEach(function(g){f=g.indexOf(":"),e=g.substring(0,f).trim().toLowerCase(),l=g.substring(f+1).trim(),!(!e||a[e]&&Ga[e])&&(e==="set-cookie"?a[e]?a[e].push(l):a[e]=[l]:a[e]=a[e]?a[e]+", "+l:l)}),a},Wo=Symbol("internals");function Li(s){return s&&String(s).trim().toLowerCase()}function hr(s){return s===!1||s==null?s:O.isArray(s)?s.map(hr):String(s)}function $a(s){const a=Object.create(null),e=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let l;for(;l=e.exec(s);)a[l[1]]=l[2];return a}const Xa=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function Yr(s,a,e,l,f){if(O.isFunction(l))return l.call(this,a,e);if(f&&(a=e),!!O.isString(a)){if(O.isString(l))return a.indexOf(l)!==-1;if(O.isRegExp(l))return l.test(a)}}function Qa(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(a,e,l)=>e.toUpperCase()+l)}function tu(s,a){const e=O.toCamelCase(" "+a);["get","set","has"].forEach(l=>{Object.defineProperty(s,l+e,{value:function(f,p,g){return this[l].call(this,a,f,p,g)},configurable:!0})})}class wr{constructor(a){a&&this.set(a)}set(a,e,l){const f=this;function p(E,S,U){const C=Li(S);if(!C)throw new Error("header name must be a non-empty string");const D=O.findKey(f,C);(!D||f[D]===void 0||U===!0||U===void 0&&f[D]!==!1)&&(f[D||S]=hr(E))}const g=(E,S)=>O.forEach(E,(U,C)=>p(U,C,S));return O.isPlainObject(a)||a instanceof this.constructor?g(a,e):O.isString(a)&&(a=a.trim())&&!Xa(a)?g(Ka(a),e):a!=null&&p(e,a,l),this}get(a,e){if(a=Li(a),a){const l=O.findKey(this,a);if(l){const f=this[l];if(!e)return f;if(e===!0)return $a(f);if(O.isFunction(e))return e.call(this,f,l);if(O.isRegExp(e))return e.exec(f);throw new TypeError("parser must be boolean|regexp|function")}}}has(a,e){if(a=Li(a),a){const l=O.findKey(this,a);return!!(l&&this[l]!==void 0&&(!e||Yr(this,this[l],l,e)))}return!1}delete(a,e){const l=this;let f=!1;function p(g){if(g=Li(g),g){const E=O.findKey(l,g);E&&(!e||Yr(l,l[E],E,e))&&(delete l[E],f=!0)}}return O.isArray(a)?a.forEach(p):p(a),f}clear(a){const e=Object.keys(this);let l=e.length,f=!1;for(;l--;){const p=e[l];(!a||Yr(this,this[p],p,a,!0))&&(delete this[p],f=!0)}return f}normalize(a){const e=this,l={};return O.forEach(this,(f,p)=>{const g=O.findKey(l,p);if(g){e[g]=hr(f),delete e[p];return}const E=a?Qa(p):String(p).trim();E!==p&&delete e[p],e[E]=hr(f),l[E]=!0}),this}concat(...a){return this.constructor.concat(this,...a)}toJSON(a){const e=Object.create(null);return O.forEach(this,(l,f)=>{l!=null&&l!==!1&&(e[f]=a&&O.isArray(l)?l.join(", "):l)}),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([a,e])=>a+": "+e).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(a){return a instanceof this?a:new this(a)}static concat(a,...e){const l=new this(a);return e.forEach(f=>l.set(f)),l}static accessor(a){const l=(this[Wo]=this[Wo]={accessors:{}}).accessors,f=this.prototype;function p(g){const E=Li(g);l[E]||(tu(f,g),l[E]=!0)}return O.isArray(a)?a.forEach(p):p(a),this}}wr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(wr.prototype,({value:s},a)=>{let e=a[0].toUpperCase()+a.slice(1);return{get:()=>s,set(l){this[e]=l}}});O.freezeMethods(wr);const Ke=wr;function Vr(s,a){const e=this||lo,l=a||e,f=Ke.from(l.headers);let p=l.data;return O.forEach(s,function(E){p=E.call(e,p,f.normalize(),a?a.status:void 0)}),f.normalize(),p}function gs(s){return!!(s&&s.__CANCEL__)}function Ii(s,a,e){ft.call(this,s??"canceled",ft.ERR_CANCELED,a,e),this.name="CanceledError"}O.inherits(Ii,ft,{__CANCEL__:!0});function eu(s,a,e){const l=e.config.validateStatus;!e.status||!l||l(e.status)?s(e):a(new ft("Request failed with status code "+e.status,[ft.ERR_BAD_REQUEST,ft.ERR_BAD_RESPONSE][Math.floor(e.status/100)-4],e.config,e.request,e))}const nu=Re.isStandardBrowserEnv?function(){return{write:function(e,l,f,p,g,E){const S=[];S.push(e+"="+encodeURIComponent(l)),O.isNumber(f)&&S.push("expires="+new Date(f).toGMTString()),O.isString(p)&&S.push("path="+p),O.isString(g)&&S.push("domain="+g),E===!0&&S.push("secure"),document.cookie=S.join("; ")},read:function(e){const l=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function iu(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function ru(s,a){return a?s.replace(/\/+$/,"")+"/"+a.replace(/^\/+/,""):s}function vs(s,a){return s&&!iu(a)?ru(s,a):a}const ou=Re.isStandardBrowserEnv?function(){const a=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let l;function f(p){let g=p;return a&&(e.setAttribute("href",g),g=e.href),e.setAttribute("href",g),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:e.pathname.charAt(0)==="/"?e.pathname:"/"+e.pathname}}return l=f(window.location.href),function(g){const E=O.isString(g)?f(g):g;return E.protocol===l.protocol&&E.host===l.host}}():function(){return function(){return!0}}();function su(s){const a=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return a&&a[1]||""}function au(s,a){s=s||10;const e=new Array(s),l=new Array(s);let f=0,p=0,g;return a=a!==void 0?a:1e3,function(S){const U=Date.now(),C=l[p];g||(g=U),e[f]=S,l[f]=U;let D=p,Z=0;for(;D!==f;)Z+=e[D++],D=D%s;if(f=(f+1)%s,f===p&&(p=(p+1)%s),U-g<a)return;const J=C&&U-C;return J?Math.round(Z*1e3/J):void 0}}function qo(s,a){let e=0;const l=au(50,250);return f=>{const p=f.loaded,g=f.lengthComputable?f.total:void 0,E=p-e,S=l(E),U=p<=g;e=p;const C={loaded:p,total:g,progress:g?p/g:void 0,bytes:E,rate:S||void 0,estimated:S&&g&&U?(g-p)/S:void 0,event:f};C[a?"download":"upload"]=!0,s(C)}}const uu=typeof XMLHttpRequest<"u",cu=uu&&function(s){return new Promise(function(e,l){let f=s.data;const p=Ke.from(s.headers).normalize(),g=s.responseType;let E;function S(){s.cancelToken&&s.cancelToken.unsubscribe(E),s.signal&&s.signal.removeEventListener("abort",E)}let U;O.isFormData(f)&&(Re.isStandardBrowserEnv||Re.isStandardBrowserWebWorkerEnv?p.setContentType(!1):p.getContentType(/^\s*multipart\/form-data/)?O.isString(U=p.getContentType())&&p.setContentType(U.replace(/^\s*(multipart\/form-data);+/,"$1")):p.setContentType("multipart/form-data"));let C=new XMLHttpRequest;if(s.auth){const I=s.auth.username||"",T=s.auth.password?unescape(encodeURIComponent(s.auth.password)):"";p.set("Authorization","Basic "+btoa(I+":"+T))}const D=vs(s.baseURL,s.url);C.open(s.method.toUpperCase(),ps(D,s.params,s.paramsSerializer),!0),C.timeout=s.timeout;function Z(){if(!C)return;const I=Ke.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),R={data:!g||g==="text"||g==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:I,config:s,request:C};eu(function(V){e(V),S()},function(V){l(V),S()},R),C=null}if("onloadend"in C?C.onloadend=Z:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(Z)},C.onabort=function(){C&&(l(new ft("Request aborted",ft.ECONNABORTED,s,C)),C=null)},C.onerror=function(){l(new ft("Network Error",ft.ERR_NETWORK,s,C)),C=null},C.ontimeout=function(){let T=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||ms;s.timeoutErrorMessage&&(T=s.timeoutErrorMessage),l(new ft(T,R.clarifyTimeoutError?ft.ETIMEDOUT:ft.ECONNABORTED,s,C)),C=null},Re.isStandardBrowserEnv){const I=(s.withCredentials||ou(D))&&s.xsrfCookieName&&nu.read(s.xsrfCookieName);I&&p.set(s.xsrfHeaderName,I)}f===void 0&&p.setContentType(null),"setRequestHeader"in C&&O.forEach(p.toJSON(),function(T,R){C.setRequestHeader(R,T)}),O.isUndefined(s.withCredentials)||(C.withCredentials=!!s.withCredentials),g&&g!=="json"&&(C.responseType=s.responseType),typeof s.onDownloadProgress=="function"&&C.addEventListener("progress",qo(s.onDownloadProgress,!0)),typeof s.onUploadProgress=="function"&&C.upload&&C.upload.addEventListener("progress",qo(s.onUploadProgress)),(s.cancelToken||s.signal)&&(E=I=>{C&&(l(!I||I.type?new Ii(null,s,C):I),C.abort(),C=null)},s.cancelToken&&s.cancelToken.subscribe(E),s.signal&&(s.signal.aborted?E():s.signal.addEventListener("abort",E)));const J=su(D);if(J&&Re.protocols.indexOf(J)===-1){l(new ft("Unsupported protocol "+J+":",ft.ERR_BAD_REQUEST,s));return}C.send(f||null)})},no={http:Ra,xhr:cu};O.forEach(no,(s,a)=>{if(s){try{Object.defineProperty(s,"name",{value:a})}catch{}Object.defineProperty(s,"adapterName",{value:a})}});const Yo=s=>`- ${s}`,hu=s=>O.isFunction(s)||s===null||s===!1,ys={getAdapter:s=>{s=O.isArray(s)?s:[s];const{length:a}=s;let e,l;const f={};for(let p=0;p<a;p++){e=s[p];let g;if(l=e,!hu(e)&&(l=no[(g=String(e)).toLowerCase()],l===void 0))throw new ft(`Unknown adapter '${g}'`);if(l)break;f[g||"#"+p]=l}if(!l){const p=Object.entries(f).map(([E,S])=>`adapter ${E} `+(S===!1?"is not supported by the environment":"is not available in the build"));let g=a?p.length>1?`since :
`+p.map(Yo).join(`
`):" "+Yo(p[0]):"as no adapter specified";throw new ft("There is no suitable adapter to dispatch the request "+g,"ERR_NOT_SUPPORT")}return l},adapters:no};function Jr(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new Ii(null,s)}function Vo(s){return Jr(s),s.headers=Ke.from(s.headers),s.data=Vr.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),ys.getAdapter(s.adapter||lo.adapter)(s).then(function(l){return Jr(s),l.data=Vr.call(s,s.transformResponse,l),l.headers=Ke.from(l.headers),l},function(l){return gs(l)||(Jr(s),l&&l.response&&(l.response.data=Vr.call(s,s.transformResponse,l.response),l.response.headers=Ke.from(l.response.headers))),Promise.reject(l)})}const Jo=s=>s instanceof Ke?s.toJSON():s;function ei(s,a){a=a||{};const e={};function l(U,C,D){return O.isPlainObject(U)&&O.isPlainObject(C)?O.merge.call({caseless:D},U,C):O.isPlainObject(C)?O.merge({},C):O.isArray(C)?C.slice():C}function f(U,C,D){if(O.isUndefined(C)){if(!O.isUndefined(U))return l(void 0,U,D)}else return l(U,C,D)}function p(U,C){if(!O.isUndefined(C))return l(void 0,C)}function g(U,C){if(O.isUndefined(C)){if(!O.isUndefined(U))return l(void 0,U)}else return l(void 0,C)}function E(U,C,D){if(D in a)return l(U,C);if(D in s)return l(void 0,U)}const S={url:p,method:p,data:p,baseURL:g,transformRequest:g,transformResponse:g,paramsSerializer:g,timeout:g,timeoutMessage:g,withCredentials:g,adapter:g,responseType:g,xsrfCookieName:g,xsrfHeaderName:g,onUploadProgress:g,onDownloadProgress:g,decompress:g,maxContentLength:g,maxBodyLength:g,beforeRedirect:g,transport:g,httpAgent:g,httpsAgent:g,cancelToken:g,socketPath:g,responseEncoding:g,validateStatus:E,headers:(U,C)=>f(Jo(U),Jo(C),!0)};return O.forEach(Object.keys(Object.assign({},s,a)),function(C){const D=S[C]||f,Z=D(s[C],a[C],C);O.isUndefined(Z)&&D!==E||(e[C]=Z)}),e}const bs="1.5.1",fo={};["object","boolean","number","function","string","symbol"].forEach((s,a)=>{fo[s]=function(l){return typeof l===s||"a"+(a<1?"n ":" ")+s}});const Go={};fo.transitional=function(a,e,l){function f(p,g){return"[Axios v"+bs+"] Transitional option '"+p+"'"+g+(l?". "+l:"")}return(p,g,E)=>{if(a===!1)throw new ft(f(g," has been removed"+(e?" in "+e:"")),ft.ERR_DEPRECATED);return e&&!Go[g]&&(Go[g]=!0,console.warn(f(g," has been deprecated since v"+e+" and will be removed in the near future"))),a?a(p,g,E):!0}};function lu(s,a,e){if(typeof s!="object")throw new ft("options must be an object",ft.ERR_BAD_OPTION_VALUE);const l=Object.keys(s);let f=l.length;for(;f-- >0;){const p=l[f],g=a[p];if(g){const E=s[p],S=E===void 0||g(E,p,s);if(S!==!0)throw new ft("option "+p+" must be "+S,ft.ERR_BAD_OPTION_VALUE);continue}if(e!==!0)throw new ft("Unknown option "+p,ft.ERR_BAD_OPTION)}}const ro={assertOptions:lu,validators:fo},hn=ro.validators;class fr{constructor(a){this.defaults=a,this.interceptors={request:new Uo,response:new Uo}}request(a,e){typeof a=="string"?(e=e||{},e.url=a):e=a||{},e=ei(this.defaults,e);const{transitional:l,paramsSerializer:f,headers:p}=e;l!==void 0&&ro.assertOptions(l,{silentJSONParsing:hn.transitional(hn.boolean),forcedJSONParsing:hn.transitional(hn.boolean),clarifyTimeoutError:hn.transitional(hn.boolean)},!1),f!=null&&(O.isFunction(f)?e.paramsSerializer={serialize:f}:ro.assertOptions(f,{encode:hn.function,serialize:hn.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let g=p&&O.merge(p.common,p[e.method]);p&&O.forEach(["delete","get","head","post","put","patch","common"],I=>{delete p[I]}),e.headers=Ke.concat(g,p);const E=[];let S=!0;this.interceptors.request.forEach(function(T){typeof T.runWhen=="function"&&T.runWhen(e)===!1||(S=S&&T.synchronous,E.unshift(T.fulfilled,T.rejected))});const U=[];this.interceptors.response.forEach(function(T){U.push(T.fulfilled,T.rejected)});let C,D=0,Z;if(!S){const I=[Vo.bind(this),void 0];for(I.unshift.apply(I,E),I.push.apply(I,U),Z=I.length,C=Promise.resolve(e);D<Z;)C=C.then(I[D++],I[D++]);return C}Z=E.length;let J=e;for(D=0;D<Z;){const I=E[D++],T=E[D++];try{J=I(J)}catch(R){T.call(this,R);break}}try{C=Vo.call(this,J)}catch(I){return Promise.reject(I)}for(D=0,Z=U.length;D<Z;)C=C.then(U[D++],U[D++]);return C}getUri(a){a=ei(this.defaults,a);const e=vs(a.baseURL,a.url);return ps(e,a.params,a.paramsSerializer)}}O.forEach(["delete","get","head","options"],function(a){fr.prototype[a]=function(e,l){return this.request(ei(l||{},{method:a,url:e,data:(l||{}).data}))}});O.forEach(["post","put","patch"],function(a){function e(l){return function(p,g,E){return this.request(ei(E||{},{method:a,headers:l?{"Content-Type":"multipart/form-data"}:{},url:p,data:g}))}}fr.prototype[a]=e(),fr.prototype[a+"Form"]=e(!0)});const lr=fr;class po{constructor(a){if(typeof a!="function")throw new TypeError("executor must be a function.");let e;this.promise=new Promise(function(p){e=p});const l=this;this.promise.then(f=>{if(!l._listeners)return;let p=l._listeners.length;for(;p-- >0;)l._listeners[p](f);l._listeners=null}),this.promise.then=f=>{let p;const g=new Promise(E=>{l.subscribe(E),p=E}).then(f);return g.cancel=function(){l.unsubscribe(p)},g},a(function(p,g,E){l.reason||(l.reason=new Ii(p,g,E),e(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(a){if(this.reason){a(this.reason);return}this._listeners?this._listeners.push(a):this._listeners=[a]}unsubscribe(a){if(!this._listeners)return;const e=this._listeners.indexOf(a);e!==-1&&this._listeners.splice(e,1)}static source(){let a;return{token:new po(function(f){a=f}),cancel:a}}}const fu=po;function du(s){return function(e){return s.apply(null,e)}}function pu(s){return O.isObject(s)&&s.isAxiosError===!0}const oo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oo).forEach(([s,a])=>{oo[a]=s});const mu=oo;function ws(s){const a=new lr(s),e=ns(lr.prototype.request,a);return O.extend(e,lr.prototype,a,{allOwnKeys:!0}),O.extend(e,a,null,{allOwnKeys:!0}),e.create=function(f){return ws(ei(s,f))},e}const Dt=ws(lo);Dt.Axios=lr;Dt.CanceledError=Ii;Dt.CancelToken=fu;Dt.isCancel=gs;Dt.VERSION=bs;Dt.toFormData=br;Dt.AxiosError=ft;Dt.Cancel=Dt.CanceledError;Dt.all=function(a){return Promise.all(a)};Dt.spread=du;Dt.isAxiosError=pu;Dt.mergeConfig=ei;Dt.AxiosHeaders=Ke;Dt.formToJSON=s=>_s(O.isHTMLForm(s)?new FormData(s):s);Dt.getAdapter=ys.getAdapter;Dt.HttpStatusCode=mu;Dt.default=Dt;const _u=Dt;function dr(s){"@babel/helpers - typeof";return dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},dr(s)}function qt(s,a){if(!(s instanceof a))throw new TypeError("Cannot call a class as a function")}function Ko(s,a){for(var e=0;e<a.length;e++){var l=a[e];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(s,l.key,l)}}function Yt(s,a,e){return a&&Ko(s.prototype,a),e&&Ko(s,e),Object.defineProperty(s,"prototype",{writable:!1}),s}function Oi(){return Oi=Object.assign||function(s){for(var a=1;a<arguments.length;a++){var e=arguments[a];for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&(s[l]=e[l])}return s},Oi.apply(this,arguments)}function fe(s,a){if(typeof a!="function"&&a!==null)throw new TypeError("Super expression must either be null or a function");s.prototype=Object.create(a&&a.prototype,{constructor:{value:s,writable:!0,configurable:!0}}),Object.defineProperty(s,"prototype",{writable:!1}),a&&so(s,a)}function pr(s){return pr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},pr(s)}function so(s,a){return so=Object.setPrototypeOf||function(l,f){return l.__proto__=f,l},so(s,a)}function gu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function vu(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function yu(s,a){if(a&&(typeof a=="object"||typeof a=="function"))return a;if(a!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vu(s)}function de(s){var a=gu();return function(){var l=pr(s),f;if(a){var p=pr(this).constructor;f=Reflect.construct(l,arguments,p)}else f=l.apply(this,arguments);return yu(this,f)}}var mo=function(){function s(){qt(this,s)}return Yt(s,[{key:"listenForWhisper",value:function(e,l){return this.listen(".client-"+e,l)}},{key:"notification",value:function(e){return this.listen(".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated",e)}},{key:"stopListeningForWhisper",value:function(e,l){return this.stopListening(".client-"+e,l)}}]),s}(),xs=function(){function s(a){qt(this,s),this.namespace=a}return Yt(s,[{key:"format",value:function(e){return[".","\\"].includes(e.charAt(0))?e.substring(1):(this.namespace&&(e=this.namespace+"."+e),e.replace(/\./g,"\\"))}},{key:"setNamespace",value:function(e){this.namespace=e}}]),s}(),xr=function(s){fe(e,s);var a=de(e);function e(l,f,p){var g;return qt(this,e),g=a.call(this),g.name=f,g.pusher=l,g.options=p,g.eventFormatter=new xs(g.options.namespace),g.subscribe(),g}return Yt(e,[{key:"subscribe",value:function(){this.subscription=this.pusher.subscribe(this.name)}},{key:"unsubscribe",value:function(){this.pusher.unsubscribe(this.name)}},{key:"listen",value:function(f,p){return this.on(this.eventFormatter.format(f),p),this}},{key:"listenToAll",value:function(f){var p=this;return this.subscription.bind_global(function(g,E){if(!g.startsWith("pusher:")){var S=p.options.namespace.replace(/\./g,"\\"),U=g.startsWith(S)?g.substring(S.length+1):"."+g;f(U,E)}}),this}},{key:"stopListening",value:function(f,p){return p?this.subscription.unbind(this.eventFormatter.format(f),p):this.subscription.unbind(this.eventFormatter.format(f)),this}},{key:"stopListeningToAll",value:function(f){return f?this.subscription.unbind_global(f):this.subscription.unbind_global(),this}},{key:"subscribed",value:function(f){return this.on("pusher:subscription_succeeded",function(){f()}),this}},{key:"error",value:function(f){return this.on("pusher:subscription_error",function(p){f(p)}),this}},{key:"on",value:function(f,p){return this.subscription.bind(f,p),this}}]),e}(mo),bu=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"whisper",value:function(f,p){return this.pusher.channels.channels[this.name].trigger("client-".concat(f),p),this}}]),e}(xr),wu=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"whisper",value:function(f,p){return this.pusher.channels.channels[this.name].trigger("client-".concat(f),p),this}}]),e}(xr),xu=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"here",value:function(f){return this.on("pusher:subscription_succeeded",function(p){f(Object.keys(p.members).map(function(g){return p.members[g]}))}),this}},{key:"joining",value:function(f){return this.on("pusher:member_added",function(p){f(p.info)}),this}},{key:"whisper",value:function(f,p){return this.pusher.channels.channels[this.name].trigger("client-".concat(f),p),this}},{key:"leaving",value:function(f){return this.on("pusher:member_removed",function(p){f(p.info)}),this}}]),e}(xr),Cs=function(s){fe(e,s);var a=de(e);function e(l,f,p){var g;return qt(this,e),g=a.call(this),g.events={},g.listeners={},g.name=f,g.socket=l,g.options=p,g.eventFormatter=new xs(g.options.namespace),g.subscribe(),g}return Yt(e,[{key:"subscribe",value:function(){this.socket.emit("subscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"unsubscribe",value:function(){this.unbind(),this.socket.emit("unsubscribe",{channel:this.name,auth:this.options.auth||{}})}},{key:"listen",value:function(f,p){return this.on(this.eventFormatter.format(f),p),this}},{key:"stopListening",value:function(f,p){return this.unbindEvent(this.eventFormatter.format(f),p),this}},{key:"subscribed",value:function(f){return this.on("connect",function(p){f(p)}),this}},{key:"error",value:function(f){return this}},{key:"on",value:function(f,p){var g=this;return this.listeners[f]=this.listeners[f]||[],this.events[f]||(this.events[f]=function(E,S){g.name===E&&g.listeners[f]&&g.listeners[f].forEach(function(U){return U(S)})},this.socket.on(f,this.events[f])),this.listeners[f].push(p),this}},{key:"unbind",value:function(){var f=this;Object.keys(this.events).forEach(function(p){f.unbindEvent(p)})}},{key:"unbindEvent",value:function(f,p){this.listeners[f]=this.listeners[f]||[],p&&(this.listeners[f]=this.listeners[f].filter(function(g){return g!==p})),(!p||this.listeners[f].length===0)&&(this.events[f]&&(this.socket.removeListener(f,this.events[f]),delete this.events[f]),delete this.listeners[f])}}]),e}(mo),Ps=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"whisper",value:function(f,p){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(f),data:p}),this}}]),e}(Cs),Cu=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"here",value:function(f){return this.on("presence:subscribed",function(p){f(p.map(function(g){return g.user_info}))}),this}},{key:"joining",value:function(f){return this.on("presence:joining",function(p){return f(p.user_info)}),this}},{key:"whisper",value:function(f,p){return this.socket.emit("client event",{channel:this.name,event:"client-".concat(f),data:p}),this}},{key:"leaving",value:function(f){return this.on("presence:leaving",function(p){return f(p.user_info)}),this}}]),e}(Ps),mr=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}},{key:"listen",value:function(f,p){return this}},{key:"listenToAll",value:function(f){return this}},{key:"stopListening",value:function(f,p){return this}},{key:"subscribed",value:function(f){return this}},{key:"error",value:function(f){return this}},{key:"on",value:function(f,p){return this}}]),e}(mo),$o=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"whisper",value:function(f,p){return this}}]),e}(mr),Pu=function(s){fe(e,s);var a=de(e);function e(){return qt(this,e),a.apply(this,arguments)}return Yt(e,[{key:"here",value:function(f){return this}},{key:"joining",value:function(f){return this}},{key:"whisper",value:function(f,p){return this}},{key:"leaving",value:function(f){return this}}]),e}(mr),_o=function(){function s(a){qt(this,s),this._defaultOptions={auth:{headers:{}},authEndpoint:"/broadcasting/auth",userAuthentication:{endpoint:"/broadcasting/user-auth",headers:{}},broadcaster:"pusher",csrfToken:null,bearerToken:null,host:null,key:null,namespace:"App.Events"},this.setOptions(a),this.connect()}return Yt(s,[{key:"setOptions",value:function(e){this.options=Oi(this._defaultOptions,e);var l=this.csrfToken();return l&&(this.options.auth.headers["X-CSRF-TOKEN"]=l,this.options.userAuthentication.headers["X-CSRF-TOKEN"]=l),l=this.options.bearerToken,l&&(this.options.auth.headers.Authorization="Bearer "+l,this.options.userAuthentication.headers.Authorization="Bearer "+l),e}},{key:"csrfToken",value:function(){var e;return typeof window<"u"&&window.Laravel&&window.Laravel.csrfToken?window.Laravel.csrfToken:this.options.csrfToken?this.options.csrfToken:typeof document<"u"&&typeof document.querySelector=="function"&&(e=document.querySelector('meta[name="csrf-token"]'))?e.getAttribute("content"):null}}]),s}(),Xo=function(s){fe(e,s);var a=de(e);function e(){var l;return qt(this,e),l=a.apply(this,arguments),l.channels={},l}return Yt(e,[{key:"connect",value:function(){typeof this.options.client<"u"?this.pusher=this.options.client:this.options.Pusher?this.pusher=new this.options.Pusher(this.options.key,this.options):this.pusher=new Pusher(this.options.key,this.options)}},{key:"signin",value:function(){this.pusher.signin()}},{key:"listen",value:function(f,p,g){return this.channel(f).listen(p,g)}},{key:"channel",value:function(f){return this.channels[f]||(this.channels[f]=new xr(this.pusher,f,this.options)),this.channels[f]}},{key:"privateChannel",value:function(f){return this.channels["private-"+f]||(this.channels["private-"+f]=new bu(this.pusher,"private-"+f,this.options)),this.channels["private-"+f]}},{key:"encryptedPrivateChannel",value:function(f){return this.channels["private-encrypted-"+f]||(this.channels["private-encrypted-"+f]=new wu(this.pusher,"private-encrypted-"+f,this.options)),this.channels["private-encrypted-"+f]}},{key:"presenceChannel",value:function(f){return this.channels["presence-"+f]||(this.channels["presence-"+f]=new xu(this.pusher,"presence-"+f,this.options)),this.channels["presence-"+f]}},{key:"leave",value:function(f){var p=this,g=[f,"private-"+f,"private-encrypted-"+f,"presence-"+f];g.forEach(function(E,S){p.leaveChannel(E)})}},{key:"leaveChannel",value:function(f){this.channels[f]&&(this.channels[f].unsubscribe(),delete this.channels[f])}},{key:"socketId",value:function(){return this.pusher.connection.socket_id}},{key:"disconnect",value:function(){this.pusher.disconnect()}}]),e}(_o),Tu=function(s){fe(e,s);var a=de(e);function e(){var l;return qt(this,e),l=a.apply(this,arguments),l.channels={},l}return Yt(e,[{key:"connect",value:function(){var f=this,p=this.getSocketIO();return this.socket=p(this.options.host,this.options),this.socket.on("reconnect",function(){Object.values(f.channels).forEach(function(g){g.subscribe()})}),this.socket}},{key:"getSocketIO",value:function(){if(typeof this.options.client<"u")return this.options.client;if(typeof io<"u")return io;throw new Error("Socket.io client not found. Should be globally available or passed via options.client")}},{key:"listen",value:function(f,p,g){return this.channel(f).listen(p,g)}},{key:"channel",value:function(f){return this.channels[f]||(this.channels[f]=new Cs(this.socket,f,this.options)),this.channels[f]}},{key:"privateChannel",value:function(f){return this.channels["private-"+f]||(this.channels["private-"+f]=new Ps(this.socket,"private-"+f,this.options)),this.channels["private-"+f]}},{key:"presenceChannel",value:function(f){return this.channels["presence-"+f]||(this.channels["presence-"+f]=new Cu(this.socket,"presence-"+f,this.options)),this.channels["presence-"+f]}},{key:"leave",value:function(f){var p=this,g=[f,"private-"+f,"presence-"+f];g.forEach(function(E){p.leaveChannel(E)})}},{key:"leaveChannel",value:function(f){this.channels[f]&&(this.channels[f].unsubscribe(),delete this.channels[f])}},{key:"socketId",value:function(){return this.socket.id}},{key:"disconnect",value:function(){this.socket.disconnect()}}]),e}(_o),Su=function(s){fe(e,s);var a=de(e);function e(){var l;return qt(this,e),l=a.apply(this,arguments),l.channels={},l}return Yt(e,[{key:"connect",value:function(){}},{key:"listen",value:function(f,p,g){return new mr}},{key:"channel",value:function(f){return new mr}},{key:"privateChannel",value:function(f){return new $o}},{key:"encryptedPrivateChannel",value:function(f){return new $o}},{key:"presenceChannel",value:function(f){return new Pu}},{key:"leave",value:function(f){}},{key:"leaveChannel",value:function(f){}},{key:"socketId",value:function(){return"fake-socket-id"}},{key:"disconnect",value:function(){}}]),e}(_o),ku=function(){function s(a){qt(this,s),this.options=a,this.connect(),this.options.withoutInterceptors||this.registerInterceptors()}return Yt(s,[{key:"channel",value:function(e){return this.connector.channel(e)}},{key:"connect",value:function(){if(this.options.broadcaster=="reverb")this.connector=new Xo(Oi(Oi({},this.options),{cluster:""}));else if(this.options.broadcaster=="pusher")this.connector=new Xo(this.options);else if(this.options.broadcaster=="socket.io")this.connector=new Tu(this.options);else if(this.options.broadcaster=="null")this.connector=new Su(this.options);else if(typeof this.options.broadcaster=="function")this.connector=new this.options.broadcaster(this.options);else throw new Error("Broadcaster ".concat(dr(this.options.broadcaster)," ").concat(this.options.broadcaster," is not supported."))}},{key:"disconnect",value:function(){this.connector.disconnect()}},{key:"join",value:function(e){return this.connector.presenceChannel(e)}},{key:"leave",value:function(e){this.connector.leave(e)}},{key:"leaveChannel",value:function(e){this.connector.leaveChannel(e)}},{key:"leaveAllChannels",value:function(){for(var e in this.connector.channels)this.leaveChannel(e)}},{key:"listen",value:function(e,l,f){return this.connector.listen(e,l,f)}},{key:"private",value:function(e){return this.connector.privateChannel(e)}},{key:"encryptedPrivate",value:function(e){return this.connector.encryptedPrivateChannel(e)}},{key:"socketId",value:function(){return this.connector.socketId()}},{key:"registerInterceptors",value:function(){typeof Vue=="function"&&Vue.http&&this.registerVueRequestInterceptor(),typeof axios=="function"&&this.registerAxiosRequestInterceptor(),typeof jQuery=="function"&&this.registerjQueryAjaxSetup(),(typeof Turbo>"u"?"undefined":dr(Turbo))==="object"&&this.registerTurboRequestInterceptor()}},{key:"registerVueRequestInterceptor",value:function(){var e=this;Vue.http.interceptors.push(function(l,f){e.socketId()&&l.headers.set("X-Socket-ID",e.socketId()),f()})}},{key:"registerAxiosRequestInterceptor",value:function(){var e=this;axios.interceptors.request.use(function(l){return e.socketId()&&(l.headers["X-Socket-Id"]=e.socketId()),l})}},{key:"registerjQueryAjaxSetup",value:function(){var e=this;typeof jQuery.ajax<"u"&&jQuery.ajaxPrefilter(function(l,f,p){e.socketId()&&p.setRequestHeader("X-Socket-Id",e.socketId())})}},{key:"registerTurboRequestInterceptor",value:function(){var e=this;document.addEventListener("turbo:before-fetch-request",function(l){l.detail.fetchOptions.headers["X-Socket-Id"]=e.socketId()})}}]),s}(),Lu=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Eu(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var Ts={exports:{}};/*!
* Pusher JavaScript Library v8.4.0-rc2
* https://pusher.com/
*
* Copyright 2020, Pusher
* Released under the MIT licence.
*/(function(s,a){(function(l,f){s.exports=f()})(window,function(){return function(e){var l={};function f(p){if(l[p])return l[p].exports;var g=l[p]={i:p,l:!1,exports:{}};return e[p].call(g.exports,g,g.exports,f),g.l=!0,g.exports}return f.m=e,f.c=l,f.d=function(p,g,E){f.o(p,g)||Object.defineProperty(p,g,{enumerable:!0,get:E})},f.r=function(p){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(p,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(p,"__esModule",{value:!0})},f.t=function(p,g){if(g&1&&(p=f(p)),g&8||g&4&&typeof p=="object"&&p&&p.__esModule)return p;var E=Object.create(null);if(f.r(E),Object.defineProperty(E,"default",{enumerable:!0,value:p}),g&2&&typeof p!="string")for(var S in p)f.d(E,S,(function(U){return p[U]}).bind(null,S));return E},f.n=function(p){var g=p&&p.__esModule?function(){return p.default}:function(){return p};return f.d(g,"a",g),g},f.o=function(p,g){return Object.prototype.hasOwnProperty.call(p,g)},f.p="",f(f.s=2)}([function(e,l,f){var p=this&&this.__extends||function(){var T=function(R,F){return T=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(V,Q){V.__proto__=Q}||function(V,Q){for(var _t in Q)Q.hasOwnProperty(_t)&&(V[_t]=Q[_t])},T(R,F)};return function(R,F){T(R,F);function V(){this.constructor=R}R.prototype=F===null?Object.create(F):(V.prototype=F.prototype,new V)}}();Object.defineProperty(l,"__esModule",{value:!0});var g=256,E=function(){function T(R){R===void 0&&(R="="),this._paddingCharacter=R}return T.prototype.encodedLength=function(R){return this._paddingCharacter?(R+2)/3*4|0:(R*8+5)/6|0},T.prototype.encode=function(R){for(var F="",V=0;V<R.length-2;V+=3){var Q=R[V]<<16|R[V+1]<<8|R[V+2];F+=this._encodeByte(Q>>>3*6&63),F+=this._encodeByte(Q>>>2*6&63),F+=this._encodeByte(Q>>>1*6&63),F+=this._encodeByte(Q>>>0*6&63)}var _t=R.length-V;if(_t>0){var Q=R[V]<<16|(_t===2?R[V+1]<<8:0);F+=this._encodeByte(Q>>>3*6&63),F+=this._encodeByte(Q>>>2*6&63),_t===2?F+=this._encodeByte(Q>>>1*6&63):F+=this._paddingCharacter||"",F+=this._paddingCharacter||""}return F},T.prototype.maxDecodedLength=function(R){return this._paddingCharacter?R/4*3|0:(R*6+7)/8|0},T.prototype.decodedLength=function(R){return this.maxDecodedLength(R.length-this._getPaddingLength(R))},T.prototype.decode=function(R){if(R.length===0)return new Uint8Array(0);for(var F=this._getPaddingLength(R),V=R.length-F,Q=new Uint8Array(this.maxDecodedLength(V)),_t=0,bt=0,St=0,At=0,Lt=0,Ht=0,jt=0;bt<V-4;bt+=4)At=this._decodeChar(R.charCodeAt(bt+0)),Lt=this._decodeChar(R.charCodeAt(bt+1)),Ht=this._decodeChar(R.charCodeAt(bt+2)),jt=this._decodeChar(R.charCodeAt(bt+3)),Q[_t++]=At<<2|Lt>>>4,Q[_t++]=Lt<<4|Ht>>>2,Q[_t++]=Ht<<6|jt,St|=At&g,St|=Lt&g,St|=Ht&g,St|=jt&g;if(bt<V-1&&(At=this._decodeChar(R.charCodeAt(bt)),Lt=this._decodeChar(R.charCodeAt(bt+1)),Q[_t++]=At<<2|Lt>>>4,St|=At&g,St|=Lt&g),bt<V-2&&(Ht=this._decodeChar(R.charCodeAt(bt+2)),Q[_t++]=Lt<<4|Ht>>>2,St|=Ht&g),bt<V-3&&(jt=this._decodeChar(R.charCodeAt(bt+3)),Q[_t++]=Ht<<6|jt,St|=jt&g),St!==0)throw new Error("Base64Coder: incorrect characters for decoding");return Q},T.prototype._encodeByte=function(R){var F=R;return F+=65,F+=25-R>>>8&0-65-26+97,F+=51-R>>>8&26-97-52+48,F+=61-R>>>8&52-48-62+43,F+=62-R>>>8&62-43-63+47,String.fromCharCode(F)},T.prototype._decodeChar=function(R){var F=g;return F+=(42-R&R-44)>>>8&-g+R-43+62,F+=(46-R&R-48)>>>8&-g+R-47+63,F+=(47-R&R-58)>>>8&-g+R-48+52,F+=(64-R&R-91)>>>8&-g+R-65+0,F+=(96-R&R-123)>>>8&-g+R-97+26,F},T.prototype._getPaddingLength=function(R){var F=0;if(this._paddingCharacter){for(var V=R.length-1;V>=0&&R[V]===this._paddingCharacter;V--)F++;if(R.length<4||F>2)throw new Error("Base64Coder: incorrect padding")}return F},T}();l.Coder=E;var S=new E;function U(T){return S.encode(T)}l.encode=U;function C(T){return S.decode(T)}l.decode=C;var D=function(T){p(R,T);function R(){return T!==null&&T.apply(this,arguments)||this}return R.prototype._encodeByte=function(F){var V=F;return V+=65,V+=25-F>>>8&0-65-26+97,V+=51-F>>>8&26-97-52+48,V+=61-F>>>8&52-48-62+45,V+=62-F>>>8&62-45-63+95,String.fromCharCode(V)},R.prototype._decodeChar=function(F){var V=g;return V+=(44-F&F-46)>>>8&-g+F-45+62,V+=(94-F&F-96)>>>8&-g+F-95+63,V+=(47-F&F-58)>>>8&-g+F-48+52,V+=(64-F&F-91)>>>8&-g+F-65+0,V+=(96-F&F-123)>>>8&-g+F-97+26,V},R}(E);l.URLSafeCoder=D;var Z=new D;function J(T){return Z.encode(T)}l.encodeURLSafe=J;function I(T){return Z.decode(T)}l.decodeURLSafe=I,l.encodedLength=function(T){return S.encodedLength(T)},l.maxDecodedLength=function(T){return S.maxDecodedLength(T)},l.decodedLength=function(T){return S.decodedLength(T)}},function(e,l,f){Object.defineProperty(l,"__esModule",{value:!0});var p="utf8: invalid string",g="utf8: invalid source encoding";function E(C){for(var D=new Uint8Array(S(C)),Z=0,J=0;J<C.length;J++){var I=C.charCodeAt(J);I<128?D[Z++]=I:I<2048?(D[Z++]=192|I>>6,D[Z++]=128|I&63):I<55296?(D[Z++]=224|I>>12,D[Z++]=128|I>>6&63,D[Z++]=128|I&63):(J++,I=(I&1023)<<10,I|=C.charCodeAt(J)&1023,I+=65536,D[Z++]=240|I>>18,D[Z++]=128|I>>12&63,D[Z++]=128|I>>6&63,D[Z++]=128|I&63)}return D}l.encode=E;function S(C){for(var D=0,Z=0;Z<C.length;Z++){var J=C.charCodeAt(Z);if(J<128)D+=1;else if(J<2048)D+=2;else if(J<55296)D+=3;else if(J<=57343){if(Z>=C.length-1)throw new Error(p);Z++,D+=4}else throw new Error(p)}return D}l.encodedLength=S;function U(C){for(var D=[],Z=0;Z<C.length;Z++){var J=C[Z];if(J&128){var I=void 0;if(J<224){if(Z>=C.length)throw new Error(g);var T=C[++Z];if((T&192)!==128)throw new Error(g);J=(J&31)<<6|T&63,I=128}else if(J<240){if(Z>=C.length-1)throw new Error(g);var T=C[++Z],R=C[++Z];if((T&192)!==128||(R&192)!==128)throw new Error(g);J=(J&15)<<12|(T&63)<<6|R&63,I=2048}else if(J<248){if(Z>=C.length-2)throw new Error(g);var T=C[++Z],R=C[++Z],F=C[++Z];if((T&192)!==128||(R&192)!==128||(F&192)!==128)throw new Error(g);J=(J&15)<<18|(T&63)<<12|(R&63)<<6|F&63,I=65536}else throw new Error(g);if(J<I||J>=55296&&J<=57343)throw new Error(g);if(J>=65536){if(J>1114111)throw new Error(g);J-=65536,D.push(String.fromCharCode(55296|J>>10)),J=56320|J&1023}}D.push(String.fromCharCode(J))}return D.join("")}l.decode=U},function(e,l,f){e.exports=f(3).default},function(e,l,f){f.r(l);class p{constructor(o,c){this.lastId=0,this.prefix=o,this.name=c}create(o){this.lastId++;var c=this.lastId,_=this.prefix+c,y=this.name+"["+c+"]",M=!1,N=function(){M||(o.apply(null,arguments),M=!0)};return this[c]=N,{number:c,id:_,name:y,callback:N}}remove(o){delete this[o.number]}}var g=new p("_pusher_script_","Pusher.ScriptReceivers"),E={VERSION:"8.4.0-rc2",PROTOCOL:7,wsPort:80,wssPort:443,wsPath:"",httpHost:"sockjs.pusher.com",httpPort:80,httpsPort:443,httpPath:"/pusher",stats_host:"stats.pusher.com",authEndpoint:"/pusher/auth",authTransport:"ajax",activityTimeout:12e4,pongTimeout:3e4,unavailableTimeout:1e4,userAuthentication:{endpoint:"/pusher/user-auth",transport:"ajax"},channelAuthorization:{endpoint:"/pusher/auth",transport:"ajax"},cdn_http:"http://js.pusher.com",cdn_https:"https://js.pusher.com",dependency_suffix:""},S=E;class U{constructor(o){this.options=o,this.receivers=o.receivers||g,this.loading={}}load(o,c,_){var y=this;if(y.loading[o]&&y.loading[o].length>0)y.loading[o].push(_);else{y.loading[o]=[_];var M=X.createScriptRequest(y.getPath(o,c)),N=y.receivers.create(function(j){if(y.receivers.remove(N),y.loading[o]){var it=y.loading[o];delete y.loading[o];for(var ht=function(Tt){Tt||M.cleanup()},dt=0;dt<it.length;dt++)it[dt](j,ht)}});M.send(N)}}getRoot(o){var c,_=X.getDocument().location.protocol;return o&&o.useTLS||_==="https:"?c=this.options.cdn_https:c=this.options.cdn_http,c.replace(/\/*$/,"")+"/"+this.options.version}getPath(o,c){return this.getRoot(c)+"/"+o+this.options.suffix+".js"}}var C=new p("_pusher_dependencies","Pusher.DependenciesReceivers"),D=new U({cdn_http:S.cdn_http,cdn_https:S.cdn_https,version:S.VERSION,suffix:S.dependency_suffix,receivers:C});const Z={baseUrl:"https://pusher.com",urls:{authenticationEndpoint:{path:"/docs/channels/server_api/authenticating_users"},authorizationEndpoint:{path:"/docs/channels/server_api/authorizing-users/"},javascriptQuickStart:{path:"/docs/javascript_quick_start"},triggeringClientEvents:{path:"/docs/client_api_guide/client_events#trigger-events"},encryptedChannelSupport:{fullUrl:"https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support"}}};var I={buildLogSuffix:function(h){const o="See:",c=Z.urls[h];if(!c)return"";let _;return c.fullUrl?_=c.fullUrl:c.path&&(_=Z.baseUrl+c.path),_?`${o} ${_}`:""}},T;(function(h){h.UserAuthentication="user-authentication",h.ChannelAuthorization="channel-authorization"})(T||(T={}));class R extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class F extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class V extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class Q extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class _t extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class bt extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class St extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class At extends Error{constructor(o){super(o),Object.setPrototypeOf(this,new.target.prototype)}}class Lt extends Error{constructor(o,c){super(c),this.status=o,Object.setPrototypeOf(this,new.target.prototype)}}var jt=function(h,o,c,_,y){const M=X.createXHR();M.open("POST",c.endpoint,!0),M.setRequestHeader("Content-Type","application/x-www-form-urlencoded");for(var N in c.headers)M.setRequestHeader(N,c.headers[N]);if(c.headersProvider!=null){let j=c.headersProvider();for(var N in j)M.setRequestHeader(N,j[N])}return M.onreadystatechange=function(){if(M.readyState===4)if(M.status===200){let j,it=!1;try{j=JSON.parse(M.responseText),it=!0}catch{y(new Lt(200,`JSON returned from ${_.toString()} endpoint was invalid, yet status code was 200. Data was: ${M.responseText}`),null)}it&&y(null,j)}else{let j="";switch(_){case T.UserAuthentication:j=I.buildLogSuffix("authenticationEndpoint");break;case T.ChannelAuthorization:j=`Clients must be authorized to join private or presence channels. ${I.buildLogSuffix("authorizationEndpoint")}`;break}y(new Lt(M.status,`Unable to retrieve auth string from ${_.toString()} endpoint - received status: ${M.status} from ${c.endpoint}. ${j}`),null)}},M.send(o),M};function zt(h){return ze(kn(h))}var kt=String.fromCharCode,se="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ae=function(h){var o=h.charCodeAt(0);return o<128?h:o<2048?kt(192|o>>>6)+kt(128|o&63):kt(224|o>>>12&15)+kt(128|o>>>6&63)+kt(128|o&63)},kn=function(h){return h.replace(/[^\x00-\x7F]/g,ae)},Ut=function(h){var o=[0,2,1][h.length%3],c=h.charCodeAt(0)<<16|(h.length>1?h.charCodeAt(1):0)<<8|(h.length>2?h.charCodeAt(2):0),_=[se.charAt(c>>>18),se.charAt(c>>>12&63),o>=2?"=":se.charAt(c>>>6&63),o>=1?"=":se.charAt(c&63)];return _.join("")},ze=window.btoa||function(h){return h.replace(/[\s\S]{1,3}/g,Ut)};class nt{constructor(o,c,_,y){this.clear=c,this.timer=o(()=>{this.timer&&(this.timer=y(this.timer))},_)}isRunning(){return this.timer!==null}ensureAborted(){this.timer&&(this.clear(this.timer),this.timer=null)}}var $e=nt;function et(h){window.clearTimeout(h)}function gt(h){window.clearInterval(h)}class xt extends $e{constructor(o,c){super(setTimeout,et,o,function(_){return c(),null})}}class Bt extends $e{constructor(o,c){super(setInterval,gt,o,function(_){return c(),_})}}var Ct={now(){return Date.now?Date.now():new Date().valueOf()},defer(h){return new xt(0,h)},method(h,...o){var c=Array.prototype.slice.call(arguments,1);return function(_){return _[h].apply(_,c.concat(arguments))}}},$=Ct;function K(h,...o){for(var c=0;c<o.length;c++){var _=o[c];for(var y in _)_[y]&&_[y].constructor&&_[y].constructor===Object?h[y]=K(h[y]||{},_[y]):h[y]=_[y]}return h}function Vt(){for(var h=["Pusher"],o=0;o<arguments.length;o++)typeof arguments[o]=="string"?h.push(arguments[o]):h.push(ye(arguments[o]));return h.join(" : ")}function It(h,o){var c=Array.prototype.indexOf;if(h===null)return-1;if(c&&h.indexOf===c)return h.indexOf(o);for(var _=0,y=h.length;_<y;_++)if(h[_]===o)return _;return-1}function Wt(h,o){for(var c in h)Object.prototype.hasOwnProperty.call(h,c)&&o(h[c],c,h)}function Xe(h){var o=[];return Wt(h,function(c,_){o.push(_)}),o}function Qe(h){var o=[];return Wt(h,function(c){o.push(c)}),o}function Jt(h,o,c){for(var _=0;_<h.length;_++)o.call(c||window,h[_],_,h)}function tn(h,o){for(var c=[],_=0;_<h.length;_++)c.push(o(h[_],_,h,c));return c}function ii(h,o){var c={};return Wt(h,function(_,y){c[y]=o(_)}),c}function en(h,o){o=o||function(y){return!!y};for(var c=[],_=0;_<h.length;_++)o(h[_],_,h,c)&&c.push(h[_]);return c}function ln(h,o){var c={};return Wt(h,function(_,y){(o&&o(_,y,h,c)||_)&&(c[y]=_)}),c}function nn(h){var o=[];return Wt(h,function(c,_){o.push([_,c])}),o}function Te(h,o){for(var c=0;c<h.length;c++)if(o(h[c],c,h))return!0;return!1}function rn(h,o){for(var c=0;c<h.length;c++)if(!o(h[c],c,h))return!1;return!0}function Ln(h){return ii(h,function(o){return typeof o=="object"&&(o=ye(o)),encodeURIComponent(zt(o.toString()))})}function fn(h){var o=ln(h,function(_){return _!==void 0}),c=tn(nn(Ln(o)),$.method("join","=")).join("&");return c}function dn(h){var o=[],c=[];return function _(y,M){var N,j,it;switch(typeof y){case"object":if(!y)return null;for(N=0;N<o.length;N+=1)if(o[N]===y)return{$ref:c[N]};if(o.push(y),c.push(M),Object.prototype.toString.apply(y)==="[object Array]")for(it=[],N=0;N<y.length;N+=1)it[N]=_(y[N],M+"["+N+"]");else{it={};for(j in y)Object.prototype.hasOwnProperty.call(y,j)&&(it[j]=_(y[j],M+"["+JSON.stringify(j)+"]"))}return it;case"number":case"string":case"boolean":return y}}(h,"$")}function ye(h){try{return JSON.stringify(h)}catch{return JSON.stringify(dn(h))}}class En{constructor(){this.globalLog=o=>{window.console&&window.console.log&&window.console.log(o)}}debug(...o){this.log(this.globalLog,o)}warn(...o){this.log(this.globalLogWarn,o)}error(...o){this.log(this.globalLogError,o)}globalLogWarn(o){window.console&&window.console.warn?window.console.warn(o):this.globalLog(o)}globalLogError(o){window.console&&window.console.error?window.console.error(o):this.globalLogWarn(o)}log(o,...c){var _=Vt.apply(this,arguments);Ci.log?Ci.log(_):Ci.logToConsole&&o.bind(this)(_)}}var mt=new En,pn=function(h,o,c,_,y){(c.headers!==void 0||c.headersProvider!=null)&&mt.warn(`To send headers with the ${_.toString()} request, you must use AJAX, rather than JSONP.`);var M=h.nextAuthCallbackID.toString();h.nextAuthCallbackID++;var N=h.getDocument(),j=N.createElement("script");h.auth_callbacks[M]=function(dt){y(null,dt)};var it="Pusher.auth_callbacks['"+M+"']";j.src=c.endpoint+"?callback="+encodeURIComponent(it)+"&"+o;var ht=N.getElementsByTagName("head")[0]||N.documentElement;ht.insertBefore(j,ht.firstChild)},mn=pn;class Mn{constructor(o){this.src=o}send(o){var c=this,_="Error loading "+c.src;c.script=document.createElement("script"),c.script.id=o.id,c.script.src=c.src,c.script.type="text/javascript",c.script.charset="UTF-8",c.script.addEventListener?(c.script.onerror=function(){o.callback(_)},c.script.onload=function(){o.callback(null)}):c.script.onreadystatechange=function(){(c.script.readyState==="loaded"||c.script.readyState==="complete")&&o.callback(null)},c.script.async===void 0&&document.attachEvent&&/opera/i.test(navigator.userAgent)?(c.errorScript=document.createElement("script"),c.errorScript.id=o.id+"_error",c.errorScript.text=o.name+"('"+_+"');",c.script.async=c.errorScript.async=!1):c.script.async=!0;var y=document.getElementsByTagName("head")[0];y.insertBefore(c.script,y.firstChild),c.errorScript&&y.insertBefore(c.errorScript,c.script.nextSibling)}cleanup(){this.script&&(this.script.onload=this.script.onerror=null,this.script.onreadystatechange=null),this.script&&this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.errorScript&&this.errorScript.parentNode&&this.errorScript.parentNode.removeChild(this.errorScript),this.script=null,this.errorScript=null}}class On{constructor(o,c){this.url=o,this.data=c}send(o){if(!this.request){var c=fn(this.data),_=this.url+"/"+o.number+"?"+c;this.request=X.createScriptRequest(_),this.request.send(o)}}cleanup(){this.request&&this.request.cleanup()}}var Dn=function(h,o){return function(c,_){var y="http"+(o?"s":"")+"://",M=y+(h.host||h.options.host)+h.options.path,N=X.createJSONPRequest(M,c),j=X.ScriptReceivers.create(function(it,ht){g.remove(j),N.cleanup(),ht&&ht.host&&(h.host=ht.host),_&&_(it,ht)});N.send(j)}},An={name:"jsonp",getAgent:Dn},In=An;function on(h,o,c){var _=h+(o.useTLS?"s":""),y=o.useTLS?o.hostTLS:o.hostNonTLS;return _+"://"+y+c}function Be(h,o){var c="/app/"+h,_="?protocol="+S.PROTOCOL+"&client=js&version="+S.VERSION+(o?"&"+o:"");return c+_}var vt={getInitial:function(h,o){var c=(o.httpPath||"")+Be(h,"flash=false");return on("ws",o,c)}},_n={getInitial:function(h,o){var c=(o.httpPath||"/pusher")+Be(h);return on("http",o,c)}},be={getInitial:function(h,o){return on("http",o,o.httpPath||"/pusher")},getPath:function(h,o){return Be(h)}};class ri{constructor(){this._callbacks={}}get(o){return this._callbacks[Se(o)]}add(o,c,_){var y=Se(o);this._callbacks[y]=this._callbacks[y]||[],this._callbacks[y].push({fn:c,context:_})}remove(o,c,_){if(!o&&!c&&!_){this._callbacks={};return}var y=o?[Se(o)]:Xe(this._callbacks);c||_?this.removeCallback(y,c,_):this.removeAllCallbacks(y)}removeCallback(o,c,_){Jt(o,function(y){this._callbacks[y]=en(this._callbacks[y]||[],function(M){return c&&c!==M.fn||_&&_!==M.context}),this._callbacks[y].length===0&&delete this._callbacks[y]},this)}removeAllCallbacks(o){Jt(o,function(c){delete this._callbacks[c]},this)}}function Se(h){return"_"+h}class Gt{constructor(o){this.callbacks=new ri,this.global_callbacks=[],this.failThrough=o}bind(o,c,_){return this.callbacks.add(o,c,_),this}bind_global(o){return this.global_callbacks.push(o),this}unbind(o,c,_){return this.callbacks.remove(o,c,_),this}unbind_global(o){return o?(this.global_callbacks=en(this.global_callbacks||[],c=>c!==o),this):(this.global_callbacks=[],this)}unbind_all(){return this.unbind(),this.unbind_global(),this}emit(o,c,_){for(var y=0;y<this.global_callbacks.length;y++)this.global_callbacks[y](o,c);var M=this.callbacks.get(o),N=[];if(_?N.push(c,_):c&&N.push(c),M&&M.length>0)for(var y=0;y<M.length;y++)M[y].fn.apply(M[y].context||window,N);else this.failThrough&&this.failThrough(o,c);return this}}class ee extends Gt{constructor(o,c,_,y,M){super(),this.initialize=X.transportConnectionInitializer,this.hooks=o,this.name=c,this.priority=_,this.key=y,this.options=M,this.state="new",this.timeline=M.timeline,this.activityTimeout=M.activityTimeout,this.id=this.timeline.generateUniqueID()}handlesActivityChecks(){return!!this.hooks.handlesActivityChecks}supportsPing(){return!!this.hooks.supportsPing}connect(){if(this.socket||this.state!=="initialized")return!1;var o=this.hooks.urls.getInitial(this.key,this.options);try{this.socket=this.hooks.getSocket(o,this.options)}catch(c){return $.defer(()=>{this.onError(c),this.changeState("closed")}),!1}return this.bindListeners(),mt.debug("Connecting",{transport:this.name,url:o}),this.changeState("connecting"),!0}close(){return this.socket?(this.socket.close(),!0):!1}send(o){return this.state==="open"?($.defer(()=>{this.socket&&this.socket.send(o)}),!0):!1}ping(){this.state==="open"&&this.supportsPing()&&this.socket.ping()}onOpen(){this.hooks.beforeOpen&&this.hooks.beforeOpen(this.socket,this.hooks.urls.getPath(this.key,this.options)),this.changeState("open"),this.socket.onopen=void 0}onError(o){this.emit("error",{type:"WebSocketError",error:o}),this.timeline.error(this.buildTimelineMessage({error:o.toString()}))}onClose(o){o?this.changeState("closed",{code:o.code,reason:o.reason,wasClean:o.wasClean}):this.changeState("closed"),this.unbindListeners(),this.socket=void 0}onMessage(o){this.emit("message",o)}onActivity(){this.emit("activity")}bindListeners(){this.socket.onopen=()=>{this.onOpen()},this.socket.onerror=o=>{this.onError(o)},this.socket.onclose=o=>{this.onClose(o)},this.socket.onmessage=o=>{this.onMessage(o)},this.supportsPing()&&(this.socket.onactivity=()=>{this.onActivity()})}unbindListeners(){this.socket&&(this.socket.onopen=void 0,this.socket.onerror=void 0,this.socket.onclose=void 0,this.socket.onmessage=void 0,this.supportsPing()&&(this.socket.onactivity=void 0))}changeState(o,c){this.state=o,this.timeline.info(this.buildTimelineMessage({state:o,params:c})),this.emit(o,c)}buildTimelineMessage(o){return K({cid:this.id},o)}}class we{constructor(o){this.hooks=o}isSupported(o){return this.hooks.isSupported(o)}createConnection(o,c,_,y){return new ee(this.hooks,o,c,_,y)}}var oi=new we({urls:vt,handlesActivityChecks:!1,supportsPing:!1,isInitialized:function(){return!!X.getWebSocketAPI()},isSupported:function(){return!!X.getWebSocketAPI()},getSocket:function(h){return X.createWebSocket(h)}}),m={urls:_n,handlesActivityChecks:!1,supportsPing:!0,isInitialized:function(){return!0}},v=K({getSocket:function(h){return X.HTTPFactory.createStreamingSocket(h)}},m),w=K({getSocket:function(h){return X.HTTPFactory.createPollingSocket(h)}},m),k={isSupported:function(){return X.isXHRSupported()}},z=new we(K({},v,k)),H=new we(K({},w,k)),rt={ws:oi,xhr_streaming:z,xhr_polling:H},q=rt,st=new we({file:"sockjs",urls:be,handlesActivityChecks:!0,supportsPing:!1,isSupported:function(){return!0},isInitialized:function(){return window.SockJS!==void 0},getSocket:function(h,o){return new window.SockJS(h,null,{js_path:D.getPath("sockjs",{useTLS:o.useTLS}),ignore_null_origin:o.ignoreNullOrigin})},beforeOpen:function(h,o){h.send(JSON.stringify({path:o}))}}),Y={isSupported:function(h){var o=X.isXDRSupported(h.useTLS);return o}},G=new we(K({},v,Y)),B=new we(K({},w,Y));q.xdr_streaming=G,q.xdr_polling=B,q.sockjs=st;var $t=q;class Ft extends Gt{constructor(){super();var o=this;window.addEventListener!==void 0&&(window.addEventListener("online",function(){o.emit("online")},!1),window.addEventListener("offline",function(){o.emit("offline")},!1))}isOnline(){return window.navigator.onLine===void 0?!0:window.navigator.onLine}}var ke=new Ft;class xe{constructor(o,c,_){this.manager=o,this.transport=c,this.minPingDelay=_.minPingDelay,this.maxPingDelay=_.maxPingDelay,this.pingDelay=void 0}createConnection(o,c,_,y){y=K({},y,{activityTimeout:this.pingDelay});var M=this.transport.createConnection(o,c,_,y),N=null,j=function(){M.unbind("open",j),M.bind("closed",it),N=$.now()},it=ht=>{if(M.unbind("closed",it),ht.code===1002||ht.code===1003)this.manager.reportDeath();else if(!ht.wasClean&&N){var dt=$.now()-N;dt<2*this.maxPingDelay&&(this.manager.reportDeath(),this.pingDelay=Math.max(dt/2,this.minPingDelay))}};return M.bind("open",j),M}isSupported(o){return this.manager.isAlive()&&this.transport.isSupported(o)}}const sn={decodeMessage:function(h){try{var o=JSON.parse(h.data),c=o.data;if(typeof c=="string")try{c=JSON.parse(o.data)}catch{}var _={event:o.event,channel:o.channel,data:c};return o.user_id&&(_.user_id=o.user_id),_}catch(y){throw{type:"MessageParseError",error:y,data:h.data}}},encodeMessage:function(h){return JSON.stringify(h)},processHandshake:function(h){var o=sn.decodeMessage(h);if(o.event==="pusher:connection_established"){if(!o.data.activity_timeout)throw"No activity timeout specified in handshake";return{action:"connected",id:o.data.socket_id,activityTimeout:o.data.activity_timeout*1e3}}else{if(o.event==="pusher:error")return{action:this.getCloseAction(o.data),error:this.getCloseError(o.data)};throw"Invalid handshake"}},getCloseAction:function(h){return h.code<4e3?h.code>=1002&&h.code<=1004?"backoff":null:h.code===4e3?"tls_only":h.code<4100?"refused":h.code<4200?"backoff":h.code<4300?"retry":"refused"},getCloseError:function(h){return h.code!==1e3&&h.code!==1001?{type:"PusherError",data:{code:h.code,message:h.reason||h.message}}:null}};var ne=sn;class Le extends Gt{constructor(o,c){super(),this.id=o,this.transport=c,this.activityTimeout=c.activityTimeout,this.bindListeners()}handlesActivityChecks(){return this.transport.handlesActivityChecks()}send(o){return this.transport.send(o)}send_event(o,c,_){var y={event:o,data:c};return _&&(y.channel=_),mt.debug("Event sent",y),this.send(ne.encodeMessage(y))}ping(){this.transport.supportsPing()?this.transport.ping():this.send_event("pusher:ping",{})}close(){this.transport.close()}bindListeners(){var o={message:_=>{var y;try{y=ne.decodeMessage(_)}catch(M){this.emit("error",{type:"MessageParseError",error:M,data:_.data})}if(y!==void 0){switch(mt.debug("Event recd",y),y.event){case"pusher:error":this.emit("error",{type:"PusherError",data:y.data});break;case"pusher:ping":this.emit("ping");break;case"pusher:pong":this.emit("pong");break}this.emit("message",y)}},activity:()=>{this.emit("activity")},error:_=>{this.emit("error",_)},closed:_=>{c(),_&&_.code&&this.handleCloseEvent(_),this.transport=null,this.emit("closed")}},c=()=>{Wt(o,(_,y)=>{this.transport.unbind(y,_)})};Wt(o,(_,y)=>{this.transport.bind(y,_)})}handleCloseEvent(o){var c=ne.getCloseAction(o),_=ne.getCloseError(o);_&&this.emit("error",_),c&&this.emit(c,{action:c,error:_})}}class Rn{constructor(o,c){this.transport=o,this.callback=c,this.bindListeners()}close(){this.unbindListeners(),this.transport.close()}bindListeners(){this.onMessage=o=>{this.unbindListeners();var c;try{c=ne.processHandshake(o)}catch(_){this.finish("error",{error:_}),this.transport.close();return}c.action==="connected"?this.finish("connected",{connection:new Le(c.id,this.transport),activityTimeout:c.activityTimeout}):(this.finish(c.action,{error:c.error}),this.transport.close())},this.onClosed=o=>{this.unbindListeners();var c=ne.getCloseAction(o)||"backoff",_=ne.getCloseError(o);this.finish(c,{error:_})},this.transport.bind("message",this.onMessage),this.transport.bind("closed",this.onClosed)}unbindListeners(){this.transport.unbind("message",this.onMessage),this.transport.unbind("closed",this.onClosed)}finish(o,c){this.callback(K({transport:this.transport,action:o},c))}}class si{constructor(o,c){this.timeline=o,this.options=c||{}}send(o,c){this.timeline.isEmpty()||this.timeline.send(X.TimelineTransport.getAgent(this,o),c)}}class gn extends Gt{constructor(o,c){super(function(_,y){mt.debug("No callbacks on "+o+" for "+_)}),this.name=o,this.pusher=c,this.subscribed=!1,this.subscriptionPending=!1,this.subscriptionCancelled=!1}authorize(o,c){return c(null,{auth:""})}trigger(o,c){if(o.indexOf("client-")!==0)throw new R("Event '"+o+"' does not start with 'client-'");if(!this.subscribed){var _=I.buildLogSuffix("triggeringClientEvents");mt.warn(`Client event triggered before channel 'subscription_succeeded' event . ${_}`)}return this.pusher.send_event(o,c,this.name)}disconnect(){this.subscribed=!1,this.subscriptionPending=!1}handleEvent(o){var c=o.event,_=o.data;if(c==="pusher_internal:subscription_succeeded")this.handleSubscriptionSucceededEvent(o);else if(c==="pusher_internal:subscription_count")this.handleSubscriptionCountEvent(o);else if(c.indexOf("pusher_internal:")!==0){var y={};this.emit(c,_,y)}}handleSubscriptionSucceededEvent(o){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):this.emit("pusher:subscription_succeeded",o.data)}handleSubscriptionCountEvent(o){o.data.subscription_count&&(this.subscriptionCount=o.data.subscription_count),this.emit("pusher:subscription_count",o.data)}subscribe(){this.subscribed||(this.subscriptionPending=!0,this.subscriptionCancelled=!1,this.authorize(this.pusher.connection.socket_id,(o,c)=>{o?(this.subscriptionPending=!1,mt.error(o.toString()),this.emit("pusher:subscription_error",Object.assign({},{type:"AuthError",error:o.message},o instanceof Lt?{status:o.status}:{}))):this.pusher.send_event("pusher:subscribe",{auth:c.auth,channel_data:c.channel_data,channel:this.name})}))}unsubscribe(){this.subscribed=!1,this.pusher.send_event("pusher:unsubscribe",{channel:this.name})}cancelSubscription(){this.subscriptionCancelled=!0}reinstateSubscription(){this.subscriptionCancelled=!1}}class vn extends gn{authorize(o,c){return this.pusher.config.channelAuthorizer({channelName:this.name,socketId:o},c)}}class ai{constructor(){this.reset()}get(o){return Object.prototype.hasOwnProperty.call(this.members,o)?{id:o,info:this.members[o]}:null}each(o){Wt(this.members,(c,_)=>{o(this.get(_))})}setMyID(o){this.myID=o}onSubscription(o){this.members=o.presence.hash,this.count=o.presence.count,this.me=this.get(this.myID)}addMember(o){return this.get(o.user_id)===null&&this.count++,this.members[o.user_id]=o.user_info,this.get(o.user_id)}removeMember(o){var c=this.get(o.user_id);return c&&(delete this.members[o.user_id],this.count--),c}reset(){this.members={},this.count=0,this.myID=null,this.me=null}}var Nn=function(h,o,c,_){function y(M){return M instanceof c?M:new c(function(N){N(M)})}return new(c||(c=Promise))(function(M,N){function j(dt){try{ht(_.next(dt))}catch(Tt){N(Tt)}}function it(dt){try{ht(_.throw(dt))}catch(Tt){N(Tt)}}function ht(dt){dt.done?M(dt.value):y(dt.value).then(j,it)}ht((_=_.apply(h,o||[])).next())})};class ui extends vn{constructor(o,c){super(o,c),this.members=new ai}authorize(o,c){super.authorize(o,(_,y)=>Nn(this,void 0,void 0,function*(){if(!_)if(y=y,y.channel_data!=null){var M=JSON.parse(y.channel_data);this.members.setMyID(M.user_id)}else if(yield this.pusher.user.signinDonePromise,this.pusher.user.user_data!=null)this.members.setMyID(this.pusher.user.user_data.id);else{let N=I.buildLogSuffix("authorizationEndpoint");mt.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${N}, or the user should be signed in.`),c("Invalid auth response");return}c(_,y)}))}handleEvent(o){var c=o.event;if(c.indexOf("pusher_internal:")===0)this.handleInternalEvent(o);else{var _=o.data,y={};o.user_id&&(y.user_id=o.user_id),this.emit(c,_,y)}}handleInternalEvent(o){var c=o.event,_=o.data;switch(c){case"pusher_internal:subscription_succeeded":this.handleSubscriptionSucceededEvent(o);break;case"pusher_internal:subscription_count":this.handleSubscriptionCountEvent(o);break;case"pusher_internal:member_added":var y=this.members.addMember(_);this.emit("pusher:member_added",y);break;case"pusher_internal:member_removed":var M=this.members.removeMember(_);M&&this.emit("pusher:member_removed",M);break}}handleSubscriptionSucceededEvent(o){this.subscriptionPending=!1,this.subscribed=!0,this.subscriptionCancelled?this.pusher.unsubscribe(this.name):(this.members.onSubscription(o.data),this.emit("pusher:subscription_succeeded",this.members))}disconnect(){this.members.reset(),super.disconnect()}}var zn=f(1),ci=f(0);class Cr extends vn{constructor(o,c,_){super(o,c),this.key=null,this.nacl=_}authorize(o,c){super.authorize(o,(_,y)=>{if(_){c(_,y);return}let M=y.shared_secret;if(!M){c(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`),null);return}this.key=Object(ci.decode)(M),delete y.shared_secret,c(null,y)})}trigger(o,c){throw new bt("Client events are not currently supported for encrypted channels")}handleEvent(o){var c=o.event,_=o.data;if(c.indexOf("pusher_internal:")===0||c.indexOf("pusher:")===0){super.handleEvent(o);return}this.handleEncryptedEvent(c,_)}handleEncryptedEvent(o,c){if(!this.key){mt.debug("Received encrypted event before key has been retrieved from the authEndpoint");return}if(!c.ciphertext||!c.nonce){mt.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: "+c);return}let _=Object(ci.decode)(c.ciphertext);if(_.length<this.nacl.secretbox.overheadLength){mt.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${_.length}`);return}let y=Object(ci.decode)(c.nonce);if(y.length<this.nacl.secretbox.nonceLength){mt.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${y.length}`);return}let M=this.nacl.secretbox.open(_,y,this.key);if(M===null){mt.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."),this.authorize(this.pusher.connection.socket_id,(N,j)=>{if(N){mt.error(`Failed to make a request to the authEndpoint: ${j}. Unable to fetch new key, so dropping encrypted event`);return}if(M=this.nacl.secretbox.open(_,y,this.key),M===null){mt.error("Failed to decrypt event with new key. Dropping encrypted event");return}this.emit(o,this.getDataToEmit(M))});return}this.emit(o,this.getDataToEmit(M))}getDataToEmit(o){let c=Object(zn.decode)(o);try{return JSON.parse(c)}catch{return c}}}class Pr extends Gt{constructor(o,c){super(),this.state="initialized",this.connection=null,this.key=o,this.options=c,this.timeline=this.options.timeline,this.usingTLS=this.options.useTLS,this.errorCallbacks=this.buildErrorCallbacks(),this.connectionCallbacks=this.buildConnectionCallbacks(this.errorCallbacks),this.handshakeCallbacks=this.buildHandshakeCallbacks(this.errorCallbacks);var _=X.getNetwork();_.bind("online",()=>{this.timeline.info({netinfo:"online"}),(this.state==="connecting"||this.state==="unavailable")&&this.retryIn(0)}),_.bind("offline",()=>{this.timeline.info({netinfo:"offline"}),this.connection&&this.sendActivityCheck()}),this.updateStrategy()}switchCluster(o){this.key=o,this.updateStrategy(),this.retryIn(0)}connect(){if(!(this.connection||this.runner)){if(!this.strategy.isSupported()){this.updateState("failed");return}this.updateState("connecting"),this.startConnecting(),this.setUnavailableTimer()}}send(o){return this.connection?this.connection.send(o):!1}send_event(o,c,_){return this.connection?this.connection.send_event(o,c,_):!1}disconnect(){this.disconnectInternally(),this.updateState("disconnected")}isUsingTLS(){return this.usingTLS}startConnecting(){var o=(c,_)=>{c?this.runner=this.strategy.connect(0,o):_.action==="error"?(this.emit("error",{type:"HandshakeError",error:_.error}),this.timeline.error({handshakeError:_.error})):(this.abortConnecting(),this.handshakeCallbacks[_.action](_))};this.runner=this.strategy.connect(0,o)}abortConnecting(){this.runner&&(this.runner.abort(),this.runner=null)}disconnectInternally(){if(this.abortConnecting(),this.clearRetryTimer(),this.clearUnavailableTimer(),this.connection){var o=this.abandonConnection();o.close()}}updateStrategy(){this.strategy=this.options.getStrategy({key:this.key,timeline:this.timeline,useTLS:this.usingTLS})}retryIn(o){this.timeline.info({action:"retry",delay:o}),o>0&&this.emit("connecting_in",Math.round(o/1e3)),this.retryTimer=new xt(o||0,()=>{this.disconnectInternally(),this.connect()})}clearRetryTimer(){this.retryTimer&&(this.retryTimer.ensureAborted(),this.retryTimer=null)}setUnavailableTimer(){this.unavailableTimer=new xt(this.options.unavailableTimeout,()=>{this.updateState("unavailable")})}clearUnavailableTimer(){this.unavailableTimer&&this.unavailableTimer.ensureAborted()}sendActivityCheck(){this.stopActivityCheck(),this.connection.ping(),this.activityTimer=new xt(this.options.pongTimeout,()=>{this.timeline.error({pong_timed_out:this.options.pongTimeout}),this.retryIn(0)})}resetActivityCheck(){this.stopActivityCheck(),this.connection&&!this.connection.handlesActivityChecks()&&(this.activityTimer=new xt(this.activityTimeout,()=>{this.sendActivityCheck()}))}stopActivityCheck(){this.activityTimer&&this.activityTimer.ensureAborted()}buildConnectionCallbacks(o){return K({},o,{message:c=>{this.resetActivityCheck(),this.emit("message",c)},ping:()=>{this.send_event("pusher:pong",{})},activity:()=>{this.resetActivityCheck()},error:c=>{this.emit("error",c)},closed:()=>{this.abandonConnection(),this.shouldRetry()&&this.retryIn(1e3)}})}buildHandshakeCallbacks(o){return K({},o,{connected:c=>{this.activityTimeout=Math.min(this.options.activityTimeout,c.activityTimeout,c.connection.activityTimeout||1/0),this.clearUnavailableTimer(),this.setConnection(c.connection),this.socket_id=this.connection.id,this.updateState("connected",{socket_id:this.socket_id})}})}buildErrorCallbacks(){let o=c=>_=>{_.error&&this.emit("error",{type:"WebSocketError",error:_.error}),c(_)};return{tls_only:o(()=>{this.usingTLS=!0,this.updateStrategy(),this.retryIn(0)}),refused:o(()=>{this.disconnect()}),backoff:o(()=>{this.retryIn(1e3)}),retry:o(()=>{this.retryIn(0)})}}setConnection(o){this.connection=o;for(var c in this.connectionCallbacks)this.connection.bind(c,this.connectionCallbacks[c]);this.resetActivityCheck()}abandonConnection(){if(this.connection){this.stopActivityCheck();for(var o in this.connectionCallbacks)this.connection.unbind(o,this.connectionCallbacks[o]);var c=this.connection;return this.connection=null,c}}updateState(o,c){var _=this.state;if(this.state=o,_!==o){var y=o;y==="connected"&&(y+=" with new socket ID "+c.socket_id),mt.debug("State changed",_+" -> "+y),this.timeline.info({state:o,params:c}),this.emit("state_change",{previous:_,current:o}),this.emit(o,c)}}shouldRetry(){return this.state==="connecting"||this.state==="connected"}}class Tr{constructor(){this.channels={}}add(o,c){return this.channels[o]||(this.channels[o]=Sr(o,c)),this.channels[o]}all(){return Qe(this.channels)}find(o){return this.channels[o]}remove(o){var c=this.channels[o];return delete this.channels[o],c}disconnect(){Wt(this.channels,function(o){o.disconnect()})}}function Sr(h,o){if(h.indexOf("private-encrypted-")===0){if(o.config.nacl)return Xt.createEncryptedChannel(h,o,o.config.nacl);let c="Tried to subscribe to a private-encrypted- channel but no nacl implementation available",_=I.buildLogSuffix("encryptedChannelSupport");throw new bt(`${c}. ${_}`)}else{if(h.indexOf("private-")===0)return Xt.createPrivateChannel(h,o);if(h.indexOf("presence-")===0)return Xt.createPresenceChannel(h,o);if(h.indexOf("#")===0)throw new F('Cannot create a channel with name "'+h+'".');return Xt.createChannel(h,o)}}var hi={createChannels(){return new Tr},createConnectionManager(h,o){return new Pr(h,o)},createChannel(h,o){return new gn(h,o)},createPrivateChannel(h,o){return new vn(h,o)},createPresenceChannel(h,o){return new ui(h,o)},createEncryptedChannel(h,o,c){return new Cr(h,o,c)},createTimelineSender(h,o){return new si(h,o)},createHandshake(h,o){return new Rn(h,o)},createAssistantToTheTransportManager(h,o,c){return new xe(h,o,c)}},Xt=hi;class li{constructor(o){this.options=o||{},this.livesLeft=this.options.lives||1/0}getAssistant(o){return Xt.createAssistantToTheTransportManager(this,o,{minPingDelay:this.options.minPingDelay,maxPingDelay:this.options.maxPingDelay})}isAlive(){return this.livesLeft>0}reportDeath(){this.livesLeft-=1}}class Ee{constructor(o,c){this.strategies=o,this.loop=!!c.loop,this.failFast=!!c.failFast,this.timeout=c.timeout,this.timeoutLimit=c.timeoutLimit}isSupported(){return Te(this.strategies,$.method("isSupported"))}connect(o,c){var _=this.strategies,y=0,M=this.timeout,N=null,j=(it,ht)=>{ht?c(null,ht):(y=y+1,this.loop&&(y=y%_.length),y<_.length?(M&&(M=M*2,this.timeoutLimit&&(M=Math.min(M,this.timeoutLimit))),N=this.tryStrategy(_[y],o,{timeout:M,failFast:this.failFast},j)):c(!0))};return N=this.tryStrategy(_[y],o,{timeout:M,failFast:this.failFast},j),{abort:function(){N.abort()},forceMinPriority:function(it){o=it,N&&N.forceMinPriority(it)}}}tryStrategy(o,c,_,y){var M=null,N=null;return _.timeout>0&&(M=new xt(_.timeout,function(){N.abort(),y(!0)})),N=o.connect(c,function(j,it){j&&M&&M.isRunning()&&!_.failFast||(M&&M.ensureAborted(),y(j,it))}),{abort:function(){M&&M.ensureAborted(),N.abort()},forceMinPriority:function(j){N.forceMinPriority(j)}}}}class Fe{constructor(o){this.strategies=o}isSupported(){return Te(this.strategies,$.method("isSupported"))}connect(o,c){return lt(this.strategies,o,function(_,y){return function(M,N){if(y[_].error=M,M){wt(y)&&c(!0);return}Jt(y,function(j){j.forceMinPriority(N.transport.priority)}),c(null,N)}})}}function lt(h,o,c){var _=tn(h,function(y,M,N,j){return y.connect(o,c(M,j))});return{abort:function(){Jt(_,Bn)},forceMinPriority:function(y){Jt(_,function(M){M.forceMinPriority(y)})}}}function wt(h){return rn(h,function(o){return!!o.error})}function Bn(h){!h.error&&!h.aborted&&(h.abort(),h.aborted=!0)}class an{constructor(o,c,_){this.strategy=o,this.transports=c,this.ttl=_.ttl||1800*1e3,this.usingTLS=_.useTLS,this.timeline=_.timeline}isSupported(){return this.strategy.isSupported()}connect(o,c){var _=this.usingTLS,y=fi(_),M=y&&y.cacheSkipCount?y.cacheSkipCount:0,N=[this.strategy];if(y&&y.timestamp+this.ttl>=$.now()){var j=this.transports[y.transport];j&&(["ws","wss"].includes(y.transport)||M>3?(this.timeline.info({cached:!0,transport:y.transport,latency:y.latency}),N.push(new Ee([j],{timeout:y.latency*2+1e3,failFast:!0}))):M++)}var it=$.now(),ht=N.pop().connect(o,function dt(Tt,cn){Tt?(Pt(_),N.length>0?(it=$.now(),ht=N.pop().connect(o,dt)):c(Tt)):(at(_,cn.transport.name,$.now()-it,M),c(null,cn))});return{abort:function(){ht.abort()},forceMinPriority:function(dt){o=dt,ht&&ht.forceMinPriority(dt)}}}}function Me(h){return"pusherTransport"+(h?"TLS":"NonTLS")}function fi(h){var o=X.getLocalStorage();if(o)try{var c=o[Me(h)];if(c)return JSON.parse(c)}catch{Pt(h)}return null}function at(h,o,c,_){var y=X.getLocalStorage();if(y)try{y[Me(h)]=ye({timestamp:$.now(),transport:o,latency:c,cacheSkipCount:_})}catch{}}function Pt(h){var o=X.getLocalStorage();if(o)try{delete o[Me(h)]}catch{}}class un{constructor(o,{delay:c}){this.strategy=o,this.options={delay:c}}isSupported(){return this.strategy.isSupported()}connect(o,c){var _=this.strategy,y,M=new xt(this.options.delay,function(){y=_.connect(o,c)});return{abort:function(){M.ensureAborted(),y&&y.abort()},forceMinPriority:function(N){o=N,y&&y.forceMinPriority(N)}}}}class Oe{constructor(o,c,_){this.test=o,this.trueBranch=c,this.falseBranch=_}isSupported(){var o=this.test()?this.trueBranch:this.falseBranch;return o.isSupported()}connect(o,c){var _=this.test()?this.trueBranch:this.falseBranch;return _.connect(o,c)}}class ie{constructor(o){this.strategy=o}isSupported(){return this.strategy.isSupported()}connect(o,c){var _=this.strategy.connect(o,function(y,M){M&&_.abort(),c(y,M)});return _}}function yn(h){return function(){return h.isSupported()}}var Fn=function(h,o,c){var _={};function y(Tn,Fr,Ae,Vn,Zr){var Jn=c(h,Tn,Fr,Ae,Vn,Zr);return _[Tn]=Jn,Jn}var M=Object.assign({},o,{hostNonTLS:h.wsHost+":"+h.wsPort,hostTLS:h.wsHost+":"+h.wssPort,httpPath:h.wsPath}),N=Object.assign({},M,{useTLS:!0}),j=Object.assign({},o,{hostNonTLS:h.httpHost+":"+h.httpPort,hostTLS:h.httpHost+":"+h.httpsPort,httpPath:h.httpPath}),it={loop:!0,timeout:15e3,timeoutLimit:6e4},ht=new li({minPingDelay:1e4,maxPingDelay:h.activityTimeout}),dt=new li({lives:2,minPingDelay:1e4,maxPingDelay:h.activityTimeout}),Tt=y("ws","ws",3,M,ht),cn=y("wss","ws",3,N,ht),zr=y("sockjs","sockjs",1,j),Vi=y("xhr_streaming","xhr_streaming",1,j,dt),Ji=y("xdr_streaming","xdr_streaming",1,j,dt),Gi=y("xhr_polling","xhr_polling",1,j),ce=y("xdr_polling","xdr_polling",1,j),We=new Ee([Tt],it),Br=new Ee([cn],it),Pe=new Ee([zr],it),Ki=new Ee([new Oe(yn(Vi),Vi,Ji)],it),qe=new Ee([new Oe(yn(Gi),Gi,ce)],it),$i=new Ee([new Oe(yn(Ki),new Fe([Ki,new un(qe,{delay:4e3})]),qe)],it),Ye=new Oe(yn($i),$i,Pe),Yn;return o.useTLS?Yn=new Fe([We,new un(Ye,{delay:2e3})]):Yn=new Fe([We,new un(Br,{delay:2e3}),new un(Ye,{delay:5e3})]),new an(new ie(new Oe(yn(Tt),Yn,Ye)),_,{ttl:18e5,timeline:o.timeline,useTLS:o.useTLS})},Ze=Fn,Et=function(){var h=this;h.timeline.info(h.buildTimelineMessage({transport:h.name+(h.options.useTLS?"s":"")})),h.hooks.isInitialized()?h.changeState("initialized"):h.hooks.file?(h.changeState("initializing"),D.load(h.hooks.file,{useTLS:h.options.useTLS},function(o,c){h.hooks.isInitialized()?(h.changeState("initialized"),c(!0)):(o&&h.onError(o),h.onClose(),c(!1))})):h.onClose()},He={getRequest:function(h){var o=new window.XDomainRequest;return o.ontimeout=function(){h.emit("error",new V),h.close()},o.onerror=function(c){h.emit("error",c),h.close()},o.onprogress=function(){o.responseText&&o.responseText.length>0&&h.onChunk(200,o.responseText)},o.onload=function(){o.responseText&&o.responseText.length>0&&h.onChunk(200,o.responseText),h.emit("finished",200),h.close()},o},abortRequest:function(h){h.ontimeout=h.onerror=h.onprogress=h.onload=null,h.abort()}},bn=He;const wn=256*1024;class di extends Gt{constructor(o,c,_){super(),this.hooks=o,this.method=c,this.url=_}start(o){this.position=0,this.xhr=this.hooks.getRequest(this),this.unloader=()=>{this.close()},X.addUnloadListener(this.unloader),this.xhr.open(this.method,this.url,!0),this.xhr.setRequestHeader&&this.xhr.setRequestHeader("Content-Type","application/json"),this.xhr.send(o)}close(){this.unloader&&(X.removeUnloadListener(this.unloader),this.unloader=null),this.xhr&&(this.hooks.abortRequest(this.xhr),this.xhr=null)}onChunk(o,c){for(;;){var _=this.advanceBuffer(c);if(_)this.emit("chunk",{status:o,data:_});else break}this.isBufferTooLong(c)&&this.emit("buffer_too_long")}advanceBuffer(o){var c=o.slice(this.position),_=c.indexOf(`
`);return _!==-1?(this.position+=_+1,c.slice(0,_)):null}isBufferTooLong(o){return this.position===o.length&&o.length>wn}}var je;(function(h){h[h.CONNECTING=0]="CONNECTING",h[h.OPEN=1]="OPEN",h[h.CLOSED=3]="CLOSED"})(je||(je={}));var Ce=je,pi=1;class Zn{constructor(o,c){this.hooks=o,this.session=Hn(1e3)+"/"+kr(8),this.location=mi(c),this.readyState=Ce.CONNECTING,this.openStream()}send(o){return this.sendRaw(JSON.stringify([o]))}ping(){this.hooks.sendHeartbeat(this)}close(o,c){this.onClose(o,c,!0)}sendRaw(o){if(this.readyState===Ce.OPEN)try{return X.createSocketRequest("POST",xn(_i(this.location,this.session))).start(o),!0}catch{return!1}else return!1}reconnect(){this.closeStream(),this.openStream()}onClose(o,c,_){this.closeStream(),this.readyState=Ce.CLOSED,this.onclose&&this.onclose({code:o,reason:c,wasClean:_})}onChunk(o){if(o.status===200){this.readyState===Ce.OPEN&&this.onActivity();var c,_=o.data.slice(0,1);switch(_){case"o":c=JSON.parse(o.data.slice(1)||"{}"),this.onOpen(c);break;case"a":c=JSON.parse(o.data.slice(1)||"[]");for(var y=0;y<c.length;y++)this.onEvent(c[y]);break;case"m":c=JSON.parse(o.data.slice(1)||"null"),this.onEvent(c);break;case"h":this.hooks.onHeartbeat(this);break;case"c":c=JSON.parse(o.data.slice(1)||"[]"),this.onClose(c[0],c[1],!0);break}}}onOpen(o){this.readyState===Ce.CONNECTING?(o&&o.hostname&&(this.location.base=Ri(this.location.base,o.hostname)),this.readyState=Ce.OPEN,this.onopen&&this.onopen()):this.onClose(1006,"Server lost session",!0)}onEvent(o){this.readyState===Ce.OPEN&&this.onmessage&&this.onmessage({data:o})}onActivity(){this.onactivity&&this.onactivity()}onError(o){this.onerror&&this.onerror(o)}openStream(){this.stream=X.createSocketRequest("POST",xn(this.hooks.getReceiveURL(this.location,this.session))),this.stream.bind("chunk",o=>{this.onChunk(o)}),this.stream.bind("finished",o=>{this.hooks.onFinished(this,o)}),this.stream.bind("buffer_too_long",()=>{this.reconnect()});try{this.stream.start()}catch(o){$.defer(()=>{this.onError(o),this.onClose(1006,"Could not start streaming",!1)})}}closeStream(){this.stream&&(this.stream.unbind_all(),this.stream.close(),this.stream=null)}}function mi(h){var o=/([^\?]*)\/*(\??.*)/.exec(h);return{base:o[1],queryString:o[2]}}function _i(h,o){return h.base+"/"+o+"/xhr_send"}function xn(h){var o=h.indexOf("?")===-1?"?":"&";return h+o+"t="+ +new Date+"&n="+pi++}function Ri(h,o){var c=/(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(h);return c[1]+o+c[3]}function Hn(h){return X.randomInt(h)}function kr(h){for(var o=[],c=0;c<h;c++)o.push(Hn(32).toString(32));return o.join("")}var ot=Zn,pe={getReceiveURL:function(h,o){return h.base+"/"+o+"/xhr_streaming"+h.queryString},onHeartbeat:function(h){h.sendRaw("[]")},sendHeartbeat:function(h){h.sendRaw("[]")},onFinished:function(h,o){h.onClose(1006,"Connection interrupted ("+o+")",!1)}},yt=pe,Ni={getReceiveURL:function(h,o){return h.base+"/"+o+"/xhr"+h.queryString},onHeartbeat:function(){},sendHeartbeat:function(h){h.sendRaw("[]")},onFinished:function(h,o){o===200?h.reconnect():h.onClose(1006,"Connection interrupted ("+o+")",!1)}},gi=Ni,vi={getRequest:function(h){var o=X.getXHRAPI(),c=new o;return c.onreadystatechange=c.onprogress=function(){switch(c.readyState){case 3:c.responseText&&c.responseText.length>0&&h.onChunk(c.status,c.responseText);break;case 4:c.responseText&&c.responseText.length>0&&h.onChunk(c.status,c.responseText),h.emit("finished",c.status),h.close();break}},c},abortRequest:function(h){h.onreadystatechange=null,h.abort()}},yi=vi,Ue={createStreamingSocket(h){return this.createSocket(yt,h)},createPollingSocket(h){return this.createSocket(gi,h)},createSocket(h,o){return new ot(h,o)},createXHR(h,o){return this.createRequest(yi,h,o)},createRequest(h,o,c){return new di(h,o,c)}},jn=Ue;jn.createXDR=function(h,o){return this.createRequest(bn,h,o)};var Cn=jn,Rt={nextAuthCallbackID:1,auth_callbacks:{},ScriptReceivers:g,DependenciesReceivers:C,getDefaultStrategy:Ze,Transports:$t,transportConnectionInitializer:Et,HTTPFactory:Cn,TimelineTransport:In,getXHRAPI(){return window.XMLHttpRequest},getWebSocketAPI(){return window.WebSocket||window.MozWebSocket},setup(h){window.Pusher=h;var o=()=>{this.onDocumentBody(h.ready)};window.JSON?o():D.load("json2",{},o)},getDocument(){return document},getProtocol(){return this.getDocument().location.protocol},getAuthorizers(){return{ajax:jt,jsonp:mn}},onDocumentBody(h){document.body?h():setTimeout(()=>{this.onDocumentBody(h)},0)},createJSONPRequest(h,o){return new On(h,o)},createScriptRequest(h){return new Mn(h)},getLocalStorage(){try{return window.localStorage}catch{return}},createXHR(){return this.getXHRAPI()?this.createXMLHttpRequest():this.createMicrosoftXHR()},createXMLHttpRequest(){var h=this.getXHRAPI();return new h},createMicrosoftXHR(){return new ActiveXObject("Microsoft.XMLHTTP")},getNetwork(){return ke},createWebSocket(h){var o=this.getWebSocketAPI();return new o(h)},createSocketRequest(h,o){if(this.isXHRSupported())return this.HTTPFactory.createXHR(h,o);if(this.isXDRSupported(o.indexOf("https:")===0))return this.HTTPFactory.createXDR(h,o);throw"Cross-origin HTTP requests are not supported"},isXHRSupported(){var h=this.getXHRAPI();return!!h&&new h().withCredentials!==void 0},isXDRSupported(h){var o=h?"https:":"http:",c=this.getProtocol();return!!window.XDomainRequest&&c===o},addUnloadListener(h){window.addEventListener!==void 0?window.addEventListener("unload",h,!1):window.attachEvent!==void 0&&window.attachEvent("onunload",h)},removeUnloadListener(h){window.addEventListener!==void 0?window.removeEventListener("unload",h,!1):window.detachEvent!==void 0&&window.detachEvent("onunload",h)},randomInt(h){return Math.floor(function(){return(window.crypto||window.msCrypto).getRandomValues(new Uint32Array(1))[0]/Math.pow(2,32)}()*h)}},X=Rt,Un;(function(h){h[h.ERROR=3]="ERROR",h[h.INFO=6]="INFO",h[h.DEBUG=7]="DEBUG"})(Un||(Un={}));var Pn=Un;class Lr{constructor(o,c,_){this.key=o,this.session=c,this.events=[],this.options=_||{},this.sent=0,this.uniqueID=0}log(o,c){o<=this.options.level&&(this.events.push(K({},c,{timestamp:$.now()})),this.options.limit&&this.events.length>this.options.limit&&this.events.shift())}error(o){this.log(Pn.ERROR,o)}info(o){this.log(Pn.INFO,o)}debug(o){this.log(Pn.DEBUG,o)}isEmpty(){return this.events.length===0}send(o,c){var _=K({session:this.session,bundle:this.sent+1,key:this.key,lib:"js",version:this.options.version,cluster:this.options.cluster,features:this.options.features,timeline:this.events},this.options.params);return this.events=[],o(_,(y,M)=>{y||this.sent++,c&&c(y,M)}),!0}generateUniqueID(){return this.uniqueID++,this.uniqueID}}class zi{constructor(o,c,_,y){this.name=o,this.priority=c,this.transport=_,this.options=y||{}}isSupported(){return this.transport.isSupported({useTLS:this.options.useTLS})}connect(o,c){if(this.isSupported()){if(this.priority<o)return Wn(new Q,c)}else return Wn(new At,c);var _=!1,y=this.transport.createConnection(this.name,this.priority,this.options.key,this.options),M=null,N=function(){y.unbind("initialized",N),y.connect()},j=function(){M=Xt.createHandshake(y,function(Tt){_=!0,dt(),c(null,Tt)})},it=function(Tt){dt(),c(Tt)},ht=function(){dt();var Tt;Tt=ye(y),c(new _t(Tt))},dt=function(){y.unbind("initialized",N),y.unbind("open",j),y.unbind("error",it),y.unbind("closed",ht)};return y.bind("initialized",N),y.bind("open",j),y.bind("error",it),y.bind("closed",ht),y.initialize(),{abort:()=>{_||(dt(),M?M.close():y.close())},forceMinPriority:Tt=>{_||this.priority<Tt&&(M?M.close():y.close())}}}}function Wn(h,o){return $.defer(function(){o(h)}),{abort:function(){},forceMinPriority:function(){}}}const{Transports:Er}=X;var Bi=function(h,o,c,_,y,M){var N=Er[c];if(!N)throw new St(c);var j=(!h.enabledTransports||It(h.enabledTransports,o)!==-1)&&(!h.disabledTransports||It(h.disabledTransports,o)===-1),it;return j?(y=Object.assign({ignoreNullOrigin:h.ignoreNullOrigin},y),it=new zi(o,_,M?M.getAssistant(N):N,y)):it=ct,it},ct={isSupported:function(){return!1},connect:function(h,o){var c=$.defer(function(){o(new At)});return{abort:function(){c.ensureAborted()},forceMinPriority:function(){}}}};function Mr(h){if(h==null)throw"You must pass an options object";if(h.cluster==null)throw"Options object must provide a cluster";"disableStats"in h&&mt.warn("The disableStats option is deprecated in favor of enableStats")}const ue=(h,o)=>{var c="socket_id="+encodeURIComponent(h.socketId);for(var _ in o.params)c+="&"+encodeURIComponent(_)+"="+encodeURIComponent(o.params[_]);if(o.paramsProvider!=null){let y=o.paramsProvider();for(var _ in y)c+="&"+encodeURIComponent(_)+"="+encodeURIComponent(y[_])}return c};var Fi=h=>{if(typeof X.getAuthorizers()[h.transport]>"u")throw`'${h.transport}' is not a recognized auth transport`;return(o,c)=>{const _=ue(o,h);X.getAuthorizers()[h.transport](X,_,h,T.UserAuthentication,c)}};const Or=(h,o)=>{var c="socket_id="+encodeURIComponent(h.socketId);c+="&channel_name="+encodeURIComponent(h.channelName);for(var _ in o.params)c+="&"+encodeURIComponent(_)+"="+encodeURIComponent(o.params[_]);if(o.paramsProvider!=null){let y=o.paramsProvider();for(var _ in y)c+="&"+encodeURIComponent(_)+"="+encodeURIComponent(y[_])}return c};var Dr=h=>{if(typeof X.getAuthorizers()[h.transport]>"u")throw`'${h.transport}' is not a recognized auth transport`;return(o,c)=>{const _=Or(o,h);X.getAuthorizers()[h.transport](X,_,h,T.ChannelAuthorization,c)}};const Hi=(h,o,c)=>{const _={authTransport:o.transport,authEndpoint:o.endpoint,auth:{params:o.params,headers:o.headers}};return(y,M)=>{const N=h.channel(y.channelName);c(N,_).authorize(y.socketId,M)}};function ji(h,o){let c={activityTimeout:h.activityTimeout||S.activityTimeout,cluster:h.cluster,httpPath:h.httpPath||S.httpPath,httpPort:h.httpPort||S.httpPort,httpsPort:h.httpsPort||S.httpsPort,pongTimeout:h.pongTimeout||S.pongTimeout,statsHost:h.statsHost||S.stats_host,unavailableTimeout:h.unavailableTimeout||S.unavailableTimeout,wsPath:h.wsPath||S.wsPath,wsPort:h.wsPort||S.wsPort,wssPort:h.wssPort||S.wssPort,enableStats:Rr(h),httpHost:Ar(h),useTLS:me(h),wsHost:bi(h),userAuthenticator:De(h),channelAuthorizer:Wi(h,o)};return"disabledTransports"in h&&(c.disabledTransports=h.disabledTransports),"enabledTransports"in h&&(c.enabledTransports=h.enabledTransports),"ignoreNullOrigin"in h&&(c.ignoreNullOrigin=h.ignoreNullOrigin),"timelineParams"in h&&(c.timelineParams=h.timelineParams),"nacl"in h&&(c.nacl=h.nacl),c}function Ar(h){return h.httpHost?h.httpHost:h.cluster?`sockjs-${h.cluster}.pusher.com`:S.httpHost}function bi(h){return h.wsHost?h.wsHost:Ir(h.cluster)}function Ir(h){return`ws-${h}.pusher.com`}function me(h){return X.getProtocol()==="https:"?!0:h.forceTLS!==!1}function Rr(h){return"enableStats"in h?h.enableStats:"disableStats"in h?!h.disableStats:!1}const wi=h=>"customHandler"in h&&h.customHandler!=null;function De(h){const o=Object.assign(Object.assign({},S.userAuthentication),h.userAuthentication);return wi(o)?o.customHandler:Fi(o)}function Ui(h,o){let c;if("channelAuthorization"in h)c=Object.assign(Object.assign({},S.channelAuthorization),h.channelAuthorization);else if(c={transport:h.authTransport||S.authTransport,endpoint:h.authEndpoint||S.authEndpoint},"auth"in h&&("params"in h.auth&&(c.params=h.auth.params),"headers"in h.auth&&(c.headers=h.auth.headers)),"authorizer"in h)return{customHandler:Hi(o,c,h.authorizer)};return c}function Wi(h,o){const c=Ui(h,o);return wi(c)?c.customHandler:Dr(c)}class xi extends Gt{constructor(o){super(function(c,_){mt.debug(`No callbacks on watchlist events for ${c}`)}),this.pusher=o,this.bindWatchlistInternalEvent()}handleEvent(o){o.data.events.forEach(c=>{this.emit(c.name,c)})}bindWatchlistInternalEvent(){this.pusher.connection.bind("message",o=>{var c=o.event;c==="pusher_internal:watchlist_events"&&this.handleEvent(o)})}}function Nr(){let h,o;return{promise:new Promise((_,y)=>{h=_,o=y}),resolve:h,reject:o}}var qi=Nr;class Yi extends Gt{constructor(o){super(function(c,_){mt.debug("No callbacks on user for "+c)}),this.signin_requested=!1,this.user_data=null,this.serverToUserChannel=null,this.signinDonePromise=null,this._signinDoneResolve=null,this._onAuthorize=(c,_)=>{if(c){mt.warn(`Error during signin: ${c}`),this._cleanup();return}this.pusher.send_event("pusher:signin",{auth:_.auth,user_data:_.user_data})},this.pusher=o,this.pusher.connection.bind("state_change",({previous:c,current:_})=>{c!=="connected"&&_==="connected"&&this._signin(),c==="connected"&&_!=="connected"&&(this._cleanup(),this._newSigninPromiseIfNeeded())}),this.watchlist=new xi(o),this.pusher.connection.bind("message",c=>{var _=c.event;_==="pusher:signin_success"&&this._onSigninSuccess(c.data),this.serverToUserChannel&&this.serverToUserChannel.name===c.channel&&this.serverToUserChannel.handleEvent(c)})}signin(){this.signin_requested||(this.signin_requested=!0,this._signin())}_signin(){this.signin_requested&&(this._newSigninPromiseIfNeeded(),this.pusher.connection.state==="connected"&&this.pusher.config.userAuthenticator({socketId:this.pusher.connection.socket_id},this._onAuthorize))}_onSigninSuccess(o){try{this.user_data=JSON.parse(o.user_data)}catch{mt.error(`Failed parsing user data after signin: ${o.user_data}`),this._cleanup();return}if(typeof this.user_data.id!="string"||this.user_data.id===""){mt.error(`user_data doesn't contain an id. user_data: ${this.user_data}`),this._cleanup();return}this._signinDoneResolve(),this._subscribeChannels()}_subscribeChannels(){const o=c=>{c.subscriptionPending&&c.subscriptionCancelled?c.reinstateSubscription():!c.subscriptionPending&&this.pusher.connection.state==="connected"&&c.subscribe()};this.serverToUserChannel=new gn(`#server-to-user-${this.user_data.id}`,this.pusher),this.serverToUserChannel.bind_global((c,_)=>{c.indexOf("pusher_internal:")===0||c.indexOf("pusher:")===0||this.emit(c,_)}),o(this.serverToUserChannel)}_cleanup(){this.user_data=null,this.serverToUserChannel&&(this.serverToUserChannel.unbind_all(),this.serverToUserChannel.disconnect(),this.serverToUserChannel=null),this.signin_requested&&this._signinDoneResolve()}_newSigninPromiseIfNeeded(){if(!this.signin_requested||this.signinDonePromise&&!this.signinDonePromise.done)return;const{promise:o,resolve:c,reject:_}=qi();o.done=!1;const y=()=>{o.done=!0};o.then(y).catch(y),this.signinDonePromise=o,this._signinDoneResolve=c}}class Nt{static ready(){Nt.isReady=!0;for(var o=0,c=Nt.instances.length;o<c;o++)Nt.instances[o].connect()}static getClientFeatures(){return Xe(ln({ws:X.Transports.ws},function(o){return o.isSupported({})}))}constructor(o,c){Pi(o),Mr(c),this.key=o,this.options=c,this.config=ji(this.options,this),this.channels=Xt.createChannels(),this.global_emitter=new Gt,this.sessionID=X.randomInt(1e9),this.timeline=new Lr(this.key,this.sessionID,{cluster:this.config.cluster,features:Nt.getClientFeatures(),params:this.config.timelineParams||{},limit:50,level:Pn.INFO,version:S.VERSION}),this.config.enableStats&&(this.timelineSender=Xt.createTimelineSender(this.timeline,{host:this.config.statsHost,path:"/timeline/v2/"+X.TimelineTransport.name}));var _=y=>X.getDefaultStrategy(this.config,y,Bi);this.connection=Xt.createConnectionManager(this.key,{getStrategy:_,timeline:this.timeline,activityTimeout:this.config.activityTimeout,pongTimeout:this.config.pongTimeout,unavailableTimeout:this.config.unavailableTimeout,useTLS:!!this.config.useTLS}),this.connection.bind("connected",()=>{this.subscribeAll(),this.timelineSender&&this.timelineSender.send(this.connection.isUsingTLS())}),this.connection.bind("message",y=>{var M=y.event,N=M.indexOf("pusher_internal:")===0;if(y.channel){var j=this.channel(y.channel);j&&j.handleEvent(y)}N||this.global_emitter.emit(y.event,y.data)}),this.connection.bind("connecting",()=>{this.channels.disconnect()}),this.connection.bind("disconnected",()=>{this.channels.disconnect()}),this.connection.bind("error",y=>{mt.warn(y)}),Nt.instances.push(this),this.timeline.info({instances:Nt.instances.length}),this.user=new Yi(this),Nt.isReady&&this.connect()}switchCluster(o){const{appKey:c,cluster:_}=o;this.key=c,this.options=Object.assign(Object.assign({},this.options),{cluster:_}),this.config=ji(this.options,this),this.connection.switchCluster(this.key)}channel(o){return this.channels.find(o)}allChannels(){return this.channels.all()}connect(){if(this.connection.connect(),this.timelineSender&&!this.timelineSenderTimer){var o=this.connection.isUsingTLS(),c=this.timelineSender;this.timelineSenderTimer=new Bt(6e4,function(){c.send(o)})}}disconnect(){this.connection.disconnect(),this.timelineSenderTimer&&(this.timelineSenderTimer.ensureAborted(),this.timelineSenderTimer=null)}bind(o,c,_){return this.global_emitter.bind(o,c,_),this}unbind(o,c,_){return this.global_emitter.unbind(o,c,_),this}bind_global(o){return this.global_emitter.bind_global(o),this}unbind_global(o){return this.global_emitter.unbind_global(o),this}unbind_all(o){return this.global_emitter.unbind_all(),this}subscribeAll(){var o;for(o in this.channels.channels)this.channels.channels.hasOwnProperty(o)&&this.subscribe(o)}subscribe(o){var c=this.channels.add(o,this);return c.subscriptionPending&&c.subscriptionCancelled?c.reinstateSubscription():!c.subscriptionPending&&this.connection.state==="connected"&&c.subscribe(),c}unsubscribe(o){var c=this.channels.find(o);c&&c.subscriptionPending?c.cancelSubscription():(c=this.channels.remove(o),c&&c.subscribed&&c.unsubscribe())}send_event(o,c,_){return this.connection.send_event(o,c,_)}shouldUseTLS(){return this.config.useTLS}signin(){this.user.signin()}}Nt.instances=[],Nt.isReady=!1,Nt.logToConsole=!1,Nt.Runtime=X,Nt.ScriptReceivers=X.ScriptReceivers,Nt.DependenciesReceivers=X.DependenciesReceivers,Nt.auth_callbacks=X.auth_callbacks;var Ci=l.default=Nt;function Pi(h){if(h==null)throw"You must pass your app key when you instantiate Pusher."}X.setup(Nt)}])})})(Ts);var Mu=Ts.exports;const Ou=Eu(Mu);window.Pusher=Ou;window.Echo=new ku({broadcaster:"reverb",key:"9rnhjstdgjdjyxymmj1k",wsHost:"smartcane.test",wsPort:"8080",wssPort:"8080",forceTLS:!1,enabledTransports:["ws","wss"]});window.axios=_u;window.axios.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";var Gr=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],Qn={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:typeof window=="object"&&window.navigator.userAgent.indexOf("MSIE")===-1,ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(s){return typeof console<"u"&&console.warn(s)},getWeek:function(s){var a=new Date(s.getTime());a.setHours(0,0,0,0),a.setDate(a.getDate()+3-(a.getDay()+6)%7);var e=new Date(a.getFullYear(),0,4);return 1+Math.round(((a.getTime()-e.getTime())/864e5-3+(e.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},Di={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(s){var a=s%100;if(a>3&&a<21)return"th";switch(a%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},oe=function(s,a){return a===void 0&&(a=2),("000"+s).slice(a*-1)},ge=function(s){return s===!0?1:0};function Qo(s,a){var e;return function(){var l=this,f=arguments;clearTimeout(e),e=setTimeout(function(){return s.apply(l,f)},a)}}var Kr=function(s){return s instanceof Array?s:[s]};function te(s,a,e){if(e===!0)return s.classList.add(a);s.classList.remove(a)}function pt(s,a,e){var l=window.document.createElement(s);return a=a||"",e=e||"",l.className=a,e!==void 0&&(l.textContent=e),l}function ar(s){for(;s.firstChild;)s.removeChild(s.firstChild)}function Ss(s,a){if(a(s))return s;if(s.parentNode)return Ss(s.parentNode,a)}function ur(s,a){var e=pt("div","numInputWrapper"),l=pt("input","numInput "+s),f=pt("span","arrowUp"),p=pt("span","arrowDown");if(navigator.userAgent.indexOf("MSIE 9.0")===-1?l.type="number":(l.type="text",l.pattern="\\d*"),a!==void 0)for(var g in a)l.setAttribute(g,a[g]);return e.appendChild(l),e.appendChild(f),e.appendChild(p),e}function he(s){try{if(typeof s.composedPath=="function"){var a=s.composedPath();return a[0]}return s.target}catch{return s.target}}var $r=function(){},_r=function(s,a,e){return e.months[a?"shorthand":"longhand"][s]},Du={D:$r,F:function(s,a,e){s.setMonth(e.months.longhand.indexOf(a))},G:function(s,a){s.setHours((s.getHours()>=12?12:0)+parseFloat(a))},H:function(s,a){s.setHours(parseFloat(a))},J:function(s,a){s.setDate(parseFloat(a))},K:function(s,a,e){s.setHours(s.getHours()%12+12*ge(new RegExp(e.amPM[1],"i").test(a)))},M:function(s,a,e){s.setMonth(e.months.shorthand.indexOf(a))},S:function(s,a){s.setSeconds(parseFloat(a))},U:function(s,a){return new Date(parseFloat(a)*1e3)},W:function(s,a,e){var l=parseInt(a),f=new Date(s.getFullYear(),0,2+(l-1)*7,0,0,0,0);return f.setDate(f.getDate()-f.getDay()+e.firstDayOfWeek),f},Y:function(s,a){s.setFullYear(parseFloat(a))},Z:function(s,a){return new Date(a)},d:function(s,a){s.setDate(parseFloat(a))},h:function(s,a){s.setHours((s.getHours()>=12?12:0)+parseFloat(a))},i:function(s,a){s.setMinutes(parseFloat(a))},j:function(s,a){s.setDate(parseFloat(a))},l:$r,m:function(s,a){s.setMonth(parseFloat(a)-1)},n:function(s,a){s.setMonth(parseFloat(a)-1)},s:function(s,a){s.setSeconds(parseFloat(a))},u:function(s,a){return new Date(parseFloat(a))},w:$r,y:function(s,a){s.setFullYear(2e3+parseFloat(a))}},Sn={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},Ei={Z:function(s){return s.toISOString()},D:function(s,a,e){return a.weekdays.shorthand[Ei.w(s,a,e)]},F:function(s,a,e){return _r(Ei.n(s,a,e)-1,!1,a)},G:function(s,a,e){return oe(Ei.h(s,a,e))},H:function(s){return oe(s.getHours())},J:function(s,a){return a.ordinal!==void 0?s.getDate()+a.ordinal(s.getDate()):s.getDate()},K:function(s,a){return a.amPM[ge(s.getHours()>11)]},M:function(s,a){return _r(s.getMonth(),!0,a)},S:function(s){return oe(s.getSeconds())},U:function(s){return s.getTime()/1e3},W:function(s,a,e){return e.getWeek(s)},Y:function(s){return oe(s.getFullYear(),4)},d:function(s){return oe(s.getDate())},h:function(s){return s.getHours()%12?s.getHours()%12:12},i:function(s){return oe(s.getMinutes())},j:function(s){return s.getDate()},l:function(s,a){return a.weekdays.longhand[s.getDay()]},m:function(s){return oe(s.getMonth()+1)},n:function(s){return s.getMonth()+1},s:function(s){return s.getSeconds()},u:function(s){return s.getTime()},w:function(s){return s.getDay()},y:function(s){return String(s.getFullYear()).substring(2)}},ks=function(s){var a=s.config,e=a===void 0?Qn:a,l=s.l10n,f=l===void 0?Di:l,p=s.isMobile,g=p===void 0?!1:p;return function(E,S,U){var C=U||f;return e.formatDate!==void 0&&!g?e.formatDate(E,S,C):S.split("").map(function(D,Z,J){return Ei[D]&&J[Z-1]!=="\\"?Ei[D](E,C,e):D!=="\\"?D:""}).join("")}},ao=function(s){var a=s.config,e=a===void 0?Qn:a,l=s.l10n,f=l===void 0?Di:l;return function(p,g,E,S){if(!(p!==0&&!p)){var U=S||f,C,D=p;if(p instanceof Date)C=new Date(p.getTime());else if(typeof p!="string"&&p.toFixed!==void 0)C=new Date(p);else if(typeof p=="string"){var Z=g||(e||Qn).dateFormat,J=String(p).trim();if(J==="today")C=new Date,E=!0;else if(e&&e.parseDate)C=e.parseDate(p,Z);else if(/Z$/.test(J)||/GMT$/.test(J))C=new Date(p);else{for(var I=void 0,T=[],R=0,F=0,V="";R<Z.length;R++){var Q=Z[R],_t=Q==="\\",bt=Z[R-1]==="\\"||_t;if(Sn[Q]&&!bt){V+=Sn[Q];var St=new RegExp(V).exec(p);St&&(I=!0)&&T[Q!=="Y"?"push":"unshift"]({fn:Du[Q],val:St[++F]})}else _t||(V+=".")}C=!e||!e.noCalendar?new Date(new Date().getFullYear(),0,1,0,0,0,0):new Date(new Date().setHours(0,0,0,0)),T.forEach(function(At){var Lt=At.fn,Ht=At.val;return C=Lt(C,Ht,U)||C}),C=I?C:void 0}}if(!(C instanceof Date&&!isNaN(C.getTime()))){e.errorHandler(new Error("Invalid date provided: "+D));return}return E===!0&&C.setHours(0,0,0,0),C}}};function le(s,a,e){return e===void 0&&(e=!0),e!==!1?new Date(s.getTime()).setHours(0,0,0,0)-new Date(a.getTime()).setHours(0,0,0,0):s.getTime()-a.getTime()}var Au=function(s,a,e){return s>Math.min(a,e)&&s<Math.max(a,e)},Xr=function(s,a,e){return s*3600+a*60+e},Iu=function(s){var a=Math.floor(s/3600),e=(s-a*3600)/60;return[a,e,s-a*3600-e*60]},Ru={DAY:864e5};function Qr(s){var a=s.defaultHour,e=s.defaultMinute,l=s.defaultSeconds;if(s.minDate!==void 0){var f=s.minDate.getHours(),p=s.minDate.getMinutes(),g=s.minDate.getSeconds();a<f&&(a=f),a===f&&e<p&&(e=p),a===f&&e===p&&l<g&&(l=s.minDate.getSeconds())}if(s.maxDate!==void 0){var E=s.maxDate.getHours(),S=s.maxDate.getMinutes();a=Math.min(a,E),a===E&&(e=Math.min(S,e)),a===E&&e===S&&(l=s.maxDate.getSeconds())}return{hours:a,minutes:e,seconds:l}}typeof Object.assign!="function"&&(Object.assign=function(s){for(var a=[],e=1;e<arguments.length;e++)a[e-1]=arguments[e];if(!s)throw TypeError("Cannot convert undefined or null to object");for(var l=function(E){E&&Object.keys(E).forEach(function(S){return s[S]=E[S]})},f=0,p=a;f<p.length;f++){var g=p[f];l(g)}return s});var Kt=globalThis&&globalThis.__assign||function(){return Kt=Object.assign||function(s){for(var a,e=1,l=arguments.length;e<l;e++){a=arguments[e];for(var f in a)Object.prototype.hasOwnProperty.call(a,f)&&(s[f]=a[f])}return s},Kt.apply(this,arguments)},ts=globalThis&&globalThis.__spreadArrays||function(){for(var s=0,a=0,e=arguments.length;a<e;a++)s+=arguments[a].length;for(var l=Array(s),f=0,a=0;a<e;a++)for(var p=arguments[a],g=0,E=p.length;g<E;g++,f++)l[f]=p[g];return l},Nu=300;function zu(s,a){var e={config:Kt(Kt({},Qn),Ot.defaultConfig),l10n:Di};e.parseDate=ao({config:e.config,l10n:e.l10n}),e._handlers=[],e.pluginElements=[],e.loadedPlugins=[],e._bind=T,e._setHoursFromDate=Z,e._positionCalendar=rn,e.changeMonth=gt,e.changeYear=Vt,e.clear=xt,e.close=Bt,e.onMouseOver=Jt,e._createElement=pt,e.createDay=St,e.destroy=Ct,e.isEnabled=It,e.jumpToDate=V,e.updateValue=ee,e.open=ii,e.redraw=dn,e.set=pn,e.setDate=Mn,e.toggle=Be;function l(){e.utils={getDaysInMonth:function(m,v){return m===void 0&&(m=e.currentMonth),v===void 0&&(v=e.currentYear),m===1&&(v%4===0&&v%100!==0||v%400===0)?29:e.l10n.daysInMonth[m]}}}function f(){e.element=e.input=s,e.isOpen=!1,ln(),Te(),An(),Dn(),l(),e.isMobile||bt(),F(),(e.selectedDates.length||e.config.noCalendar)&&(e.config.enableTime&&Z(e.config.noCalendar?e.latestSelectedDateObj:void 0),ee(!1)),E();var m=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!e.isMobile&&m&&rn(),vt("onReady")}function p(){var m;return((m=e.calendarContainer)===null||m===void 0?void 0:m.getRootNode()).activeElement||document.activeElement}function g(m){return m.bind(e)}function E(){var m=e.config;m.weekNumbers===!1&&m.showMonths===1||m.noCalendar!==!0&&window.requestAnimationFrame(function(){if(e.calendarContainer!==void 0&&(e.calendarContainer.style.visibility="hidden",e.calendarContainer.style.display="block"),e.daysContainer!==void 0){var v=(e.days.offsetWidth+1)*m.showMonths;e.daysContainer.style.width=v+"px",e.calendarContainer.style.width=v+(e.weekWrapper!==void 0?e.weekWrapper.offsetWidth:0)+"px",e.calendarContainer.style.removeProperty("visibility"),e.calendarContainer.style.removeProperty("display")}})}function S(m){if(e.selectedDates.length===0){var v=e.config.minDate===void 0||le(new Date,e.config.minDate)>=0?new Date:new Date(e.config.minDate.getTime()),w=Qr(e.config);v.setHours(w.hours,w.minutes,w.seconds,v.getMilliseconds()),e.selectedDates=[v],e.latestSelectedDateObj=v}m!==void 0&&m.type!=="blur"&&oi(m);var k=e._input.value;D(),ee(),e._input.value!==k&&e._debouncedChange()}function U(m,v){return m%12+12*ge(v===e.l10n.amPM[1])}function C(m){switch(m%24){case 0:case 12:return 12;default:return m%12}}function D(){if(!(e.hourElement===void 0||e.minuteElement===void 0)){var m=(parseInt(e.hourElement.value.slice(-2),10)||0)%24,v=(parseInt(e.minuteElement.value,10)||0)%60,w=e.secondElement!==void 0?(parseInt(e.secondElement.value,10)||0)%60:0;e.amPM!==void 0&&(m=U(m,e.amPM.textContent));var k=e.config.minTime!==void 0||e.config.minDate&&e.minDateHasTime&&e.latestSelectedDateObj&&le(e.latestSelectedDateObj,e.config.minDate,!0)===0,z=e.config.maxTime!==void 0||e.config.maxDate&&e.maxDateHasTime&&e.latestSelectedDateObj&&le(e.latestSelectedDateObj,e.config.maxDate,!0)===0;if(e.config.maxTime!==void 0&&e.config.minTime!==void 0&&e.config.minTime>e.config.maxTime){var H=Xr(e.config.minTime.getHours(),e.config.minTime.getMinutes(),e.config.minTime.getSeconds()),rt=Xr(e.config.maxTime.getHours(),e.config.maxTime.getMinutes(),e.config.maxTime.getSeconds()),q=Xr(m,v,w);if(q>rt&&q<H){var st=Iu(H);m=st[0],v=st[1],w=st[2]}}else{if(z){var Y=e.config.maxTime!==void 0?e.config.maxTime:e.config.maxDate;m=Math.min(m,Y.getHours()),m===Y.getHours()&&(v=Math.min(v,Y.getMinutes())),v===Y.getMinutes()&&(w=Math.min(w,Y.getSeconds()))}if(k){var G=e.config.minTime!==void 0?e.config.minTime:e.config.minDate;m=Math.max(m,G.getHours()),m===G.getHours()&&v<G.getMinutes()&&(v=G.getMinutes()),v===G.getMinutes()&&(w=Math.max(w,G.getSeconds()))}}J(m,v,w)}}function Z(m){var v=m||e.latestSelectedDateObj;v&&v instanceof Date&&J(v.getHours(),v.getMinutes(),v.getSeconds())}function J(m,v,w){e.latestSelectedDateObj!==void 0&&e.latestSelectedDateObj.setHours(m%24,v,w||0,0),!(!e.hourElement||!e.minuteElement||e.isMobile)&&(e.hourElement.value=oe(e.config.time_24hr?m:(12+m)%12+12*ge(m%12===0)),e.minuteElement.value=oe(v),e.amPM!==void 0&&(e.amPM.textContent=e.l10n.amPM[ge(m>=12)]),e.secondElement!==void 0&&(e.secondElement.value=oe(w)))}function I(m){var v=he(m),w=parseInt(v.value)+(m.delta||0);(w/1e3>1||m.key==="Enter"&&!/[^\d]/.test(w.toString()))&&Vt(w)}function T(m,v,w,k){if(v instanceof Array)return v.forEach(function(z){return T(m,z,w,k)});if(m instanceof Array)return m.forEach(function(z){return T(z,v,w,k)});m.addEventListener(v,w,k),e._handlers.push({remove:function(){return m.removeEventListener(v,w,k)}})}function R(){vt("onChange")}function F(){if(e.config.wrap&&["open","close","toggle","clear"].forEach(function(w){Array.prototype.forEach.call(e.element.querySelectorAll("[data-"+w+"]"),function(k){return T(k,"click",e[w])})}),e.isMobile){on();return}var m=Qo(tn,50);if(e._debouncedChange=Qo(R,Nu),e.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&T(e.daysContainer,"mouseover",function(w){e.config.mode==="range"&&Jt(he(w))}),T(e._input,"keydown",Qe),e.calendarContainer!==void 0&&T(e.calendarContainer,"keydown",Qe),!e.config.inline&&!e.config.static&&T(window,"resize",m),window.ontouchstart!==void 0?T(window.document,"touchstart",K):T(window.document,"mousedown",K),T(window.document,"focus",K,{capture:!0}),e.config.clickOpens===!0&&(T(e._input,"focus",e.open),T(e._input,"click",e.open)),e.daysContainer!==void 0&&(T(e.monthNav,"click",we),T(e.monthNav,["keyup","increment"],I),T(e.daysContainer,"click",En)),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0){var v=function(w){return he(w).select()};T(e.timeContainer,["increment"],S),T(e.timeContainer,"blur",S,{capture:!0}),T(e.timeContainer,"click",Q),T([e.hourElement,e.minuteElement],["focus","click"],v),e.secondElement!==void 0&&T(e.secondElement,"focus",function(){return e.secondElement&&e.secondElement.select()}),e.amPM!==void 0&&T(e.amPM,"click",function(w){S(w)})}e.config.allowInput&&T(e._input,"blur",Xe)}function V(m,v){var w=m!==void 0?e.parseDate(m):e.latestSelectedDateObj||(e.config.minDate&&e.config.minDate>e.now?e.config.minDate:e.config.maxDate&&e.config.maxDate<e.now?e.config.maxDate:e.now),k=e.currentYear,z=e.currentMonth;try{w!==void 0&&(e.currentYear=w.getFullYear(),e.currentMonth=w.getMonth())}catch(H){H.message="Invalid date supplied: "+w,e.config.errorHandler(H)}v&&e.currentYear!==k&&(vt("onYearChange"),se()),v&&(e.currentYear!==k||e.currentMonth!==z)&&vt("onMonthChange"),e.redraw()}function Q(m){var v=he(m);~v.className.indexOf("arrow")&&_t(m,v.classList.contains("arrowUp")?1:-1)}function _t(m,v,w){var k=m&&he(m),z=w||k&&k.parentNode&&k.parentNode.firstChild,H=_n("increment");H.delta=v,z&&z.dispatchEvent(H)}function bt(){var m=window.document.createDocumentFragment();if(e.calendarContainer=pt("div","flatpickr-calendar"),e.calendarContainer.tabIndex=-1,!e.config.noCalendar){if(m.appendChild(Ut()),e.innerContainer=pt("div","flatpickr-innerContainer"),e.config.weekNumbers){var v=et(),w=v.weekWrapper,k=v.weekNumbers;e.innerContainer.appendChild(w),e.weekNumbers=k,e.weekWrapper=w}e.rContainer=pt("div","flatpickr-rContainer"),e.rContainer.appendChild(nt()),e.daysContainer||(e.daysContainer=pt("div","flatpickr-days"),e.daysContainer.tabIndex=-1),kt(),e.rContainer.appendChild(e.daysContainer),e.innerContainer.appendChild(e.rContainer),m.appendChild(e.innerContainer)}e.config.enableTime&&m.appendChild(ze()),te(e.calendarContainer,"rangeMode",e.config.mode==="range"),te(e.calendarContainer,"animate",e.config.animate===!0),te(e.calendarContainer,"multiMonth",e.config.showMonths>1),e.calendarContainer.appendChild(m);var z=e.config.appendTo!==void 0&&e.config.appendTo.nodeType!==void 0;if((e.config.inline||e.config.static)&&(e.calendarContainer.classList.add(e.config.inline?"inline":"static"),e.config.inline&&(!z&&e.element.parentNode?e.element.parentNode.insertBefore(e.calendarContainer,e._input.nextSibling):e.config.appendTo!==void 0&&e.config.appendTo.appendChild(e.calendarContainer)),e.config.static)){var H=pt("div","flatpickr-wrapper");e.element.parentNode&&e.element.parentNode.insertBefore(H,e.element),H.appendChild(e.element),e.altInput&&H.appendChild(e.altInput),H.appendChild(e.calendarContainer)}!e.config.static&&!e.config.inline&&(e.config.appendTo!==void 0?e.config.appendTo:window.document.body).appendChild(e.calendarContainer)}function St(m,v,w,k){var z=It(v,!0),H=pt("span",m,v.getDate().toString());return H.dateObj=v,H.$i=k,H.setAttribute("aria-label",e.formatDate(v,e.config.ariaDateFormat)),m.indexOf("hidden")===-1&&le(v,e.now)===0&&(e.todayDateElem=H,H.classList.add("today"),H.setAttribute("aria-current","date")),z?(H.tabIndex=-1,be(v)&&(H.classList.add("selected"),e.selectedDateElem=H,e.config.mode==="range"&&(te(H,"startRange",e.selectedDates[0]&&le(v,e.selectedDates[0],!0)===0),te(H,"endRange",e.selectedDates[1]&&le(v,e.selectedDates[1],!0)===0),m==="nextMonthDay"&&H.classList.add("inRange")))):H.classList.add("flatpickr-disabled"),e.config.mode==="range"&&ri(v)&&!be(v)&&H.classList.add("inRange"),e.weekNumbers&&e.config.showMonths===1&&m!=="prevMonthDay"&&k%7===6&&e.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+e.config.getWeek(v)+"</span>"),vt("onDayCreate",H),H}function At(m){m.focus(),e.config.mode==="range"&&Jt(m)}function Lt(m){for(var v=m>0?0:e.config.showMonths-1,w=m>0?e.config.showMonths:-1,k=v;k!=w;k+=m)for(var z=e.daysContainer.children[k],H=m>0?0:z.children.length-1,rt=m>0?z.children.length:-1,q=H;q!=rt;q+=m){var st=z.children[q];if(st.className.indexOf("hidden")===-1&&It(st.dateObj))return st}}function Ht(m,v){for(var w=m.className.indexOf("Month")===-1?m.dateObj.getMonth():e.currentMonth,k=v>0?e.config.showMonths:-1,z=v>0?1:-1,H=w-e.currentMonth;H!=k;H+=z)for(var rt=e.daysContainer.children[H],q=w-e.currentMonth===H?m.$i+v:v<0?rt.children.length-1:0,st=rt.children.length,Y=q;Y>=0&&Y<st&&Y!=(v>0?st:-1);Y+=z){var G=rt.children[Y];if(G.className.indexOf("hidden")===-1&&It(G.dateObj)&&Math.abs(m.$i-Y)>=Math.abs(v))return At(G)}e.changeMonth(z),jt(Lt(z),0)}function jt(m,v){var w=p(),k=Wt(w||document.body),z=m!==void 0?m:k?w:e.selectedDateElem!==void 0&&Wt(e.selectedDateElem)?e.selectedDateElem:e.todayDateElem!==void 0&&Wt(e.todayDateElem)?e.todayDateElem:Lt(v>0?1:-1);z===void 0?e._input.focus():k?Ht(z,v):At(z)}function zt(m,v){for(var w=(new Date(m,v,1).getDay()-e.l10n.firstDayOfWeek+7)%7,k=e.utils.getDaysInMonth((v-1+12)%12,m),z=e.utils.getDaysInMonth(v,m),H=window.document.createDocumentFragment(),rt=e.config.showMonths>1,q=rt?"prevMonthDay hidden":"prevMonthDay",st=rt?"nextMonthDay hidden":"nextMonthDay",Y=k+1-w,G=0;Y<=k;Y++,G++)H.appendChild(St("flatpickr-day "+q,new Date(m,v-1,Y),Y,G));for(Y=1;Y<=z;Y++,G++)H.appendChild(St("flatpickr-day",new Date(m,v,Y),Y,G));for(var B=z+1;B<=42-w&&(e.config.showMonths===1||G%7!==0);B++,G++)H.appendChild(St("flatpickr-day "+st,new Date(m,v+1,B%z),B,G));var $t=pt("div","dayContainer");return $t.appendChild(H),$t}function kt(){if(e.daysContainer!==void 0){ar(e.daysContainer),e.weekNumbers&&ar(e.weekNumbers);for(var m=document.createDocumentFragment(),v=0;v<e.config.showMonths;v++){var w=new Date(e.currentYear,e.currentMonth,1);w.setMonth(e.currentMonth+v),m.appendChild(zt(w.getFullYear(),w.getMonth()))}e.daysContainer.appendChild(m),e.days=e.daysContainer.firstChild,e.config.mode==="range"&&e.selectedDates.length===1&&Jt()}}function se(){if(!(e.config.showMonths>1||e.config.monthSelectorType!=="dropdown")){var m=function(k){return e.config.minDate!==void 0&&e.currentYear===e.config.minDate.getFullYear()&&k<e.config.minDate.getMonth()?!1:!(e.config.maxDate!==void 0&&e.currentYear===e.config.maxDate.getFullYear()&&k>e.config.maxDate.getMonth())};e.monthsDropdownContainer.tabIndex=-1,e.monthsDropdownContainer.innerHTML="";for(var v=0;v<12;v++)if(m(v)){var w=pt("option","flatpickr-monthDropdown-month");w.value=new Date(e.currentYear,v).getMonth().toString(),w.textContent=_r(v,e.config.shorthandCurrentMonth,e.l10n),w.tabIndex=-1,e.currentMonth===v&&(w.selected=!0),e.monthsDropdownContainer.appendChild(w)}}}function ae(){var m=pt("div","flatpickr-month"),v=window.document.createDocumentFragment(),w;e.config.showMonths>1||e.config.monthSelectorType==="static"?w=pt("span","cur-month"):(e.monthsDropdownContainer=pt("select","flatpickr-monthDropdown-months"),e.monthsDropdownContainer.setAttribute("aria-label",e.l10n.monthAriaLabel),T(e.monthsDropdownContainer,"change",function(rt){var q=he(rt),st=parseInt(q.value,10);e.changeMonth(st-e.currentMonth),vt("onMonthChange")}),se(),w=e.monthsDropdownContainer);var k=ur("cur-year",{tabindex:"-1"}),z=k.getElementsByTagName("input")[0];z.setAttribute("aria-label",e.l10n.yearAriaLabel),e.config.minDate&&z.setAttribute("min",e.config.minDate.getFullYear().toString()),e.config.maxDate&&(z.setAttribute("max",e.config.maxDate.getFullYear().toString()),z.disabled=!!e.config.minDate&&e.config.minDate.getFullYear()===e.config.maxDate.getFullYear());var H=pt("div","flatpickr-current-month");return H.appendChild(w),H.appendChild(k),v.appendChild(H),m.appendChild(v),{container:m,yearElement:z,monthElement:w}}function kn(){ar(e.monthNav),e.monthNav.appendChild(e.prevMonthNav),e.config.showMonths&&(e.yearElements=[],e.monthElements=[]);for(var m=e.config.showMonths;m--;){var v=ae();e.yearElements.push(v.yearElement),e.monthElements.push(v.monthElement),e.monthNav.appendChild(v.container)}e.monthNav.appendChild(e.nextMonthNav)}function Ut(){return e.monthNav=pt("div","flatpickr-months"),e.yearElements=[],e.monthElements=[],e.prevMonthNav=pt("span","flatpickr-prev-month"),e.prevMonthNav.innerHTML=e.config.prevArrow,e.nextMonthNav=pt("span","flatpickr-next-month"),e.nextMonthNav.innerHTML=e.config.nextArrow,kn(),Object.defineProperty(e,"_hidePrevMonthArrow",{get:function(){return e.__hidePrevMonthArrow},set:function(m){e.__hidePrevMonthArrow!==m&&(te(e.prevMonthNav,"flatpickr-disabled",m),e.__hidePrevMonthArrow=m)}}),Object.defineProperty(e,"_hideNextMonthArrow",{get:function(){return e.__hideNextMonthArrow},set:function(m){e.__hideNextMonthArrow!==m&&(te(e.nextMonthNav,"flatpickr-disabled",m),e.__hideNextMonthArrow=m)}}),e.currentYearElement=e.yearElements[0],Se(),e.monthNav}function ze(){e.calendarContainer.classList.add("hasTime"),e.config.noCalendar&&e.calendarContainer.classList.add("noCalendar");var m=Qr(e.config);e.timeContainer=pt("div","flatpickr-time"),e.timeContainer.tabIndex=-1;var v=pt("span","flatpickr-time-separator",":"),w=ur("flatpickr-hour",{"aria-label":e.l10n.hourAriaLabel});e.hourElement=w.getElementsByTagName("input")[0];var k=ur("flatpickr-minute",{"aria-label":e.l10n.minuteAriaLabel});if(e.minuteElement=k.getElementsByTagName("input")[0],e.hourElement.tabIndex=e.minuteElement.tabIndex=-1,e.hourElement.value=oe(e.latestSelectedDateObj?e.latestSelectedDateObj.getHours():e.config.time_24hr?m.hours:C(m.hours)),e.minuteElement.value=oe(e.latestSelectedDateObj?e.latestSelectedDateObj.getMinutes():m.minutes),e.hourElement.setAttribute("step",e.config.hourIncrement.toString()),e.minuteElement.setAttribute("step",e.config.minuteIncrement.toString()),e.hourElement.setAttribute("min",e.config.time_24hr?"0":"1"),e.hourElement.setAttribute("max",e.config.time_24hr?"23":"12"),e.hourElement.setAttribute("maxlength","2"),e.minuteElement.setAttribute("min","0"),e.minuteElement.setAttribute("max","59"),e.minuteElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(w),e.timeContainer.appendChild(v),e.timeContainer.appendChild(k),e.config.time_24hr&&e.timeContainer.classList.add("time24hr"),e.config.enableSeconds){e.timeContainer.classList.add("hasSeconds");var z=ur("flatpickr-second");e.secondElement=z.getElementsByTagName("input")[0],e.secondElement.value=oe(e.latestSelectedDateObj?e.latestSelectedDateObj.getSeconds():m.seconds),e.secondElement.setAttribute("step",e.minuteElement.getAttribute("step")),e.secondElement.setAttribute("min","0"),e.secondElement.setAttribute("max","59"),e.secondElement.setAttribute("maxlength","2"),e.timeContainer.appendChild(pt("span","flatpickr-time-separator",":")),e.timeContainer.appendChild(z)}return e.config.time_24hr||(e.amPM=pt("span","flatpickr-am-pm",e.l10n.amPM[ge((e.latestSelectedDateObj?e.hourElement.value:e.config.defaultHour)>11)]),e.amPM.title=e.l10n.toggleTitle,e.amPM.tabIndex=-1,e.timeContainer.appendChild(e.amPM)),e.timeContainer}function nt(){e.weekdayContainer?ar(e.weekdayContainer):e.weekdayContainer=pt("div","flatpickr-weekdays");for(var m=e.config.showMonths;m--;){var v=pt("div","flatpickr-weekdaycontainer");e.weekdayContainer.appendChild(v)}return $e(),e.weekdayContainer}function $e(){if(e.weekdayContainer){var m=e.l10n.firstDayOfWeek,v=ts(e.l10n.weekdays.shorthand);m>0&&m<v.length&&(v=ts(v.splice(m,v.length),v.splice(0,m)));for(var w=e.config.showMonths;w--;)e.weekdayContainer.children[w].innerHTML=`
<span class='flatpickr-weekday'>
`+v.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function et(){e.calendarContainer.classList.add("hasWeeks");var m=pt("div","flatpickr-weekwrapper");m.appendChild(pt("span","flatpickr-weekday",e.l10n.weekAbbreviation));var v=pt("div","flatpickr-weeks");return m.appendChild(v),{weekWrapper:m,weekNumbers:v}}function gt(m,v){v===void 0&&(v=!0);var w=v?m:m-e.currentMonth;w<0&&e._hidePrevMonthArrow===!0||w>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=w,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,vt("onYearChange"),se()),kt(),vt("onMonthChange"),Se())}function xt(m,v){if(m===void 0&&(m=!0),v===void 0&&(v=!0),e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,v===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){var w=Qr(e.config),k=w.hours,z=w.minutes,H=w.seconds;J(k,z,H)}e.redraw(),m&&vt("onChange")}function Bt(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),vt("onClose")}function Ct(){e.config!==void 0&&vt("onDestroy");for(var m=e._handlers.length;m--;)e._handlers[m].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){var v=e.calendarContainer.parentNode;if(v.lastChild&&v.removeChild(v.lastChild),v.parentNode){for(;v.firstChild;)v.parentNode.insertBefore(v.firstChild,v);v.parentNode.removeChild(v)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(w){try{delete e[w]}catch{}})}function $(m){return e.calendarContainer.contains(m)}function K(m){if(e.isOpen&&!e.config.inline){var v=he(m),w=$(v),k=v===e.input||v===e.altInput||e.element.contains(v)||m.path&&m.path.indexOf&&(~m.path.indexOf(e.input)||~m.path.indexOf(e.altInput)),z=!k&&!w&&!$(m.relatedTarget),H=!e.config.ignoredFocusElements.some(function(rt){return rt.contains(v)});z&&H&&(e.config.allowInput&&e.setDate(e._input.value,!1,e.config.altInput?e.config.altFormat:e.config.dateFormat),e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&S(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&e.clear(!1))}}function Vt(m){if(!(!m||e.config.minDate&&m<e.config.minDate.getFullYear()||e.config.maxDate&&m>e.config.maxDate.getFullYear())){var v=m,w=e.currentYear!==v;e.currentYear=v||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),w&&(e.redraw(),vt("onYearChange"),se())}}function It(m,v){var w;v===void 0&&(v=!0);var k=e.parseDate(m,void 0,v);if(e.config.minDate&&k&&le(k,e.config.minDate,v!==void 0?v:!e.minDateHasTime)<0||e.config.maxDate&&k&&le(k,e.config.maxDate,v!==void 0?v:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(k===void 0)return!1;for(var z=!!e.config.enable,H=(w=e.config.enable)!==null&&w!==void 0?w:e.config.disable,rt=0,q=void 0;rt<H.length;rt++){if(q=H[rt],typeof q=="function"&&q(k))return z;if(q instanceof Date&&k!==void 0&&q.getTime()===k.getTime())return z;if(typeof q=="string"){var st=e.parseDate(q,void 0,!0);return st&&st.getTime()===k.getTime()?z:!z}else if(typeof q=="object"&&k!==void 0&&q.from&&q.to&&k.getTime()>=q.from.getTime()&&k.getTime()<=q.to.getTime())return z}return!z}function Wt(m){return e.daysContainer!==void 0?m.className.indexOf("hidden")===-1&&m.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(m):!1}function Xe(m){var v=m.target===e._input,w=e._input.value.trimEnd()!==Gt();v&&w&&!(m.relatedTarget&&$(m.relatedTarget))&&e.setDate(e._input.value,!0,m.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Qe(m){var v=he(m),w=e.config.wrap?s.contains(v):v===e._input,k=e.config.allowInput,z=e.isOpen&&(!k||!w),H=e.config.inline&&w&&!k;if(m.keyCode===13&&w){if(k)return e.setDate(e._input.value,!0,v===e.altInput?e.config.altFormat:e.config.dateFormat),e.close(),v.blur();e.open()}else if($(v)||z||H){var rt=!!e.timeContainer&&e.timeContainer.contains(v);switch(m.keyCode){case 13:rt?(m.preventDefault(),S(),ye()):En(m);break;case 27:m.preventDefault(),ye();break;case 8:case 46:w&&!e.config.allowInput&&(m.preventDefault(),e.clear());break;case 37:case 39:if(!rt&&!w){m.preventDefault();var q=p();if(e.daysContainer!==void 0&&(k===!1||q&&Wt(q))){var st=m.keyCode===39?1:-1;m.ctrlKey?(m.stopPropagation(),gt(st),jt(Lt(1),0)):jt(void 0,st)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:m.preventDefault();var Y=m.keyCode===40?1:-1;e.daysContainer&&v.$i!==void 0||v===e.input||v===e.altInput?m.ctrlKey?(m.stopPropagation(),Vt(e.currentYear-Y),jt(Lt(1),0)):rt||jt(void 0,Y*7):v===e.currentYearElement?Vt(e.currentYear-Y):e.config.enableTime&&(!rt&&e.hourElement&&e.hourElement.focus(),S(m),e._debouncedChange());break;case 9:if(rt){var G=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(function(Ft){return Ft}),B=G.indexOf(v);if(B!==-1){var $t=G[B+(m.shiftKey?-1:1)];m.preventDefault(),($t||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(v)&&m.shiftKey&&(m.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&v===e.amPM)switch(m.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],D(),ee();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],D(),ee();break}(w||$(v))&&vt("onKeyDown",m)}function Jt(m,v){if(v===void 0&&(v="flatpickr-day"),!(e.selectedDates.length!==1||m&&(!m.classList.contains(v)||m.classList.contains("flatpickr-disabled")))){for(var w=m?m.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),k=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),z=Math.min(w,e.selectedDates[0].getTime()),H=Math.max(w,e.selectedDates[0].getTime()),rt=!1,q=0,st=0,Y=z;Y<H;Y+=Ru.DAY)It(new Date(Y),!0)||(rt=rt||Y>z&&Y<H,Y<k&&(!q||Y>q)?q=Y:Y>k&&(!st||Y<st)&&(st=Y));var G=Array.from(e.rContainer.querySelectorAll("*:nth-child(-n+"+e.config.showMonths+") > ."+v));G.forEach(function(B){var $t=B.dateObj,Ft=$t.getTime(),ke=q>0&&Ft<q||st>0&&Ft>st;if(ke){B.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(xe){B.classList.remove(xe)});return}else if(rt&&!ke)return;["startRange","inRange","endRange","notAllowed"].forEach(function(xe){B.classList.remove(xe)}),m!==void 0&&(m.classList.add(w<=e.selectedDates[0].getTime()?"startRange":"endRange"),k<w&&Ft===k?B.classList.add("startRange"):k>w&&Ft===k&&B.classList.add("endRange"),Ft>=q&&(st===0||Ft<=st)&&Au(Ft,k,w)&&B.classList.add("inRange"))})}}function tn(){e.isOpen&&!e.config.static&&!e.config.inline&&rn()}function ii(m,v){if(v===void 0&&(v=e._positionElement),e.isMobile===!0){if(m){m.preventDefault();var w=he(m);w&&w.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),vt("onOpen");return}else if(e._input.disabled||e.config.inline)return;var k=e.isOpen;e.isOpen=!0,k||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),vt("onOpen"),rn(v)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(m===void 0||!e.timeContainer.contains(m.relatedTarget))&&setTimeout(function(){return e.hourElement.select()},50)}function en(m){return function(v){var w=e.config["_"+m+"Date"]=e.parseDate(v,e.config.dateFormat),k=e.config["_"+(m==="min"?"max":"min")+"Date"];w!==void 0&&(e[m==="min"?"minDateHasTime":"maxDateHasTime"]=w.getHours()>0||w.getMinutes()>0||w.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(function(z){return It(z)}),!e.selectedDates.length&&m==="min"&&Z(w),ee()),e.daysContainer&&(dn(),w!==void 0?e.currentYearElement[m]=w.getFullYear().toString():e.currentYearElement.removeAttribute(m),e.currentYearElement.disabled=!!k&&w!==void 0&&k.getFullYear()===w.getFullYear())}}function ln(){var m=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],v=Kt(Kt({},JSON.parse(JSON.stringify(s.dataset||{}))),a),w={};e.config.parseDate=v.parseDate,e.config.formatDate=v.formatDate,Object.defineProperty(e.config,"enable",{get:function(){return e.config._enable},set:function(G){e.config._enable=On(G)}}),Object.defineProperty(e.config,"disable",{get:function(){return e.config._disable},set:function(G){e.config._disable=On(G)}});var k=v.mode==="time";if(!v.dateFormat&&(v.enableTime||k)){var z=Ot.defaultConfig.dateFormat||Qn.dateFormat;w.dateFormat=v.noCalendar||k?"H:i"+(v.enableSeconds?":S":""):z+" H:i"+(v.enableSeconds?":S":"")}if(v.altInput&&(v.enableTime||k)&&!v.altFormat){var H=Ot.defaultConfig.altFormat||Qn.altFormat;w.altFormat=v.noCalendar||k?"h:i"+(v.enableSeconds?":S K":" K"):H+(" h:i"+(v.enableSeconds?":S":"")+" K")}Object.defineProperty(e.config,"minDate",{get:function(){return e.config._minDate},set:en("min")}),Object.defineProperty(e.config,"maxDate",{get:function(){return e.config._maxDate},set:en("max")});var rt=function(G){return function(B){e.config[G==="min"?"_minTime":"_maxTime"]=e.parseDate(B,"H:i:S")}};Object.defineProperty(e.config,"minTime",{get:function(){return e.config._minTime},set:rt("min")}),Object.defineProperty(e.config,"maxTime",{get:function(){return e.config._maxTime},set:rt("max")}),v.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,w,v);for(var q=0;q<m.length;q++)e.config[m[q]]=e.config[m[q]]===!0||e.config[m[q]]==="true";Gr.filter(function(G){return e.config[G]!==void 0}).forEach(function(G){e.config[G]=Kr(e.config[G]||[]).map(g)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var q=0;q<e.config.plugins.length;q++){var st=e.config.plugins[q](e)||{};for(var Y in st)Gr.indexOf(Y)>-1?e.config[Y]=Kr(st[Y]).map(g).concat(e.config[Y]):typeof v[Y]>"u"&&(e.config[Y]=st[Y])}v.altInputClass||(e.config.altInputClass=nn().className+" "+e.config.altInputClass),vt("onParseConfig")}function nn(){return e.config.wrap?s.querySelector("[data-input]"):s}function Te(){typeof e.config.locale!="object"&&typeof Ot.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error("flatpickr: invalid locale "+e.config.locale)),e.l10n=Kt(Kt({},Ot.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?Ot.l10ns[e.config.locale]:void 0),Sn.D="("+e.l10n.weekdays.shorthand.join("|")+")",Sn.l="("+e.l10n.weekdays.longhand.join("|")+")",Sn.M="("+e.l10n.months.shorthand.join("|")+")",Sn.F="("+e.l10n.months.longhand.join("|")+")",Sn.K="("+e.l10n.amPM[0]+"|"+e.l10n.amPM[1]+"|"+e.l10n.amPM[0].toLowerCase()+"|"+e.l10n.amPM[1].toLowerCase()+")";var m=Kt(Kt({},a),JSON.parse(JSON.stringify(s.dataset||{})));m.time_24hr===void 0&&Ot.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=ks(e),e.parseDate=ao({config:e.config,l10n:e.l10n})}function rn(m){if(typeof e.config.position=="function")return void e.config.position(e,m);if(e.calendarContainer!==void 0){vt("onPreCalendarPosition");var v=m||e._positionElement,w=Array.prototype.reduce.call(e.calendarContainer.children,function(Nn,ui){return Nn+ui.offsetHeight},0),k=e.calendarContainer.offsetWidth,z=e.config.position.split(" "),H=z[0],rt=z.length>1?z[1]:null,q=v.getBoundingClientRect(),st=window.innerHeight-q.bottom,Y=H==="above"||H!=="below"&&st<w&&q.top>w,G=window.pageYOffset+q.top+(Y?-w-2:v.offsetHeight+2);if(te(e.calendarContainer,"arrowTop",!Y),te(e.calendarContainer,"arrowBottom",Y),!e.config.inline){var B=window.pageXOffset+q.left,$t=!1,Ft=!1;rt==="center"?(B-=(k-q.width)/2,$t=!0):rt==="right"&&(B-=k-q.width,Ft=!0),te(e.calendarContainer,"arrowLeft",!$t&&!Ft),te(e.calendarContainer,"arrowCenter",$t),te(e.calendarContainer,"arrowRight",Ft);var ke=window.document.body.offsetWidth-(window.pageXOffset+q.right),xe=B+k>window.document.body.offsetWidth,sn=ke+k>window.document.body.offsetWidth;if(te(e.calendarContainer,"rightMost",xe),!e.config.static)if(e.calendarContainer.style.top=G+"px",!xe)e.calendarContainer.style.left=B+"px",e.calendarContainer.style.right="auto";else if(!sn)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=ke+"px";else{var ne=Ln();if(ne===void 0)return;var Le=window.document.body.offsetWidth,Rn=Math.max(0,Le/2-k/2),si=".flatpickr-calendar.centerMost:before",gn=".flatpickr-calendar.centerMost:after",vn=ne.cssRules.length,ai="{left:"+q.left+"px;right:auto;}";te(e.calendarContainer,"rightMost",!1),te(e.calendarContainer,"centerMost",!0),ne.insertRule(si+","+gn+ai,vn),e.calendarContainer.style.left=Rn+"px",e.calendarContainer.style.right="auto"}}}}function Ln(){for(var m=null,v=0;v<document.styleSheets.length;v++){var w=document.styleSheets[v];if(w.cssRules){try{w.cssRules}catch{continue}m=w;break}}return m??fn()}function fn(){var m=document.createElement("style");return document.head.appendChild(m),m.sheet}function dn(){e.config.noCalendar||e.isMobile||(se(),Se(),kt())}function ye(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function En(m){m.preventDefault(),m.stopPropagation();var v=function(G){return G.classList&&G.classList.contains("flatpickr-day")&&!G.classList.contains("flatpickr-disabled")&&!G.classList.contains("notAllowed")},w=Ss(he(m),v);if(w!==void 0){var k=w,z=e.latestSelectedDateObj=new Date(k.dateObj.getTime()),H=(z.getMonth()<e.currentMonth||z.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=k,e.config.mode==="single")e.selectedDates=[z];else if(e.config.mode==="multiple"){var rt=be(z);rt?e.selectedDates.splice(parseInt(rt),1):e.selectedDates.push(z)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=z,e.selectedDates.push(z),le(z,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(function(G,B){return G.getTime()-B.getTime()}));if(D(),H){var q=e.currentYear!==z.getFullYear();e.currentYear=z.getFullYear(),e.currentMonth=z.getMonth(),q&&(vt("onYearChange"),se()),vt("onMonthChange")}if(Se(),kt(),ee(),!H&&e.config.mode!=="range"&&e.config.showMonths===1?At(k):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){var st=e.config.mode==="single"&&!e.config.enableTime,Y=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(st||Y)&&ye()}R()}}var mt={locale:[Te,$e],showMonths:[kn,E,nt],minDate:[V],maxDate:[V],positionElement:[In],clickOpens:[function(){e.config.clickOpens===!0?(T(e._input,"focus",e.open),T(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function pn(m,v){if(m!==null&&typeof m=="object"){Object.assign(e.config,m);for(var w in m)mt[w]!==void 0&&mt[w].forEach(function(k){return k()})}else e.config[m]=v,mt[m]!==void 0?mt[m].forEach(function(k){return k()}):Gr.indexOf(m)>-1&&(e.config[m]=Kr(v));e.redraw(),ee(!0)}function mn(m,v){var w=[];if(m instanceof Array)w=m.map(function(k){return e.parseDate(k,v)});else if(m instanceof Date||typeof m=="number")w=[e.parseDate(m,v)];else if(typeof m=="string")switch(e.config.mode){case"single":case"time":w=[e.parseDate(m,v)];break;case"multiple":w=m.split(e.config.conjunction).map(function(k){return e.parseDate(k,v)});break;case"range":w=m.split(e.l10n.rangeSeparator).map(function(k){return e.parseDate(k,v)});break}else e.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(m)));e.selectedDates=e.config.allowInvalidPreload?w:w.filter(function(k){return k instanceof Date&&It(k,!1)}),e.config.mode==="range"&&e.selectedDates.sort(function(k,z){return k.getTime()-z.getTime()})}function Mn(m,v,w){if(v===void 0&&(v=!1),w===void 0&&(w=e.config.dateFormat),m!==0&&!m||m instanceof Array&&m.length===0)return e.clear(v);mn(m,w),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),V(void 0,v),Z(),e.selectedDates.length===0&&e.clear(!1),ee(v),v&&vt("onChange")}function On(m){return m.slice().map(function(v){return typeof v=="string"||typeof v=="number"||v instanceof Date?e.parseDate(v,void 0,!0):v&&typeof v=="object"&&v.from&&v.to?{from:e.parseDate(v.from,void 0),to:e.parseDate(v.to,void 0)}:v}).filter(function(v){return v})}function Dn(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;var m=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);m&&mn(m,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function An(){if(e.input=nn(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=pt(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),In()}function In(){e._positionElement=e.config.positionElement||e._input}function on(){var m=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=pt("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=m,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=m==="datetime-local"?"Y-m-d\\TH:i:S":m==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}T(e.mobileInput,"change",function(v){e.setDate(he(v).value,!1,e.mobileFormatStr),vt("onChange"),vt("onClose")})}function Be(m){if(e.isOpen===!0)return e.close();e.open(m)}function vt(m,v){if(e.config!==void 0){var w=e.config[m];if(w!==void 0&&w.length>0)for(var k=0;w[k]&&k<w.length;k++)w[k](e.selectedDates,e.input.value,e,v);m==="onChange"&&(e.input.dispatchEvent(_n("change")),e.input.dispatchEvent(_n("input")))}}function _n(m){var v=document.createEvent("Event");return v.initEvent(m,!0,!0),v}function be(m){for(var v=0;v<e.selectedDates.length;v++){var w=e.selectedDates[v];if(w instanceof Date&&le(w,m)===0)return""+v}return!1}function ri(m){return e.config.mode!=="range"||e.selectedDates.length<2?!1:le(m,e.selectedDates[0])>=0&&le(m,e.selectedDates[1])<=0}function Se(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach(function(m,v){var w=new Date(e.currentYear,e.currentMonth,1);w.setMonth(e.currentMonth+v),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[v].textContent=_r(w.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=w.getMonth().toString(),m.value=w.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function Gt(m){var v=m||(e.config.altInput?e.config.altFormat:e.config.dateFormat);return e.selectedDates.map(function(w){return e.formatDate(w,v)}).filter(function(w,k,z){return e.config.mode!=="range"||e.config.enableTime||z.indexOf(w)===k}).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function ee(m){m===void 0&&(m=!0),e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Gt(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Gt(e.config.altFormat)),m!==!1&&vt("onValueUpdate")}function we(m){var v=he(m),w=e.prevMonthNav.contains(v),k=e.nextMonthNav.contains(v);w||k?gt(w?-1:1):e.yearElements.indexOf(v)>=0?v.select():v.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):v.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function oi(m){m.preventDefault();var v=m.type==="keydown",w=he(m),k=w;e.amPM!==void 0&&w===e.amPM&&(e.amPM.textContent=e.l10n.amPM[ge(e.amPM.textContent===e.l10n.amPM[0])]);var z=parseFloat(k.getAttribute("min")),H=parseFloat(k.getAttribute("max")),rt=parseFloat(k.getAttribute("step")),q=parseInt(k.value,10),st=m.delta||(v?m.which===38?1:-1:0),Y=q+rt*st;if(typeof k.value<"u"&&k.value.length===2){var G=k===e.hourElement,B=k===e.minuteElement;Y<z?(Y=H+Y+ge(!G)+(ge(G)&&ge(!e.amPM)),B&&_t(void 0,-1,e.hourElement)):Y>H&&(Y=k===e.hourElement?Y-H-ge(!e.amPM):z,B&&_t(void 0,1,e.hourElement)),e.amPM&&G&&(rt===1?Y+q===23:Math.abs(Y-q)>rt)&&(e.amPM.textContent=e.l10n.amPM[ge(e.amPM.textContent===e.l10n.amPM[0])]),k.value=oe(Y)}}return f(),e}function ti(s,a){for(var e=Array.prototype.slice.call(s).filter(function(g){return g instanceof HTMLElement}),l=[],f=0;f<e.length;f++){var p=e[f];try{if(p.getAttribute("data-fp-omit")!==null)continue;p._flatpickr!==void 0&&(p._flatpickr.destroy(),p._flatpickr=void 0),p._flatpickr=zu(p,a||{}),l.push(p._flatpickr)}catch(g){console.error(g)}}return l.length===1?l[0]:l}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(s){return ti(this,s)},HTMLElement.prototype.flatpickr=function(s){return ti([this],s)});var Ot=function(s,a){return typeof s=="string"?ti(window.document.querySelectorAll(s),a):s instanceof Node?ti([s],a):ti(s,a)};Ot.defaultConfig={};Ot.l10ns={en:Kt({},Di),default:Kt({},Di)};Ot.localize=function(s){Ot.l10ns.default=Kt(Kt({},Ot.l10ns.default),s)};Ot.setDefaults=function(s){Ot.defaultConfig=Kt(Kt({},Ot.defaultConfig),s)};Ot.parseDate=ao({});Ot.formatDate=ks({});Ot.compareDates=le;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(s){return ti(this,s)});Date.prototype.fp_incr=function(s){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof s=="string"?parseInt(s,10):s))};typeof window<"u"&&(window.flatpickr=Ot);var es={exports:{}};/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/(function(s,a){(function(e,l){l(a)})(Lu,function(e){var l="1.9.4";function f(t){var n,i,r,u;for(i=1,r=arguments.length;i<r;i++){u=arguments[i];for(n in u)t[n]=u[n]}return t}var p=Object.create||function(){function t(){}return function(n){return t.prototype=n,new t}}();function g(t,n){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var r=i.call(arguments,2);return function(){return t.apply(n,r.length?r.concat(i.call(arguments)):arguments)}}var E=0;function S(t){return"_leaflet_id"in t||(t._leaflet_id=++E),t._leaflet_id}function U(t,n,i){var r,u,d,b;return b=function(){r=!1,u&&(d.apply(i,u),u=!1)},d=function(){r?u=arguments:(t.apply(i,arguments),setTimeout(b,n),r=!0)},d}function C(t,n,i){var r=n[1],u=n[0],d=r-u;return t===r&&i?t:((t-u)%d+d)%d+u}function D(){return!1}function Z(t,n){if(n===!1)return t;var i=Math.pow(10,n===void 0?6:n);return Math.round(t*i)/i}function J(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function I(t){return J(t).split(/\s+/)}function T(t,n){Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?p(t.options):{});for(var i in n)t.options[i]=n[i];return t.options}function R(t,n,i){var r=[];for(var u in t)r.push(encodeURIComponent(i?u.toUpperCase():u)+"="+encodeURIComponent(t[u]));return(!n||n.indexOf("?")===-1?"?":"&")+r.join("&")}var F=/\{ *([\w_ -]+) *\}/g;function V(t,n){return t.replace(F,function(i,r){var u=n[r];if(u===void 0)throw new Error("No value provided for variable "+i);return typeof u=="function"&&(u=u(n)),u})}var Q=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};function _t(t,n){for(var i=0;i<t.length;i++)if(t[i]===n)return i;return-1}var bt="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function St(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var At=0;function Lt(t){var n=+new Date,i=Math.max(0,16-(n-At));return At=n+i,window.setTimeout(t,i)}var Ht=window.requestAnimationFrame||St("RequestAnimationFrame")||Lt,jt=window.cancelAnimationFrame||St("CancelAnimationFrame")||St("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function zt(t,n,i){if(i&&Ht===Lt)t.call(n);else return Ht.call(window,g(t,n))}function kt(t){t&&jt.call(window,t)}var se={__proto__:null,extend:f,create:p,bind:g,get lastId(){return E},stamp:S,throttle:U,wrapNum:C,falseFn:D,formatNum:Z,trim:J,splitWords:I,setOptions:T,getParamString:R,template:V,isArray:Q,indexOf:_t,emptyImageUrl:bt,requestFn:Ht,cancelFn:jt,requestAnimFrame:zt,cancelAnimFrame:kt};function ae(){}ae.extend=function(t){var n=function(){T(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},i=n.__super__=this.prototype,r=p(i);r.constructor=n,n.prototype=r;for(var u in this)Object.prototype.hasOwnProperty.call(this,u)&&u!=="prototype"&&u!=="__super__"&&(n[u]=this[u]);return t.statics&&f(n,t.statics),t.includes&&(kn(t.includes),f.apply(null,[r].concat(t.includes))),f(r,t),delete r.statics,delete r.includes,r.options&&(r.options=i.options?p(i.options):{},f(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){i.callInitHooks&&i.callInitHooks.call(this),this._initHooksCalled=!0;for(var d=0,b=r._initHooks.length;d<b;d++)r._initHooks[d].call(this)}},n},ae.include=function(t){var n=this.prototype.options;return f(this.prototype,t),t.options&&(this.prototype.options=n,this.mergeOptions(t.options)),this},ae.mergeOptions=function(t){return f(this.prototype.options,t),this},ae.addInitHook=function(t){var n=Array.prototype.slice.call(arguments,1),i=typeof t=="function"?t:function(){this[t].apply(this,n)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};function kn(t){if(!(typeof L>"u"||!L||!L.Mixin)){t=Q(t)?t:[t];for(var n=0;n<t.length;n++)t[n]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",new Error().stack)}}var Ut={on:function(t,n,i){if(typeof t=="object")for(var r in t)this._on(r,t[r],n);else{t=I(t);for(var u=0,d=t.length;u<d;u++)this._on(t[u],n,i)}return this},off:function(t,n,i){if(!arguments.length)delete this._events;else if(typeof t=="object")for(var r in t)this._off(r,t[r],n);else{t=I(t);for(var u=arguments.length===1,d=0,b=t.length;d<b;d++)u?this._off(t[d]):this._off(t[d],n,i)}return this},_on:function(t,n,i,r){if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}if(this._listens(t,n,i)===!1){i===this&&(i=void 0);var u={fn:n,ctx:i};r&&(u.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(u)}},_off:function(t,n,i){var r,u,d;if(this._events&&(r=this._events[t],!!r)){if(arguments.length===1){if(this._firingCount)for(u=0,d=r.length;u<d;u++)r[u].fn=D;delete this._events[t];return}if(typeof n!="function"){console.warn("wrong listener type: "+typeof n);return}var b=this._listens(t,n,i);if(b!==!1){var x=r[b];this._firingCount&&(x.fn=D,this._events[t]=r=r.slice()),r.splice(b,1)}}},fire:function(t,n,i){if(!this.listens(t,i))return this;var r=f({},n,{type:t,target:this,sourceTarget:n&&n.sourceTarget||this});if(this._events){var u=this._events[t];if(u){this._firingCount=this._firingCount+1||1;for(var d=0,b=u.length;d<b;d++){var x=u[d],P=x.fn;x.once&&this.off(t,P,x.ctx),P.call(x.ctx||this,r)}this._firingCount--}}return i&&this._propagateEvent(r),this},listens:function(t,n,i,r){typeof t!="string"&&console.warn('"string" type argument expected');var u=n;typeof n!="function"&&(r=!!n,u=void 0,i=void 0);var d=this._events&&this._events[t];if(d&&d.length&&this._listens(t,u,i)!==!1)return!0;if(r){for(var b in this._eventParents)if(this._eventParents[b].listens(t,n,i,r))return!0}return!1},_listens:function(t,n,i){if(!this._events)return!1;var r=this._events[t]||[];if(!n)return!!r.length;i===this&&(i=void 0);for(var u=0,d=r.length;u<d;u++)if(r[u].fn===n&&r[u].ctx===i)return u;return!1},once:function(t,n,i){if(typeof t=="object")for(var r in t)this._on(r,t[r],n,!0);else{t=I(t);for(var u=0,d=t.length;u<d;u++)this._on(t[u],n,i,!0)}return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[S(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[S(t)],this},_propagateEvent:function(t){for(var n in this._eventParents)this._eventParents[n].fire(t.type,f({layer:t.target,propagatedFrom:t.target},t),!0)}};Ut.addEventListener=Ut.on,Ut.removeEventListener=Ut.clearAllEventListeners=Ut.off,Ut.addOneTimeEventListener=Ut.once,Ut.fireEvent=Ut.fire,Ut.hasEventListeners=Ut.listens;var ze=ae.extend(Ut);function nt(t,n,i){this.x=i?Math.round(t):t,this.y=i?Math.round(n):n}var $e=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};nt.prototype={clone:function(){return new nt(this.x,this.y)},add:function(t){return this.clone()._add(et(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(et(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new nt(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new nt(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=$e(this.x),this.y=$e(this.y),this},distanceTo:function(t){t=et(t);var n=t.x-this.x,i=t.y-this.y;return Math.sqrt(n*n+i*i)},equals:function(t){return t=et(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=et(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+Z(this.x)+", "+Z(this.y)+")"}};function et(t,n,i){return t instanceof nt?t:Q(t)?new nt(t[0],t[1]):t==null?t:typeof t=="object"&&"x"in t&&"y"in t?new nt(t.x,t.y):new nt(t,n,i)}function gt(t,n){if(t)for(var i=n?[t,n]:t,r=0,u=i.length;r<u;r++)this.extend(i[r])}gt.prototype={extend:function(t){var n,i;if(!t)return this;if(t instanceof nt||typeof t[0]=="number"||"x"in t)n=i=et(t);else if(t=xt(t),n=t.min,i=t.max,!n||!i)return this;return!this.min&&!this.max?(this.min=n.clone(),this.max=i.clone()):(this.min.x=Math.min(n.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(n.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)),this},getCenter:function(t){return et((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return et(this.min.x,this.max.y)},getTopRight:function(){return et(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,i;return typeof t[0]=="number"||t instanceof nt?t=et(t):t=xt(t),t instanceof gt?(n=t.min,i=t.max):n=i=t,n.x>=this.min.x&&i.x<=this.max.x&&n.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=xt(t);var n=this.min,i=this.max,r=t.min,u=t.max,d=u.x>=n.x&&r.x<=i.x,b=u.y>=n.y&&r.y<=i.y;return d&&b},overlaps:function(t){t=xt(t);var n=this.min,i=this.max,r=t.min,u=t.max,d=u.x>n.x&&r.x<i.x,b=u.y>n.y&&r.y<i.y;return d&&b},isValid:function(){return!!(this.min&&this.max)},pad:function(t){var n=this.min,i=this.max,r=Math.abs(n.x-i.x)*t,u=Math.abs(n.y-i.y)*t;return xt(et(n.x-r,n.y-u),et(i.x+r,i.y+u))},equals:function(t){return t?(t=xt(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight())):!1}};function xt(t,n){return!t||t instanceof gt?t:new gt(t,n)}function Bt(t,n){if(t)for(var i=n?[t,n]:t,r=0,u=i.length;r<u;r++)this.extend(i[r])}Bt.prototype={extend:function(t){var n=this._southWest,i=this._northEast,r,u;if(t instanceof $)r=t,u=t;else if(t instanceof Bt){if(r=t._southWest,u=t._northEast,!r||!u)return this}else return t?this.extend(K(t)||Ct(t)):this;return!n&&!i?(this._southWest=new $(r.lat,r.lng),this._northEast=new $(u.lat,u.lng)):(n.lat=Math.min(r.lat,n.lat),n.lng=Math.min(r.lng,n.lng),i.lat=Math.max(u.lat,i.lat),i.lng=Math.max(u.lng,i.lng)),this},pad:function(t){var n=this._southWest,i=this._northEast,r=Math.abs(n.lat-i.lat)*t,u=Math.abs(n.lng-i.lng)*t;return new Bt(new $(n.lat-r,n.lng-u),new $(i.lat+r,i.lng+u))},getCenter:function(){return new $((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new $(this.getNorth(),this.getWest())},getSouthEast:function(){return new $(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){typeof t[0]=="number"||t instanceof $||"lat"in t?t=K(t):t=Ct(t);var n=this._southWest,i=this._northEast,r,u;return t instanceof Bt?(r=t.getSouthWest(),u=t.getNorthEast()):r=u=t,r.lat>=n.lat&&u.lat<=i.lat&&r.lng>=n.lng&&u.lng<=i.lng},intersects:function(t){t=Ct(t);var n=this._southWest,i=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),d=u.lat>=n.lat&&r.lat<=i.lat,b=u.lng>=n.lng&&r.lng<=i.lng;return d&&b},overlaps:function(t){t=Ct(t);var n=this._southWest,i=this._northEast,r=t.getSouthWest(),u=t.getNorthEast(),d=u.lat>n.lat&&r.lat<i.lat,b=u.lng>n.lng&&r.lng<i.lng;return d&&b},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,n){return t?(t=Ct(t),this._southWest.equals(t.getSouthWest(),n)&&this._northEast.equals(t.getNorthEast(),n)):!1},isValid:function(){return!!(this._southWest&&this._northEast)}};function Ct(t,n){return t instanceof Bt?t:new Bt(t,n)}function $(t,n,i){if(isNaN(t)||isNaN(n))throw new Error("Invalid LatLng object: ("+t+", "+n+")");this.lat=+t,this.lng=+n,i!==void 0&&(this.alt=+i)}$.prototype={equals:function(t,n){if(!t)return!1;t=K(t);var i=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return i<=(n===void 0?1e-9:n)},toString:function(t){return"LatLng("+Z(this.lat,t)+", "+Z(this.lng,t)+")"},distanceTo:function(t){return It.distance(this,K(t))},wrap:function(){return It.wrapLatLng(this)},toBounds:function(t){var n=180*t/40075017,i=n/Math.cos(Math.PI/180*this.lat);return Ct([this.lat-n,this.lng-i],[this.lat+n,this.lng+i])},clone:function(){return new $(this.lat,this.lng,this.alt)}};function K(t,n,i){return t instanceof $?t:Q(t)&&typeof t[0]!="object"?t.length===3?new $(t[0],t[1],t[2]):t.length===2?new $(t[0],t[1]):null:t==null?t:typeof t=="object"&&"lat"in t?new $(t.lat,"lng"in t?t.lng:t.lon,t.alt):n===void 0?null:new $(t,n,i)}var Vt={latLngToPoint:function(t,n){var i=this.projection.project(t),r=this.scale(n);return this.transformation._transform(i,r)},pointToLatLng:function(t,n){var i=this.scale(n),r=this.transformation.untransform(t,i);return this.projection.unproject(r)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var n=this.projection.bounds,i=this.scale(t),r=this.transformation.transform(n.min,i),u=this.transformation.transform(n.max,i);return new gt(r,u)},infinite:!1,wrapLatLng:function(t){var n=this.wrapLng?C(t.lng,this.wrapLng,!0):t.lng,i=this.wrapLat?C(t.lat,this.wrapLat,!0):t.lat,r=t.alt;return new $(i,n,r)},wrapLatLngBounds:function(t){var n=t.getCenter(),i=this.wrapLatLng(n),r=n.lat-i.lat,u=n.lng-i.lng;if(r===0&&u===0)return t;var d=t.getSouthWest(),b=t.getNorthEast(),x=new $(d.lat-r,d.lng-u),P=new $(b.lat-r,b.lng-u);return new Bt(x,P)}},It=f({},Vt,{wrapLng:[-180,180],R:6371e3,distance:function(t,n){var i=Math.PI/180,r=t.lat*i,u=n.lat*i,d=Math.sin((n.lat-t.lat)*i/2),b=Math.sin((n.lng-t.lng)*i/2),x=d*d+Math.cos(r)*Math.cos(u)*b*b,P=2*Math.atan2(Math.sqrt(x),Math.sqrt(1-x));return this.R*P}}),Wt=6378137,Xe={R:Wt,MAX_LATITUDE:85.0511287798,project:function(t){var n=Math.PI/180,i=this.MAX_LATITUDE,r=Math.max(Math.min(i,t.lat),-i),u=Math.sin(r*n);return new nt(this.R*t.lng*n,this.R*Math.log((1+u)/(1-u))/2)},unproject:function(t){var n=180/Math.PI;return new $((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*n,t.x*n/this.R)},bounds:function(){var t=Wt*Math.PI;return new gt([-t,-t],[t,t])}()};function Qe(t,n,i,r){if(Q(t)){this._a=t[0],this._b=t[1],this._c=t[2],this._d=t[3];return}this._a=t,this._b=n,this._c=i,this._d=r}Qe.prototype={transform:function(t,n){return this._transform(t.clone(),n)},_transform:function(t,n){return n=n||1,t.x=n*(this._a*t.x+this._b),t.y=n*(this._c*t.y+this._d),t},untransform:function(t,n){return n=n||1,new nt((t.x/n-this._b)/this._a,(t.y/n-this._d)/this._c)}};function Jt(t,n,i,r){return new Qe(t,n,i,r)}var tn=f({},It,{code:"EPSG:3857",projection:Xe,transformation:function(){var t=.5/(Math.PI*Xe.R);return Jt(t,.5,-t,.5)}()}),ii=f({},tn,{code:"EPSG:900913"});function en(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function ln(t,n){var i="",r,u,d,b,x,P;for(r=0,d=t.length;r<d;r++){for(x=t[r],u=0,b=x.length;u<b;u++)P=x[u],i+=(u?"L":"M")+P.x+" "+P.y;i+=n?B.svg?"z":"x":""}return i||"M0 0"}var nn=document.documentElement.style,Te="ActiveXObject"in window,rn=Te&&!document.addEventListener,Ln="msLaunchUri"in navigator&&!("documentMode"in document),fn=G("webkit"),dn=G("android"),ye=G("android 2")||G("android 3"),En=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),mt=dn&&G("Google")&&En<537&&!("AudioNode"in window),pn=!!window.opera,mn=!Ln&&G("chrome"),Mn=G("gecko")&&!fn&&!pn&&!Te,On=!mn&&G("safari"),Dn=G("phantom"),An="OTransition"in nn,In=navigator.platform.indexOf("Win")===0,on=Te&&"transition"in nn,Be="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!ye,vt="MozPerspective"in nn,_n=!window.L_DISABLE_3D&&(on||Be||vt)&&!An&&!Dn,be=typeof orientation<"u"||G("mobile"),ri=be&&fn,Se=be&&Be,Gt=!window.PointerEvent&&window.MSPointerEvent,ee=!!(window.PointerEvent||Gt),we="ontouchstart"in window||!!window.TouchEvent,oi=!window.L_NO_TOUCH&&(we||ee),m=be&&pn,v=be&&Mn,w=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,k=function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",D,n),window.removeEventListener("testPassiveEventSupport",D,n)}catch{}return t}(),z=function(){return!!document.createElement("canvas").getContext}(),H=!!(document.createElementNS&&en("svg").createSVGRect),rt=!!H&&function(){var t=document.createElement("div");return t.innerHTML="<svg/>",(t.firstChild&&t.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"}(),q=!H&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var n=t.firstChild;return n.style.behavior="url(#default#VML)",n&&typeof n.adj=="object"}catch{return!1}}(),st=navigator.platform.indexOf("Mac")===0,Y=navigator.platform.indexOf("Linux")===0;function G(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var B={ie:Te,ielt9:rn,edge:Ln,webkit:fn,android:dn,android23:ye,androidStock:mt,opera:pn,chrome:mn,gecko:Mn,safari:On,phantom:Dn,opera12:An,win:In,ie3d:on,webkit3d:Be,gecko3d:vt,any3d:_n,mobile:be,mobileWebkit:ri,mobileWebkit3d:Se,msPointer:Gt,pointer:ee,touch:oi,touchNative:we,mobileOpera:m,mobileGecko:v,retina:w,passiveEvents:k,canvas:z,svg:H,vml:q,inlineSvg:rt,mac:st,linux:Y},$t=B.msPointer?"MSPointerDown":"pointerdown",Ft=B.msPointer?"MSPointerMove":"pointermove",ke=B.msPointer?"MSPointerUp":"pointerup",xe=B.msPointer?"MSPointerCancel":"pointercancel",sn={touchstart:$t,touchmove:Ft,touchend:ke,touchcancel:xe},ne={touchstart:ci,touchmove:zn,touchend:zn,touchcancel:zn},Le={},Rn=!1;function si(t,n,i){return n==="touchstart"&&ui(),ne[n]?(i=ne[n].bind(this,i),t.addEventListener(sn[n],i,!1),i):(console.warn("wrong event specified:",n),D)}function gn(t,n,i){if(!sn[n]){console.warn("wrong event specified:",n);return}t.removeEventListener(sn[n],i,!1)}function vn(t){Le[t.pointerId]=t}function ai(t){Le[t.pointerId]&&(Le[t.pointerId]=t)}function Nn(t){delete Le[t.pointerId]}function ui(){Rn||(document.addEventListener($t,vn,!0),document.addEventListener(Ft,ai,!0),document.addEventListener(ke,Nn,!0),document.addEventListener(xe,Nn,!0),Rn=!0)}function zn(t,n){if(n.pointerType!==(n.MSPOINTER_TYPE_MOUSE||"mouse")){n.touches=[];for(var i in Le)n.touches.push(Le[i]);n.changedTouches=[n],t(n)}}function ci(t,n){n.MSPOINTER_TYPE_TOUCH&&n.pointerType===n.MSPOINTER_TYPE_TOUCH&&Rt(n),zn(t,n)}function Cr(t){var n={},i,r;for(r in t)i=t[r],n[r]=i&&i.bind?i.bind(t):i;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}var Pr=200;function Tr(t,n){t.addEventListener("dblclick",n);var i=0,r;function u(d){if(d.detail!==1){r=d.detail;return}if(!(d.pointerType==="mouse"||d.sourceCapabilities&&!d.sourceCapabilities.firesTouchEvents)){var b=Un(d);if(!(b.some(function(P){return P instanceof HTMLLabelElement&&P.attributes.for})&&!b.some(function(P){return P instanceof HTMLInputElement||P instanceof HTMLSelectElement}))){var x=Date.now();x-i<=Pr?(r++,r===2&&n(Cr(d))):r=1,i=x}}}return t.addEventListener("click",u),{dblclick:n,simDblclick:u}}function Sr(t,n){t.removeEventListener("dblclick",n.dblclick),t.removeEventListener("click",n.simDblclick)}var hi=Fn(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Xt=Fn(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),li=Xt==="webkitTransition"||Xt==="OTransition"?Xt+"End":"transitionend";function Ee(t){return typeof t=="string"?document.getElementById(t):t}function Fe(t,n){var i=t.style[n]||t.currentStyle&&t.currentStyle[n];if((!i||i==="auto")&&document.defaultView){var r=document.defaultView.getComputedStyle(t,null);i=r?r[n]:null}return i==="auto"?null:i}function lt(t,n,i){var r=document.createElement(t);return r.className=n||"",i&&i.appendChild(r),r}function wt(t){var n=t.parentNode;n&&n.removeChild(t)}function Bn(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function an(t){var n=t.parentNode;n&&n.lastChild!==t&&n.appendChild(t)}function Me(t){var n=t.parentNode;n&&n.firstChild!==t&&n.insertBefore(t,n.firstChild)}function fi(t,n){if(t.classList!==void 0)return t.classList.contains(n);var i=Oe(t);return i.length>0&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(i)}function at(t,n){if(t.classList!==void 0)for(var i=I(n),r=0,u=i.length;r<u;r++)t.classList.add(i[r]);else if(!fi(t,n)){var d=Oe(t);un(t,(d?d+" ":"")+n)}}function Pt(t,n){t.classList!==void 0?t.classList.remove(n):un(t,J((" "+Oe(t)+" ").replace(" "+n+" "," ")))}function un(t,n){t.className.baseVal===void 0?t.className=n:t.className.baseVal=n}function Oe(t){return t.correspondingElement&&(t=t.correspondingElement),t.className.baseVal===void 0?t.className:t.className.baseVal}function ie(t,n){"opacity"in t.style?t.style.opacity=n:"filter"in t.style&&yn(t,n)}function yn(t,n){var i=!1,r="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(r)}catch{if(n===1)return}n=Math.round(n*100),i?(i.Enabled=n!==100,i.Opacity=n):t.style.filter+=" progid:"+r+"(opacity="+n+")"}function Fn(t){for(var n=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in n)return t[i];return!1}function Ze(t,n,i){var r=n||new nt(0,0);t.style[hi]=(B.ie3d?"translate("+r.x+"px,"+r.y+"px)":"translate3d("+r.x+"px,"+r.y+"px,0)")+(i?" scale("+i+")":"")}function Et(t,n){t._leaflet_pos=n,B.any3d?Ze(t,n):(t.style.left=n.x+"px",t.style.top=n.y+"px")}function He(t){return t._leaflet_pos||new nt(0,0)}var bn,wn,di;if("onselectstart"in document)bn=function(){ot(window,"selectstart",Rt)},wn=function(){yt(window,"selectstart",Rt)};else{var je=Fn(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);bn=function(){if(je){var t=document.documentElement.style;di=t[je],t[je]="none"}},wn=function(){je&&(document.documentElement.style[je]=di,di=void 0)}}function Ce(){ot(window,"dragstart",Rt)}function pi(){yt(window,"dragstart",Rt)}var Zn,mi;function _i(t){for(;t.tabIndex===-1;)t=t.parentNode;t.style&&(xn(),Zn=t,mi=t.style.outlineStyle,t.style.outlineStyle="none",ot(window,"keydown",xn))}function xn(){Zn&&(Zn.style.outlineStyle=mi,Zn=void 0,mi=void 0,yt(window,"keydown",xn))}function Ri(t){do t=t.parentNode;while((!t.offsetWidth||!t.offsetHeight)&&t!==document.body);return t}function Hn(t){var n=t.getBoundingClientRect();return{x:n.width/t.offsetWidth||1,y:n.height/t.offsetHeight||1,boundingClientRect:n}}var kr={__proto__:null,TRANSFORM:hi,TRANSITION:Xt,TRANSITION_END:li,get:Ee,getStyle:Fe,create:lt,remove:wt,empty:Bn,toFront:an,toBack:Me,hasClass:fi,addClass:at,removeClass:Pt,setClass:un,getClass:Oe,setOpacity:ie,testProp:Fn,setTransform:Ze,setPosition:Et,getPosition:He,get disableTextSelection(){return bn},get enableTextSelection(){return wn},disableImageDrag:Ce,enableImageDrag:pi,preventOutline:_i,restoreOutline:xn,getSizedParentNode:Ri,getScale:Hn};function ot(t,n,i,r){if(n&&typeof n=="object")for(var u in n)vi(t,u,n[u],i);else{n=I(n);for(var d=0,b=n.length;d<b;d++)vi(t,n[d],i,r)}return this}var pe="_leaflet_events";function yt(t,n,i,r){if(arguments.length===1)Ni(t),delete t[pe];else if(n&&typeof n=="object")for(var u in n)yi(t,u,n[u],i);else if(n=I(n),arguments.length===2)Ni(t,function(x){return _t(n,x)!==-1});else for(var d=0,b=n.length;d<b;d++)yi(t,n[d],i,r);return this}function Ni(t,n){for(var i in t[pe]){var r=i.split(/\d/)[0];(!n||n(r))&&yi(t,r,null,null,i)}}var gi={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function vi(t,n,i,r){var u=n+S(i)+(r?"_"+S(r):"");if(t[pe]&&t[pe][u])return this;var d=function(x){return i.call(r||t,x||window.event)},b=d;!B.touchNative&&B.pointer&&n.indexOf("touch")===0?d=si(t,n,d):B.touch&&n==="dblclick"?d=Tr(t,d):"addEventListener"in t?n==="touchstart"||n==="touchmove"||n==="wheel"||n==="mousewheel"?t.addEventListener(gi[n]||n,d,B.passiveEvents?{passive:!1}:!1):n==="mouseenter"||n==="mouseleave"?(d=function(x){x=x||window.event,Wn(t,x)&&b(x)},t.addEventListener(gi[n],d,!1)):t.addEventListener(n,b,!1):t.attachEvent("on"+n,d),t[pe]=t[pe]||{},t[pe][u]=d}function yi(t,n,i,r,u){u=u||n+S(i)+(r?"_"+S(r):"");var d=t[pe]&&t[pe][u];if(!d)return this;!B.touchNative&&B.pointer&&n.indexOf("touch")===0?gn(t,n,d):B.touch&&n==="dblclick"?Sr(t,d):"removeEventListener"in t?t.removeEventListener(gi[n]||n,d,!1):t.detachEvent("on"+n,d),t[pe][u]=null}function Ue(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function jn(t){return vi(t,"wheel",Ue),this}function Cn(t){return ot(t,"mousedown touchstart dblclick contextmenu",Ue),t._leaflet_disable_click=!0,this}function Rt(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function X(t){return Rt(t),Ue(t),this}function Un(t){if(t.composedPath)return t.composedPath();for(var n=[],i=t.target;i;)n.push(i),i=i.parentNode;return n}function Pn(t,n){if(!n)return new nt(t.clientX,t.clientY);var i=Hn(n),r=i.boundingClientRect;return new nt((t.clientX-r.left)/i.x-n.clientLeft,(t.clientY-r.top)/i.y-n.clientTop)}var Lr=B.linux&&B.chrome?window.devicePixelRatio:B.mac?window.devicePixelRatio*3:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function zi(t){return B.edge?t.wheelDeltaY/2:t.deltaY&&t.deltaMode===0?-t.deltaY/Lr:t.deltaY&&t.deltaMode===1?-t.deltaY*20:t.deltaY&&t.deltaMode===2?-t.deltaY*60:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?-t.detail*20:t.detail?t.detail/-32765*60:0}function Wn(t,n){var i=n.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch{return!1}return i!==t}var Er={__proto__:null,on:ot,off:yt,stopPropagation:Ue,disableScrollPropagation:jn,disableClickPropagation:Cn,preventDefault:Rt,stop:X,getPropagationPath:Un,getMousePosition:Pn,getWheelDelta:zi,isExternalTarget:Wn,addListener:ot,removeListener:yt},Bi=ze.extend({run:function(t,n,i,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=He(t),this._offset=n.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=zt(this._animate,this),this._step()},_step:function(t){var n=+new Date-this._startTime,i=this._duration*1e3;n<i?this._runFrame(this._easeOut(n/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,n){var i=this._startPos.add(this._offset.multiplyBy(t));n&&i._round(),Et(this._el,i),this.fire("step")},_complete:function(){kt(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),ct=ze.extend({options:{crs:tn,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,n){n=T(this,n),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=g(this._onResize,this),this._initEvents(),n.maxBounds&&this.setMaxBounds(n.maxBounds),n.zoom!==void 0&&(this._zoom=this._limitZoom(n.zoom)),n.center&&n.zoom!==void 0&&this.setView(K(n.center),n.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=Xt&&B.any3d&&!B.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),ot(this._proxy,li,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,n,i){if(n=n===void 0?this._zoom:this._limitZoom(n),t=this._limitCenter(K(t),n,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&i!==!0){i.animate!==void 0&&(i.zoom=f({animate:i.animate},i.zoom),i.pan=f({animate:i.animate,duration:i.duration},i.pan));var r=this._zoom!==n?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,n,i.zoom):this._tryAnimatedPan(t,i.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,n,i.pan&&i.pan.noMoveStart),this},setZoom:function(t,n){return this._loaded?this.setView(this.getCenter(),t,{zoom:n}):(this._zoom=t,this)},zoomIn:function(t,n){return t=t||(B.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,n)},zoomOut:function(t,n){return t=t||(B.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,n)},setZoomAround:function(t,n,i){var r=this.getZoomScale(n),u=this.getSize().divideBy(2),d=t instanceof nt?t:this.latLngToContainerPoint(t),b=d.subtract(u).multiplyBy(1-1/r),x=this.containerPointToLatLng(u.add(b));return this.setView(x,n,{zoom:i})},_getBoundsCenterZoom:function(t,n){n=n||{},t=t.getBounds?t.getBounds():Ct(t);var i=et(n.paddingTopLeft||n.padding||[0,0]),r=et(n.paddingBottomRight||n.padding||[0,0]),u=this.getBoundsZoom(t,!1,i.add(r));if(u=typeof n.maxZoom=="number"?Math.min(n.maxZoom,u):u,u===1/0)return{center:t.getCenter(),zoom:u};var d=r.subtract(i).divideBy(2),b=this.project(t.getSouthWest(),u),x=this.project(t.getNorthEast(),u),P=this.unproject(b.add(x).divideBy(2).add(d),u);return{center:P,zoom:u}},fitBounds:function(t,n){if(t=Ct(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,n);return this.setView(i.center,i.zoom,n)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,n){return this.setView(t,this._zoom,{pan:n})},panBy:function(t,n){if(t=et(t).round(),n=n||{},!t.x&&!t.y)return this.fire("moveend");if(n.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new Bi,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),n.noMoveStart||this.fire("movestart"),n.animate!==!1){at(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,n.duration||.25,n.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,n,i){if(i=i||{},i.animate===!1||!B.any3d)return this.setView(t,n,i);this._stop();var r=this.project(this.getCenter()),u=this.project(t),d=this.getSize(),b=this._zoom;t=K(t),n=n===void 0?b:n;var x=Math.max(d.x,d.y),P=x*this.getZoomScale(b,n),A=u.distanceTo(r)||1,W=1.42,tt=W*W;function ut(Mt){var sr=Mt?-1:1,Js=Mt?P:x,Gs=P*P-x*x+sr*tt*tt*A*A,Ks=2*Js*tt*A,Wr=Gs/Ks,zo=Math.sqrt(Wr*Wr+1)-Wr,$s=zo<1e-9?-18:Math.log(zo);return $s}function Qt(Mt){return(Math.exp(Mt)-Math.exp(-Mt))/2}function Zt(Mt){return(Math.exp(Mt)+Math.exp(-Mt))/2}function _e(Mt){return Qt(Mt)/Zt(Mt)}var re=ut(0);function Xn(Mt){return x*(Zt(re)/Zt(re+W*Mt))}function Ws(Mt){return x*(Zt(re)*_e(re+W*Mt)-Qt(re))/tt}function qs(Mt){return 1-Math.pow(1-Mt,1.5)}var Ys=Date.now(),Ro=(ut(1)-re)/W,Vs=i.duration?1e3*i.duration:1e3*Ro*.8;function No(){var Mt=(Date.now()-Ys)/Vs,sr=qs(Mt)*Ro;Mt<=1?(this._flyToFrame=zt(No,this),this._move(this.unproject(r.add(u.subtract(r).multiplyBy(Ws(sr)/A)),b),this.getScaleZoom(x/Xn(sr),b),{flyTo:!0})):this._move(t,n)._moveEnd(!0)}return this._moveStart(!0,i.noMoveStart),No.call(this),this},flyToBounds:function(t,n){var i=this._getBoundsCenterZoom(t,n);return this.flyTo(i.center,i.zoom,n)},setMaxBounds:function(t){return t=Ct(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var n=this.options.minZoom;return this.options.minZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var n=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&n!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,n){this._enforcingBounds=!0;var i=this.getCenter(),r=this._limitCenter(i,this._zoom,Ct(t));return i.equals(r)||this.panTo(r,n),this._enforcingBounds=!1,this},panInside:function(t,n){n=n||{};var i=et(n.paddingTopLeft||n.padding||[0,0]),r=et(n.paddingBottomRight||n.padding||[0,0]),u=this.project(this.getCenter()),d=this.project(t),b=this.getPixelBounds(),x=xt([b.min.add(i),b.max.subtract(r)]),P=x.getSize();if(!x.contains(d)){this._enforcingBounds=!0;var A=d.subtract(x.getCenter()),W=x.extend(d).getSize().subtract(P);u.x+=A.x<0?-W.x:W.x,u.y+=A.y<0?-W.y:W.y,this.panTo(this.unproject(u),n),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=f({animate:!1,pan:!0},t===!0?{animate:!0}:t);var n=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=n.divideBy(2).round(),u=i.divideBy(2).round(),d=r.subtract(u);return!d.x&&!d.y?this:(t.animate&&t.pan?this.panBy(d):(t.pan&&this._rawPanBy(d),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(g(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:n,newSize:i}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=f({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var n=g(this._handleGeolocationResponse,this),i=g(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(n,i,t):navigator.geolocation.getCurrentPosition(n,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var n=t.code,i=t.message||(n===1?"permission denied":n===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:n,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var n=t.coords.latitude,i=t.coords.longitude,r=new $(n,i),u=r.toBounds(t.coords.accuracy*2),d=this._locateOptions;if(d.setView){var b=this.getBoundsZoom(u);this.setView(r,d.maxZoom?Math.min(b,d.maxZoom):b)}var x={latlng:r,bounds:u,timestamp:t.timestamp};for(var P in t.coords)typeof t.coords[P]=="number"&&(x[P]=t.coords[P]);this.fire("locationfound",x)}},addHandler:function(t,n){if(!n)return this;var i=this[t]=new n(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),wt(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(kt(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var t;for(t in this._layers)this._layers[t].remove();for(t in this._panes)wt(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,n){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=lt("div",i,n||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),n=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new Bt(n,i)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,n,i){t=Ct(t),i=et(i||[0,0]);var r=this.getZoom()||0,u=this.getMinZoom(),d=this.getMaxZoom(),b=t.getNorthWest(),x=t.getSouthEast(),P=this.getSize().subtract(i),A=xt(this.project(x,r),this.project(b,r)).getSize(),W=B.any3d?this.options.zoomSnap:1,tt=P.x/A.x,ut=P.y/A.y,Qt=n?Math.max(tt,ut):Math.min(tt,ut);return r=this.getScaleZoom(Qt,r),W&&(r=Math.round(r/(W/100))*(W/100),r=n?Math.ceil(r/W)*W:Math.floor(r/W)*W),Math.max(u,Math.min(d,r))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new nt(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,n){var i=this._getTopLeftPoint(t,n);return new gt(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(t===void 0?this.getZoom():t)},getPane:function(t){return typeof t=="string"?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,n){var i=this.options.crs;return n=n===void 0?this._zoom:n,i.scale(t)/i.scale(n)},getScaleZoom:function(t,n){var i=this.options.crs;n=n===void 0?this._zoom:n;var r=i.zoom(t*i.scale(n));return isNaN(r)?1/0:r},project:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.latLngToPoint(K(t),n)},unproject:function(t,n){return n=n===void 0?this._zoom:n,this.options.crs.pointToLatLng(et(t),n)},layerPointToLatLng:function(t){var n=et(t).add(this.getPixelOrigin());return this.unproject(n)},latLngToLayerPoint:function(t){var n=this.project(K(t))._round();return n._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(K(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(Ct(t))},distance:function(t,n){return this.options.crs.distance(K(t),K(n))},containerPointToLayerPoint:function(t){return et(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return et(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var n=this.containerPointToLayerPoint(et(t));return this.layerPointToLatLng(n)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(K(t)))},mouseEventToContainerPoint:function(t){return Pn(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var n=this._container=Ee(t);if(n){if(n._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");ot(n,"scroll",this._onScroll,this),this._containerId=S(n)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&B.any3d,at(t,"leaflet-container"+(B.touch?" leaflet-touch":"")+(B.retina?" leaflet-retina":"")+(B.ielt9?" leaflet-oldie":"")+(B.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var n=Fe(t,"position");n!=="absolute"&&n!=="relative"&&n!=="fixed"&&n!=="sticky"&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Et(this._mapPane,new nt(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(at(t.markerPane,"leaflet-zoom-hide"),at(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,n,i){Et(this._mapPane,new nt(0,0));var r=!this._loaded;this._loaded=!0,n=this._limitZoom(n),this.fire("viewprereset");var u=this._zoom!==n;this._moveStart(u,i)._move(t,n)._moveEnd(u),this.fire("viewreset"),r&&this.fire("load")},_moveStart:function(t,n){return t&&this.fire("zoomstart"),n||this.fire("movestart"),this},_move:function(t,n,i,r){n===void 0&&(n=this._zoom);var u=this._zoom!==n;return this._zoom=n,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),r?i&&i.pinch&&this.fire("zoom",i):((u||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return kt(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Et(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[S(this._container)]=this;var n=t?yt:ot;n(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&n(window,"resize",this._onResize,this),B.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){kt(this._resizeRequest),this._resizeRequest=zt(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,n){for(var i=[],r,u=n==="mouseout"||n==="mouseover",d=t.target||t.srcElement,b=!1;d;){if(r=this._targets[S(d)],r&&(n==="click"||n==="preclick")&&this._draggableMoved(r)){b=!0;break}if(r&&r.listens(n,!0)&&(u&&!Wn(d,t)||(i.push(r),u))||d===this._container)break;d=d.parentNode}return!i.length&&!b&&!u&&this.listens(n,!0)&&(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var n=t.target||t.srcElement;if(!(!this._loaded||n._leaflet_disable_events||t.type==="click"&&this._isClickDisabled(n))){var i=t.type;i==="mousedown"&&_i(n),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,n,i){if(t.type==="click"){var r=f({},t);r.type="preclick",this._fireDOMEvent(r,r.type,i)}var u=this._findEventTargets(t,n);if(i){for(var d=[],b=0;b<i.length;b++)i[b].listens(n,!0)&&d.push(i[b]);u=d.concat(u)}if(u.length){n==="contextmenu"&&Rt(t);var x=u[0],P={originalEvent:t};if(t.type!=="keypress"&&t.type!=="keydown"&&t.type!=="keyup"){var A=x.getLatLng&&(!x._radius||x._radius<=10);P.containerPoint=A?this.latLngToContainerPoint(x.getLatLng()):this.mouseEventToContainerPoint(t),P.layerPoint=this.containerPointToLayerPoint(P.containerPoint),P.latlng=A?x.getLatLng():this.layerPointToLatLng(P.layerPoint)}for(b=0;b<u.length;b++)if(u[b].fire(n,P,!0),P.originalEvent._stopped||u[b].options.bubblingMouseEvents===!1&&_t(this._mouseEvents,n)!==-1)return}},_draggableMoved:function(t){return t=t.dragging&&t.dragging.enabled()?t:this,t.dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,n=this._handlers.length;t<n;t++)this._handlers[t].disable()},whenReady:function(t,n){return this._loaded?t.call(n||this,{target:this}):this.on("load",t,n),this},_getMapPanePos:function(){return He(this._mapPane)||new nt(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,n){var i=t&&n!==void 0?this._getNewPixelOrigin(t,n):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,n){var i=this.getSize()._divideBy(2);return this.project(t,n)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,n,i){var r=this._getNewPixelOrigin(i,n);return this.project(t,n)._subtract(r)},_latLngBoundsToNewLayerBounds:function(t,n,i){var r=this._getNewPixelOrigin(i,n);return xt([this.project(t.getSouthWest(),n)._subtract(r),this.project(t.getNorthWest(),n)._subtract(r),this.project(t.getSouthEast(),n)._subtract(r),this.project(t.getNorthEast(),n)._subtract(r)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,n,i){if(!i)return t;var r=this.project(t,n),u=this.getSize().divideBy(2),d=new gt(r.subtract(u),r.add(u)),b=this._getBoundsOffset(d,i,n);return Math.abs(b.x)<=1&&Math.abs(b.y)<=1?t:this.unproject(r.add(b),n)},_limitOffset:function(t,n){if(!n)return t;var i=this.getPixelBounds(),r=new gt(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(r,n))},_getBoundsOffset:function(t,n,i){var r=xt(this.project(n.getNorthEast(),i),this.project(n.getSouthWest(),i)),u=r.min.subtract(t.min),d=r.max.subtract(t.max),b=this._rebound(u.x,-d.x),x=this._rebound(u.y,-d.y);return new nt(b,x)},_rebound:function(t,n){return t+n>0?Math.round(t-n)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(n))},_limitZoom:function(t){var n=this.getMinZoom(),i=this.getMaxZoom(),r=B.any3d?this.options.zoomSnap:1;return r&&(t=Math.round(t/r)*r),Math.max(n,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){Pt(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,n){var i=this._getCenterOffset(t)._trunc();return(n&&n.animate)!==!0&&!this.getSize().contains(i)?!1:(this.panBy(i,n),!0)},_createAnimProxy:function(){var t=this._proxy=lt("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(n){var i=hi,r=this._proxy.style[i];Ze(this._proxy,this.project(n.center,n.zoom),this.getZoomScale(n.zoom,1)),r===this._proxy.style[i]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){wt(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),n=this.getZoom();Ze(this._proxy,this.project(t,n),this.getZoomScale(n,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,n,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||i.animate===!1||this._nothingToAnimate()||Math.abs(n-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(n),u=this._getCenterOffset(t)._divideBy(1-1/r);return i.animate!==!0&&!this.getSize().contains(u)?!1:(zt(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,n,!0)},this),!0)},_animateZoom:function(t,n,i,r){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=n,at(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:n,noUpdate:r}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(g(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&Pt(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Mr(t,n){return new ct(t,n)}var ue=ae.extend({options:{position:"topright"},initialize:function(t){T(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var n=this._map;return n&&n.removeControl(this),this.options.position=t,n&&n.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var n=this._container=this.onAdd(t),i=this.getPosition(),r=t._controlCorners[i];return at(n,"leaflet-control"),i.indexOf("bottom")!==-1?r.insertBefore(n,r.firstChild):r.appendChild(n),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(wt(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),qn=function(t){return new ue(t)};ct.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},n="leaflet-",i=this._controlContainer=lt("div",n+"control-container",this._container);function r(u,d){var b=n+u+" "+n+d;t[u+d]=lt("div",b,i)}r("top","left"),r("top","right"),r("bottom","left"),r("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)wt(this._controlCorners[t]);wt(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var Fi=ue.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,n,i,r){return i<r?-1:r<i?1:0}},initialize:function(t,n,i){T(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1;for(var r in t)this._addLayer(t[r],r);for(r in n)this._addLayer(n[r],r,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var n=0;n<this._layers.length;n++)this._layers[n].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return ue.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,n){return this._addLayer(t,n),this._map?this._update():this},addOverlay:function(t,n){return this._addLayer(t,n,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var n=this._getLayer(S(t));return n&&this._layers.splice(this._layers.indexOf(n),1),this._map?this._update():this},expand:function(){at(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(at(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):Pt(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return Pt(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",n=this._container=lt("div",t),i=this.options.collapsed;n.setAttribute("aria-haspopup",!0),Cn(n),jn(n);var r=this._section=lt("section",t+"-list");i&&(this._map.on("click",this.collapse,this),ot(n,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var u=this._layersLink=lt("a",t+"-toggle",n);u.href="#",u.title="Layers",u.setAttribute("role","button"),ot(u,{keydown:function(d){d.keyCode===13&&this._expandSafely()},click:function(d){Rt(d),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=lt("div",t+"-base",r),this._separator=lt("div",t+"-separator",r),this._overlaysList=lt("div",t+"-overlays",r),n.appendChild(r)},_getLayer:function(t){for(var n=0;n<this._layers.length;n++)if(this._layers[n]&&S(this._layers[n].layer)===t)return this._layers[n]},_addLayer:function(t,n,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:n,overlay:i}),this.options.sortLayers&&this._layers.sort(g(function(r,u){return this.options.sortFunction(r.layer,u.layer,r.name,u.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;Bn(this._baseLayersList),Bn(this._overlaysList),this._layerControlInputs=[];var t,n,i,r,u=0;for(i=0;i<this._layers.length;i++)r=this._layers[i],this._addItem(r),n=n||r.overlay,t=t||!r.overlay,u+=r.overlay?0:1;return this.options.hideSingleBase&&(t=t&&u>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=n&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var n=this._getLayer(S(t.target)),i=n.overlay?t.type==="add"?"overlayadd":"overlayremove":t.type==="add"?"baselayerchange":null;i&&this._map.fire(i,n)},_createRadioElement:function(t,n){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(n?' checked="checked"':"")+"/>",r=document.createElement("div");return r.innerHTML=i,r.firstChild},_addItem:function(t){var n=document.createElement("label"),i=this._map.hasLayer(t.layer),r;t.overlay?(r=document.createElement("input"),r.type="checkbox",r.className="leaflet-control-layers-selector",r.defaultChecked=i):r=this._createRadioElement("leaflet-base-layers_"+S(this),i),this._layerControlInputs.push(r),r.layerId=S(t.layer),ot(r,"click",this._onInputClick,this);var u=document.createElement("span");u.innerHTML=" "+t.name;var d=document.createElement("span");n.appendChild(d),d.appendChild(r),d.appendChild(u);var b=t.overlay?this._overlaysList:this._baseLayersList;return b.appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t=this._layerControlInputs,n,i,r=[],u=[];this._handlingClick=!0;for(var d=t.length-1;d>=0;d--)n=t[d],i=this._getLayer(n.layerId).layer,n.checked?r.push(i):n.checked||u.push(i);for(d=0;d<u.length;d++)this._map.hasLayer(u[d])&&this._map.removeLayer(u[d]);for(d=0;d<r.length;d++)this._map.hasLayer(r[d])||this._map.addLayer(r[d]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t=this._layerControlInputs,n,i,r=this._map.getZoom(),u=t.length-1;u>=0;u--)n=t[u],i=this._getLayer(n.layerId).layer,n.disabled=i.options.minZoom!==void 0&&r<i.options.minZoom||i.options.maxZoom!==void 0&&r>i.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ot(t,"click",Rt),this.expand();var n=this;setTimeout(function(){yt(t,"click",Rt),n._preventClick=!1})}}),Or=function(t,n,i){return new Fi(t,n,i)},Zi=ue.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var n="leaflet-control-zoom",i=lt("div",n+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,n+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,n+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,n,i,r,u){var d=lt("a",i,r);return d.innerHTML=t,d.href="#",d.title=n,d.setAttribute("role","button"),d.setAttribute("aria-label",n),Cn(d),ot(d,"click",X),ot(d,"click",u,this),ot(d,"click",this._refocusOnMap,this),d},_updateDisabled:function(){var t=this._map,n="leaflet-disabled";Pt(this._zoomInButton,n),Pt(this._zoomOutButton,n),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(at(this._zoomOutButton,n),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(at(this._zoomInButton,n),this._zoomInButton.setAttribute("aria-disabled","true"))}});ct.mergeOptions({zoomControl:!0}),ct.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Zi,this.addControl(this.zoomControl))});var Dr=function(t){return new Zi(t)},Hi=ue.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var n="leaflet-control-scale",i=lt("div",n),r=this.options;return this._addScales(r,n+"-line",i),t.on(r.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,n,i){t.metric&&(this._mScale=lt("div",n,i)),t.imperial&&(this._iScale=lt("div",n,i))},_update:function(){var t=this._map,n=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,n]),t.containerPointToLatLng([this.options.maxWidth,n]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var n=this._getRoundNum(t),i=n<1e3?n+" m":n/1e3+" km";this._updateScale(this._mScale,i,n/t)},_updateImperial:function(t){var n=t*3.2808399,i,r,u;n>5280?(i=n/5280,r=this._getRoundNum(i),this._updateScale(this._iScale,r+" mi",r/i)):(u=this._getRoundNum(n),this._updateScale(this._iScale,u+" ft",u/n))},_updateScale:function(t,n,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=n},_getRoundNum:function(t){var n=Math.pow(10,(Math.floor(t)+"").length-1),i=t/n;return i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1,n*i}}),ji=function(t){return new Hi(t)},Ar='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',bi=ue.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(B.inlineSvg?Ar+" ":"")+"Leaflet</a>"},initialize:function(t){T(this,t),this._attributions={}},onAdd:function(t){t.attributionControl=this,this._container=lt("div","leaflet-control-attribution"),Cn(this._container);for(var n in t._layers)t._layers[n].getAttribution&&this.addAttribution(t._layers[n].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var n in this._attributions)this._attributions[n]&&t.push(n);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' <span aria-hidden="true">|</span> ')}}});ct.mergeOptions({attributionControl:!0}),ct.addInitHook(function(){this.options.attributionControl&&new bi().addTo(this)});var Ir=function(t){return new bi(t)};ue.Layers=Fi,ue.Zoom=Zi,ue.Scale=Hi,ue.Attribution=bi,qn.layers=Or,qn.zoom=Dr,qn.scale=ji,qn.attribution=Ir;var me=ae.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});me.addTo=function(t,n){return t.addHandler(n,this),this};var Rr={Events:Ut},wi=B.touch?"touchstart mousedown":"mousedown",De=ze.extend({options:{clickTolerance:3},initialize:function(t,n,i,r){T(this,r),this._element=t,this._dragStartTarget=n||t,this._preventOutline=i},enable:function(){this._enabled||(ot(this._dragStartTarget,wi,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(De._dragging===this&&this.finishDrag(!0),yt(this._dragStartTarget,wi,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!fi(this._element,"leaflet-zoom-anim"))){if(t.touches&&t.touches.length!==1){De._dragging===this&&this.finishDrag();return}if(!(De._dragging||t.shiftKey||t.which!==1&&t.button!==1&&!t.touches)&&(De._dragging=this,this._preventOutline&&_i(this._element),Ce(),bn(),!this._moving)){this.fire("down");var n=t.touches?t.touches[0]:t,i=Ri(this._element);this._startPoint=new nt(n.clientX,n.clientY),this._startPos=He(this._element),this._parentScale=Hn(i);var r=t.type==="mousedown";ot(document,r?"mousemove":"touchmove",this._onMove,this),ot(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var n=t.touches&&t.touches.length===1?t.touches[0]:t,i=new nt(n.clientX,n.clientY)._subtract(this._startPoint);!i.x&&!i.y||Math.abs(i.x)+Math.abs(i.y)<this.options.clickTolerance||(i.x/=this._parentScale.x,i.y/=this._parentScale.y,Rt(t),this._moved||(this.fire("dragstart"),this._moved=!0,at(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),at(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(i),this._moving=!0,this._lastEvent=t,this._updatePosition())}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Et(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){Pt(document.body,"leaflet-dragging"),this._lastTarget&&(Pt(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),yt(document,"mousemove touchmove",this._onMove,this),yt(document,"mouseup touchend touchcancel",this._onUp,this),pi(),wn();var n=this._moved&&this._moving;this._moving=!1,De._dragging=!1,n&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function Ui(t,n,i){var r,u=[1,4,2,8],d,b,x,P,A,W,tt,ut;for(d=0,W=t.length;d<W;d++)t[d]._code=y(t[d],n);for(x=0;x<4;x++){for(tt=u[x],r=[],d=0,W=t.length,b=W-1;d<W;b=d++)P=t[d],A=t[b],P._code&tt?A._code&tt||(ut=_(A,P,tt,n,i),ut._code=y(ut,n),r.push(ut)):(A._code&tt&&(ut=_(A,P,tt,n,i),ut._code=y(ut,n),r.push(ut)),r.push(P));t=r}return t}function Wi(t,n){var i,r,u,d,b,x,P,A,W;if(!t||t.length===0)throw new Error("latlngs not passed");j(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var tt=K([0,0]),ut=Ct(t),Qt=ut.getNorthWest().distanceTo(ut.getSouthWest())*ut.getNorthEast().distanceTo(ut.getNorthWest());Qt<1700&&(tt=xi(t));var Zt=t.length,_e=[];for(i=0;i<Zt;i++){var re=K(t[i]);_e.push(n.project(K([re.lat-tt.lat,re.lng-tt.lng])))}for(x=P=A=0,i=0,r=Zt-1;i<Zt;r=i++)u=_e[i],d=_e[r],b=u.y*d.x-d.y*u.x,P+=(u.x+d.x)*b,A+=(u.y+d.y)*b,x+=b*3;x===0?W=_e[0]:W=[P/x,A/x];var Xn=n.unproject(et(W));return K([Xn.lat+tt.lat,Xn.lng+tt.lng])}function xi(t){for(var n=0,i=0,r=0,u=0;u<t.length;u++){var d=K(t[u]);n+=d.lat,i+=d.lng,r++}return K([n/r,i/r])}var Nr={__proto__:null,clipPolygon:Ui,polygonCenter:Wi,centroid:xi};function qi(t,n){if(!n||!t.length)return t.slice();var i=n*n;return t=h(t,i),t=Ci(t,i),t}function Yi(t,n,i){return Math.sqrt(N(t,n,i,!0))}function Nt(t,n,i){return N(t,n,i)}function Ci(t,n){var i=t.length,r=typeof Uint8Array!=void 0+""?Uint8Array:Array,u=new r(i);u[0]=u[i-1]=1,Pi(t,u,n,0,i-1);var d,b=[];for(d=0;d<i;d++)u[d]&&b.push(t[d]);return b}function Pi(t,n,i,r,u){var d=0,b,x,P;for(x=r+1;x<=u-1;x++)P=N(t[x],t[r],t[u],!0),P>d&&(b=x,d=P);d>i&&(n[b]=1,Pi(t,n,i,r,b),Pi(t,n,i,b,u))}function h(t,n){for(var i=[t[0]],r=1,u=0,d=t.length;r<d;r++)M(t[r],t[u])>n&&(i.push(t[r]),u=r);return u<d-1&&i.push(t[d-1]),i}var o;function c(t,n,i,r,u){var d=r?o:y(t,i),b=y(n,i),x,P,A;for(o=b;;){if(!(d|b))return[t,n];if(d&b)return!1;x=d||b,P=_(t,n,x,i,u),A=y(P,i),x===d?(t=P,d=A):(n=P,b=A)}}function _(t,n,i,r,u){var d=n.x-t.x,b=n.y-t.y,x=r.min,P=r.max,A,W;return i&8?(A=t.x+d*(P.y-t.y)/b,W=P.y):i&4?(A=t.x+d*(x.y-t.y)/b,W=x.y):i&2?(A=P.x,W=t.y+b*(P.x-t.x)/d):i&1&&(A=x.x,W=t.y+b*(x.x-t.x)/d),new nt(A,W,u)}function y(t,n){var i=0;return t.x<n.min.x?i|=1:t.x>n.max.x&&(i|=2),t.y<n.min.y?i|=4:t.y>n.max.y&&(i|=8),i}function M(t,n){var i=n.x-t.x,r=n.y-t.y;return i*i+r*r}function N(t,n,i,r){var u=n.x,d=n.y,b=i.x-u,x=i.y-d,P=b*b+x*x,A;return P>0&&(A=((t.x-u)*b+(t.y-d)*x)/P,A>1?(u=i.x,d=i.y):A>0&&(u+=b*A,d+=x*A)),b=t.x-u,x=t.y-d,r?b*b+x*x:new nt(u,d)}function j(t){return!Q(t[0])||typeof t[0][0]!="object"&&typeof t[0][0]<"u"}function it(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),j(t)}function ht(t,n){var i,r,u,d,b,x,P,A;if(!t||t.length===0)throw new Error("latlngs not passed");j(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var W=K([0,0]),tt=Ct(t),ut=tt.getNorthWest().distanceTo(tt.getSouthWest())*tt.getNorthEast().distanceTo(tt.getNorthWest());ut<1700&&(W=xi(t));var Qt=t.length,Zt=[];for(i=0;i<Qt;i++){var _e=K(t[i]);Zt.push(n.project(K([_e.lat-W.lat,_e.lng-W.lng])))}for(i=0,r=0;i<Qt-1;i++)r+=Zt[i].distanceTo(Zt[i+1])/2;if(r===0)A=Zt[0];else for(i=0,d=0;i<Qt-1;i++)if(b=Zt[i],x=Zt[i+1],u=b.distanceTo(x),d+=u,d>r){P=(d-r)/u,A=[x.x-P*(x.x-b.x),x.y-P*(x.y-b.y)];break}var re=n.unproject(et(A));return K([re.lat+W.lat,re.lng+W.lng])}var dt={__proto__:null,simplify:qi,pointToSegmentDistance:Yi,closestPointOnSegment:Nt,clipSegment:c,_getEdgeIntersection:_,_getBitCode:y,_sqClosestPointOnSegment:N,isFlat:j,_flat:it,polylineCenter:ht},Tt={project:function(t){return new nt(t.lng,t.lat)},unproject:function(t){return new $(t.y,t.x)},bounds:new gt([-180,-90],[180,90])},cn={R:6378137,R_MINOR:6356752314245179e-9,bounds:new gt([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(t){var n=Math.PI/180,i=this.R,r=t.lat*n,u=this.R_MINOR/i,d=Math.sqrt(1-u*u),b=d*Math.sin(r),x=Math.tan(Math.PI/4-r/2)/Math.pow((1-b)/(1+b),d/2);return r=-i*Math.log(Math.max(x,1e-10)),new nt(t.lng*n*i,r)},unproject:function(t){for(var n=180/Math.PI,i=this.R,r=this.R_MINOR/i,u=Math.sqrt(1-r*r),d=Math.exp(-t.y/i),b=Math.PI/2-2*Math.atan(d),x=0,P=.1,A;x<15&&Math.abs(P)>1e-7;x++)A=u*Math.sin(b),A=Math.pow((1-A)/(1+A),u/2),P=Math.PI/2-2*Math.atan(d*A)-b,b+=P;return new $(b*n,t.x*n/i)}},zr={__proto__:null,LonLat:Tt,Mercator:cn,SphericalMercator:Xe},Vi=f({},It,{code:"EPSG:3395",projection:cn,transformation:function(){var t=.5/(Math.PI*cn.R);return Jt(t,.5,-t,.5)}()}),Ji=f({},It,{code:"EPSG:4326",projection:Tt,transformation:Jt(1/180,1,-1/180,.5)}),Gi=f({},Vt,{projection:Tt,transformation:Jt(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,n){var i=n.lng-t.lng,r=n.lat-t.lat;return Math.sqrt(i*i+r*r)},infinite:!0});Vt.Earth=It,Vt.EPSG3395=Vi,Vt.EPSG3857=tn,Vt.EPSG900913=ii,Vt.EPSG4326=Ji,Vt.Simple=Gi;var ce=ze.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[S(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[S(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var n=t.target;if(n.hasLayer(this)){if(this._map=n,this._zoomAnimated=n._zoomAnimated,this.getEvents){var i=this.getEvents();n.on(i,this),this.once("remove",function(){n.off(i,this)},this)}this.onAdd(n),this.fire("add"),n.fire("layeradd",{layer:this})}}});ct.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var n=S(t);return this._layers[n]?this:(this._layers[n]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var n=S(t);return this._layers[n]?(this._loaded&&t.onRemove(this),delete this._layers[n],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return S(t)in this._layers},eachLayer:function(t,n){for(var i in this._layers)t.call(n,this._layers[i]);return this},_addLayers:function(t){t=t?Q(t)?t:[t]:[];for(var n=0,i=t.length;n<i;n++)this.addLayer(t[n])},_addZoomLimit:function(t){(!isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[S(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var n=S(t);this._zoomBoundLayers[n]&&(delete this._zoomBoundLayers[n],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,n=-1/0,i=this._getZoomSpan();for(var r in this._zoomBoundLayers){var u=this._zoomBoundLayers[r].options;t=u.minZoom===void 0?t:Math.min(t,u.minZoom),n=u.maxZoom===void 0?n:Math.max(n,u.maxZoom)}this._layersMaxZoom=n===-1/0?void 0:n,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),this.options.maxZoom===void 0&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var We=ce.extend({initialize:function(t,n){T(this,n),this._layers={};var i,r;if(t)for(i=0,r=t.length;i<r;i++)this.addLayer(t[i])},addLayer:function(t){var n=this.getLayerId(t);return this._layers[n]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var n=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[n]&&this._map.removeLayer(this._layers[n]),delete this._layers[n],this},hasLayer:function(t){var n=typeof t=="number"?t:this.getLayerId(t);return n in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var n=Array.prototype.slice.call(arguments,1),i,r;for(i in this._layers)r=this._layers[i],r[t]&&r[t].apply(r,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,n){for(var i in this._layers)t.call(n,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return S(t)}}),Br=function(t,n){return new We(t,n)},Pe=We.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),We.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),We.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new Bt;for(var n in this._layers){var i=this._layers[n];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ki=function(t,n){return new Pe(t,n)},qe=ae.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){T(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,n){var i=this._getIconUrl(t);if(!i){if(t==="icon")throw new Error("iconUrl not set in Icon options (see the docs).");return null}var r=this._createImg(i,n&&n.tagName==="IMG"?n:null);return this._setIconStyles(r,t),(this.options.crossOrigin||this.options.crossOrigin==="")&&(r.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),r},_setIconStyles:function(t,n){var i=this.options,r=i[n+"Size"];typeof r=="number"&&(r=[r,r]);var u=et(r),d=et(n==="shadow"&&i.shadowAnchor||i.iconAnchor||u&&u.divideBy(2,!0));t.className="leaflet-marker-"+n+" "+(i.className||""),d&&(t.style.marginLeft=-d.x+"px",t.style.marginTop=-d.y+"px"),u&&(t.style.width=u.x+"px",t.style.height=u.y+"px")},_createImg:function(t,n){return n=n||document.createElement("img"),n.src=t,n},_getIconUrl:function(t){return B.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function $i(t){return new qe(t)}var Ye=qe.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return typeof Ye.imagePath!="string"&&(Ye.imagePath=this._detectIconPath()),(this.options.imagePath||Ye.imagePath)+qe.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var n=function(i,r,u){var d=r.exec(i);return d&&d[u]};return t=n(t,/^url\((['"])?(.+)\1\)$/,2),t&&n(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=lt("div","leaflet-default-icon-path",document.body),n=Fe(t,"background-image")||Fe(t,"backgroundImage");if(document.body.removeChild(t),n=this._stripUrl(n),n)return n;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),Yn=me.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new De(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),at(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&Pt(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var n=this._marker,i=n._map,r=this._marker.options.autoPanSpeed,u=this._marker.options.autoPanPadding,d=He(n._icon),b=i.getPixelBounds(),x=i.getPixelOrigin(),P=xt(b.min._subtract(x).add(u),b.max._subtract(x).subtract(u));if(!P.contains(d)){var A=et((Math.max(P.max.x,d.x)-P.max.x)/(b.max.x-P.max.x)-(Math.min(P.min.x,d.x)-P.min.x)/(b.min.x-P.min.x),(Math.max(P.max.y,d.y)-P.max.y)/(b.max.y-P.max.y)-(Math.min(P.min.y,d.y)-P.min.y)/(b.min.y-P.min.y)).multiplyBy(r);i.panBy(A,{animate:!1}),this._draggable._newPos._add(A),this._draggable._startPos._add(A),Et(n._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=zt(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(kt(this._panRequest),this._panRequest=zt(this._adjustPan.bind(this,t)))},_onDrag:function(t){var n=this._marker,i=n._shadow,r=He(n._icon),u=n._map.layerPointToLatLng(r);i&&Et(i,r),n._latlng=u,t.latlng=u,t.oldLatLng=this._oldLatLng,n.fire("move",t).fire("drag",t)},_onDragEnd:function(t){kt(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Tn=ce.extend({options:{icon:new Ye,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,n){T(this,n),this._latlng=K(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var n=this._latlng;return this._latlng=K(t),this.update(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,n="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),r=!1;i!==this._icon&&(this._icon&&this._removeIcon(),r=!0,t.title&&(i.title=t.title),i.tagName==="IMG"&&(i.alt=t.alt||"")),at(i,n),t.keyboard&&(i.tabIndex="0",i.setAttribute("role","button")),this._icon=i,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&ot(i,"focus",this._panOnFocus,this);var u=t.icon.createShadow(this._shadow),d=!1;u!==this._shadow&&(this._removeShadow(),d=!0),u&&(at(u,n),u.alt=""),this._shadow=u,t.opacity<1&&this._updateOpacity(),r&&this.getPane().appendChild(this._icon),this._initInteraction(),u&&d&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&yt(this._icon,"focus",this._panOnFocus,this),wt(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&wt(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Et(this._icon,t),this._shadow&&Et(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(n)},_initInteraction:function(){if(this.options.interactive&&(at(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Yn)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Yn(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&ie(this._icon,t),this._shadow&&ie(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var n=this.options.icon.options,i=n.iconSize?et(n.iconSize):et(0,0),r=n.iconAnchor?et(n.iconAnchor):et(0,0);t.panInside(this._latlng,{paddingTopLeft:r,paddingBottomRight:i.subtract(r)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function Fr(t,n){return new Tn(t,n)}var Ae=ce.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return T(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),Vn=Ae.extend({options:{fill:!0,radius:10},initialize:function(t,n){T(this,n),this._latlng=K(t),this._radius=this.options.radius},setLatLng:function(t){var n=this._latlng;return this._latlng=K(t),this.redraw(),this.fire("move",{oldLatLng:n,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var n=t&&t.radius||this._radius;return Ae.prototype.setStyle.call(this,t),this.setRadius(n),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,n=this._radiusY||t,i=this._clickTolerance(),r=[t+i,n+i];this._pxBounds=new gt(this._point.subtract(r),this._point.add(r))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function Zr(t,n){return new Vn(t,n)}var Jn=Vn.extend({initialize:function(t,n,i){if(typeof n=="number"&&(n=f({},i,{radius:n})),T(this,n),this._latlng=K(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new Bt(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ae.prototype.setStyle,_project:function(){var t=this._latlng.lng,n=this._latlng.lat,i=this._map,r=i.options.crs;if(r.distance===It.distance){var u=Math.PI/180,d=this._mRadius/It.R/u,b=i.project([n+d,t]),x=i.project([n-d,t]),P=b.add(x).divideBy(2),A=i.unproject(P).lat,W=Math.acos((Math.cos(d*u)-Math.sin(n*u)*Math.sin(A*u))/(Math.cos(n*u)*Math.cos(A*u)))/u;(isNaN(W)||W===0)&&(W=d/Math.cos(Math.PI/180*n)),this._point=P.subtract(i.getPixelOrigin()),this._radius=isNaN(W)?0:P.x-i.project([A,t-W]).x,this._radiusY=P.y-b.y}else{var tt=r.unproject(r.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(tt).x}this._updateBounds()}});function Ls(t,n,i){return new Jn(t,n,i)}var Ve=Ae.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,n){T(this,n),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var n=1/0,i=null,r=N,u,d,b=0,x=this._parts.length;b<x;b++)for(var P=this._parts[b],A=1,W=P.length;A<W;A++){u=P[A-1],d=P[A];var tt=r(t,u,d,!0);tt<n&&(n=tt,i=r(t,u,d))}return i&&(i.distance=Math.sqrt(n)),i},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return ht(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,n){return n=n||this._defaultShape(),t=K(t),n.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new Bt,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return j(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var n=[],i=j(t),r=0,u=t.length;r<u;r++)i?(n[r]=K(t[r]),this._bounds.extend(n[r])):n[r]=this._convertLatLngs(t[r]);return n},_project:function(){var t=new gt;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),n=new nt(t,t);this._rawPxBounds&&(this._pxBounds=new gt([this._rawPxBounds.min.subtract(n),this._rawPxBounds.max.add(n)]))},_projectLatlngs:function(t,n,i){var r=t[0]instanceof $,u=t.length,d,b;if(r){for(b=[],d=0;d<u;d++)b[d]=this._map.latLngToLayerPoint(t[d]),i.extend(b[d]);n.push(b)}else for(d=0;d<u;d++)this._projectLatlngs(t[d],n,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}var n=this._parts,i,r,u,d,b,x,P;for(i=0,u=0,d=this._rings.length;i<d;i++)for(P=this._rings[i],r=0,b=P.length;r<b-1;r++)x=c(P[r],P[r+1],t,r,!0),x&&(n[u]=n[u]||[],n[u].push(x[0]),(x[1]!==P[r+1]||r===b-2)&&(n[u].push(x[1]),u++))}},_simplifyPoints:function(){for(var t=this._parts,n=this.options.smoothFactor,i=0,r=t.length;i<r;i++)t[i]=qi(t[i],n)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,n){var i,r,u,d,b,x,P=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,d=this._parts.length;i<d;i++)for(x=this._parts[i],r=0,b=x.length,u=b-1;r<b;u=r++)if(!(!n&&r===0)&&Yi(t,x[u],x[r])<=P)return!0;return!1}});function Es(t,n){return new Ve(t,n)}Ve._flat=it;var Gn=Ve.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Wi(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var n=Ve.prototype._convertLatLngs.call(this,t),i=n.length;return i>=2&&n[0]instanceof $&&n[0].equals(n[i-1])&&n.pop(),n},_setLatLngs:function(t){Ve.prototype._setLatLngs.call(this,t),j(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return j(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,n=this.options.weight,i=new nt(n,n);if(t=new gt(t.min.subtract(i),t.max.add(i)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(t))){if(this.options.noClip){this._parts=this._rings;return}for(var r=0,u=this._rings.length,d;r<u;r++)d=Ui(this._rings[r],t,!0),d.length&&this._parts.push(d)}},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var n=!1,i,r,u,d,b,x,P,A;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(d=0,P=this._parts.length;d<P;d++)for(i=this._parts[d],b=0,A=i.length,x=A-1;b<A;x=b++)r=i[b],u=i[x],r.y>t.y!=u.y>t.y&&t.x<(u.x-r.x)*(t.y-r.y)/(u.y-r.y)+r.x&&(n=!n);return n||Ve.prototype._containsPoint.call(this,t,!0)}});function Ms(t,n){return new Gn(t,n)}var Je=Pe.extend({initialize:function(t,n){T(this,n),this._layers={},t&&this.addData(t)},addData:function(t){var n=Q(t)?t:t.features,i,r,u;if(n){for(i=0,r=n.length;i<r;i++)u=n[i],(u.geometries||u.geometry||u.features||u.coordinates)&&this.addData(u);return this}var d=this.options;if(d.filter&&!d.filter(t))return this;var b=Xi(t,d);return b?(b.feature=er(t),b.defaultOptions=b.options,this.resetStyle(b),d.onEachFeature&&d.onEachFeature(t,b),this.addLayer(b)):this},resetStyle:function(t){return t===void 0?this.eachLayer(this.resetStyle,this):(t.options=f({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(n){this._setLayerStyle(n,t)},this)},_setLayerStyle:function(t,n){t.setStyle&&(typeof n=="function"&&(n=n(t.feature)),t.setStyle(n))}});function Xi(t,n){var i=t.type==="Feature"?t.geometry:t,r=i?i.coordinates:null,u=[],d=n&&n.pointToLayer,b=n&&n.coordsToLatLng||Hr,x,P,A,W;if(!r&&!i)return null;switch(i.type){case"Point":return x=b(r),go(d,t,x,n);case"MultiPoint":for(A=0,W=r.length;A<W;A++)x=b(r[A]),u.push(go(d,t,x,n));return new Pe(u);case"LineString":case"MultiLineString":return P=Qi(r,i.type==="LineString"?0:1,b),new Ve(P,n);case"Polygon":case"MultiPolygon":return P=Qi(r,i.type==="Polygon"?1:2,b),new Gn(P,n);case"GeometryCollection":for(A=0,W=i.geometries.length;A<W;A++){var tt=Xi({geometry:i.geometries[A],type:"Feature",properties:t.properties},n);tt&&u.push(tt)}return new Pe(u);case"FeatureCollection":for(A=0,W=i.features.length;A<W;A++){var ut=Xi(i.features[A],n);ut&&u.push(ut)}return new Pe(u);default:throw new Error("Invalid GeoJSON object.")}}function go(t,n,i,r){return t?t(n,i):new Tn(i,r&&r.markersInheritOptions&&r)}function Hr(t){return new $(t[1],t[0],t[2])}function Qi(t,n,i){for(var r=[],u=0,d=t.length,b;u<d;u++)b=n?Qi(t[u],n-1,i):(i||Hr)(t[u]),r.push(b);return r}function jr(t,n){return t=K(t),t.alt!==void 0?[Z(t.lng,n),Z(t.lat,n),Z(t.alt,n)]:[Z(t.lng,n),Z(t.lat,n)]}function tr(t,n,i,r){for(var u=[],d=0,b=t.length;d<b;d++)u.push(n?tr(t[d],j(t[d])?0:n-1,i,r):jr(t[d],r));return!n&&i&&u.length>0&&u.push(u[0].slice()),u}function Kn(t,n){return t.feature?f({},t.feature,{geometry:n}):er(n)}function er(t){return t.type==="Feature"||t.type==="FeatureCollection"?t:{type:"Feature",properties:{},geometry:t}}var Ur={toGeoJSON:function(t){return Kn(this,{type:"Point",coordinates:jr(this.getLatLng(),t)})}};Tn.include(Ur),Jn.include(Ur),Vn.include(Ur),Ve.include({toGeoJSON:function(t){var n=!j(this._latlngs),i=tr(this._latlngs,n?1:0,!1,t);return Kn(this,{type:(n?"Multi":"")+"LineString",coordinates:i})}}),Gn.include({toGeoJSON:function(t){var n=!j(this._latlngs),i=n&&!j(this._latlngs[0]),r=tr(this._latlngs,i?2:n?1:0,!0,t);return n||(r=[r]),Kn(this,{type:(i?"Multi":"")+"Polygon",coordinates:r})}}),We.include({toMultiPoint:function(t){var n=[];return this.eachLayer(function(i){n.push(i.toGeoJSON(t).geometry.coordinates)}),Kn(this,{type:"MultiPoint",coordinates:n})},toGeoJSON:function(t){var n=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(n==="MultiPoint")return this.toMultiPoint(t);var i=n==="GeometryCollection",r=[];return this.eachLayer(function(u){if(u.toGeoJSON){var d=u.toGeoJSON(t);if(i)r.push(d.geometry);else{var b=er(d);b.type==="FeatureCollection"?r.push.apply(r,b.features):r.push(b)}}}),i?Kn(this,{geometries:r,type:"GeometryCollection"}):{type:"FeatureCollection",features:r}}});function vo(t,n){return new Je(t,n)}var Os=vo,nr=ce.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,n,i){this._url=t,this._bounds=Ct(n),T(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(at(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){wt(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&an(this._image),this},bringToBack:function(){return this._map&&Me(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=Ct(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t=this._url.tagName==="IMG",n=this._image=t?this._url:lt("img");if(at(n,"leaflet-image-layer"),this._zoomAnimated&&at(n,"leaflet-zoom-animated"),this.options.className&&at(n,this.options.className),n.onselectstart=D,n.onmousemove=D,n.onload=g(this.fire,this,"load"),n.onerror=g(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(n.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=n.src;return}n.src=this._url,n.alt=this.options.alt},_animateZoom:function(t){var n=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Ze(this._image,i,n)},_reset:function(){var t=this._image,n=new gt(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=n.getSize();Et(t,n.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){ie(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ds=function(t,n,i){return new nr(t,n,i)},yo=nr.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t=this._url.tagName==="VIDEO",n=this._image=t?this._url:lt("video");if(at(n,"leaflet-image-layer"),this._zoomAnimated&&at(n,"leaflet-zoom-animated"),this.options.className&&at(n,this.options.className),n.onselectstart=D,n.onmousemove=D,n.onloadeddata=g(this.fire,this,"load"),t){for(var i=n.getElementsByTagName("source"),r=[],u=0;u<i.length;u++)r.push(i[u].src);this._url=i.length>0?r:[n.src];return}Q(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(n.style,"objectFit")&&(n.style.objectFit="fill"),n.autoplay=!!this.options.autoplay,n.loop=!!this.options.loop,n.muted=!!this.options.muted,n.playsInline=!!this.options.playsInline;for(var d=0;d<this._url.length;d++){var b=lt("source");b.src=this._url[d],n.appendChild(b)}}});function As(t,n,i){return new yo(t,n,i)}var bo=nr.extend({_initImage:function(){var t=this._image=this._url;at(t,"leaflet-image-layer"),this._zoomAnimated&&at(t,"leaflet-zoom-animated"),this.options.className&&at(t,this.options.className),t.onselectstart=D,t.onmousemove=D}});function Is(t,n,i){return new bo(t,n,i)}var Ie=ce.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,n){t&&(t instanceof $||Q(t))?(this._latlng=K(t),T(this,n)):(T(this,t),this._source=n),this.options.content&&(this._content=this.options.content)},openOn:function(t){return t=arguments.length?t:this._source._map,t.hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&ie(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&ie(this._container,1),this.bringToFront(),this.options.interactive&&(at(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(ie(this._container,0),this._removeTimeout=setTimeout(g(wt,void 0,this._container),200)):wt(this._container),this.options.interactive&&(Pt(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=K(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&an(this._container),this},bringToBack:function(){return this._map&&Me(this._container),this},_prepareOpen:function(t){var n=this._source;if(!n._map)return!1;if(n instanceof Pe){n=null;var i=this._source._layers;for(var r in i)if(i[r]._map){n=i[r];break}if(!n)return!1;this._source=n}if(!t)if(n.getCenter)t=n.getCenter();else if(n.getLatLng)t=n.getLatLng();else if(n.getBounds)t=n.getBounds().getCenter();else throw new Error("Unable to get source layer LatLng.");return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,n=typeof this._content=="function"?this._content(this._source||this):this._content;if(typeof n=="string")t.innerHTML=n;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(n)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),n=et(this.options.offset),i=this._getAnchor();this._zoomAnimated?Et(this._container,t.add(i)):n=n.add(t).add(i);var r=this._containerBottom=-n.y,u=this._containerLeft=-Math.round(this._containerWidth/2)+n.x;this._container.style.bottom=r+"px",this._container.style.left=u+"px"}},_getAnchor:function(){return[0,0]}});ct.include({_initOverlay:function(t,n,i,r){var u=n;return u instanceof t||(u=new t(r).setContent(n)),i&&u.setLatLng(i),u}}),ce.include({_initOverlay:function(t,n,i,r){var u=i;return u instanceof t?(T(u,r),u._source=this):(u=n&&!r?n:new t(r,this),u.setContent(i)),u}});var ir=Ie.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return t=arguments.length?t:this._source._map,!t.hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ie.prototype.openOn.call(this,t)},onAdd:function(t){Ie.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ae||this._source.on("preclick",Ue))},onRemove:function(t){Ie.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ae||this._source.off("preclick",Ue))},getEvents:function(){var t=Ie.prototype.getEvents.call(this);return(this.options.closeOnClick!==void 0?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",n=this._container=lt("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=lt("div",t+"-content-wrapper",n);if(this._contentNode=lt("div",t+"-content",i),Cn(n),jn(this._contentNode),ot(n,"contextmenu",Ue),this._tipContainer=lt("div",t+"-tip-container",n),this._tip=lt("div",t+"-tip",this._tipContainer),this.options.closeButton){var r=this._closeButton=lt("a",t+"-close-button",n);r.setAttribute("role","button"),r.setAttribute("aria-label","Close popup"),r.href="#close",r.innerHTML='<span aria-hidden="true">&#215;</span>',ot(r,"click",function(u){Rt(u),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,n=t.style;n.width="",n.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),n.width=i+1+"px",n.whiteSpace="",n.height="";var r=t.offsetHeight,u=this.options.maxHeight,d="leaflet-popup-scrolled";u&&r>u?(n.height=u+"px",at(t,d)):Pt(t,d),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();Et(this._container,n.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,n=parseInt(Fe(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+n,r=this._containerWidth,u=new nt(this._containerLeft,-i-this._containerBottom);u._add(He(this._container));var d=t.layerPointToContainerPoint(u),b=et(this.options.autoPanPadding),x=et(this.options.autoPanPaddingTopLeft||b),P=et(this.options.autoPanPaddingBottomRight||b),A=t.getSize(),W=0,tt=0;d.x+r+P.x>A.x&&(W=d.x+r-A.x+P.x),d.x-W-x.x<0&&(W=d.x-x.x),d.y+i+P.y>A.y&&(tt=d.y+i-A.y+P.y),d.y-tt-x.y<0&&(tt=d.y-x.y),(W||tt)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([W,tt]))}},_getAnchor:function(){return et(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Rs=function(t,n){return new ir(t,n)};ct.mergeOptions({closePopupOnClick:!0}),ct.include({openPopup:function(t,n,i){return this._initOverlay(ir,t,n,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),ce.include({bindPopup:function(t,n){return this._popup=this._initOverlay(ir,this._popup,t,n),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Pe||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(!(!this._popup||!this._map)){X(t);var n=t.layer||t.target;if(this._popup._source===n&&!(n instanceof Ae)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng);return}this._popup._source=n,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){t.originalEvent.keyCode===13&&this._openPopup(t)}});var rr=Ie.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ie.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ie.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ie.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip",n=t+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=lt("div",n),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+S(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var n,i,r=this._map,u=this._container,d=r.latLngToContainerPoint(r.getCenter()),b=r.layerPointToContainerPoint(t),x=this.options.direction,P=u.offsetWidth,A=u.offsetHeight,W=et(this.options.offset),tt=this._getAnchor();x==="top"?(n=P/2,i=A):x==="bottom"?(n=P/2,i=0):x==="center"?(n=P/2,i=A/2):x==="right"?(n=0,i=A/2):x==="left"?(n=P,i=A/2):b.x<d.x?(x="right",n=0,i=A/2):(x="left",n=P+(W.x+tt.x)*2,i=A/2),t=t.subtract(et(n,i,!0)).add(W).add(tt),Pt(u,"leaflet-tooltip-right"),Pt(u,"leaflet-tooltip-left"),Pt(u,"leaflet-tooltip-top"),Pt(u,"leaflet-tooltip-bottom"),at(u,"leaflet-tooltip-"+x),Et(u,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&ie(this._container,t)},_animateZoom:function(t){var n=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(n)},_getAnchor:function(){return et(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),Ns=function(t,n){return new rr(t,n)};ct.include({openTooltip:function(t,n,i){return this._initOverlay(rr,t,n,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),ce.include({bindTooltip:function(t,n){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(rr,this._tooltip,t,n),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(!(!t&&this._tooltipHandlersAdded)){var n=t?"off":"on",i={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?i.add=this._openTooltip:(i.mouseover=this._openTooltip,i.mouseout=this.closeTooltip,i.click=this._openTooltip,this._map?this._addFocusListeners():i.add=this._addFocusListeners),this._tooltip.options.sticky&&(i.mousemove=this._moveTooltip),this[n](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Pe||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var n=typeof t.getElement=="function"&&t.getElement();n&&(ot(n,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),ot(n,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var n=typeof t.getElement=="function"&&t.getElement();n&&n.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(!(!this._tooltip||!this._map)){if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var n=this;this._map.once("moveend",function(){n._openOnceFlag=!1,n._openTooltip(t)});return}this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)}},_moveTooltip:function(t){var n=t.latlng,i,r;this._tooltip.options.sticky&&t.originalEvent&&(i=this._map.mouseEventToContainerPoint(t.originalEvent),r=this._map.containerPointToLayerPoint(i),n=this._map.layerPointToLatLng(r)),this._tooltip.setLatLng(n)}});var wo=qe.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var n=t&&t.tagName==="DIV"?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(Bn(n),n.appendChild(i.html)):n.innerHTML=i.html!==!1?i.html:"",i.bgPos){var r=et(i.bgPos);n.style.backgroundPosition=-r.x+"px "+-r.y+"px"}return this._setIconStyles(n,"icon"),n},createShadow:function(){return null}});function zs(t){return new wo(t)}qe.Default=Ye;var Ti=ce.extend({options:{tileSize:256,opacity:1,updateWhenIdle:B.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){T(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),wt(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(an(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(Me(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=U(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof nt?t:new nt(t,t)},_updateZIndex:function(){this._container&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var n=this.getPane().children,i=-t(-1/0,1/0),r=0,u=n.length,d;r<u;r++)d=n[r].style.zIndex,n[r]!==this._container&&d&&(i=t(i,+d));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!B.ielt9){ie(this._container,this.options.opacity);var t=+new Date,n=!1,i=!1;for(var r in this._tiles){var u=this._tiles[r];if(!(!u.current||!u.loaded)){var d=Math.min(1,(t-u.loaded)/200);ie(u.el,d),d<1?n=!0:(u.active?i=!0:this._onOpaqueTile(u),u.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),n&&(kt(this._fadeFrame),this._fadeFrame=zt(this._updateOpacity,this))}},_onOpaqueTile:D,_initContainer:function(){this._container||(this._container=lt("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,n=this.options.maxZoom;if(t!==void 0){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=n-Math.abs(t-i),this._onUpdateLevel(i)):(wt(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var r=this._levels[t],u=this._map;return r||(r=this._levels[t]={},r.el=lt("div","leaflet-tile-container leaflet-zoom-animated",this._container),r.el.style.zIndex=n,r.origin=u.project(u.unproject(u.getPixelOrigin()),t).round(),r.zoom=t,this._setZoomTransform(r,u.getCenter(),u.getZoom()),D(r.el.offsetWidth),this._onCreateLevel(r)),this._level=r,r}},_onUpdateLevel:D,_onRemoveLevel:D,_onCreateLevel:D,_pruneTiles:function(){if(this._map){var t,n,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom){this._removeAllTiles();return}for(t in this._tiles)n=this._tiles[t],n.retain=n.current;for(t in this._tiles)if(n=this._tiles[t],n.current&&!n.active){var r=n.coords;this._retainParent(r.x,r.y,r.z,r.z-5)||this._retainChildren(r.x,r.y,r.z,r.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var n in this._tiles)this._tiles[n].coords.z===t&&this._removeTile(n)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)wt(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,n,i,r){var u=Math.floor(t/2),d=Math.floor(n/2),b=i-1,x=new nt(+u,+d);x.z=+b;var P=this._tileCoordsToKey(x),A=this._tiles[P];return A&&A.active?(A.retain=!0,!0):(A&&A.loaded&&(A.retain=!0),b>r?this._retainParent(u,d,b,r):!1)},_retainChildren:function(t,n,i,r){for(var u=2*t;u<2*t+2;u++)for(var d=2*n;d<2*n+2;d++){var b=new nt(u,d);b.z=i+1;var x=this._tileCoordsToKey(b),P=this._tiles[x];if(P&&P.active){P.retain=!0;continue}else P&&P.loaded&&(P.retain=!0);i+1<r&&this._retainChildren(u,d,i+1,r)}},_resetView:function(t){var n=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),n,n)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var n=this.options;return n.minNativeZoom!==void 0&&t<n.minNativeZoom?n.minNativeZoom:n.maxNativeZoom!==void 0&&n.maxNativeZoom<t?n.maxNativeZoom:t},_setView:function(t,n,i,r){var u=Math.round(n);this.options.maxZoom!==void 0&&u>this.options.maxZoom||this.options.minZoom!==void 0&&u<this.options.minZoom?u=void 0:u=this._clampZoom(u);var d=this.options.updateWhenZooming&&u!==this._tileZoom;(!r||d)&&(this._tileZoom=u,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),u!==void 0&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,n)},_setZoomTransforms:function(t,n){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,n)},_setZoomTransform:function(t,n,i){var r=this._map.getZoomScale(i,t.zoom),u=t.origin.multiplyBy(r).subtract(this._map._getNewPixelOrigin(n,i)).round();B.any3d?Ze(t.el,u,r):Et(t.el,u)},_resetGrid:function(){var t=this._map,n=t.options.crs,i=this._tileSize=this.getTileSize(),r=this._tileZoom,u=this._map.getPixelWorldBounds(this._tileZoom);u&&(this._globalTileRange=this._pxBoundsToTileRange(u)),this._wrapX=n.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,n.wrapLng[0]],r).x/i.x),Math.ceil(t.project([0,n.wrapLng[1]],r).x/i.y)],this._wrapY=n.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([n.wrapLat[0],0],r).y/i.x),Math.ceil(t.project([n.wrapLat[1],0],r).y/i.y)]},_onMoveEnd:function(){!this._map||this._map._animatingZoom||this._update()},_getTiledPixelBounds:function(t){var n=this._map,i=n._animatingZoom?Math.max(n._animateToZoom,n.getZoom()):n.getZoom(),r=n.getZoomScale(i,this._tileZoom),u=n.project(t,this._tileZoom).floor(),d=n.getSize().divideBy(r*2);return new gt(u.subtract(d),u.add(d))},_update:function(t){var n=this._map;if(n){var i=this._clampZoom(n.getZoom());if(t===void 0&&(t=n.getCenter()),this._tileZoom!==void 0){var r=this._getTiledPixelBounds(t),u=this._pxBoundsToTileRange(r),d=u.getCenter(),b=[],x=this.options.keepBuffer,P=new gt(u.getBottomLeft().subtract([x,-x]),u.getTopRight().add([x,-x]));if(!(isFinite(u.min.x)&&isFinite(u.min.y)&&isFinite(u.max.x)&&isFinite(u.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var A in this._tiles){var W=this._tiles[A].coords;(W.z!==this._tileZoom||!P.contains(new nt(W.x,W.y)))&&(this._tiles[A].current=!1)}if(Math.abs(i-this._tileZoom)>1){this._setView(t,i);return}for(var tt=u.min.y;tt<=u.max.y;tt++)for(var ut=u.min.x;ut<=u.max.x;ut++){var Qt=new nt(ut,tt);if(Qt.z=this._tileZoom,!!this._isValidTile(Qt)){var Zt=this._tiles[this._tileCoordsToKey(Qt)];Zt?Zt.current=!0:b.push(Qt)}}if(b.sort(function(re,Xn){return re.distanceTo(d)-Xn.distanceTo(d)}),b.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var _e=document.createDocumentFragment();for(ut=0;ut<b.length;ut++)this._addTile(b[ut],_e);this._level.el.appendChild(_e)}}}},_isValidTile:function(t){var n=this._map.options.crs;if(!n.infinite){var i=this._globalTileRange;if(!n.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!n.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var r=this._tileCoordsToBounds(t);return Ct(this.options.bounds).overlaps(r)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var n=this._map,i=this.getTileSize(),r=t.scaleBy(i),u=r.add(i),d=n.unproject(r,t.z),b=n.unproject(u,t.z);return[d,b]},_tileCoordsToBounds:function(t){var n=this._tileCoordsToNwSe(t),i=new Bt(n[0],n[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var n=t.split(":"),i=new nt(+n[0],+n[1]);return i.z=+n[2],i},_removeTile:function(t){var n=this._tiles[t];n&&(wt(n.el),delete this._tiles[t],this.fire("tileunload",{tile:n.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){at(t,"leaflet-tile");var n=this.getTileSize();t.style.width=n.x+"px",t.style.height=n.y+"px",t.onselectstart=D,t.onmousemove=D,B.ielt9&&this.options.opacity<1&&ie(t,this.options.opacity)},_addTile:function(t,n){var i=this._getTilePos(t),r=this._tileCoordsToKey(t),u=this.createTile(this._wrapCoords(t),g(this._tileReady,this,t));this._initTile(u),this.createTile.length<2&&zt(g(this._tileReady,this,t,null,u)),Et(u,i),this._tiles[r]={el:u,coords:t,current:!0},n.appendChild(u),this.fire("tileloadstart",{tile:u,coords:t})},_tileReady:function(t,n,i){n&&this.fire("tileerror",{error:n,tile:i,coords:t});var r=this._tileCoordsToKey(t);i=this._tiles[r],i&&(i.loaded=+new Date,this._map._fadeAnimated?(ie(i.el,0),kt(this._fadeFrame),this._fadeFrame=zt(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),n||(at(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),B.ielt9||!this._map._fadeAnimated?zt(this._pruneTiles,this):setTimeout(g(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var n=new nt(this._wrapX?C(t.x,this._wrapX):t.x,this._wrapY?C(t.y,this._wrapY):t.y);return n.z=t.z,n},_pxBoundsToTileRange:function(t){var n=this.getTileSize();return new gt(t.min.unscaleBy(n).floor(),t.max.unscaleBy(n).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Bs(t){return new Ti(t)}var $n=Ti.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,n){this._url=t,n=T(this,n),n.detectRetina&&B.retina&&n.maxZoom>0?(n.tileSize=Math.floor(n.tileSize/2),n.zoomReverse?(n.zoomOffset--,n.minZoom=Math.min(n.maxZoom,n.minZoom+1)):(n.zoomOffset++,n.maxZoom=Math.max(n.minZoom,n.maxZoom-1)),n.minZoom=Math.max(0,n.minZoom)):n.zoomReverse?n.minZoom=Math.min(n.maxZoom,n.minZoom):n.maxZoom=Math.max(n.minZoom,n.maxZoom),typeof n.subdomains=="string"&&(n.subdomains=n.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,n){return this._url===t&&n===void 0&&(n=!0),this._url=t,n||this.redraw(),this},createTile:function(t,n){var i=document.createElement("img");return ot(i,"load",g(this._tileOnLoad,this,n,i)),ot(i,"error",g(this._tileOnError,this,n,i)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(i.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var n={r:B.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(n.y=i),n["-y"]=i}return V(this._url,f(n,this.options))},_tileOnLoad:function(t,n){B.ielt9?setTimeout(g(t,this,null,n),0):t(null,n)},_tileOnError:function(t,n,i){var r=this.options.errorTileUrl;r&&n.getAttribute("src")!==r&&(n.src=r),t(i,n)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,n=this.options.maxZoom,i=this.options.zoomReverse,r=this.options.zoomOffset;return i&&(t=n-t),t+r},_getSubdomain:function(t){var n=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[n]},_abortLoading:function(){var t,n;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&(n=this._tiles[t].el,n.onload=D,n.onerror=D,!n.complete)){n.src=bt;var i=this._tiles[t].coords;wt(n),delete this._tiles[t],this.fire("tileabort",{tile:n,coords:i})}},_removeTile:function(t){var n=this._tiles[t];if(n)return n.el.setAttribute("src",bt),Ti.prototype._removeTile.call(this,t)},_tileReady:function(t,n,i){if(!(!this._map||i&&i.getAttribute("src")===bt))return Ti.prototype._tileReady.call(this,t,n,i)}});function xo(t,n){return new $n(t,n)}var Co=$n.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,n){this._url=t;var i=f({},this.defaultWmsParams);for(var r in n)r in this.options||(i[r]=n[r]);n=T(this,n);var u=n.detectRetina&&B.retina?2:1,d=this.getTileSize();i.width=d.x*u,i.height=d.y*u,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var n=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[n]=this._crs.code,$n.prototype.onAdd.call(this,t)},getTileUrl:function(t){var n=this._tileCoordsToNwSe(t),i=this._crs,r=xt(i.project(n[0]),i.project(n[1])),u=r.min,d=r.max,b=(this._wmsVersion>=1.3&&this._crs===Ji?[u.y,u.x,d.y,d.x]:[u.x,u.y,d.x,d.y]).join(","),x=$n.prototype.getTileUrl.call(this,t);return x+R(this.wmsParams,x,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+b},setParams:function(t,n){return f(this.wmsParams,t),n||this.redraw(),this}});function Fs(t,n){return new Co(t,n)}$n.WMS=Co,xo.wms=Fs;var Ge=ce.extend({options:{padding:.1},initialize:function(t){T(this,t),S(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),at(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,n){var i=this._map.getZoomScale(n,this._zoom),r=this._map.getSize().multiplyBy(.5+this.options.padding),u=this._map.project(this._center,n),d=r.multiplyBy(-i).add(u).subtract(this._map._getNewPixelOrigin(t,n));B.any3d?Ze(this._container,d,i):Et(this._container,d)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var t in this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,n=this._map.getSize(),i=this._map.containerPointToLayerPoint(n.multiplyBy(-t)).round();this._bounds=new gt(i,i.add(n.multiplyBy(1+t*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Po=Ge.extend({options:{tolerance:0},getEvents:function(){var t=Ge.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ge.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ot(t,"mousemove",this._onMouseMove,this),ot(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ot(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){kt(this._redrawRequest),delete this._ctx,wt(this._container),yt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var t;this._redrawBounds=null;for(var n in this._layers)t=this._layers[n],t._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ge.prototype._update.call(this);var t=this._bounds,n=this._container,i=t.getSize(),r=B.retina?2:1;Et(n,t.min),n.width=r*i.x,n.height=r*i.y,n.style.width=i.x+"px",n.style.height=i.y+"px",B.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ge.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[S(t)]=t;var n=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=n),this._drawLast=n,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var n=t._order,i=n.next,r=n.prev;i?i.prev=r:this._drawLast=r,r?r.next=i:this._drawFirst=i,delete t._order,delete this._layers[S(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if(typeof t.options.dashArray=="string"){var n=t.options.dashArray.split(/[, ]+/),i=[],r,u;for(u=0;u<n.length;u++){if(r=Number(n[u]),isNaN(r))return;i.push(r)}t.options._dashArray=i}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||zt(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var n=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new gt,this._redrawBounds.extend(t._pxBounds.min.subtract([n,n])),this._redrawBounds.extend(t._pxBounds.max.add([n,n]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var n=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,n.x,n.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,n=this._redrawBounds;if(this._ctx.save(),n){var i=n.getSize();this._ctx.beginPath(),this._ctx.rect(n.min.x,n.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var r=this._drawFirst;r;r=r.next)t=r.layer,(!n||t._pxBounds&&t._pxBounds.intersects(n))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,n){if(this._drawing){var i,r,u,d,b=t._parts,x=b.length,P=this._ctx;if(x){for(P.beginPath(),i=0;i<x;i++){for(r=0,u=b[i].length;r<u;r++)d=b[i][r],P[r?"lineTo":"moveTo"](d.x,d.y);n&&P.closePath()}this._fillStroke(P,t)}}},_updateCircle:function(t){if(!(!this._drawing||t._empty())){var n=t._point,i=this._ctx,r=Math.max(Math.round(t._radius),1),u=(Math.max(Math.round(t._radiusY),1)||r)/r;u!==1&&(i.save(),i.scale(1,u)),i.beginPath(),i.arc(n.x,n.y/u,r,0,Math.PI*2,!1),u!==1&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,n){var i=n.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&i.weight!==0&&(t.setLineDash&&t.setLineDash(n.options&&n.options._dashArray||[]),t.globalAlpha=i.opacity,t.lineWidth=i.weight,t.strokeStyle=i.color,t.lineCap=i.lineCap,t.lineJoin=i.lineJoin,t.stroke())},_onClick:function(t){for(var n=this._map.mouseEventToLayerPoint(t),i,r,u=this._drawFirst;u;u=u.next)i=u.layer,i.options.interactive&&i._containsPoint(n)&&(!(t.type==="click"||t.type==="preclick")||!this._map._draggableMoved(i))&&(r=i);this._fireEvent(r?[r]:!1,t)},_onMouseMove:function(t){if(!(!this._map||this._map.dragging.moving()||this._map._animatingZoom)){var n=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,n)}},_handleMouseOut:function(t){var n=this._hoveredLayer;n&&(Pt(this._container,"leaflet-interactive"),this._fireEvent([n],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,n){if(!this._mouseHoverThrottled){for(var i,r,u=this._drawFirst;u;u=u.next)i=u.layer,i.options.interactive&&i._containsPoint(n)&&(r=i);r!==this._hoveredLayer&&(this._handleMouseOut(t),r&&(at(this._container,"leaflet-interactive"),this._fireEvent([r],t,"mouseover"),this._hoveredLayer=r)),this._fireEvent(this._hoveredLayer?[this._hoveredLayer]:!1,t),this._mouseHoverThrottled=!0,setTimeout(g(function(){this._mouseHoverThrottled=!1},this),32)}},_fireEvent:function(t,n,i){this._map._fireDOMEvent(n,i||n.type,t)},_bringToFront:function(t){var n=t._order;if(n){var i=n.next,r=n.prev;if(i)i.prev=r;else return;r?r.next=i:i&&(this._drawFirst=i),n.prev=this._drawLast,this._drawLast.next=n,n.next=null,this._drawLast=n,this._requestRedraw(t)}},_bringToBack:function(t){var n=t._order;if(n){var i=n.next,r=n.prev;if(r)r.next=i;else return;i?i.prev=r:r&&(this._drawLast=r),n.prev=null,n.next=this._drawFirst,this._drawFirst.prev=n,this._drawFirst=n,this._requestRedraw(t)}}});function To(t){return B.canvas?new Po(t):null}var Si=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch{}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),Zs={_initContainer:function(){this._container=lt("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ge.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var n=t._container=Si("shape");at(n,"leaflet-vml-shape "+(this.options.className||"")),n.coordsize="1 1",t._path=Si("path"),n.appendChild(t._path),this._updateStyle(t),this._layers[S(t)]=t},_addPath:function(t){var n=t._container;this._container.appendChild(n),t.options.interactive&&t.addInteractiveTarget(n)},_removePath:function(t){var n=t._container;wt(n),t.removeInteractiveTarget(n),delete this._layers[S(t)]},_updateStyle:function(t){var n=t._stroke,i=t._fill,r=t.options,u=t._container;u.stroked=!!r.stroke,u.filled=!!r.fill,r.stroke?(n||(n=t._stroke=Si("stroke")),u.appendChild(n),n.weight=r.weight+"px",n.color=r.color,n.opacity=r.opacity,r.dashArray?n.dashStyle=Q(r.dashArray)?r.dashArray.join(" "):r.dashArray.replace(/( *, *)/g," "):n.dashStyle="",n.endcap=r.lineCap.replace("butt","flat"),n.joinstyle=r.lineJoin):n&&(u.removeChild(n),t._stroke=null),r.fill?(i||(i=t._fill=Si("fill")),u.appendChild(i),i.color=r.fillColor||r.color,i.opacity=r.fillOpacity):i&&(u.removeChild(i),t._fill=null)},_updateCircle:function(t){var n=t._point.round(),i=Math.round(t._radius),r=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+n.x+","+n.y+" "+i+","+r+" 0,"+65535*360)},_setPath:function(t,n){t._path.v=n},_bringToFront:function(t){an(t._container)},_bringToBack:function(t){Me(t._container)}},or=B.vml?Si:en,ki=Ge.extend({_initContainer:function(){this._container=or("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=or("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){wt(this._container),yt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){Ge.prototype._update.call(this);var t=this._bounds,n=t.getSize(),i=this._container;(!this._svgSize||!this._svgSize.equals(n))&&(this._svgSize=n,i.setAttribute("width",n.x),i.setAttribute("height",n.y)),Et(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,n.x,n.y].join(" ")),this.fire("update")}},_initPath:function(t){var n=t._path=or("path");t.options.className&&at(n,t.options.className),t.options.interactive&&at(n,"leaflet-interactive"),this._updateStyle(t),this._layers[S(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){wt(t._path),t.removeInteractiveTarget(t._path),delete this._layers[S(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var n=t._path,i=t.options;n&&(i.stroke?(n.setAttribute("stroke",i.color),n.setAttribute("stroke-opacity",i.opacity),n.setAttribute("stroke-width",i.weight),n.setAttribute("stroke-linecap",i.lineCap),n.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?n.setAttribute("stroke-dasharray",i.dashArray):n.removeAttribute("stroke-dasharray"),i.dashOffset?n.setAttribute("stroke-dashoffset",i.dashOffset):n.removeAttribute("stroke-dashoffset")):n.setAttribute("stroke","none"),i.fill?(n.setAttribute("fill",i.fillColor||i.color),n.setAttribute("fill-opacity",i.fillOpacity),n.setAttribute("fill-rule",i.fillRule||"evenodd")):n.setAttribute("fill","none"))},_updatePoly:function(t,n){this._setPath(t,ln(t._parts,n))},_updateCircle:function(t){var n=t._point,i=Math.max(Math.round(t._radius),1),r=Math.max(Math.round(t._radiusY),1)||i,u="a"+i+","+r+" 0 1,0 ",d=t._empty()?"M0 0":"M"+(n.x-i)+","+n.y+u+i*2+",0 "+u+-i*2+",0 ";this._setPath(t,d)},_setPath:function(t,n){t._path.setAttribute("d",n)},_bringToFront:function(t){an(t._path)},_bringToBack:function(t){Me(t._path)}});B.vml&&ki.include(Zs);function So(t){return B.svg||B.vml?new ki(t):null}ct.include({getRenderer:function(t){var n=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return n||(n=this._renderer=this._createRenderer()),this.hasLayer(n)||this.addLayer(n),n},_getPaneRenderer:function(t){if(t==="overlayPane"||t===void 0)return!1;var n=this._paneRenderers[t];return n===void 0&&(n=this._createRenderer({pane:t}),this._paneRenderers[t]=n),n},_createRenderer:function(t){return this.options.preferCanvas&&To(t)||So(t)}});var ko=Gn.extend({initialize:function(t,n){Gn.prototype.initialize.call(this,this._boundsToLatLngs(t),n)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return t=Ct(t),[t.getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function Hs(t,n){return new ko(t,n)}ki.create=or,ki.pointsToPath=ln,Je.geometryToLayer=Xi,Je.coordsToLatLng=Hr,Je.coordsToLatLngs=Qi,Je.latLngToCoords=jr,Je.latLngsToCoords=tr,Je.getFeature=Kn,Je.asFeature=er,ct.mergeOptions({boxZoom:!0});var Lo=me.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ot(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){yt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){wt(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||t.which!==1&&t.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),bn(),Ce(),this._startPoint=this._map.mouseEventToContainerPoint(t),ot(document,{contextmenu:X,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=lt("div","leaflet-zoom-box",this._container),at(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var n=new gt(this._point,this._startPoint),i=n.getSize();Et(this._box,n.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(wt(this._box),Pt(this._container,"leaflet-crosshair")),wn(),pi(),yt(document,{contextmenu:X,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if(!(t.which!==1&&t.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(g(this._resetState,this),0);var n=new Bt(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(n).fire("boxzoomend",{boxZoomBounds:n})}},_onKeyDown:function(t){t.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});ct.addInitHook("addHandler","boxZoom",Lo),ct.mergeOptions({doubleClickZoom:!0});var Eo=me.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var n=this._map,i=n.getZoom(),r=n.options.zoomDelta,u=t.originalEvent.shiftKey?i-r:i+r;n.options.doubleClickZoom==="center"?n.setZoom(u):n.setZoomAround(t.containerPoint,u)}});ct.addInitHook("addHandler","doubleClickZoom",Eo),ct.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var Mo=me.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new De(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}at(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){Pt(this._map._container,"leaflet-grab"),Pt(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var n=Ct(this._map.options.maxBounds);this._offsetLimit=xt(this._map.latLngToContainerPoint(n.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(n.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var n=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(n),this._prunePositions(n)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),n=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=n.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,n){return t-(t-n)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var t=this._draggable._newPos.subtract(this._draggable._startPos),n=this._offsetLimit;t.x<n.min.x&&(t.x=this._viscousLimit(t.x,n.min.x)),t.y<n.min.y&&(t.y=this._viscousLimit(t.y,n.min.y)),t.x>n.max.x&&(t.x=this._viscousLimit(t.x,n.max.x)),t.y>n.max.y&&(t.y=this._viscousLimit(t.y,n.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,n=Math.round(t/2),i=this._initialWorldOffset,r=this._draggable._newPos.x,u=(r-n+i)%t+n-i,d=(r+n+i)%t-n-i,b=Math.abs(u+i)<Math.abs(d+i)?u:d;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=b},_onDragEnd:function(t){var n=this._map,i=n.options,r=!i.inertia||t.noInertia||this._times.length<2;if(n.fire("dragend",t),r)n.fire("moveend");else{this._prunePositions(+new Date);var u=this._lastPos.subtract(this._positions[0]),d=(this._lastTime-this._times[0])/1e3,b=i.easeLinearity,x=u.multiplyBy(b/d),P=x.distanceTo([0,0]),A=Math.min(i.inertiaMaxSpeed,P),W=x.multiplyBy(A/P),tt=A/(i.inertiaDeceleration*b),ut=W.multiplyBy(-tt/2).round();!ut.x&&!ut.y?n.fire("moveend"):(ut=n._limitOffset(ut,n.options.maxBounds),zt(function(){n.panBy(ut,{duration:tt,easeLinearity:b,noMoveStart:!0,animate:!0})}))}}});ct.addInitHook("addHandler","dragging",Mo),ct.mergeOptions({keyboard:!0,keyboardPanDelta:80});var Oo=me.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),ot(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),yt(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,n=document.documentElement,i=t.scrollTop||n.scrollTop,r=t.scrollLeft||n.scrollLeft;this._map._container.focus(),window.scrollTo(r,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var n=this._panKeys={},i=this.keyCodes,r,u;for(r=0,u=i.left.length;r<u;r++)n[i.left[r]]=[-1*t,0];for(r=0,u=i.right.length;r<u;r++)n[i.right[r]]=[t,0];for(r=0,u=i.down.length;r<u;r++)n[i.down[r]]=[0,t];for(r=0,u=i.up.length;r<u;r++)n[i.up[r]]=[0,-1*t]},_setZoomDelta:function(t){var n=this._zoomKeys={},i=this.keyCodes,r,u;for(r=0,u=i.zoomIn.length;r<u;r++)n[i.zoomIn[r]]=t;for(r=0,u=i.zoomOut.length;r<u;r++)n[i.zoomOut[r]]=-t},_addHooks:function(){ot(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){yt(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var n=t.keyCode,i=this._map,r;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(r=this._panKeys[n],t.shiftKey&&(r=et(r).multiplyBy(3)),i.options.maxBounds&&(r=i._limitOffset(et(r),i.options.maxBounds)),i.options.worldCopyJump){var u=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(r)));i.panTo(u)}else i.panBy(r)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else if(n===27&&i._popup&&i._popup.options.closeOnEscapeKey)i.closePopup();else return;X(t)}}});ct.addInitHook("addHandler","keyboard",Oo),ct.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var Do=me.extend({addHooks:function(){ot(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){yt(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var n=zi(t),i=this._map.options.wheelDebounceTime;this._delta+=n,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var r=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(g(this._performZoom,this),r),X(t)},_performZoom:function(){var t=this._map,n=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var r=this._delta/(this._map.options.wheelPxPerZoomLevel*4),u=4*Math.log(2/(1+Math.exp(-Math.abs(r))))/Math.LN2,d=i?Math.ceil(u/i)*i:u,b=t._limitZoom(n+(this._delta>0?d:-d))-n;this._delta=0,this._startTime=null,b&&(t.options.scrollWheelZoom==="center"?t.setZoom(n+b):t.setZoomAround(this._lastMousePos,n+b))}});ct.addInitHook("addHandler","scrollWheelZoom",Do);var js=600;ct.mergeOptions({tapHold:B.touchNative&&B.safari&&B.mobile,tapTolerance:15});var Ao=me.extend({addHooks:function(){ot(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){yt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),t.touches.length===1){var n=t.touches[0];this._startPos=this._newPos=new nt(n.clientX,n.clientY),this._holdTimeout=setTimeout(g(function(){this._cancel(),this._isTapValid()&&(ot(document,"touchend",Rt),ot(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",n))},this),js),ot(document,"touchend touchcancel contextmenu",this._cancel,this),ot(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){yt(document,"touchend",Rt),yt(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),yt(document,"touchend touchcancel contextmenu",this._cancel,this),yt(document,"touchmove",this._onMove,this)},_onMove:function(t){var n=t.touches[0];this._newPos=new nt(n.clientX,n.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,n){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY});i._simulated=!0,n.target.dispatchEvent(i)}});ct.addInitHook("addHandler","tapHold",Ao),ct.mergeOptions({touchZoom:B.touch,bounceAtZoomLimits:!0});var Io=me.extend({addHooks:function(){at(this._map._container,"leaflet-touch-zoom"),ot(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){Pt(this._map._container,"leaflet-touch-zoom"),yt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var n=this._map;if(!(!t.touches||t.touches.length!==2||n._animatingZoom||this._zooming)){var i=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=n.getSize()._divideBy(2),this._startLatLng=n.containerPointToLatLng(this._centerPoint),n.options.touchZoom!=="center"&&(this._pinchStartLatLng=n.containerPointToLatLng(i.add(r)._divideBy(2))),this._startDist=i.distanceTo(r),this._startZoom=n.getZoom(),this._moved=!1,this._zooming=!0,n._stop(),ot(document,"touchmove",this._onTouchMove,this),ot(document,"touchend touchcancel",this._onTouchEnd,this),Rt(t)}},_onTouchMove:function(t){if(!(!t.touches||t.touches.length!==2||!this._zooming)){var n=this._map,i=n.mouseEventToContainerPoint(t.touches[0]),r=n.mouseEventToContainerPoint(t.touches[1]),u=i.distanceTo(r)/this._startDist;if(this._zoom=n.getScaleZoom(u,this._startZoom),!n.options.bounceAtZoomLimits&&(this._zoom<n.getMinZoom()&&u<1||this._zoom>n.getMaxZoom()&&u>1)&&(this._zoom=n._limitZoom(this._zoom)),n.options.touchZoom==="center"){if(this._center=this._startLatLng,u===1)return}else{var d=i._add(r)._divideBy(2)._subtract(this._centerPoint);if(u===1&&d.x===0&&d.y===0)return;this._center=n.unproject(n.project(this._pinchStartLatLng,this._zoom).subtract(d),this._zoom)}this._moved||(n._moveStart(!0,!1),this._moved=!0),kt(this._animRequest);var b=g(n._move,n,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=zt(b,this,!0),Rt(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,kt(this._animRequest),yt(document,"touchmove",this._onTouchMove,this),yt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});ct.addInitHook("addHandler","touchZoom",Io),ct.BoxZoom=Lo,ct.DoubleClickZoom=Eo,ct.Drag=Mo,ct.Keyboard=Oo,ct.ScrollWheelZoom=Do,ct.TapHold=Ao,ct.TouchZoom=Io,e.Bounds=gt,e.Browser=B,e.CRS=Vt,e.Canvas=Po,e.Circle=Jn,e.CircleMarker=Vn,e.Class=ae,e.Control=ue,e.DivIcon=wo,e.DivOverlay=Ie,e.DomEvent=Er,e.DomUtil=kr,e.Draggable=De,e.Evented=ze,e.FeatureGroup=Pe,e.GeoJSON=Je,e.GridLayer=Ti,e.Handler=me,e.Icon=qe,e.ImageOverlay=nr,e.LatLng=$,e.LatLngBounds=Bt,e.Layer=ce,e.LayerGroup=We,e.LineUtil=dt,e.Map=ct,e.Marker=Tn,e.Mixin=Rr,e.Path=Ae,e.Point=nt,e.PolyUtil=Nr,e.Polygon=Gn,e.Polyline=Ve,e.Popup=ir,e.PosAnimation=Bi,e.Projection=zr,e.Rectangle=ko,e.Renderer=Ge,e.SVG=ki,e.SVGOverlay=bo,e.TileLayer=$n,e.Tooltip=rr,e.Transformation=Qe,e.Util=se,e.VideoOverlay=yo,e.bind=g,e.bounds=xt,e.canvas=To,e.circle=Ls,e.circleMarker=Zr,e.control=qn,e.divIcon=zs,e.extend=f,e.featureGroup=Ki,e.geoJSON=vo,e.geoJson=Os,e.gridLayer=Bs,e.icon=$i,e.imageOverlay=Ds,e.latLng=K,e.latLngBounds=Ct,e.layerGroup=Br,e.map=Mr,e.marker=Fr,e.point=et,e.polygon=Ms,e.polyline=Es,e.popup=Rs,e.rectangle=Hs,e.setOptions=T,e.stamp=S,e.svg=So,e.svgOverlay=Is,e.tileLayer=xo,e.tooltip=Ns,e.transformation=Jt,e.version=l,e.videoOverlay=As;var Us=window.L;e.noConflict=function(){return window.L=Us,this},window.L=e})})(es,es.exports);ta(()=>import("./alpine-5dea0a14.js"),[]);window.flatpckr=Ot;