PageSourceSearch

https://www.indekrimpenerwaard.nl/build/main.788e012f08b0d54fd134.bundle.js

js indekrimpenerwaard.nl collected 2026-10-09 17:13:12 UTC 564,447 bytes, 2 lines download raw bytes

1/*! For license information please see main.788e012f08b0d54fd134.bundle.js.LICENSE.txt */
2(self.webpackChunkkunstmaan_edition=self.webpackChunkkunstmaan_edition||[]).push([[3481,8792],{2:(t,e,i)=>{"use strict";i.d(e,{_P:()=>l,cl:()=>o,e6:()=>s,g2:()=>r,o5:()=>a});var n=i(9470);const s=()=>!document.body.dataset.cookieBundleEnabled,o=(t,e)=>!!Array.isArray(t)&&t.includes(e),r=(t,e)=>{let i=e;if(!i)for(const e of t.querySelectorAll(".cookie-message__template")){const t=e.content.firstElementChild.cloneNode(!0),s=(0,n.A)("[data-cookie-accept-all]",t);if(null!==s&&""===s.dataset.cookieAcceptAll){i=!0;break}const o=e.closest("[data-cookie-enable-on]");o.innerHTML="",o.appendChild(t)}return i},a=t=>!s()&&t.querySelector("[data-cookie-enable-on]"),l=(t,e)=>t?o(e,t.dataset.cookieEnableOn):s()},34:(t,e,i)=>{"use strict";var n=i(4901);t.exports=function(t){return"object"==typeof t?null!==t:n(t)}},106:(t,e,i)=>{"use strict";function n(t){return t+.5|0}i.d(e,{t1:()=>bs,$L:()=>cr});const s=(t,e,i)=>Math.max(Math.min(t,i),e);function o(t){return s(n(2.55*t),0,255)}function r(t){return s(n(255*t),0,255)}function a(t){return s(n(t/2.55)/100,0,1)}function l(t){return s(n(100*t),0,100)}const h={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},c=[..."0123456789ABCDEF"],u=t=>c[15&t],d=t=>c[(240&t)>>4]+c[15&t],p=t=>(240&t)>>4==(15&t);const f=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function m(t,e,i){const n=e*Math.min(i,1-i),s=(e,s=(e+t/30)%12)=>i-n*Math.max(Math.min(s-3,9-s,1),-1);return[s(0),s(8),s(4)]}function g(t,e,i){const n=(n,s=(n+t/60)%6)=>i-i*e*Math.max(Math.min(s,4-s,1),0);return[n(5),n(3),n(1)]}function _(t,e,i){const n=m(t,1,.5);let s;for(e+i>1&&(s=1/(e+i),e*=s,i*=s),s=0;s<3;s++)n[s]*=1-e-i,n[s]+=e;return n}function v(t){const e=t.r/255,i=t.g/255,n=t.b/255,s=Math.max(e,i,n),o=Math.min(e,i,n),r=(s+o)/2;let a,l,h;return s!==o&&(h=s-o,l=r>.5?h/(2-s-o):h/(s+o),a=function(t,e,i,n,s){return t===s?(e-i)/n+(e<i?6:0):e===s?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,s),a=60*a+.5),[0|a,l||0,r]}function y(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(r)}function b(t,e,i){return y(m,t,e,i)}function x(t){return(t%360+360)%360}const w={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},M={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let k;const L=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,O=t=>
vendor: 16,682 bytes, line 2
2t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,E=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function S(t,e,i){if(t){let n=v(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=b(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function A(t,e){return t?Object.assign(e||{},t):t}function P(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=r(t[3]))):(e=A(t,{r:0,g:0,b:0,a:1})).a=r(e.a),e}function C(t){return"r"===t.charAt(0)?function(t){const e=L.exec(t);let i,n,r,a=255;if(e){if(e[7]!==i){const t=+e[7];a=e[8]?o(t):s(255*t,0,255)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?o(i):s(i,0,255)),n=255&(e[4]?o(n):s(n,0,255)),r=255&(e[6]?o(r):s(r,0,255)),{r:i,g:n,b:r,a}}}(t):function(t){const e=f.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?o(+e[5]):r(+e[5]));const s=x(+e[2]),a=+e[3]/100,l=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return y(_,t,e,i)}(s,a,l):"hsv"===e[1]?function(t,e,i){return y(g,t,e,i)}(s,a,l):b(s,a,l),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class T{constructor(t){if(t instanceof T)return t;const e=typeof t;let i;var n,s,o;"object"===e?i=P(t):"string"===e&&(o=(n=t).length,"#"===n[0]&&(4===o||5===o?s={r:255&17*h[n[1]],g:255&17*h[n[2]],b:255&17*h[n[3]],a:5===o?17*h[n[4]]:255}:7!==o&&9!==o||(s={r:h[n[1]]<<4|h[n[2]],g:h[n[3]]<<4|h[n[4]],b:h[n[5]]<<4|h[n[6]],a:9===o?h[n[7]]<<4|h[n[8]]:255})),i=s||function(t){k||(k=function(){const t={},e=Object.keys(M),i=Object.keys(w);let n,s,o,r,a;for(n=0;n<e.length;n++){for(r=a=e[n],s=0;s<i.length;s++)o=i[s],a=a.replace(o,w[o]);o=parseInt(M[r],16),t[a]=[o>>16&255,o>>8&255,255&o]}return t}(),k.transparent=[0,0,0,0]);const e=k[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||C(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=A(this._rgb);return t&&(t.a=a(t.a)),t}set rgb(t){this._rgb=P(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${a(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>p(t.r)&&p(t.g)&&p(t.b)&&p(t.a))(t)?u:d,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=v(t),i=e[0],n=l(e[1]),s=l(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${s}%, ${a(t.a)})`:`hsl(${i}, ${n}%, ${s}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let s;const o=e===s?.5:e,r=2*o-1,a=i.a-n.a,l=((r*a===-1?r:(r+a)/(1+r*a))+1)/2;s=1-l,i.r=255&l*i.r+s*n.r+.5,i.g=255&l*i.g+s*n.g+.5,i.b=255&l*i.b+s*n.b+.5,i.a=o*i.a+(1-o)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=E(a(t.r)),s=E(a(t.g)),o=E(a(t.b));return{r:r(O(n+i*(E(a(e.r))-n))),g:r(O(s+i*(E(a(e.g))-s))),b:r(O(o+i*(E(a(e.b))-o))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new T(this.rgb)}alpha(t){return this._rgb.a=r(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=n(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return S(this._rgb,2,t),this}darken(t){return S(this._rgb,2,-t),this}saturate(t){return S(this._rgb,1,t),this}desaturate(t){return S(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=v(t);i[0]=x(i[0]+e),i=b(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function I(){}const D=(()=>{let t=0;return()=>t++})();function z(t){return null==t}function F(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function R(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function N(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function B(t,e){return N(t)?t:e}function j(t,e){return void 0===t?e:t}const V=(t,e)=>"string"==typeof t&&t.endsWith("%")?parseFloat(t)/100*e:+t;function H(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function $(t,e,i,n){let s,o,r;if(F(t))if(o=t.length,n)for(s=o-1;s>=0;s--)e.call(i,t[s],s);else for(s=0;s<o;s++)e.call(i,t[s],s);else if(R(t))for(r=Object.keys(t),o=r.length,s=0;s<o;s++)e.call(i,t[r[s]],r[s])}function Z(t,e){let i,n,s,o;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(s=t[i],o=e[i],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function W(t){if(F(t))return t.map(W);if(R(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let s=0;for(;s<n;++s)e[i[s]]=W(t[i[s]]);return e}return t}function q(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function U(t,e,i,n){if(!q(t))return;const s=e[t],o=i[t];R(s)&&R(o)?K(s,o,n):e[t]=W(o)}function K(t,e,i){const n=F(e)?e:[e],s=n.length;if(!R(t))return t;const o=(i=i||{}).merger||U;let r;for(let e=0;e<s;++e){if(r=n[e],!R(r))continue;const s=Object.keys(r);for(let e=0,n=s.length;e<n;++e)o(s[e],t,r,i)}return t}function Y(t,e){return K(t,e,{merger:G})}function G(t,e,i){if(!q(t))return;const n=e[t],s=i[t];R(n)&&R(s)?Y(n,s):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=W(s))}const X={"":t=>t,x:t=>t.x,y:t=>t.y};function J(t,e){const i=X[e]||(X[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Q(t){return t.charAt(0).toUpperCase()+t.slice(1)}const tt=t=>void 0!==t,et=t=>"function"==typeof t,it=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},nt=Math.PI,st=2*nt,ot=st+nt,rt=Number.POSITIVE_INFINITY,at=nt/180,lt=nt/2,ht=nt/4,ct=2*nt/3,ut=Math.log10,dt=Math.sign;function pt(t,e,i){return Math.abs(t-e)<i}function ft(t){const e=Math.round(t);t=pt(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(ut(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function mt(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function gt(t,e,i){let n,s,o;for(n=0,s=t.length;n<s;n++)o=t[n][i],isNaN(o)||(e.min=Math.min(e.min,o),e.max=Math.max(e.max,o))}function _t(t){return t*(nt/180)}function vt(t){return t*(180/nt)}function yt(t){if(!N(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function bt(t,e){const i=e.x-t.x,n=e.y-t.y,s=Math.sqrt(i*i+n*n);let o=Math.atan2(n,i);return o<-.5*nt&&(o+=st),{angle:o,distance:s}}function xt(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function wt(t,e){return(t-e+ot)%st-nt}function Mt(t){return(t%st+st)%st}function kt(t,e,i,n){const s=Mt(t),o=Mt(e),r=Mt(i),a=Mt(o-s),l=Mt(r-s),h=Mt(s-o),c=Mt(s-r);return s===o||s===r||n&&o===r||a>l&&h<c}function Lt(t,e,i){return Math.max(e,Math.min(i,t))}function Ot(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function Et(t,e,i){i=i||(i=>t[i]<e);let n,s=t.length-1,o=0;for(;s-o>1;)n=o+s>>1,i(n)?o=n:s=n;return{lo:o,hi:s}}const St=(t,e,i,n)=>Et(t,i,n?n=>{const s=t[n][e];return s<i||s===i&&t[n+1][e]===i}:n=>t[n][e]<i),At=(t,e,i)=>Et(t,i,n=>t[n][e]>=i),Pt=["push","pop","shift","splice","unshift"];function Ct(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,s=n.indexOf(e);-1!==s&&n.splice(s,1),n.length>0||(Pt.forEach(e=>{delete t[e]}),delete t._chartjs)}function Tt(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const It="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function Dt(t,e){let i=[],n=!1;return function(...s){i=s,n||(n=!0,It.call(window,()=>{n=!1,t.apply(e,i)}))}}const zt=t=>"start"===t?"left":"end"===t?"right":"center",Ft=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;function Rt(t,e,i){const n=e.length;let s=0,o=n;if(t._sorted){const{iScale:r,vScale:a,_parsed:l}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=r.axis,{min:u,max:d,minDefined:p,maxDefined:f}=r.getUserBounds();if(p){if(s=Math.min(St(l,c,u).lo,i?n:St(e,c,r.getPixelForValue(u)).lo),h){const t=l.slice(0,s+1).reverse().findIndex(t=>!z(t[a.axis]));s-=Math.max(0,t)}s=Lt(s,0,n-1)}if(f){let t=Math.max(St(l,r.axis,d,!0).hi+1,i?0:St(e,c,r.getPixelForValue(d),!0).hi+1);if(h){const e=l.slice(t-1).findIndex(t=>!z(t[a.axis]));t+=Math.max(0,e)}o=Lt(t,s,n)-s}else o=n-s}return{start:s,count:o}}function Nt(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,s={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=s,!0;const o=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,s),o}const Bt=t=>0===t||1===t,jt=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*st/i),Vt=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*st/i)+1,Ht={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*lt),easeOutSine:t=>Math.sin(t*lt),easeInOutSine:t=>-.5*(Math.cos(nt*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>Bt(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>Bt(t)?t:jt(t,.075,.3),easeOutElastic:t=>Bt(t)?t:Vt(t,.075,.3),easeInOutElastic(t){const e=.1125;return Bt(t)?t:t<.5?.5*jt(2*t,e,.45):.5+.5*Vt(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Ht.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Ht.easeInBounce(2*t):.5*Ht.easeOutBounce(2*t-1)+.5};function $t(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function Zt(t){return $t(t)?t:new T(t)}function Wt(t){return $t(t)?t:new T(t).saturate(.5).darken(.1).hexString()}const qt=["x","y","borderWidth","radius","tension"],Ut=["color","borderColor","backgroundColor"],Kt=new Map;function Yt(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Kt.get(i);return n||(n=new Intl.NumberFormat(t,e),Kt.set(i,n)),n}(e,i).format(t)}const Gt={values:t=>F(t)?t:""+t,numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let s,o=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(s="scientific"),o=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const r=ut(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),l={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),Yt(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(ut(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Gt.numeric.call(this,t,e,i):""}};var Xt={formatters:Gt};const Jt=Object.create(null),Qt=Object.create(null);function te(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function ee(t,e,i){return"string"==typeof e?K(te(t,e),i):K(te(t,""),e)}class ie{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(t,e)=>Wt(e.backgroundColor),this.hoverBorderColor=(t,e)=>Wt(e.borderColor),this.hoverColor=(t,e)=>Wt(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return ee(this,t,e)}get(t){return te(this,t)}describe(t,e){return ee(Qt,t,e)}override(t,e){return ee(Jt,t,e)}route(t,e,i,n){const s=te(this,t),o=te(this,i),r="_"+e;Object.defineProperties(s,{[r]:{value:s[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[r],e=o[n];return R(t)?Object.assign({},e,t):j(t,e)},set(t){this[r]=t}}})}apply(t){t.forEach(t=>t(this))}}var ne=new ie({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:Ut},numbers:{type:"number",properties:qt}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Xt.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function se(t,e,i,n,s){let o=e[s];return o||(o=e[s]=t.measureText(s).width,i.push(s)),o>n&&(n=o),n}function oe(t,e,i,n){let s=(n=n||{}).data=n.data||{},o=n.garbageCollect=n.garbageCollect||[];n.font!==e&&(s=n.data={},o=n.garbageCollect=[],n.font=e),t.save(),t.font=e;let r=0;const a=i.length;let l,h,c,u,d;for(l=0;l<a;l++)if(u=i[l],null==u||F(u)){if(F(u))for(h=0,c=u.length;h<c;h++)d=u[h],null==d||F(d)||(r=se(t,s,o,r,d))}else r=se(t,s,o,r,u);t.restore();const p=o.length/2;if(p>i.length){for(l=0;l<p;l++)delete s[o[l]];o.splice(0,p)}return r}function re(t,e,i){const n=t.currentDevicePixelRatio,s=0!==i?Math.max(i/2,.5):0;return Math.round((e-s)*n)/n+s}function ae(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function le(t,e,i,n){he(t,e,i,n,null)}function he(t,e,i,n,s){let o,r,a,l,h,c,u,d;const p=e.pointStyle,f=e.rotation,m=e.radius;let g=(f||0)*at;if(p&&"object"==typeof p&&(o=p.toString(),"[object HTMLImageElement]"===o||"[object HTMLCanvasElement]"===o))return t.save(),t.translate(i,n),t.rotate(g),t.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),void t.restore();if(!(isNaN(m)||m<=0)){switch(t.beginPath(),p){default:s?t.ellipse(i,n,s/2,m,0,0,st):t.arc(i,n,m,0,st),t.closePath();break;case"triangle":c=s?s/2:m,t.moveTo(i+Math.sin(g)*c,n-Math.cos(g)*m),g+=ct,t.lineTo(i+Math.sin(g)*c,n-Math.cos(g)*m),g+=ct,t.lineTo(i+Math.sin(g)*c,n-Math.cos(g)*m),t.closePath();break;
vendor: 5,056 bytes, line 2
2case"rectRounded":h=.516*m,l=m-h,r=Math.cos(g+ht)*l,u=Math.cos(g+ht)*(s?s/2-h:l),a=Math.sin(g+ht)*l,d=Math.sin(g+ht)*(s?s/2-h:l),t.arc(i-u,n-a,h,g-nt,g-lt),t.arc(i+d,n-r,h,g-lt,g),t.arc(i+u,n+a,h,g,g+lt),t.arc(i-d,n+r,h,g+lt,g+nt),t.closePath();break;case"rect":if(!f){l=Math.SQRT1_2*m,c=s?s/2:l,t.rect(i-c,n-l,2*c,2*l);break}g+=ht;case"rectRot":u=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(s?s/2:m),t.moveTo(i-u,n-a),t.lineTo(i+d,n-r),t.lineTo(i+u,n+a),t.lineTo(i-d,n+r),t.closePath();break;case"crossRot":g+=ht;case"cross":u=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(s?s/2:m),t.moveTo(i-u,n-a),t.lineTo(i+u,n+a),t.moveTo(i+d,n-r),t.lineTo(i-d,n+r);break;case"star":u=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(s?s/2:m),t.moveTo(i-u,n-a),t.lineTo(i+u,n+a),t.moveTo(i+d,n-r),t.lineTo(i-d,n+r),g+=ht,u=Math.cos(g)*(s?s/2:m),r=Math.cos(g)*m,a=Math.sin(g)*m,d=Math.sin(g)*(s?s/2:m),t.moveTo(i-u,n-a),t.lineTo(i+u,n+a),t.moveTo(i+d,n-r),t.lineTo(i-d,n+r);break;case"line":r=s?s/2:Math.cos(g)*m,a=Math.sin(g)*m,t.moveTo(i-r,n-a),t.lineTo(i+r,n+a);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(g)*(s?s/2:m),n+Math.sin(g)*m);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function ce(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function ue(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function de(t){t.restore()}function pe(t,e,i,n,s){if(!e)return t.lineTo(i.x,i.y);if("middle"===s){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===s!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function fe(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function me(t,e,i,n,s){if(s.strikethrough||s.underline){const o=t.measureText(n),r=e-o.actualBoundingBoxLeft,a=e+o.actualBoundingBoxRight,l=i-o.actualBoundingBoxAscent,h=i+o.actualBoundingBoxDescent,c=s.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=s.decorationWidth||2,t.moveTo(r,c),t.lineTo(a,c),t.stroke()}}function ge(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function _e(t,e,i,n,s,o={}){const r=F(e)?e:[e],a=o.strokeWidth>0&&""!==o.strokeColor;let l,h;for(t.save(),t.font=s.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),z(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,o),l=0;l<r.length;++l)h=r[l],o.backdrop&&ge(t,o.backdrop),a&&(o.strokeColor&&(t.strokeStyle=o.strokeColor),z(o.strokeWidth)||(t.lineWidth=o.strokeWidth),t.strokeText(h,i,n,o.maxWidth)),t.fillText(h,i,n,o.maxWidth),me(t,i,n,h,o),n+=Number(s.lineHeight);t.restore()}function ve(t,e){const{x:i,y:n,w:s,h:o,radius:r}=e;t.arc(i+r.topLeft,n+r.topLeft,r.topLeft,1.5*nt,nt,!0),t.lineTo(i,n+o-r.bottomLeft),t.arc(i+r.bottomLeft,n+o-r.bottomLeft,r.bottomLeft,nt,lt,!0),t.lineTo(i+s-r.bottomRight,n+o),t.arc(i+s-r.bottomRight,n+o-r.bottomRight,r.bottomRight,lt,0,!0),t.lineTo(i+s,n+r.topRight),t.arc(i+s-r.topRight,n+r.topRight,r.topRight,0,-lt,!0),t.lineTo(i+r.topLeft,n)}const ye=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,be=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function xe(t,e){const i=(""+t).match(ye);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const we=t=>+t||0;function Me(t,e){const i={},n=R(e),s=n?Object.keys(e):e,o=R(t)?n?i=>j(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of s)i[t]=we(o(t));return i}function ke(t){return Me(t,{top:"y",right:"x",bottom:"y",left:"x"})}function Le(t){return Me(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Oe(t){const e=ke(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function Ee(t,e){t=t||{},e=e||ne.font;let i=j(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=j(t.style,e.style);n&&!(""+n).match(be)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const s={family:j(t.family,e.family),lineHeight:xe(j(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:j(t.weight,e.weight),string:""};return s.string=function(t){return!t||z(t.size)||z(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(s),s}function Se(t,e,i,n){let s,o,r,a=!0;for(s=0,o=t.length;s<o;++s)if(r=t[s],void 0!==r&&(void 0!==e&&"function"==typeof r&&(r=r(e),a=!1),void 0!==i&&F(r)&&(r=r[i%r.length],a=!1),void 0!==r))return n&&!a&&(n.cacheable=!1),r}function Ae(t,e){return Object.assign(Object.create(t),e)}function Pe(t,e=[""],i,n,s=()=>t[0]){const o=i||t;void 0===n&&(n=Ve("_fallback",t));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:o,_fallback:n,_getTarget:s,override:i=>Pe([i,...t],e,o,n)};return new Proxy(r,{deleteProperty:(e,i)=>(delete e[i],delete e._keys,delete t[0][i],!0),get:(i,n)=>ze(i,n,()=>
vendor: 4,216 bytes, line 2
2function(t,e,i,n){let s;for(const o of e)if(s=Ve(Ie(o,t),i),void 0!==s)return De(t,s)?Be(i,n,t,s):s}(n,e,t,i)),getOwnPropertyDescriptor:(t,e)=>Reflect.getOwnPropertyDescriptor(t._scopes[0],e),getPrototypeOf:()=>Reflect.getPrototypeOf(t[0]),has:(t,e)=>He(t).includes(e),ownKeys:t=>He(t),set(t,e,i){const n=t._storage||(t._storage=s());return t[e]=n[e]=i,delete t._keys,!0}})}function Ce(t,e,i,n){const s={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:Te(t,n),setContext:e=>Ce(t,e,i,n),override:s=>Ce(t.override(s),e,i,n)};return new Proxy(s,{deleteProperty:(e,i)=>(delete e[i],delete t[i],!0),get:(t,e,i)=>ze(t,e,()=>function(t,e,i){const{_proxy:n,_context:s,_subProxy:o,_descriptors:r}=t;let a=n[e];return et(a)&&r.isScriptable(e)&&(a=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=i;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(o,r||n);return a.delete(t),De(t,l)&&(l=Be(s._scopes,s,t,l)),l}(e,a,t,i)),F(a)&&a.length&&(a=function(t,e,i,n){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=i;if(void 0!==o.index&&n(t))return e[o.index%e.length];if(R(e[0])){const i=e,n=s._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=Be(n,s,t,l);e.push(Ce(i,o,r&&r[t],a))}}return e}(e,a,t,r.isIndexable)),De(e,a)&&(a=Ce(a,s,o&&o[e],r)),a}(t,e,i)),getOwnPropertyDescriptor:(e,i)=>e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i),getPrototypeOf:()=>Reflect.getPrototypeOf(t),has:(e,i)=>Reflect.has(t,i),ownKeys:()=>Reflect.ownKeys(t),set:(e,i,n)=>(t[i]=n,delete e[i],!0)})}function Te(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:s=e.allKeys}=t;return{allKeys:s,scriptable:i,indexable:n,isScriptable:et(i)?i:()=>i,isIndexable:et(n)?n:()=>n}}const Ie=(t,e)=>t?t+Q(e):e,De=(t,e)=>R(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ze(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function Fe(t,e,i){return et(t)?t(e,i):t}const Re=(t,e)=>!0===t?e:"string"==typeof t?J(e,t):void 0;function Ne(t,e,i,n,s){for(const o of e){const e=Re(i,o);if(e){t.add(e);const o=Fe(e._fallback,i,s);if(void 0!==o&&o!==i&&o!==n)return o}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function Be(t,e,i,n){const s=e._rootScopes,o=Fe(e._fallback,i,n),r=[...t,...s],a=new Set;a.add(n);let l=je(a,r,i,o||i,n);return null!==l&&(void 0===o||o===i||(l=je(a,r,o,l,n),null!==l))&&Pe(Array.from(a),[""],s,o,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const s=n[e];return F(s)&&R(i)?i:s||{}}(e,i,n))}function je(t,e,i,n,s){for(;i;)i=Ne(t,e,i,n,s);return i}function Ve(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function He(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}function $e(t,e,i,n){const{iScale:s}=t,{key:o="r"}=this._parsing,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={r:s.parse(J(c,o),h)};return r}const Ze=Number.EPSILON||1e-14,We=(t,e)=>e<t.length&&!t[e].skip&&t[e],qe=t=>"x"===t?"y":"x";function Ue(t,e,i,n){const s=t.skip?e:t,o=e,r=i.skip?e:i,a=xt(o,s),l=xt(r,o);let h=a/(a+l),c=l/(a+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:o.x-u*(r.x-s.x),y:o.y-u*(r.y-s.y)},next:{x:o.x+d*(r.x-s.x),y:o.y+d*(r.y-s.y)}}}function Ke(t,e,i){return Math.max(Math.min(t,i),e)}function Ye(t,e,i,n,s){let o,r,a,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=qe(e),n=t.length,s=Array(n).fill(0),o=Array(n);let r,a,l,h=We(t,0);for(r=0;r<n;++r)if(a=l,l=h,h=We(t,r+1),l){if(h){const t=h[e]-l[e];s[r]=0!==t?(h[i]-l[i])/t:0}o[r]=a?h?dt(s[r-1])!==dt(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}!function(t,e,i){const n=t.length;let s,o,r,a,l,h=We(t,0);for(let c=0;c<n-1;++c)l=h,h=We(t,c+1),l&&h&&(pt(e[c],0,Ze)?i[c]=i[c+1]=0:(s=i[c]/e[c],o=i[c+1]/e[c],a=Math.pow(s,2)+Math.pow(o,2),a<=9||(r=3/Math.sqrt(a),i[c]=s*r*e[c],i[c+1]=o*r*e[c])))}
vendor: 10,400 bytes, line 2
2(t,s,o),function(t,e,i="x"){const n=qe(i),s=t.length;let o,r,a,l=We(t,0);for(let h=0;h<s;++h){if(r=a,a=l,l=We(t,h+1),!a)continue;const s=a[i],c=a[n];r&&(o=(s-r[i])/3,a[`cp1${i}`]=s-o,a[`cp1${n}`]=c-o*e[h]),l&&(o=(l[i]-s)/3,a[`cp2${i}`]=s+o,a[`cp2${n}`]=c+o*e[h])}}(t,o,e)}(t,s);else{let i=n?t[t.length-1]:t[0];for(o=0,r=t.length;o<r;++o)a=t[o],l=Ue(i,a,t[Math.min(o+1,r-(n?0:1))%r],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,i=a}e.capBezierPoints&&function(t,e){let i,n,s,o,r,a=ce(t[0],e);for(i=0,n=t.length;i<n;++i)r=o,o=a,a=i<n-1&&ce(t[i+1],e),o&&(s=t[i],r&&(s.cp1x=Ke(s.cp1x,e.left,e.right),s.cp1y=Ke(s.cp1y,e.top,e.bottom)),a&&(s.cp2x=Ke(s.cp2x,e.left,e.right),s.cp2y=Ke(s.cp2y,e.top,e.bottom)))}(t,i)}function Ge(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Xe(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function Je(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const Qe=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),ti=["top","right","bottom","left"];function ei(t,e,i){const n={};i=i?"-"+i:"";for(let s=0;s<4;s++){const o=ti[s];n[o]=parseFloat(t[e+"-"+o+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function ii(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,s=Qe(i),o="border-box"===s.boxSizing,r=ei(s,"padding"),a=ei(s,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:s,offsetY:o}=n;let r,a,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(s,o,t.target))r=s,a=o;else{const t=e.getBoundingClientRect();r=n.clientX-t.left,a=n.clientY-t.top,l=!0}return{x:r,y:a,box:l}}(t,i),u=r.left+(c&&a.left),d=r.top+(c&&a.top);let{width:p,height:f}=e;return o&&(p-=r.width+a.width,f-=r.height+a.height),{x:Math.round((l-u)/p*i.width/n),y:Math.round((h-d)/f*i.height/n)}}const ni=t=>Math.round(10*t)/10;function si(t,e,i){const n=e||1,s=ni(t.height*n),o=ni(t.width*n);t.height=ni(t.height),t.width=ni(t.width);const r=t.canvas;return r.style&&(i||!r.style.height&&!r.style.width)&&(r.style.height=`${t.height}px`,r.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||r.height!==s||r.width!==o)&&(t.currentDevicePixelRatio=n,r.height=s,r.width=o,t.ctx.setTransform(n,0,0,n,0,0),!0)}const oi=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Ge()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function ri(t,e){const i=function(t,e){return Qe(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function ai(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function li(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function hi(t,e,i,n){const s={x:t.cp2x,y:t.cp2y},o={x:e.cp1x,y:e.cp1y},r=ai(t,s,i),a=ai(s,o,i),l=ai(o,e,i),h=ai(r,a,i),c=ai(a,l,i);return ai(h,c,i)}function ci(t,e,i){return t?function(t,e){return{x:i=>t+t+e-i,setWidth(t){e=t},textAlign:t=>"center"===t?t:"right"===t?"left":"right",xPlus:(t,e)=>t-e,leftForLtr:(t,e)=>t-e}}(e,i):{x:t=>t,setWidth(t){},textAlign:t=>t,xPlus:(t,e)=>t+e,leftForLtr:(t,e)=>t}}function ui(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function di(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function pi(t){return"angle"===t?{between:kt,compare:wt,normalize:Mt}:{between:Ot,compare:(t,e)=>t-e,normalize:t=>t}}function fi({start:t,end:e,count:i,loop:n,style:s}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:s}}function mi(t,e,i){if(!i)return[t];const{property:n,start:s,end:o}=i,r=e.length,{compare:a,between:l,normalize:h}=pi(n),{start:c,end:u,loop:d,style:p}=function(t,e,i){const{property:n,start:s,end:o}=i,{between:r,normalize:a}=pi(n),l=e.length;let h,c,{start:u,end:d,loop:p}=t;if(p){for(u+=l,d+=l,h=0,c=l;h<c&&r(a(e[u%l][n]),s,o);++h)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:p,style:t.style}}(t,e,i),f=[];let m,g,_,v=!1,y=null;const b=()=>v||l(s,_,m)&&0!==a(s,_),x=()=>!v||0===a(o,m)||l(o,_,m);for(let t=c,i=c;t<=u;++t)g=e[t%r],g.skip||(m=h(g[n]),m!==_&&(v=l(m,s,o),null===y&&b()&&(y=0===a(m,s)?t:i),null!==y&&x()&&(f.push(fi({start:y,end:t,loop:d,count:r,style:p})),y=null),i=t,_=m));return null!==y&&f.push(fi({start:y,end:u,loop:d,count:r,style:p})),f}function gi(t,e){const i=[],n=t.segments;for(let s=0;s<n.length;s++){const o=mi(n[s],t.points,e);o.length&&i.push(...o)}return i}function _i(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function vi(t,e){if(!e)return!1;const i=[],n=function(t,e){return $t(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}function yi(t,e,i){return t.options.clip?t[i]:e[i]}function bi(t,e){const i=e._clip;if(i.disabled)return!1;const n=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:yi(i,e,"left"),right:yi(i,e,"right"),top:yi(n,e,"top"),bottom:yi(n,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:n.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:n.right+(!0===i.right?0:i.right),top:!1===i.top?0:n.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:n.bottom+(!0===i.bottom?0:i.bottom)}}class xi{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const s=e.listeners[n],o=e.duration;s.forEach(n=>n({chart:t,initial:e.initial,numSteps:o,currentStep:Math.min(i-e.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=It.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const s=i.items;let o,r=s.length-1,a=!1;for(;r>=0;--r)o=s[r],o._active?(o._total>i.duration&&(i.duration=o._total),o.tick(t),a=!0):(s[r]=s[s.length-1],s.pop());a&&(n.draw(),this._notify(n,i,t,"progress")),s.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=s.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var wi=new xi;const Mi="transparent",ki={boolean:(t,e,i)=>i>.5?e:t,color(t,e,i){const n=Zt(t||Mi),s=n.valid&&Zt(e||Mi);return s&&s.valid?s.mix(n,i).hexString():e},number:(t,e,i)=>t+(e-t)*i};class Li{constructor(t,e,i,n){const s=e[i];n=Se([t.to,n,s,t.from]);const o=Se([t.from,s,n]);this._active=!0,this._fn=t.fn||ki[t.type||typeof o],this._easing=Ht[t.easing]||Ht.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=o,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],s=i-this._start,o=this._duration-s;this._start=i,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=s,this._loop=!!t.loop,this._to=Se([t.to,e,n,t.from]),this._from=Se([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,s=this._from,o=this._loop,r=this._to;let a;if(this._active=s!==r&&(o||e<i),!this._active)return this._target[n]=r,void this._notify(!0);e<0?this._target[n]=s:(a=e/i%2,a=o&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(s,r,a))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class Oi{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!R(t))return;const e=Object.keys(ne.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const s=t[n];if(!R(s))return;const o={};for(const t of e)o[t]=s[t];(F(s.properties)&&s.properties||[n]).forEach(t=>{t!==n&&i.has(t)||i.set(t,o)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const s=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const s=t[n[e]];s&&s.active()&&i.push(s.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),s}_createAnimations(t,e){const i=this._properties,n=[],s=t.$animations||(t.$animations={}),o=Object.keys(e),r=Date.now();let a;for(a=o.length-1;a>=0;--a){const l=o[a];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=s[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,r);continue}c.cancel()}u&&u.duration?(s[l]=c=new Li(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(wi.add(this._chart,i),!0):void 0}}function Ei(t,e){const i=t&&t.options||{},n=i.reverse,s=void 0===i.min?e:0,o=void 0===i.max?e:0;return{start:n?o:s,end:n?s:o}}function Si(t,e){const i=[],n=t._getSortedDatasetMetas(e);let s,o;for(s=0,o=n.length;s<o;++s)i.push(n[s].index);return i}function Ai(t,e,i,n={}){const s=t.keys,o="single"===n.mode;let r,a,l,h;if(null===e)return;let c=!1;for(r=0,a=s.length;r<a;
vendor: 4,961 bytes, line 2
2++r){if(l=+s[r],l===i){if(c=!0,n.all)continue;break}h=t.values[l],N(h)&&(o||0===e||dt(e)===dt(h))&&(e+=h)}return c||n.all?e:0}function Pi(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function Ci(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function Ti(t,e,i,n){for(const s of e.getMatchingVisibleMetas(n).reverse()){const e=t[s.index];if(i&&e>0||!i&&e<0)return s.index}return null}function Ii(t,e){const{chart:i,_cachedMeta:n}=t,s=i._stacks||(i._stacks={}),{iScale:o,vScale:r,index:a}=n,l=o.axis,h=r.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(o,r,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[l]:o,[h]:u}=i;d=(i._stacks||(i._stacks={}))[h]=Ci(s,c,o),d[a]=u,d._top=Ti(d,r,!0,n.type),d._bottom=Ti(d,r,!1,n.type),(d._visualValues||(d._visualValues={}))[a]=u}}function Di(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function zi(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const Fi=t=>"reset"===t||"none"===t,Ri=(t,e)=>e?t:Object.assign({},t);class Ni{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=Pi(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&zi(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,s=e.xAxisID=j(i.xAxisID,Di(t,"x")),o=e.yAxisID=j(i.yAxisID,Di(t,"y")),r=e.rAxisID=j(i.rAxisID,Di(t,"r")),a=e.indexAxis,l=e.iAxisID=n(a,s,o,r),h=e.vAxisID=n(a,o,s,r);e.xScale=this.getScaleForId(s),e.yScale=this.getScaleForId(o),e.rScale=this.getScaleForId(r),e.iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ct(this._data,this),t._stacked&&zi(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(R(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,s="x"===i.axis?"x":"y",o="x"===n.axis?"x":"y",r=Object.keys(t),a=new Array(r.length);let l,h,c;for(l=0,h=r.length;l<h;++l)c=r[l],a[l]={[s]:c,[o]:t[c]};return a}(e,t)}else if(i!==e){if(i){Ct(i,this);const t=this._cachedMeta;zi(t),t._parsed=[]}e&&Object.isExtensible(e)&&((n=e)._chartjs?n._chartjs.listeners.push(this):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),Pt.forEach(t=>{const e="_onData"+Q(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const s=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),s}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const s=e._stacked;e._stacked=Pi(e.vScale,e),e.stack!==i.stack&&(n=!0,zi(e),e.stack=i.stack),this._resyncElements(t),(n||s!==e._stacked)&&(Ii(this,e._parsed),e._stacked=Pi(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:s,_stacked:o}=i,r=s.axis;let a,l,h,c=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=F(n[t])?this.parseArrayData(i,n,t,e):R(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const s=()=>null===l[r]||u&&l[r]<u[r];for(a=0;a<e;++a)i._parsed[a+t]=l=h[a],c&&(s()&&(c=!1),u=l);i._sorted=c}o&&Ii(this,h)}
vendor: 5,204 bytes, line 2
2parsePrimitiveData(t,e,i,n){const{iScale:s,vScale:o}=t,r=s.axis,a=o.axis,l=s.getLabels(),h=s===o,c=new Array(n);let u,d,p;for(u=0,d=n;u<d;++u)p=u+i,c[u]={[r]:h||s.parse(l[p],p),[a]:o.parse(e[p],p)};return c}parseArrayData(t,e,i,n){const{xScale:s,yScale:o}=t,r=new Array(n);let a,l,h,c;for(a=0,l=n;a<l;++a)h=a+i,c=e[h],r[a]={x:s.parse(c[0],h),y:o.parse(c[1],h)};return r}parseObjectData(t,e,i,n){const{xScale:s,yScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let h,c,u,d;for(h=0,c=n;h<c;++h)u=h+i,d=e[u],l[h]={x:s.parse(J(d,r),u),y:o.parse(J(d,a),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,s=this._cachedMeta,o=e[t.axis];return Ai({keys:Si(n,!0),values:e._stacks[t.axis]._visualValues},o,s.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const s=i[e.axis];let o=null===s?NaN:s;const r=n&&i._stacks[e.axis];n&&r&&(n.values=r,o=Ai(n,s,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,s=i._sorted&&t===i.iScale,o=n.length,r=this._getOtherScale(t),a=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:Si(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:s}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:s?i:Number.POSITIVE_INFINITY}}(r);let u,d;function p(){d=n[u];const e=d[r.axis];return!N(d[t.axis])||h>e||c<e}for(u=0;u<o&&(p()||(this.updateRangeFromParsed(l,t,d,a),!s));++u);if(s)for(u=o-1;u>=0;--u)if(!p()){this.updateRangeFromParsed(l,t,d,a);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,s,o;for(n=0,s=e.length;n<s;++n)o=e[n][t.axis],N(o)&&i.push(o);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,s=this.getParsed(t);return{label:i?""+i.getLabelForValue(s[i.axis]):"",value:n?""+n.getLabelForValue(s[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,s;return R(t)?(e=t.top,i=t.right,n=t.bottom,s=t.left):e=i=n=s=t,{top:e,right:i,bottom:n,left:s,disabled:!1===t}}(j(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=Ei(t,i),s=Ei(e,i);return{top:s.end,right:n.end,bottom:s.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],s=e.chartArea,o=[],r=this._drawStart||0,a=this._drawCount||n.length-r,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,s,r,a),h=r;h<r+a;++h){const e=n[h];e.hidden||(e.active&&l?o.push(e):e.draw(t,s))}for(h=0;h<o.length;++h)o[h].draw(t,s)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let s;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];s=e.$context||(e.$context=function(t,e,i){return Ae(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),s.parsed=this.getParsed(t),s.raw=n.data[t],s.index=s.dataIndex=t}else s=this.$context||(this.$context=function(t,e){return Ae(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),s.dataset=n,s.index=s.datasetIndex=this.index;return s.active=!!e,s.mode=i,s}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,s=this._cachedDataOpts,o=t+"-"+e,r=s[o],a=this.enableOptionSharing&&tt(i);if(r)return Ri(r,a);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),d=Object.keys(ne.elements[t]),p=l.resolveNamedOptions(u,d,()=>this.getContext(i,n,e),c);return p.$shared&&(p.$shared=a,s[o]=Object.freeze(Ri(p,a))),p}_resolveAnimations(t,e,i){const n=this.chart,s=this._cachedDataOpts,o=`animation-${e}`,r=s[o];if(r)return r;let a;if(!1!==n.options.animation){const n=this.chart.config,s=n.datasetAnimationScopeKeys(this._type,e),o=n.getOptionScopes(this.getDataset(),s);a=n.createResolver(o,this.getContext(t,i,e))}const l=new Oi(n,a&&a.animations);return a&&a._cacheable&&(s[o]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||Fi(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,s=this.getSharedOptions(i),o=this.includeOptions(e,s)||s!==n;return this.updateSharedOptions(s,e,i),{sharedOptions:s,includeOptions:o}}updateElement(t,e,i,n){Fi(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!Fi(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const s=this.getStyle(e,n);
vendor: 4,564 bytes, line 2
2this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(s)||s})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,s=e.length,o=Math.min(s,n);o&&this.parse(0,o),s>n?this._insertElements(n,s-n,t):s<n&&this._removeElements(s,n-s)}_insertElements(t,e,i=!0){const n=this._cachedMeta,s=n.data,o=t+e;let r;const a=t=>{for(t.length+=e,r=t.length-1;r>=o;r--)t[r]=t[r-e]};for(a(s),r=t;r<o;++r)s[r]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(t,e),i&&this.updateElements(s,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&zi(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function Bi(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,s=i.length;e<s;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=Tt(n.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let n,s,o,r,a=e._length;const l=()=>{32767!==o&&-32768!==o&&(tt(r)&&(a=Math.min(a,Math.abs(o-r)||a)),r=o)};for(n=0,s=i.length;n<s;++n)o=e.getPixelForValue(i[n]),l();for(r=void 0,n=0,s=e.ticks.length;n<s;++n)o=e.getPixelForTick(n),l();return a}function ji(t,e,i,n){return F(t)?function(t,e,i,n){const s=i.parse(t[0],n),o=i.parse(t[1],n),r=Math.min(s,o),a=Math.max(s,o);let l=r,h=a;Math.abs(r)>Math.abs(a)&&(l=a,h=r),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:s,end:o,min:r,max:a}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function Vi(t,e,i,n){const s=t.iScale,o=t.vScale,r=s.getLabels(),a=s===o,l=[];let h,c,u,d;for(h=i,c=i+n;h<c;++h)d=e[h],u={},u[s.axis]=a||s.parse(r[h],h),l.push(ji(d,u,o,h));return l}function Hi(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function $i(t,e,i,n){let s=e.borderSkipped;const o={};if(!s)return void(t.borderSkipped=o);if(!0===s)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:r,end:a,reverse:l,top:h,bottom:c}=function(t){let e,i,n,s,o;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(s="end",o="start"):(s="start",o="end"),{start:i,end:n,reverse:e,top:s,bottom:o}}(t);"middle"===s&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?s=h:(i._bottom||0)===n?s=c:(o[Zi(c,r,a,l)]=!0,s=h)),o[Zi(s,r,a,l)]=!0,t.borderSkipped=o}function Zi(t,e,i,n){var s,o,r;return n?(r=i,t=Wi(t=(s=t)===(o=e)?r:s===r?o:s,i,e)):t=Wi(t,e,i),t}function Wi(t,e,i){return"start"===t?e:"end"===t?i:t}function qi(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}class Ui extends Ni{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>"spacing"!==t,_indexable:t=>"spacing"!==t&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data,{labels:{pointStyle:i,textAlign:n,color:s,useBorderRadius:o,borderRadius:r}}=t.legend.options;return e.labels.length&&e.datasets.length?e.labels.map((e,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:e,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.getDataVisibility(a),lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:l.borderWidth,strokeStyle:l.borderColor,textAlign:n,pointStyle:i,borderRadius:o&&(r||l.borderRadius),index:a}}):[]}}
vendor: 9,171 bytes, line 2
2,onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}};constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,n=this._cachedMeta;if(!1===this._parsing)n._parsed=i;else{let s,o,r=t=>+i[t];if(R(i[t])){const{key:t="value"}=this._parsing;r=e=>+J(i[e],t)}for(s=t,o=t+e;s<o;++s)n._parsed[s]=r(s)}}_getRotation(){return _t(this.options.rotation-90)}_getCircumference(){return _t(this.options.circumference)}_getRotationExtents(){let t=st,e=-st;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,s=n._getRotation(),o=n._getCircumference();t=Math.min(t,s),e=Math.max(e,s+o)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,n=this._cachedMeta,s=n.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,r=Math.max((Math.min(i.width,i.height)-o)/2,0),a=Math.min((h=r,"string"==typeof(l=this.options.cutout)&&l.endsWith("%")?parseFloat(l)/100:+l/h),1);var l,h;const c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:p,ratioY:f,offsetX:m,offsetY:g}=function(t,e,i){let n=1,s=1,o=0,r=0;if(e<st){const a=t,l=a+e,h=Math.cos(a),c=Math.sin(a),u=Math.cos(l),d=Math.sin(l),p=(t,e,n)=>kt(t,a,l,!0)?1:Math.max(e,e*i,n,n*i),f=(t,e,n)=>kt(t,a,l,!0)?-1:Math.min(e,e*i,n,n*i),m=p(0,h,u),g=p(lt,c,d),_=f(nt,h,u),v=f(nt+lt,c,d);n=(m-_)/2,s=(g-v)/2,o=-(m+_)/2,r=-(g+v)/2}return{ratioX:n,ratioY:s,offsetX:o,offsetY:r}}(d,u,a),_=(i.width-o)/p,v=(i.height-o)/f,y=Math.max(Math.min(_,v)/2,0),b=V(this.options.radius,y),x=(b-Math.max(b*a,0))/this._getVisibleDatasetWeightTotal();this.offsetX=m*b,this.offsetY=g*b,n.total=this.calculateTotal(),this.outerRadius=b-x*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-x*c,0),this.updateElements(s,0,s.length,t)}_circumference(t,e){const i=this.options,n=this._cachedMeta,s=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||null===n._parsed[t]||n.data[t].hidden?0:this.calculateCircumference(n._parsed[t]*s/st)}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,r=o.chartArea,a=o.options.animation,l=(r.left+r.right)/2,h=(r.top+r.bottom)/2,c=s&&a.animateScale,u=c?0:this.innerRadius,d=c?0:this.outerRadius,{sharedOptions:p,includeOptions:f}=this._getSharedOptions(e,n);let m,g=this._getRotation();for(m=0;m<e;++m)g+=this._circumference(m,s);for(m=e;m<e+i;++m){const e=this._circumference(m,s),i=t[m],o={x:l+this.offsetX,y:h+this.offsetY,startAngle:g,endAngle:g+e,circumference:e,outerRadius:d,innerRadius:u};f&&(o.options=p||this.resolveDataElementOptions(m,i.active?"active":n)),g+=e,this.updateElement(i,m,o,n)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i,n=0;for(i=0;i<e.length;i++){const s=t._parsed[i];null===s||isNaN(s)||!this.chart.getDataVisibility(i)||e[i].hidden||(n+=Math.abs(s))}return n}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?st*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=Yt(e._parsed[t],i.options.locale);return{label:n[t]||"",value:s}}getMaxBorderWidth(t){let e=0;const i=this.chart;let n,s,o,r,a;if(!t)for(n=0,s=i.data.datasets.length;n<s;++n)if(i.isDatasetVisible(n)){o=i.getDatasetMeta(n),t=o.data,r=o.controller;break}if(!t)return 0;for(n=0,s=t.length;n<s;++n)a=r.resolveDataElementOptions(n),"inner"!==a.borderAlign&&(e=Math.max(e,a.borderWidth||0,a.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,n=t.length;i<n;++i){const t=this.resolveDataElementOptions(i);e=Math.max(e,t.offset||0,t.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(j(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class Ki extends Ni{static id="polarArea";static defaults={dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:n}}=t.legend.options;return e.labels.map((e,s)=>{const o=t.getDatasetMeta(0).controller.getStyle(s);return{text:e,fillStyle:o.backgroundColor,strokeStyle:o.borderColor,fontColor:n,lineWidth:o.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(s),index:s}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}};constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,n=i.data.labels||[],s=Yt(e._parsed[t].r,i.options.locale);return{label:n[t]||"",value:s}}parseObjectData(t,e,i,n){return $e.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((t,i)=>{const n=this.getParsed(i).r;!isNaN(n)&&this.chart.getDataVisibility(i)&&(n<e.min&&(e.min=n),n>e.max&&(e.max=n))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,n=Math.min(e.right-e.left,e.bottom-e.top),s=Math.max(n/2,0),o=(s-Math.max(i.cutoutPercentage?s/100*i.cutoutPercentage:1,0))/t.getVisibleDatasetCount();this.outerRadius=s-o*this.index,this.innerRadius=this.outerRadius-o}updateElements(t,e,i,n){const s="reset"===n,o=this.chart,r=o.options.animation,a=this._cachedMeta.rScale,l=a.xCenter,h=a.yCenter,c=a.getIndexAngle(0)-.5*nt;let u,d=c;const p=360/this.countVisibleElements();for(u=0;u<e;++u)d+=this._computeAngle(u,n,p);for(u=e;u<e+i;u++){const e=t[u];let i=d,f=d+this._computeAngle(u,n,p),m=o.getDataVisibility(u)?a.getDistanceFromCenterForValue(this.getParsed(u).r):0;d=f,s&&(r.animateScale&&(m=0),r.animateRotate&&(i=f=c));const g={x:l,y:h,innerRadius:0,outerRadius:m,startAngle:i,endAngle:f,options:this.resolveDataElementOptions(u,e.active?"active":n)};this.updateElement(e,u,g,n)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((t,i)=>{!isNaN(this.getParsed(i).r)&&this.chart.getDataVisibility(i)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?_t(this.resolveDataElementOptions(t,e).angle||i):0}}var Yi=Object.freeze({__proto__:null,BarController:class extends Ni{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return Vi(t,e,i,n)}parseArrayData(t,e,i,n){return Vi(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:s,vScale:o}=t,{xAxisKey:r="x",yAxisKey:a="y"}=this._parsing,l="x"===s.axis?r:a,h="x"===o.axis?r:a,c=[];let u,d,p,f;for(u=i,d=i+n;u<d;++u)f=e[u],p={},p[s.axis]=s.parse(J(f,l),u),c.push(ji(J(f,h),p,o,u));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const s=i._custom;s&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,s.min),t.max=Math.max(t.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,s=this.getParsed(t),o=s._custom,r=Hi(o)?"["+o.start+", "+o.end+"]":""+n.getLabelForValue(s[n.axis]);return{label:""+i.getLabelForValue(s[i.axis]),value:r}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const s="reset"===n,{index:o,_cachedMeta:{vScale:r}}=this,a=r.getBasePixel(),l=r.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,n);for(let d=e;d<e+i;d++){const e=this.getParsed(d),i=s||z(e[r.axis])?{base:a,head:a}:this._calculateBarValuePixels(d),p=this._calculateBarIndexPixels(d,h),f=(e._stacks||{})[r.axis],m={horizontal:l,base:i.base,enableBorderRadius:!f||Hi(e._custom)||o===f._top||o===f._bottom,x:l?i.head:p.center,y:l?p.center:i.head,height:l?p.size:Math.abs(i.size),width:l?Math.abs(i.size):p.size};u&&(m.options=c||this.resolveDataElementOptions(d,t[d].active?"active":n));const g=m.options||t[d].options;$i(m,g,f,o),qi(m,g,h.ratio),this.updateElement(t[d],d,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),s=i.options.stacked,o=[],r=this._cachedMeta.controller.getParsed(e),a=r&&r[i.axis],l=t=>{const e=t._parsed.find(t=>
vendor: 11,661 bytes, line 2
2t[i.axis]===a),n=e&&e[t.vScale.axis];if(z(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!l(i))&&((!1===s||-1===o.indexOf(i.stack)||void 0===s&&void 0===i.stack)&&o.push(i.stack),i.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[j("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),s=void 0!==e?n.indexOf(e):-1;return-1===s?n.length-1:s}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let s,o;for(s=0,o=e.data.length;s<o;++s)n.push(i.getPixelForValue(this.getParsed(s)[i.axis],s));const r=t.barThickness;return{min:r||Bi(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:r?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:s,minBarLength:o}}=this,r=s||0,a=this.getParsed(t),l=a._custom,h=Hi(l);let c,u,d=a[e.axis],p=0,f=i?this.applyStack(e,a,i):d;f!==d&&(p=f-d,f=d),h&&(d=l.barStart,f=l.barEnd-l.barStart,0!==d&&dt(d)!==dt(l.barEnd)&&(p=0),p+=d);const m=z(s)||h?p:s;let g=e.getPixelForValue(m);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(p+f):g,u=c-g,Math.abs(u)<o){u=function(t,e,i){return 0!==t?dt(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,r)*o,d===r&&(g-=u/2);const t=e.getPixelForDecimal(0),s=e.getPixelForDecimal(1),l=Math.min(t,s),p=Math.max(t,s);g=Math.max(Math.min(g,p),l),c=g+u,i&&!h&&(a._stacks[e.axis]._visualValues[n]=e.getValueForPixel(c)-e.getValueForPixel(g))}if(g===e.getPixelForValue(r)){const t=dt(u)*e.getLineWidthForValue(r)/2;g+=t,u-=t}return{size:u,base:g,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,s=n.skipNull,o=j(n.maxBarThickness,1/0);let r,a;const l=this._getAxisCount();if(e.grouped){const i=s?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,n){const s=e.pixels,o=s[t];let r=t>0?s[t-1]:null,a=t<s.length-1?s[t+1]:null;const l=i.categoryPercentage;null===r&&(r=o-(null===a?e.end-e.start:a-o)),null===a&&(a=o+o-r);const h=o-(o-Math.min(r,a))/2*l;return{chunk:Math.abs(a-r)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i*l):function(t,e,i,n){const s=i.barThickness;let o,r;return z(s)?(o=e.min*i.categoryPercentage,r=i.barPercentage):(o=s*n,r=1),{chunk:o/n,ratio:r,start:e.pixels[t]-o/2}}(t,e,n,i*l),c="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,u=this._getAxis().indexOf(j(c,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,s?t:void 0)+u;r=h.start+h.chunk*d+h.chunk/2,a=Math.min(o,h.chunk*h.ratio)}else r=i.getPixelForValue(this.getParsed(t)[i.axis],t),a=Math.min(o,e.min*e.ratio);return{base:r-a/2,head:r+a/2,center:r,size:a}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let s=0;for(;s<n;++s)null===this.getParsed(s)[e.axis]||i[s].hidden||i[s].draw(this._ctx)}},BubbleController:class extends Ni{static id="bubble";static defaults={datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}};static overrides={scales:{x:{type:"linear"},y:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,n){const s=super.parsePrimitiveData(t,e,i,n);for(let t=0;t<s.length;t++)s[t]._custom=this.resolveDataElementOptions(t+i).radius;return s}parseArrayData(t,e,i,n){const s=super.parseArrayData(t,e,i,n);for(let t=0;t<s.length;t++){const n=e[i+t];s[t]._custom=j(n[2],this.resolveDataElementOptions(t+i).radius)}return s}parseObjectData(t,e,i,n){const s=super.parseObjectData(t,e,i,n);for(let t=0;t<s.length;t++){const n=e[i+t];s[t]._custom=j(n&&n.r&&+n.r,this.resolveDataElementOptions(t+i).radius)}return s}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,o=this.getParsed(t),r=n.getLabelForValue(o.x),a=s.getLabelForValue(o.y),l=o._custom;return{label:i[t]||"",value:"("+r+", "+a+(l?", "+l:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r}=this._cachedMeta,{sharedOptions:a,includeOptions:l}=this._getSharedOptions(e,n),h=o.axis,c=r.axis;for(let u=e;u<e+i;u++){const e=t[u],i=!s&&this.getParsed(u),d={},p=d[h]=s?o.getPixelForDecimal(.5):o.getPixelForValue(i[h]),f=d[c]=s?r.getBasePixel():r.getPixelForValue(i[c]);d.skip=isNaN(p)||isNaN(f),l&&(d.options=a||this.resolveDataElementOptions(u,e.active?"active":n),s&&(d.options.radius=0)),this.updateElement(e,u,d,n)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let n=super.resolveDataElementOptions(t,e);n.$shared&&(n=Object.assign({},n,{$shared:!1}));const s=n.radius;return"active"!==e&&(n.radius=0),n.radius+=j(i&&i._custom,s),n}},DoughnutController:Ui,LineController:class extends Ni{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:s}=e,o=this.chart._animationsDisabled;let{start:r,count:a}=Rt(e,n,o);this._drawStart=r,this._drawCount=a,Nt(e)&&(r=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!s._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!o,options:l},t),this.updateElements(n,r,a,t)}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),u=o.axis,d=r.axis,{spanGaps:p,segment:f}=this.options,m=mt(p)?p:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||s||"none"===n,_=e+i,v=t.length;let y=e>0&&this.getParsed(e-1);for(let i=0;i<v;++i){const p=t[i],v=g?p:{};if(i<e||i>=_){v.skip=!0;continue}const b=this.getParsed(i),x=z(b[d]),w=v[u]=o.getPixelForValue(b[u],i),M=v[d]=s||x?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,b,a):b[d],i);v.skip=isNaN(w)||isNaN(M)||x,v.stop=i>0&&Math.abs(b[u]-y[u])>m,f&&(v.parsed=b,v.raw=l.data[i]),c&&(v.options=h||this.resolveDataElementOptions(i,p.active?"active":n)),g||this.updateElement(p,i,v,n),y=b}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},PieController:class extends Ui{static id="pie";static defaults={cutout:0,rotation:0,circumference:360,radius:"100%"}},PolarAreaController:Ki,RadarController:class extends Ni{static id="radar";static defaults={datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}};static overrides={aspectRatio:1,scales:{r:{type:"radialLinear"}}};getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,n){return $e.bind(this)(t,e,i,n)}update(t){const e=this._cachedMeta,i=e.dataset,n=e.data||[],s=e.iScale.getLabels();if(i.points=n,"resize"!==t){const e=this.resolveDatasetElementOptions(t);this.options.showLine||(e.borderWidth=0);const o={_loop:!0,_fullLoop:s.length===n.length,options:e};this.updateElement(i,void 0,o,t)}this.updateElements(n,0,n.length,t)}updateElements(t,e,i,n){const s=this._cachedMeta.rScale,o="reset"===n;for(let r=e;r<e+i;r++){const e=t[r],i=this.resolveDataElementOptions(r,e.active?"active":n),a=s.getPointPositionForValue(r,this.getParsed(r).r),l=o?s.xCenter:a.x,h=o?s.yCenter:a.y,c={x:l,y:h,angle:a.angle,skip:isNaN(l)||isNaN(h),options:i};this.updateElement(e,r,c,n)}}},ScatterController:class extends Ni{static id="scatter";static defaults={datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1};static overrides={interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}};getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:s}=e,o=this.getParsed(t),r=n.getLabelForValue(o.x),a=s.getLabelForValue(o.y);return{label:i[t]||"",value:"("+r+", "+a+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,n=this.chart._animationsDisabled;let{start:s,count:o}=Rt(e,i,n);if(this._drawStart=s,this._drawCount=o,Nt(e)&&(s=0,o=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:s,_dataset:o}=e;s._chart=this.chart,s._datasetIndex=this.index,s._decimated=!!o._decimated,s.points=i;const r=this.resolveDatasetElementOptions(t);r.segment=this.options.segment,this.updateElement(s,void 0,{animated:!n,options:r},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,s,o,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,n){const s="reset"===n,{iScale:o,vScale:r,_stacked:a,_dataset:l}=this._cachedMeta,h=this.resolveDataElementOptions(e,n),c=this.getSharedOptions(h),u=this.includeOptions(n,c),d=o.axis,p=r.axis,{spanGaps:f,segment:m}=this.options,g=mt(f)?f:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||s||"none"===n;let v=e>0&&this.getParsed(e-1);for(let h=e;h<e+i;++h){const e=t[h],i=this.getParsed(h),f=_?e:{},y=z(i[p]),b=f[d]=o.getPixelForValue(i[d],h),x=f[p]=s||y?r.getBasePixel():r.getPixelForValue(a?this.applyStack(r,i,a):i[p],h);f.skip=isNaN(b)||isNaN(x)||y,f.stop=h>0&&Math.abs(i[d]-v[d])>g,m&&(f.parsed=i,f.raw=l.data[h]),u&&(f.options=c||this.resolveDataElementOptions(h,e.active?"active":n)),_||this.updateElement(e,h,f,n),v=i}this.updateSharedOptions(c,n,h)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let t=0;for(let i=e.length-1;i>=0;--i)t=Math.max(t,e[i].size(this.resolveDataElementOptions(i))/2);return t>0&&t}const i=t.dataset,n=i.options&&i.options.borderWidth||0;if(!e.length)return n;const s=e[0].size(this.resolveDataElementOptions(0)),o=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(n,s,o)/2}}});function Gi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Xi{static override(t){Object.assign(Xi.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return Gi()}parse(){return Gi()}format(){return Gi()}add(){return Gi()}diff(){return Gi()}startOf(){return Gi()}endOf(){return Gi()}}var Ji=Xi;function Qi(t,e,i,n){const{controller:s,data:o,_sorted:r}=t,a=s._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&"r"!==e&&r&&o.length){const r=a._reversePixels?At:St;if(!n){const n=r(o,e,i);if(l){const{vScale:e}=s._cachedMeta,{_parsed:i}=t,o=i.slice(0,n.lo+1).reverse().findIndex(t=>
2!z(t[e.axis]));n.lo-=Math.max(0,o);const r=i.slice(n.hi).findIndex(t=>!z(t[e.axis]));n.hi+=Math.max(0,r)}return n}if(s._sharedOptions){const t=o[0],n="function"==typeof t.getRange&&t.getRange(e);if(n){const t=r(o,e,i-n),s=r(o,e,i+n);return{lo:t.lo,hi:s.hi}}}}return{lo:0,hi:o.length-1}}function tn(t,e,i,n,s){const o=t.getSortedVisibleDatasetMetas(),r=i[e];for(let t=0,i=o.length;t<i;++t){const{index:i,data:a}=o[t],{lo:l,hi:h}=Qi(o[t],e,r,s);for(let t=l;t<=h;++t){const e=a[t];e.skip||n(e,i,t)}}}function en(t,e,i,n,s){const o=[];return s||t.isPointInArea(e)?(tn(t,i,e,function(i,r,a){(s||ce(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&o.push({element:i,datasetIndex:r,index:a})},!0),o):o}function nn(t,e,i,n,s,o){return o||t.isPointInArea(e)?"r"!==i||n?function(t,e,i,n,s,o){let r=[];const a=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const s=e?Math.abs(t.x-n.x):0,o=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}(i);let l=Number.POSITIVE_INFINITY;return tn(t,i,e,function(i,h,c){const u=i.inRange(e.x,e.y,s);if(n&&!u)return;const d=i.getCenterPoint(s);if(!o&&!t.isPointInArea(d)&&!u)return;const p=a(e,d);p<l?(r=[{element:i,datasetIndex:h,index:c}],l=p):p===l&&r.push({element:i,datasetIndex:h,index:c})}),r}(t,e,i,n,s,o):function(t,e,i,n){let s=[];return tn(t,i,e,function(t,i,o){const{startAngle:r,endAngle:a}=t.getProps(["startAngle","endAngle"],n),{angle:l}=bt(t,{x:e.x,y:e.y});kt(l,r,a)&&s.push({element:t,datasetIndex:i,index:o})}),s}(t,e,i,s):[]}function sn(t,e,i,n,s){const o=[],r="x"===i?"inXRange":"inYRange";let a=!1;return tn(t,i,e,(t,n,l)=>{t[r]&&t[r](e[i],s)&&(o.push({element:t,datasetIndex:n,index:l}),a=a||t.inRange(e.x,e.y,s))}),n&&!a?[]:o}var on={evaluateInteractionItems:tn,modes:{index(t,e,i,n){const s=ii(e,t),o=i.axis||"x",r=i.includeInvisible||!1,a=i.intersect?en(t,s,o,n,r):nn(t,s,o,!1,n,r),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=a[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,n){const s=ii(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;let a=i.intersect?en(t,s,o,n,r):nn(t,s,o,!1,n,r);if(a.length>0){const e=a[0].datasetIndex,i=t.getDatasetMeta(e).data;a=[];for(let t=0;t<i.length;++t)a.push({element:i[t],datasetIndex:e,index:t})}return a},point:(t,e,i,n)=>en(t,ii(e,t),i.axis||"xy",n,i.includeInvisible||!1),nearest(t,e,i,n){const s=ii(e,t),o=i.axis||"xy",r=i.includeInvisible||!1;return nn(t,s,o,i.intersect,n,r)},x:(t,e,i,n)=>sn(t,ii(e,t),"x",i.intersect,n),y:(t,e,i,n)=>sn(t,ii(e,t),"y",i.intersect,n)}};const rn=["left","top","right","bottom"];function an(t,e){return t.filter(t=>t.pos===e)}function ln(t,e){return t.filter(t=>-1===rn.indexOf(t.pos)&&t.box.axis===e)}function hn(t,e){return t.sort((t,i)=>{const n=e?i:t,s=e?t:i;return n.weight===s.weight?n.index-s.index:n.weight-s.weight})}function cn(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function un(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function dn(t,e,i,n){const{pos:s,box:o}=i,r=t.maxPadding;if(!R(s)){i.size&&(t[s]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?o.height:o.width),i.size=e.size/e.count,t[s]+=i.size}o.getPadding&&un(r,o.getPadding());const a=Math.max(0,e.outerWidth-cn(r,t,"left","right")),l=Math.max(0,e.outerHeight-cn(r,t,"to
2p","bottom")),h=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function pn(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function fn(t,e,i,n){const s=[];let o,r,a,l,h,c;for(o=0,r=t.length,h=0;o<r;++o){a=t[o],l=a.box,l.update(a.width||e.w,a.height||e.h,pn(a.horizontal,e));const{same:r,other:u}=dn(e,i,a,n);h|=r&&s.length,c=c||u,l.fullSize||s.push(a)}return h&&fn(s,e,i,n)||c}function mn(t,e,i,n,s){t.top=i,t.left=e,t.right=e+n,t.bottom=i+s,t.width=n,t.height=s}function gn(t,e,i,n){const s=i.padding;let{x:o,y:r}=e;for(const a of t){const t=a.box,l=n[a.stack]||{count:1,placed:0,weight:1},h=a.stackWeight/l.weight||1;if(a.horizontal){const n=e.w*h,o=l.size||t.height;tt(l.start)&&(r=l.start),t.fullSize?mn(t,s.left,r,i.outerWidth-s.right-s.left,o):mn(t,e.left+l.placed,r,n,o),l.start=r,l.placed+=n,r=t.bottom}else{const n=e.h*h,r=l.size||t.width;tt(l.start)&&(o=l.start),t.fullSize?mn(t,o,s.top,r,i.outerHeight-s.bottom-s.top):mn(t,o,e.top+l.placed,r,n),l.start=o,l.placed+=n,o=t.right}}e.x=o,e.y=r}var _n={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const s=Oe(t.options.layout.padding),o=Math.max(e-s.width,0),r=Math.max(i-s.height,0),a=function(t){const e=function(t){const e=[];let i,n,s,o,r,a;for(i=0,n=(t||[]).length;i<n;++i)s=t[i],({position:o,options:{stack:r,stackWeight:a=1}}=s),e.push({index:i,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return e}(t),i=hn(e.filter(t=>t.box.fullSize),!0),n=hn(an(e,"left"),!0),s=hn(an(e,"right")),o=hn(an(e,"top"),!0),r=hn(an(e,"bottom")),a=ln(e,"x"),l=ln(e,"y");return{fullSize:i,leftAndTop:n.concat(o),rightAndBottom:s.concat(l).concat(r).concat(a),chartArea:an(e,"chartArea"),vertical:n.concat(s).concat(l),horizontal:o.concat(r).concat(a)}}(t.boxes),l=a.vertical,h=a.horizontal;$(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const c=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/c,hBoxMaxHeight:r/2}),d=Object.assign({},s);un(d,Oe(n));const p=Object.assign({maxPadding:d,w:o,h:r,x:s.left,y:s.top},s),f=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:s}=i;if(!t||!rn.includes(n))continue;const o=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:s}=e;let o,r,a;for(o=0,r=t.length;o<r;++o){a=t[o];const{fullSize:r}=a.box,l=i[a.stack],h=l&&a.stackWeight/l.weight;a.horizontal?(a.width=h?h*n:r&&e.availableWidth,a.height=s):(a.width=n,a.height=h?h*s:r&&e.availableHeight)}return i}(l.concat(h),u);fn(a.fullSize,p,u,f),fn(l,p,u,f),fn(h,p,u,f)&&fn(l,p,u,f),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(p),gn(a.leftAndTop,p,u,f),p.x+=p.w,p.y+=p.h,gn(a.rightAndBottom,p,u,f),t.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},$(a.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class vn{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class yn extends vn{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}
vendor: 19,111 bytes, line 2
2const bn="$chartjs",xn={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},wn=t=>null===t||""===t,Mn=!!oi&&{passive:!0};function kn(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,Mn)}function Ln(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function On(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Ln(i.addedNodes,n),e=e&&!Ln(i.removedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}function En(t,e,i){const n=t.canvas,s=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Ln(i.removedNodes,n),e=e&&!Ln(i.addedNodes,n);e&&i()});return s.observe(document,{childList:!0,subtree:!0}),s}const Sn=new Map;let An=0;function Pn(){const t=window.devicePixelRatio;t!==An&&(An=t,Sn.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Cn(t,e,i){const n=t.canvas,s=n&&Xe(n);if(!s)return;const o=Dt((t,e)=>{const n=s.clientWidth;i(t,e),n<s.clientWidth&&i()},window),r=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||o(i,n)});return r.observe(s),function(t,e){Sn.size||window.addEventListener("resize",Pn),Sn.set(t,e)}(t,o),r}function Tn(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Sn.delete(t),Sn.size||window.removeEventListener("resize",Pn)}(t)}function In(t,e,i){const n=t.canvas,s=Dt(e=>{null!==t.ctx&&i(function(t,e){const i=xn[t.type]||t.type,{x:n,y:s}=ii(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==s?s:null}}(e,t))},t);return function(t,e,i){t&&t.addEventListener(e,i,Mn)}(n,e,s),s}class Dn extends vn{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),s=t.getAttribute("width");if(t[bn]={initial:{height:n,width:s,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",wn(s)){const e=ri(t,"width");void 0!==e&&(t.width=e)}if(wn(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=ri(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[bn])return!1;const i=e[bn].initial;["height","width"].forEach(t=>{const n=i[t];z(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e[bn],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),s={attach:On,detach:En,resize:Cn}[e]||In;n[e]=s(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Tn,detach:Tn,resize:Tn}[e]||kn)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const s=Qe(t),o=ei(s,"margin"),r=Je(s.maxWidth,t,"clientWidth")||rt,a=Je(s.maxHeight,t,"clientHeight")||rt,l=function(t,e,i){let n,s;if(void 0===e||void 0===i){const o=t&&Xe(t);if(o){const t=o.getBoundingClientRect(),r=Qe(o),a=ei(r,"border","width"),l=ei(r,"padding");e=t.width-l.width-a.width,i=t.height-l.height-a.height,n=Je(r.maxWidth,o,"clientWidth"),s=Je(r.maxHeight,o,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||rt,maxHeight:s||rt}}(t,e,i);let{width:h,height:c}=l;if("content-box"===s.boxSizing){const t=ei(s,"border","width"),e=ei(s,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-o.width),c=Math.max(0,n?h/n:c-o.height),h=ni(Math.min(h,r,l.maxWidth)),c=ni(Math.min(c,a,l.maxHeight)),h&&!c&&(c=ni(h/2)),(void 0!==e||void 0!==i)&&n&&l.height&&c>l.height&&(c=l.height,h=ni(Math.floor(c*n))),{width:h,height:c}}(t,e,i,n)}isAttached(t){const e=t&&Xe(t);return!(!e||!e.isConnected)}}class zn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return mt(this.x)&&mt(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}function Fn(t,e,i,n,s){const o=j(n,0),r=Math.min(j(s,t.length),t.length);let a,l,h,c=0;for(i=Math.ceil(i),s&&(a=s-n,i=a/Math.floor(a/i)),h=o;h<0;)c++,h=Math.round(o+c*i);for(l=Math.max(o,0);l<r;l++)l===h&&(e.push(t[l]),c++,h=Math.round(o+c*i))}const Rn=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,Nn=(t,e)=>Math.min(e||t,t);function Bn(t,e){const i=[],n=t.length/e,s=t.length;let o=0;for(;o<s;o+=n)i.push(t[Math.floor(o)]);return i}function jn(t,e,i){const n=t.ticks.length,s=Math.min(e,n-1),o=t._startPixel,r=t._endPixel,a=1e-6;let l,h=t.getPixelForTick(s);if(!(i&&(l=1===n?Math.max(h-o,r-h):0===e?(t.getPixelForTick(1)-h)/2:(h-t.getPixelForTick(s-1))/2,h+=s<e?l:-l,h<o-a||h>r+a)))return h}function Vn(t){return t.drawTicks?t.tickLength:0}function Hn(t,e){if(!t.display)return 0;const i=Ee(t.font,e),n=Oe(t.padding);return(F(t.text)?t.text.length:1)*i.lineHeight+n.height}function $n(t,e,i){let n=zt(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class Zn extends zn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=B(t,Number.POSITIVE_INFINITY),e=B(e,Number.NEGATIVE_INFINITY),i=B(i,Number.POSITIVE_INFINITY),n=B(n,Number.NEGATIVE_INFINITY),{min:B(t,i),max:B(e,n),minDefined:N(t),maxDefined:N(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:s,maxDefined:o}=this.getUserBounds();if(s&&o)return{min:i,max:n};const r=this.getMatchingVisibleMetas();for(let a=0,l=r.length;a<l;++a)e=r[a].controller.getMinMax(this,t),s||(i=Math.min(i,e.min)),o||(n=Math.max(n,e.max));return i=o&&i>n?n:i,n=s&&i>n?i:n,{min:B(i,B(n,i)),max:B(n,B(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){H(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:s,ticks:o}=this.options,r=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:s}=t,o=V(e,(s-n)/2),r=(t,e)=>i&&0===t?0:t+e;return{min:r(n,-Math.abs(o)),max:r(s,o)}}(this,s,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=r<this.ticks.length;this._convertTicksToLabels(a?Bn(this.ticks,r):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||"auto"===o.source)&&(this.ticks=function(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),s=t._maxLength/i;return Math.floor(Math.min(n,s))}(t),s=Math.min(i.maxTicksLimit||n,n),o=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],r=o.length,a=o[0],l=o[r-1],h=[];if(r>s)return function(t,e,i,n){let s,o=0,r=i[0];for(n=Math.ceil(n),s=0;s<t.length;s++)s===r&&(e.push(t[s]),o++,r=i[o*n])}(e,h,o,r/s),h;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),s=e.length/i;if(!n)return Math.max(s,1);const o=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}(n);for(let t=0,e=o.length-1;t<e;t++){const e=o[t];if(e>s)return e}return Math.max(s,1)}(o,e,s);if(r>0){let t,i;const n=r>1?Math.round((l-a)/(r-1)):null;for(Fn(e,h,c,z(n)?0:a-n,a),t=0,i=r-1;t<i;t++)Fn(e,h,c,o[t],o[t+1]);return Fn(e,h,c,l,z(n)?e.length:l+n),h}return Fn(e,h,c),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){H(this.options.afterUpdate,[this])}beforeSetDimensions(){H(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){H(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),H(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){H(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,s;for(i=0,n=t.length;i<n;i++)s=t[i],s.label=H(e.callback,[s.value,i,t],this)}afterTickToLabelConversion(){H(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){H(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=Nn(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,s=e.maxRotation;let o,r,a,l=n;if(!this._isVisible()||!e.display||n>=s||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=Lt(this.chart.width-c,0,this.maxWidth);o=t.offset?this.maxWidth/i:d/(i-1),c+6>o&&(o=d/(i-(t.offset?.5:1)),r=this.maxHeight-Vn(t.grid)-e.padding-Hn(t.title,this.chart.options.font),a=Math.sqrt(c*c+u*u),l=vt(Math.min(Math.asin(Lt((h.highest.height+6)/o,-1,1)),Math.asin(Lt(r/a,-1,1))-Math.asin(Lt(u/a,-1,1)))),l=Math.max(n,Math.min(s,l))),this.labelRotation=l}afterCalculateLabelRotation(){H(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){H(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:s}}=this,o=this._isVisible(),r=this.isHorizontal();if(o){const o=Hn(n,e.options.font);if(r?(t.width=this.maxWidth,t.height=Vn(s)+o):(t.height=this.maxHeight,t.width=Vn(s)+o),i.display&&this.ticks.length){const{first:e,last:n,widest:s,highest:o}=this._getLabelSizes(),a=2*i.padding,l=_t(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(r){const e=i.mirror?0:c*s.width+h*o.height;t.height=Math.min(this.maxHeight,t.height+e+a)}else{const e=i.mirror?0:h*s.width+c*o.height;t.width=Math.min(this.maxWidth,t.width+e+a)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),r?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:s,padding:o},position:r}=this.options,a=0!==this.labelRotation,l="top"!==r&&"x"===this.axis;if(this.isHorizontal()){const r=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;a?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===s?u=e.width:"end"===s?c=t.width:"inner"!==s&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-r+o)*this.width/(this.width-r),0),this.paddingRight=Math.max((u-h+o)*this.width/(this.width-h),0)}else{let i=e.height/2,n=t.height/2;"start"===s?(i=0,n=t.height):"end"===s&&(i=e.height,n=0),this.paddingTop=i+o,this.paddingBottom=n+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){H(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)z(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=Bn(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:s}=this,o=[],r=[],a=Math.floor(e/Nn(e,i));let l,h,c,u,d,p,f,m,g,_,v,y=0,b=0;for(l=0;l<e;l+=a){if(u=t[l].label,d=this._resolveTickFontOptions(l),n.font=p=d.string,f=s[p]=s[p]||{data:{},gc:[]},m=d.lineHeight,g=_=0,z(u)||F(u)){if(F(u))for(h=0,c=u.length;h<c;++h)v=u[h],z(v)||F(v)||(g=se(n,f.data,f.gc,g,v),_+=m)}else g=se(n,f.data,f.gc,g,u),_=m;o.push(g),r.push(_),y=Math.max(g,y),b=Math.max(_,b)}!function(t,e){$(t,t=>{const i=t.gc,n=i.length/2;let s;if(n>e){for(s=0;s<n;++s)delete t.data[i[s]];i.splice(0,n)}})}(s,e);const x=o.indexOf(y),w=r.indexOf(b),M=t=>({width:o[t]||0,height:r[t]||0});return{first:M(0),last:M(e-1),widest:M(x),highest:M(w),widths:o,heights:r}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Lt(this._alignToPixels?re(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return Ae(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=Ae(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=_t(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),s=this._getLabelSizes(),o=t.autoSkipPadding||0,r=s?s.widest.width+o:0,a=s?s.highest.height+o:0;return this.isHorizontal()?a*i>r*n?r/i:a/n:a*n<r*i?a/i:r/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:s,position:o,border:r}=n,a=s.offset,l=this.isHorizontal(),h=this.ticks.length+(a?1:0),c=Vn(s),u=[],d=r.setContext(this.getContext()),p=d.display?d.width:0,f=p/2,m=function(t){return re(i,t,p)};let g,_,v,y,b,x,w,M,k,L,O,E;if("top"===o)g=m(this.bottom),x=this.bottom-c,M=g-f,L=m(t.top)+f,E=t.bottom;else if("bottom"===o)g=m(this.top),L=t.top,E=m(t.bottom)-f,x=g+f,M=this.top+c;else if("left"===o)g=m(this.right),b=this.right-c,w=g-f,k=m(t.left)+f,O=t.right;else if("right"===o)g=m(this.left),k=t.left,O=m(t.right)-f,b=g+f,w=this.left+c;else if("x"===e){if("center"===o)g=m((t.top+t.bottom)/2+.5);else if(R(o)){const t=Object.keys(o)[0],e=o[t];g=m(this.chart.scales[t].getPixelForValue(e))}L=t.top,E=t.bottom,x=g+f,M=x+c}else if("y"===e){if("center"===o)g=m((t.left+t.right)/2);else if(R(o)){const t=Object.keys(o)[0],e=o[t];g=m(this.chart.scales[t].getPixelForValue(e))}b=g-f,w=b-c,k=t.left,O=t.right}const S=j(n.ticks.maxTicksLimit,h),A=Math.max(1,Math.ceil(h/S));for(_=0;_<h;_+=A){const t=this.getContext(_),e=s.setContext(t),n=r.setContext(t),o=e.lineWidth,h=e.color,c=n.dash||[],d=n.dashOffset,p=e.tickWidth,f=e.tickColor,m=e.tickBorderDash||[],g=e.tickBorderDashOffset;v=jn(this,_,a),void 0!==v&&(y=re(i,v,o),l?b=w=k=O=y:x=M=L=E=y,u.push({tx1:b,ty1:x,tx2:w,ty2:M,x1:k,y1:L,x2:O,y2:E,width:o,color:h,borderDash:c,borderDashOffset:d,tickWidth:p,tickColor:f,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=h,this._borderValue=g,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:s}=i,o=this.isHorizontal(),r=this.ticks,{align:a,crossAlign:l,padding:h,mirror:c}=s,u=Vn(i.grid),d=u+h,p=c?-h:d,f=-_t(this.labelRotation),m=[];let g,_,v,y,b,x,w,M,k,L,O,E,S="middle";if("top"===n)x=this.bottom-p,w=this._getXAxisLabelAlignment();else if("bottom"===n)x=this.top+p,w=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,b=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(u);w=t.textAlign,b=t.x}else if("x"===e){if("center"===n)x=(t.top+t.bottom)/2+d;else if(R(n)){const t=Object.keys(n)[0],e=n[t];x=this.chart.scales[t].getPixelForValue(e)+d}w=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)b=(t.left+t.right)/2-d;else if(R(n)){const t=Object.keys(n)[0],e=n[t];b=this.chart.scales[t].getPixelForValue(e)}w=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===a?S="top":"end"===a&&(S="bottom"));const A=this._getLabelSizes();for(g=0,_=r.length;g<_;++g){v=r[g],y=v.label;const t=s.setContext(this.getContext(g));M=this.getPixelForTick(g)+s.labelOffset,k=this._resolveTickFontOptions(g),L=k.lineHeight,O=F(y)?y.length:1;const e=O/2,i=t.color,a=t.textStrokeColor,h=t.textStrokeWidth;let u,d=w;
vendor: 6,006 bytes, line 2
2if(o?(b=M,"inner"===w&&(d=g===_-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),E="top"===n?"near"===l||0!==f?-O*L+L/2:"center"===l?-A.highest.height/2-e*L+L:-A.highest.height+L/2:"near"===l||0!==f?L/2:"center"===l?A.highest.height/2-e*L:A.highest.height-O*L,c&&(E*=-1),0===f||t.showLabelBackdrop||(b+=L/2*Math.sin(f))):(x=M,E=(1-O)*L/2),t.showLabelBackdrop){const e=Oe(t.backdropPadding),i=A.heights[g],n=A.widths[g];let s=E-e.top,o=0-e.left;switch(S){case"middle":s-=i/2;break;case"bottom":s-=i}switch(w){case"center":o-=n/2;break;case"right":o-=n;break;case"inner":g===_-1?o-=n:g>0&&(o-=n/2)}u={left:o,top:s,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({label:y,font:k,textOffset:E,options:{rotation:f,color:i,strokeColor:a,strokeWidth:h,textAlign:d,textBaseline:S,translation:[b,x],backdrop:u}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-_t(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:s}}=this.options,o=t+s,r=this._getLabelSizes().widest.width;let a,l;return"left"===e?n?(l=this.right+s,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l+=r)):(l=this.right-o,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l=this.left)):"right"===e?n?(l=this.left+s,"near"===i?a="right":"center"===i?(a="center",l-=r/2):(a="left",l-=r)):(l=this.left+o,"near"===i?a="left":"center"===i?(a="center",l+=r/2):(a="right",l=this.right)):a="right",{textAlign:a,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:s,height:o}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,s,o),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(e=>e.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let s,o;const r=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(s=0,o=n.length;s<o;++s){const t=n[s];e.drawOnChartArea&&r({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&r({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,s=i.setContext(this.getContext()),o=i.display?s.width:0;if(!o)return;const r=n.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,h,c,u;this.isHorizontal()?(l=re(t,this.left,o)-o/2,h=re(t,this.right,r)+r/2,c=u=a):(c=re(t,this.top,o)-o/2,u=re(t,this.bottom,r)+r/2,l=h=a),e.save(),e.lineWidth=s.width,e.strokeStyle=s.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&ue(e,i);const n=this.getLabelItems(t);for(const t of n){const i=t.options,n=t.font;_e(e,t.label,0,t.textOffset,n,i)}i&&de(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const s=Ee(i.font),o=Oe(i.padding),r=i.align;let a=s.lineHeight/2;"bottom"===e||"center"===e||R(e)?(a+=o.bottom,F(i.text)&&(a+=s.lineHeight*(i.text.length-1))):a+=o.top;const{titleX:l,titleY:h,maxWidth:c,rotation:u}=function(t,e,i,n){const{top:s,left:o,bottom:r,right:a,chart:l}=t,{chartArea:h,scales:c}=l;let u,d,p,f=0;const m=r-s,g=a-o;if(t.isHorizontal()){if(d=Ft(n,o,a),R(i)){const t=Object.keys(i)[0],n=i[t];p=c[t].getPixelForValue(n)+m-e}else p="center"===i?(h.bottom+h.top)/2+m-e:Rn(t,i,e);u=a-o}else{if(R(i)){const t=Object.keys(i)[0],n=i[t];d=c[t].getPixelForValue(n)-g+e}else d="center"===i?(h.left+h.right)/2-g+e:Rn(t,i,e);p=Ft(n,r,s),f="left"===i?-lt:lt}return{titleX:d,titleY:p,maxWidth:u,rotation:f}}(this,a,e,r);_e(t,i.text,0,0,s,{color:i.color,maxWidth:c,rotation:u,textAlign:$n(r,e,n),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=j(t.grid&&t.grid.z,-1),n=j(t.border&&t.border.z,0);return this._isVisible()&&this.draw===Zn.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let s,o;for(s=0,o=e.length;s<o;++s){const o=e[s];o[i]!==this.id||t&&o.type!==t||n.push(o)}return n}_resolveTickFontOptions(t){return Ee(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Wn{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,s=t.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+t);return s in n||(n[s]=t,function(t,e,i){const n=K(Object.create(null),[i?ne.get(i):{},ne.get(e),t.defaults]);ne.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>
vendor: 22,042 bytes, line 2
2{const n=i.split("."),s=n.pop(),o=[t].concat(n).join("."),r=e[i].split("."),a=r.pop(),l=r.join(".");ne.route(o,s,l,a)})}(e,t.defaultRoutes),t.descriptors&&ne.describe(e,t.descriptors)}(t,o,i),this.override&&ne.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in ne[n]&&(delete ne[n][i],this.override&&delete Jt[i])}}class qn{constructor(){this.controllers=new Wn(Ni,"datasets",!0),this.elements=new Wn(zn,"elements"),this.plugins=new Wn(Object,"plugins"),this.scales=new Wn(Zn,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):$(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=Q(t);H(i["before"+n],[],i),e[t](i),H(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var Un=new qn;class Kn{constructor(){this._init=void 0}notify(t,e,i,n){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const s=n?this._descriptors(t).filter(n):this._descriptors(t),o=this._notify(s,t,e,i);return"afterDestroy"===e&&(this._notify(s,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),o}_notify(t,e,i,n){n=n||{};for(const s of t){const t=s.plugin;if(!1===H(t[i],[e,n,s.options],t)&&n.cancelable)return!1}return!0}invalidate(){z(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=j(i.options&&i.options.plugins,{}),s=function(t){const e={},i=[],n=Object.keys(Un.plugins.items);for(let t=0;t<n.length;t++)i.push(Un.getPlugin(n[t]));const s=t.plugins||[];for(let t=0;t<s.length;t++){const n=s[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,s){const o=[],r=t.getContext();for(const a of e){const e=a.id,l=Yn(n[e],s);null!==l&&o.push({plugin:a,options:Gn(t.config,{plugin:a,local:i[e]},l,r)})}return o}(t,s,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function Yn(t,e){return e||!1!==t?!0===t?{}:t:null}function Gn(t,{plugin:e,local:i},n,s){const o=t.pluginScopeKeys(e),r=t.getOptionScopes(n,o);return i&&e.defaults&&r.push(e.defaults),t.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function Xn(t,e){const i=ne.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function Jn(t){if("x"===t||"y"===t||"r"===t)return t}function Qn(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function ts(t,...e){if(Jn(t))return t;for(const i of e){const e=i.axis||Qn(i.position)||t.length>1&&Jn(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function es(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function is(t){const e=t.options||(t.options={});e.plugins=j(e.plugins,{}),e.scales=function(t,e){const i=Jt[t.type]||{scales:{}},n=e.scales||{},s=Xn(t.type,e),o=Object.create(null);return Object.keys(n).forEach(e=>{const r=n[e];if(!R(r))return console.error(`Invalid scale configuration for scale: ${e}`);if(r._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const a=ts(e,r,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return es(t,"x",i[0])||es(t,"y",i[0])}return{}}(e,t),ne.scales[r.type]),l=function(t,e){return t===e?"_index_":"_value_"}(a,s),h=i.scales||{};o[e]=Y(Object.create(null),[{axis:a},r,h[a],h[l]])}),t.data.datasets.forEach(i=>{const s=i.type||t.type,r=i.indexAxis||Xn(s,e),a=(Jt[s]||{}).scales||{};Object.keys(a).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,r),s=i[e+"AxisID"]||e;o[s]=o[s]||Object.create(null),Y(o[s],[{axis:e},n[s],a[t]])})}),Object.keys(o).forEach(t=>{const e=o[t];Y(e,[ne.scales[e.type],ne.scale])}),o}(t,e)}function ns(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const ss=new Map,os=new Set;function rs(t,e){let i=ss.get(t);return i||(i=e(),ss.set(t,i),os.add(i)),i}const as=(t,e,i)=>{const n=J(e,i);void 0!==n&&t.add(n)};class ls{constructor(t){this._config=function(t){return(t=t||{}).data=ns(t.data),is(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=ns(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),is(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return rs(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return rs(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return rs(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return rs(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:s}=this,o=this._cachedScopes(t,i),r=o.get(e);if(r)return r;const a=new Set;e.forEach(e=>{t&&(a.add(t),e.forEach(e=>as(a,t,e))),e.forEach(t=>as(a,n,t)),e.forEach(t=>as(a,Jt[s]||{},t)),e.forEach(t=>as(a,ne,t)),e.forEach(t=>as(a,Qt,t))});const l=Array.from(a);return 0===l.length&&l.push(Object.create(null)),os.has(e)&&o.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Jt[e]||{},ne.datasets[e]||{},{type:e},ne,Qt]}resolveNamedOptions(t,e,i,n=[""]){const s={$shared:!0},{resolver:o,subPrefixes:r}=hs(this._resolverCache,t,n);let a=o;(function(t,e){const{isScriptable:i,isIndexable:n}=Te(t);for(const s of e){const e=i(s),o=n(s),r=(o||e)&&t[s];if(e&&(et(r)||cs(r))||o&&F(r))return!0}return!1})(o,e)&&(s.$shared=!1,a=Ce(o,i=et(i)?i():i,this.createResolver(t,i,r)));for(const t of e)s[t]=a[t];return s}createResolver(t,e,i=[""],n){const{resolver:s}=hs(this._resolverCache,t,i);return R(e)?Ce(s,e,void 0,n):s}}function hs(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const s=i.join();let o=n.get(s);return o||(o={resolver:Pe(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(s,o)),o}const cs=t=>R(t)&&Object.getOwnPropertyNames(t).some(e=>et(t[e])),us=["top","bottom","left","right","chartArea"];function ds(t,e){return"top"===t||"bottom"===t||-1===us.indexOf(t)&&"x"===e}function ps(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function fs(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),H(i&&i.onComplete,[t],e)}function ms(t){const e=t.chart,i=e.options.animation;H(i&&i.onProgress,[t],e)}function gs(t){return Ge()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const _s={},vs=t=>{const e=gs(t);return Object.values(_s).filter(t=>t.canvas===e).pop()};function ys(t,e,i){const n=Object.keys(t);for(const s of n){const n=+s;if(n>=e){const o=t[s];delete t[s],(i>0||n>e)&&(t[n+i]=o)}}}class bs{static defaults=ne;static instances=_s;static overrides=Jt;static registry=Un;static version="4.5.1";static getChart=vs;static register(...t){Un.add(...t),xs()}static unregister(...t){Un.remove(...t),xs()}constructor(t,e){const i=this.config=new ls(e),n=gs(t),s=vs(n);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Ge()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?yn:Dn}(n)),this.platform.updateConfig(i);const r=this.platform.acquireContext(n,o.aspectRatio),a=r&&r.canvas,l=a&&a.height,h=a&&a.width;this.id=D(),this.ctx=r,this.canvas=a,this.width=h,this.height=l,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new Kn,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),o.resizeDelay||0),this._dataChanges=[],_s[this.id]=this,r&&a?(wi.listen(this,"complete",fs),wi.listen(this,"progress",ms),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:s}=this;return z(t)?e&&s?s:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return Un}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():si(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return ae(this.canvas,this.ctx),this}stop(){return wi.stop(this),this}resize(t,e){wi.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,s=i.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(n,t,e,s),r=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,si(this,r,!0)&&(this.notifyPlugins("resize",{size:o}),H(i.onResize,[this,o],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){$(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let s=[];e&&(s=s.concat(Object.keys(e).map(t=>{const i=e[t],n=ts(t,i),s="r"===n,o="x"===n;return{options:i,dposition:s?"chartArea":o?"bottom":"left",dtype:s?"radialLinear":o?"category":"linear"}}))),$(s,e=>{const s=e.options,o=s.id,r=ts(o,s),a=j(s.type,e.dtype);void 0!==s.position&&ds(s.position,r)===ds(e.dposition)||(s.position=e.dposition),n[o]=!0;let l=null;o in i&&i[o].type===a?l=i[o]:(l=new(Un.getScale(a))({id:o,type:a,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(s,t)}),$(n,(t,e)=>{t||delete i[e]}),$(i,t=>{_n.configure(this,t,t.options),_n.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(ps("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let s=this.getDatasetMeta(i);const o=n.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=n.indexAxis||Xn(o,this.options),s.order=n.order||0,s.index=i,s.label=""+n.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const e=Un.getController(o),{datasetElementType:n,dataElementType:r}=ne.datasets[o];Object.assign(e,{dataElementType:Un.getElement(r),datasetElementType:n&&Un.getElement(n)}),s.controller=new e(this,i),t.push(s.controller)}}return this._updateMetasets(),t}_resetElements(){$(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===s.indexOf(e);e.buildOrUpdateElements(i),o=Math.max(+e.getMaxOverflow(),o)}o=this._minPadding=i.layout.autoPadding?o:0,this._updateLayout(o),n||$(s,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(ps("z","_idx"));const{_active:r,_lastEvent:a}=this;a?this._eventHandler(a,!0):r.length&&this._updateHoverStyles(r,r,!0),this.render()}_updateScales(){$(this.scales,t=>{_n.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);it(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:s}of e)ys(t,n,"_removeElements"===i?-s:s)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;t<e;t++)if(!it(n,i(t)))return;return Array.from(n).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;_n.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],$(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,et(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(wi.has(this)?this.attached&&!wi.running(this)&&wi.start(this):(this.draw(),fs({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,s;for(n=0,s=e.length;n<s;++n){const s=e[n];t&&!s.visible||i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=bi(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&ue(e,n),t.controller.draw(),n&&de(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return ce(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const s=on.modes[e];return"function"==typeof s?s(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Ae(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",s=this.getDatasetMeta(t),o=s.controller._resolveAnimations(void 0,n);tt(e)?(s.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),o.update(s,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),wi.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),ae(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete _s[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};$(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},s=(t,e)=>{this.canvas&&this.resize(t,e)};let o;const r=()=>{n("attach",r),this.attached=!0,this.resize(),i("resize",s),i("detach",o)};o=()=>{this.attached=!1,n("resize",s),this._stop(),this._resize(0,0),i("attach",r)},e.isAttached(this.canvas)?r():o()}unbindEvents(){$(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},$(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let s,o,r,a;for("dataset"===e&&(s=this.getDatasetMeta(t[0].datasetIndex),s.controller["_"+n+"DatasetHoverStyle"]()),r=0,a=t.length;r<a;++r){o=t[r];const e=o&&this.getDatasetMeta(o.datasetIndex).controller;e&&e[n+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!Z(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){const n=this.options.hover,s=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),o=s(e,t),r=i?t:s(t,e);o.length&&this.updateHoverStyle(o,n.mode,!1),r.length&&n.mode&&this.updateHoverStyle(r,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const s=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(s||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:s}=this,o=e,r=this._getActiveElements(t,n,i,o),a=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,a);i&&(this._lastEvent=null,H(s.onHover,[t,r,this],this),a&&H(s.onClick,[t,r,this],this));const h=!Z(r,n);
vendor: 1,978 bytes, line 2
2return(h||e)&&(this._active=r,this._updateHoverStyles(r,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const s=this.options.hover;return this.getElementsAtEventForMode(t,s.mode,s,n)}}function xs(){return $(bs.instances,t=>t._plugins.invalidate())}function ws(t,e,i,n){return{x:i+t*Math.cos(e),y:n+t*Math.sin(e)}}function Ms(t,e,i,n,s,o){const{x:r,y:a,startAngle:l,pixelMargin:h,innerRadius:c}=e,u=Math.max(e.outerRadius+n+i-h,0),d=c>0?c+n+i+h:0;let p=0;const f=s-l;if(n){const t=((c>0?c-n:0)+(u>0?u-n:0))/2;p=(f-(0!==t?f*t/(t+n):f))/2}const m=(f-Math.max(.001,f*u-i/nt)/u)/2,g=l+m+p,_=s-m-p,{outerStart:v,outerEnd:y,innerStart:b,innerEnd:x}=function(t,e,i,n){const s=Me(t.options.borderRadius,["outerStart","outerEnd","innerStart","innerEnd"]),o=(i-e)/2,r=Math.min(o,n*e/2),a=t=>{const e=(i-Math.min(o,t))*n/2;return Lt(t,0,Math.min(o,e))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Lt(s.innerStart,0,r),innerEnd:Lt(s.innerEnd,0,r)}}(e,d,u,_-g),w=u-v,M=u-y,k=g+v/w,L=_-y/M,O=d+b,E=d+x,S=g+b/O,A=_-x/E;if(t.beginPath(),o){const e=(k+L)/2;if(t.arc(r,a,u,k,e),t.arc(r,a,u,e,L),y>0){const e=ws(M,L,r,a);t.arc(e.x,e.y,y,L,_+lt)}const i=ws(E,_,r,a);if(t.lineTo(i.x,i.y),x>0){const e=ws(E,A,r,a);t.arc(e.x,e.y,x,_+lt,A+Math.PI)}const n=(_-x/d+(g+b/d))/2;if(t.arc(r,a,d,_-x/d,n,!0),t.arc(r,a,d,n,g+b/d,!0),b>0){const e=ws(O,S,r,a);t.arc(e.x,e.y,b,S+Math.PI,g-lt)}const s=ws(w,g,r,a);if(t.lineTo(s.x,s.y),v>0){const e=ws(w,k,r,a);t.arc(e.x,e.y,v,g-lt,k)}}else{t.moveTo(r,a);const e=Math.cos(k)*u+r,i=Math.sin(k)*u+a;t.lineTo(e,i);const n=Math.cos(L)*u+r,s=Math.sin(L)*u+a;t.lineTo(n,s)}t.closePath()}function ks(t,e,i=e){t.lineCap=j(i.borderCapStyle,e.borderCapStyle),t.setLineDash(j(i.borderDash,e.borderDash)),t.lineDashOffset=j(i.borderDashOffset,e.borderDashOffset),t.lineJoin=j(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=j(i.borderWidth,e.borderWidth),t.strokeStyle=j(i.borderColor,e.borderColor)}
vendor: 4,466 bytes, line 2
2function Ls(t,e,i){t.lineTo(i.x,i.y)}function Os(t,e,i={}){const n=t.length,{start:s=0,end:o=n-1}=i,{start:r,end:a}=e,l=Math.max(s,r),h=Math.min(o,a),c=s<r&&o<r||s>a&&o>a;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function Es(t,e,i,n){const{points:s,options:o}=e,{count:r,start:a,loop:l,ilen:h}=Os(s,i,n),c=function(t){return t.stepped?pe:t.tension||"monotone"===t.cubicInterpolationMode?fe:Ls}(o);let u,d,p,{move:f=!0,reverse:m}=n||{};for(u=0;u<=h;++u)d=s[(a+(m?h-u:u))%r],d.skip||(f?(t.moveTo(d.x,d.y),f=!1):c(t,p,d,m,o.stepped),p=d);return l&&(d=s[(a+(m?h:0))%r],c(t,p,d,m,o.stepped)),!!l}function Ss(t,e,i,n){const s=e.points,{count:o,start:r,ilen:a}=Os(s,i,n),{move:l=!0,reverse:h}=n||{};let c,u,d,p,f,m,g=0,_=0;const v=t=>(r+(h?a-t:t))%o,y=()=>{p!==f&&(t.lineTo(g,f),t.lineTo(g,p),t.lineTo(g,m))};for(l&&(u=s[v(0)],t.moveTo(u.x,u.y)),c=0;c<=a;++c){if(u=s[v(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<p?p=i:i>f&&(f=i),g=(_*g+e)/++_):(y(),t.lineTo(e,i),d=n,_=0,p=f=i),m=i}y()}function As(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?Es:Ss}const Ps="function"==typeof Path2D;class Cs extends zn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;Ye(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,s=i.length;if(!s)return[];const o=!!t._loop,{start:r,end:a}=function(t,e,i,n){let s=0,o=e-1;if(i&&!n)for(;s<e&&!t[s].skip;)s++;for(;s<e&&t[s].skip;)s++;for(s%=e,i&&(o+=s);o>s&&t[o%e].skip;)o--;return o%=e,{start:s,end:o}}(i,s,o,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const s=t._chart.getContext(),o=_i(t.options),{_datasetIndex:r,options:{spanGaps:a}}=t,l=i.length,h=[];let c=o,u=e[0].start,d=u;function p(t,e,n,s){const o=a?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=o;for(;i[e%l].skip;)e+=o;t%l!==e%l&&(h.push({start:t%l,end:e%l,loop:n,style:s}),c=s,u=e%l)}}for(const t of e){u=a?u:t.start;let e,o=i[u%l];for(d=u+1;d<=t.end;d++){const a=i[d%l];e=_i(n.setContext(Ae(s,{type:"segment",p0:o,p1:a,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:r}))),vi(e,c)&&p(u,d-1,t.loop,c),o=a,c=e}u<d-1&&p(u,d-1,t.loop,c)}return h}(t,e,i,n):e}(t,!0===n?[{start:r,end:a,loop:o}]:function(t,e,i,n){const s=t.length,o=[];let r,a=e,l=t[e];for(r=e+1;r<=i;++r){const i=t[r%s];i.skip||i.stop?l.skip||(n=!1,o.push({start:e%s,end:(r-1)%s,loop:n}),e=a=i.stop?r:null):(a=r,l.skip&&(e=r)),l=i}return null!==a&&o.push({start:e%s,end:a%s,loop:n}),o}(i,r,a<r?a+s:a,!!t._fullLoop&&0===r&&a===s-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],s=this.points,o=gi(this,{property:e,start:n,end:n});if(!o.length)return;const r=[],a=function(t){return t.stepped?li:t.tension||"monotone"===t.cubicInterpolationMode?hi:ai}(i);let l,h;for(l=0,h=o.length;l<h;++l){const{start:h,end:c}=o[l],u=s[h],d=s[c];if(u===d){r.push(u);continue}const p=a(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);p[e]=t[e],r.push(p)}return 1===r.length?r[0]:r}pathSegment(t,e,i){return As(this)(t,this,e,i)}path(t,e,i){const n=this.segments,s=As(this);let o=this._loop;e=e||0,i=i||this.points.length-e;for(const r of n)o&=s(t,this,r,{start:e,end:e+i-1});return!!o}draw(t,e,i,n){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(t.save(),function(t,e,
vendor: 4,120 bytes, line 2
2i,n){Ps&&!e.options.segment?function(t,e,i,n){let s=e._path;s||(s=e._path=new Path2D,e.path(s,i,n)&&s.closePath()),ks(t,e.options),t.stroke(s)}(t,e,i,n):function(t,e,i,n){const{segments:s,options:o}=e,r=As(e);for(const a of s)ks(t,o,a.style),t.beginPath(),r(t,e,a,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function Ts(t,e,i,n){const s=t.options,{[i]:o}=t.getProps([i],n);return Math.abs(e-o)<s.radius+s.hitRadius}function Is(t,e){const{x:i,y:n,base:s,width:o,height:r}=t.getProps(["x","y","base","width","height"],e);let a,l,h,c,u;return t.horizontal?(u=r/2,a=Math.min(i,s),l=Math.max(i,s),h=n-u,c=n+u):(u=o/2,a=i-u,l=i+u,h=Math.min(n,s),c=Math.max(n,s)),{left:a,top:h,right:l,bottom:c}}function Ds(t,e,i,n){return t?0:Lt(e,i,n)}function zs(t,e,i,n){const s=null===e,o=null===i,r=t&&!(s&&o)&&Is(t,n);return r&&(s||Ot(e,r.left,r.right))&&(o||Ot(i,r.top,r.bottom))}function Fs(t,e){t.rect(e.x,e.y,e.w,e.h)}function Rs(t,e,i={}){const n=t.x!==i.x?-e:0,s=t.y!==i.y?-e:0,o=(t.x+t.w!==i.x+i.w?e:0)-n,r=(t.y+t.h!==i.y+i.h?e:0)-s;return{x:t.x+n,y:t.y+s,w:t.w+o,h:t.h+r,radius:t.radius}}var Ns=Object.freeze({__proto__:null,ArcElement:class extends zn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.getProps(["x","y"],i),{angle:s,distance:o}=bt(n,{x:t,y:e}),{startAngle:r,endAngle:a,innerRadius:l,outerRadius:h,circumference:c}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),u=(this.options.spacing+this.options.borderWidth)/2,d=j(c,a-r),p=kt(s,r,a)&&r!==a,f=d>=st||p,m=Ot(o,l+u,h+u);return f&&m}getCenterPoint(t){const{x:e,y:i,startAngle:n,endAngle:s,innerRadius:o,outerRadius:r}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:a,spacing:l}=this.options,h=(n+s)/2,c=(o+r+l+a)/2;return{x:e+Math.cos(h)*c,y:i+Math.sin(h)*c}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:e,circumference:i}=this,n=(e.offset||0)/4,s=(e.spacing||0)/2,o=e.circular;if(this.pixelMargin="inner"===e.borderAlign?.33:0,this.fullCircles=i>st?Math.floor(i/st):0,0===i||this.innerRadius<0||this.outerRadius<0)return;t.save();const r=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(r)*n,Math.sin(r)*n);const a=n*(1-Math.sin(Math.min(nt,i||0)));t.fillStyle=e.backgroundColor,t.strokeStyle=e.borderColor,function(t,e,i,n,s){const{fullCircles:o,startAngle:r,circumference:a}=e;let l=e.endAngle;if(o){Ms(t,e,i,n,l,s);for(let e=0;e<o;++e)t.fill();isNaN(a)||(l=r+(a%st||st))}Ms(t,e,i,n,l,s),t.fill()}(t,this,a,s,o),function(t,e,i,n,s){const{fullCircles:o,startAngle:r,circumference:a,options:l}=e,{borderWidth:h,borderJoinStyle:c,borderDash:u,borderDashOffset:d,borderRadius:p}=l,f="inner"===l.borderAlign;if(!h)return;t.setLineDash(u||[]),t.lineDashOffset=d,f?(t.lineWidth=2*h,t.lineJoin=c||"round"):(t.lineWidth=h,t.lineJoin=c||"bevel");let m=e.endAngle;if(o){Ms(t,e,i,n,m,s);for(let e=0;e<o;++e)t.stroke();isNaN(a)||(m=r+(a%st||st))}f&&function(t,e,i){const{startAngle:n,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:l}=e;let h=s/a;t.beginPath(),t.arc(o,r,a,n-h,i+h),l>s?(h=s/l,t.arc(o,r,l,i+h,n-h,!0)):t.arc(o,r,s,i+lt,n-lt),t.closePath(),t.clip()}(t,e,m),l.selfJoin&&m-r>=nt&&0===p&&"miter"!==c&&function(t,e,i){const{startAngle:n,x:s,y:o,outerRadius:r,innerRadius:a,options:l}=e,{borderWidth:h,borderJoinStyle:c}=l,u=Math.min(h/r,Mt(n-i));if(t.beginPath(),t.arc(s,o,r-h/2,n+u/2,i-u/2),a>0){const e=Math.min(h/a,Mt(n-i));
vendor: 4,593 bytes, line 2
2t.arc(s,o,a+h/2,i-e/2,n+e/2,!0)}else{const e=Math.min(h/2,r*Mt(n-i));if("round"===c)t.arc(s,o,e,i-nt/2,n+nt/2,!0);else if("bevel"===c){const r=2*e*e,a=-r*Math.cos(i+nt/2)+s,l=-r*Math.sin(i+nt/2)+o,h=r*Math.cos(n+nt/2)+s,c=r*Math.sin(n+nt/2)+o;t.lineTo(a,l),t.lineTo(h,c)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}(t,e,m),o||(Ms(t,e,i,n,m,s),t.stroke())}(t,this,a,s,o),t.restore()}},BarElement:class extends zn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:s,outer:o}=function(t){const e=Is(t),i=e.right-e.left,n=e.bottom-e.top,s=function(t,e,i){const n=t.options.borderWidth,s=t.borderSkipped,o=ke(n);return{t:Ds(s.top,o.top,0,i),r:Ds(s.right,o.right,0,e),b:Ds(s.bottom,o.bottom,0,i),l:Ds(s.left,o.left,0,e)}}(t,i/2,n/2),o=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),s=t.options.borderRadius,o=Le(s),r=Math.min(e,i),a=t.borderSkipped,l=n||R(s);return{topLeft:Ds(!l||a.top||a.left,o.topLeft,0,r),topRight:Ds(!l||a.top||a.right,o.topRight,0,r),bottomLeft:Ds(!l||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:Ds(!l||a.bottom||a.right,o.bottomRight,0,r)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:o},inner:{x:e.left+s.l,y:e.top+s.t,w:i-s.l-s.r,h:n-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}(this),r=(a=o.radius).topLeft||a.topRight||a.bottomLeft||a.bottomRight?ve:Fs;var a;t.save(),o.w===s.w&&o.h===s.h||(t.beginPath(),r(t,Rs(o,e,s)),t.clip(),r(t,Rs(s,-e,o)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),r(t,Rs(s,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return zs(this,t,e,i)}inXRange(t,e){return zs(this,t,null,e)}inYRange(t,e){return zs(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:s}=this.getProps(["x","y","base","horizontal"],t);return{x:s?(e+n)/2:e,y:s?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},LineElement:Cs,PointElement:class extends zn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:s,y:o}=this.getProps(["x","y"],i);return Math.pow(t-s,2)+Math.pow(e-o,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Ts(this,t,"x",e)}inYRange(t,e){return Ts(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!ce(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,le(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}});const Bs=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],js=Bs.map(t=>t.replace("rgb(","rgba(").replace(")",", 0.5)"));function Vs(t){return Bs[t%Bs.length]}function Hs(t){return js[t%js.length]}function $s(t){let e;for(e in t)if(t[e].borderColor||t[e].backgroundColor)return!0;return!1}var Zs={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(t,e,i){if(!i.enabled)return;const{data:{datasets:n},options:s}=t.config,{elements:o}=s,r=$s(n)||(a=s)&&(a.borderColor||a.backgroundColor)||o&&$s(o)||"rgba(0,0,0,0.1)"!==ne.borderColor||"rgba(0,0,0,0.1)"!==ne.backgroundColor;var a;if(!i.forceOverride&&r)return;const l=function(t){let e=0;return(i,n)=>{const s=t.getDatasetMeta(n).controller;s instanceof Ui?e=function(t,e){return t.backgroundColor=t.data.map(()=>Vs(e++)),e}(i,e):s instanceof Ki?e=function(t,e){return t.backgroundColor=t.data.map(()=>Hs(e++)),e}(i,e):s&&(e=function(t,e){return t.borderColor=Vs(e),t.backgroundColor=Hs(e),++e}(i,e))}}(t);
vendor: 2,034 bytes, line 2
2n.forEach(l)}};function Ws(t){if(t._decimated){const e=t._data;delete t._decimated,delete t._data,Object.defineProperty(t,"data",{configurable:!0,enumerable:!0,writable:!0,value:e})}}function qs(t){t.data.datasets.forEach(t=>{Ws(t)})}var Us={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(t,e,i)=>{if(!i.enabled)return void qs(t);const n=t.width;t.data.datasets.forEach((e,s)=>{const{_data:o,indexAxis:r}=e,a=t.getDatasetMeta(s),l=o||e.data;if("y"===Se([r,t.options.indexAxis]))return;if(!a.controller.supportsDecimation)return;const h=t.scales[a.xAxisID];if("linear"!==h.type&&"time"!==h.type)return;if(t.options.parsing)return;let c,{start:u,count:d}=function(t,e){const i=e.length;let n,s=0;const{iScale:o}=t,{min:r,max:a,minDefined:l,maxDefined:h}=o.getUserBounds();return l&&(s=Lt(St(e,o.axis,r).lo,0,i-1)),n=h?Lt(St(e,o.axis,a).hi+1,s,i)-s:i-s,{start:s,count:n}}(a,l);if(d<=(i.threshold||4*n))Ws(e);else{switch(z(o)&&(e._data=l,delete e.data,Object.defineProperty(e,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(t){this._data=t}})),i.algorithm){case"lttb":c=function(t,e,i,n,s){const o=s.samples||n;if(o>=i)return t.slice(e,e+i);const r=[],a=(i-2)/(o-2);let l=0;const h=e+i-1;let c,u,d,p,f,m=e;for(r[l++]=t[m],c=0;c<o-2;c++){let n,s=0,o=0;const h=Math.floor((c+1)*a)+1+e,g=Math.min(Math.floor((c+2)*a)+1,i)+e,_=g-h;for(n=h;n<g;n++)s+=t[n].x,o+=t[n].y;s/=_,o/=_;const v=Math.floor(c*a)+1+e,y=Math.min(Math.floor((c+1)*a)+1,i)+e,{x:b,y:x}=t[m];for(d=p=-1,n=v;n<y;n++)p=.5*Math.abs((b-s)*(t[n].y-x)-(b-t[n].x)*(o-x)),p>d&&(d=p,u=t[n],f=n);r[l++]=u,m=f}return r[l++]=t[h],r}(l,u,d,n,i);break;case"min-max":c=function(t,e,i,n){let s,o,r,a,l,h,c,u,d,p,f=0,m=0;const g=[],_=e+i-1,v=t[e].x,y=t[_].x-v;for(s=e;s<e+i;++s){o=t[s],r=(o.x-v)/y*n,a=o.y;const e=0|r;if(e===l)a<d?(d=a,h=s):a>p&&(p=a,c=s),f=(m*f+o.x)/++m;else{const i=s-1;if(!z(h)&&!z(c)){const e=Math.min(h,c),n=Math.max(h,c);e!==u&&e!==i&&g.push({...t[e],x:f}),n!==u&&n!==i&&g.push({...t[n],x:f})}s>
vendor: 9,043 bytes, line 2
20&&i!==u&&g.push(t[i]),g.push(o),l=e,m=0,d=p=a,h=c=u=s}}return g}(l,u,d,n);break;default:throw new Error(`Unsupported decimation algorithm '${i.algorithm}'`)}e._decimated=c}})},destroy(t){qs(t)}};function Ks(t,e,i,n){if(n)return;let s=e[t],o=i[t];return"angle"===t&&(s=Mt(s),o=Mt(o)),{property:t,start:s,end:o}}function Ys(t,e,i){for(;e>t;e--){const t=i[e];if(!isNaN(t.x)&&!isNaN(t.y))break}return e}function Gs(t,e,i,n){return t&&e?n(t[i],e[i]):t?t[i]:e?e[i]:0}function Xs(t,e){let i=[],n=!1;return F(t)?(n=!0,i=t):i=function(t,e){const{x:i=null,y:n=null}=t||{},s=e.points,o=[];return e.segments.forEach(({start:t,end:e})=>{e=Ys(t,e,s);const r=s[t],a=s[e];null!==n?(o.push({x:r.x,y:n}),o.push({x:a.x,y:n})):null!==i&&(o.push({x:i,y:r.y}),o.push({x:i,y:a.y}))}),o}(t,e),i.length?new Cs({points:i,options:{tension:0},_loop:n,_fullLoop:n}):null}function Js(t){return t&&!1!==t.fill}function Qs(t,e,i){let n=t[e].fill;const s=[e];let o;if(!i)return n;for(;!1!==n&&-1===s.indexOf(n);){if(!N(n))return n;if(o=t[n],!o)return!1;if(o.visible)return n;s.push(n),n=o.fill}return!1}function to(t,e,i){const n=function(t){const e=t.options,i=e.fill;let n=j(i&&i.target,i);return void 0===n&&(n=!!e.backgroundColor),!1!==n&&null!==n&&(!0===n?"origin":n)}(t);if(R(n))return!isNaN(n.value)&&n;let s=parseFloat(n);return N(s)&&Math.floor(s)===s?function(t,e,i,n){return"-"!==t&&"+"!==t||(i=e+i),!(i===e||i<0||i>=n)&&i}(n[0],e,s,i):["origin","start","end","stack","shape"].indexOf(n)>=0&&n}function eo(t,e,i){const n=[];for(let s=0;s<i.length;s++){const o=i[s],{first:r,last:a,point:l}=io(o,e,"x");if(!(!l||r&&a))if(r)n.unshift(l);else if(t.push(l),!a)break}t.push(...n)}function io(t,e,i){const n=t.interpolate(e,i);if(!n)return{};const s=n[i],o=t.segments,r=t.points;let a=!1,l=!1;for(let t=0;t<o.length;t++){const e=o[t],n=r[e.start][i],h=r[e.end][i];if(Ot(s,n,h)){a=s===n,l=s===h;break}}return{first:a,last:l,point:n}}class no{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:n,y:s,radius:o}=this;return e=e||{start:0,end:st},t.arc(n,s,o,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:n}=this,s=t.angle;return{x:e+Math.cos(s)*n,y:i+Math.sin(s)*n,angle:s}}}function so(t,e,i){const n=function(t){const{chart:e,fill:i,line:n}=t;if(N(i))return function(t,e){const i=t.getDatasetMeta(e);return i&&t.isDatasetVisible(e)?i.dataset:null}(e,i);if("stack"===i)return function(t){const{scale:e,index:i,line:n}=t,s=[],o=n.segments,r=n.points,a=function(t,e){const i=[],n=t.getMatchingVisibleMetas("line");for(let t=0;t<n.length;t++){const s=n[t];if(s.index===e)break;s.hidden||i.unshift(s.dataset)}return i}(e,i);a.push(Xs({x:null,y:e.bottom},n));for(let t=0;t<o.length;t++){const e=o[t];for(let t=e.start;t<=e.end;t++)eo(s,r[t],a)}return new Cs({points:s,options:{}})}(t);if("shape"===i)return!0;const s=function(t){return(t.scale||{}).getPointPositionForValue?function(t){const{scale:e,fill:i}=t,n=e.options,s=e.getLabels().length,o=n.reverse?e.max:e.min,r=function(t,e,i){let n;return n="start"===t?i:"end"===t?e.options.reverse?e.min:e.max:R(t)?t.value:e.getBaseValue(),n}(i,e,o),a=[];if(n.grid.circular){const t=e.getPointPositionForValue(0,o);return new no({x:t.x,y:t.y,radius:e.getDistanceFromCenterForValue(r)})}for(let t=0;t<s;++t)a.push(e.getPointPositionForValue(t,r));return a}(t):function(t){const{scale:e={},fill:i}=t,n=function(t,e){let i=null;return"start"===t?i=e.bottom:"end"===t?i=e.top:R(t)?i=e.getPixelForValue(t.value):e.getBasePixel&&(i=e.getBasePixel()),i}(i,e);if(N(n)){const t=e.isHorizontal();return{x:t?n:null,y:t?null:n}}return null}(t)}(t);return s instanceof no?s:Xs(s,n)}(e),{chart:s,index:o,line:r,scale:a,axis:l}=e,h=r.options,c=h.fill,u=h.backgroundColor,{above:d=u,below:p=u}=c||{},f=s.getDatasetMeta(o),m=bi(s,f);n&&r.points.length&&(ue(t,i),function(t,e){const{line:i,target:n,above:s,below:o,area:r,scale:a,clip:l}=e,h=i._loop?"angle":e.axis;t.save();let c=o;o!==s&&("x"===h?(oo(t,n,r.top),ao(t,{line:i,target:n,color:s,scale:a,property:h,clip:l}),t.restore(),t.save(),oo(t,n,r.bottom)):"y"===h&&(ro(t,n,r.left),ao(t,{line:i,target:n,color:o,scale:a,property:h,clip:l}),t.restore(),t.save(),ro(t,n,r.right),c=s)),ao(t,{line:i,target:n,color:c,scale:a,property:h,clip:l}),t.restore()}(t,{line:r,target:n,above:d,below:p,area:i,scale:a,axis:l,clip:m}),de(t))}function oo(t,e,i){const{segments:n,points:s}=e;let o=!0,r=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,h=s[n],c=s[Ys(n,l,s)];o?(t.moveTo(h.x,h.y),o=!1):(t.lineTo(h.x,i),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(c.x,i)}t.lineTo(e.first().x,i),t.closePath(),t.clip()}function ro(t,e,i){const{segments:n,points:s}=e;let o=!0,r=!1;t.beginPath();for(const a of n){const{start:n,end:l}=a,h=s[n],c=s[Ys(n,l,s)];o?(t.moveTo(h.x,h.y),o=!1):(t.lineTo(i,h.y),t.lineTo(h.x,h.y)),r=!!e.pathSegment(t,a,{move:r}),r?t.closePath():t.lineTo(i,c.y)}t.lineTo(i,e.first().y),t.closePath(),t.clip()}function ao(t,e){const{line:i,target:n,property:s,color:o,scale:r,clip:a}=e,l=function(t,e,i){const n=t.segments,s=t.points,o=e.points,r=[];for(const t of n){let{start:n,end:a}=t;a=Ys(n,a,s);const l=Ks(i,s[n],s[a],t.loop);if(!e.segments){r.push({source:t,target:l,start:s[n],end:s[a]});continue}const h=gi(e,l);for(const e of h){const n=Ks(i,o[e.start],o[e.end],e.loop),a=mi(t,s,n);for(const t of a)r.push({source:t,target:e,start:{[i]:Gs(l,n,"start",Math.max)},end:{[i]:Gs(l,n,"end",Math.min)}})}}return r}(i,n,s);for(const{source:e,target:h,start:c,end:u}of l){const{style:{backgroundColor:l=o}={}}=e,d=!0!==n;t.save(),t.fillStyle=l,lo(t,r,a,d&&Ks(s,c,u)),t.beginPath();const p=!!i.pathSegment(t,e);let f;if(d){p?t.closePath():ho(t,n,u,s);const e=!!n.pathSegment(t,h,{move:p,reverse:!0});f=p&&e,f||ho(t,n,c,s)}t.closePath(),t.fill(f?"evenodd":"nonzero"),t.restore()}}function lo(t,e,i,n){const s=e.chart.chartArea,{property:o,start:r,end:a}=n||{};if("x"===o||"y"===o){let e,n,l,h;"x"===o?(e=r,n=s.top,l=a,h=s.bottom):(e=s.left,n=r,l=s.right,h=a),t.beginPath(),i&&(e=Math.max(e,i.left),l=Math.min(l,i.right),n=Math.max(n,i.top),h=Math.min(h,i.bottom)),t.rect(e,n,l-e,h-n),t.clip()}}function ho(t,e,i,n){const s=e.interpolate(i,n);s&&t.lineTo(s.x,s.y)}var co={id:"filler",afterDatasetsUpdate(t,e,i){const n=(t.data.datasets||[]).length,s=[];let o,r,a,l;for(r=0;r<n;++r)o=t.getDatasetMeta(r),a=o.dataset,l=null,a&&a.options&&a instanceof Cs&&(l={visible:t.isDatasetVisible(r),index:r,fill:to(a,r,n),chart:t,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=l,s.push(l);for(r=0;r<n;++r)l=s[r],l&&!1!==l.fill&&(l.fill=Qs(s,r,i.propagate))},beforeDraw(t,e,i){const n="beforeDraw"===i.drawTime,s=t.getSortedVisibleDatasetMetas(),o=t.chartArea;for(let e=s.length-1;e>=0;--e){const i=s[e].$filler;i&&(i.line.updateControlPoints(o,i.axis),n&&i.fill&&so(t.ctx,i,o))}},beforeDatasetsDraw(t,e,i){if("beforeDatasetsDraw"!==i.drawTime)return;const n=t.getSortedVisibleDatasetMetas();for(let e=n.length-1;e>=0;--e){const i=n[e].$filler;Js(i)&&so(t.ctx,i,t.chartArea)}},beforeDatasetDraw(t,e,i){const n=e.meta.$filler;Js(n)&&"beforeDatasetDraw"===i.drawTime&&so(t.ctx,n,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const uo=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class po extends zn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=H(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=Ee(i.font),s=n.size,o=this._computeTitleHeight(),{boxWidth:r,itemHeight:a}=uo(i,s);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(o,s,r,a)+10):(h=this.maxHeight,l=this._fitCols(o,n,r,a)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:s,maxWidth:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+r;let c=t;s.textAlign="left",s.textBaseline="middle";let u=-1,d=-h;
vendor: 25,537 bytes, line 2
2return this.legendItems.forEach((t,p)=>{const f=i+e/2+s.measureText(t.text).width;(0===p||l[l.length-1]+f+2*r>o)&&(c+=h,l[l.length-(p>0?0:1)]=0,d+=h,u++),a[p]={left:0,top:d,row:u,width:f,height:n},l[l.length-1]+=f+r}),c}_fitCols(t,e,i,n){const{ctx:s,maxHeight:o,options:{labels:{padding:r}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],h=o-t;let c=r,u=0,d=0,p=0,f=0;return this.legendItems.forEach((t,o)=>{const{itemWidth:m,itemHeight:g}=function(t,e,i,n,s){const o=function(t,e,i,n){let s=t.text;return s&&"string"!=typeof s&&(s=s.reduce((t,e)=>t.length>e.length?t:e)),e+i.size/2+n.measureText(s).width}(n,t,e,i),r=function(t,e,i){let n=t;return"string"!=typeof e.text&&(n=fo(e,i)),n}(s,n,e.lineHeight);return{itemWidth:o,itemHeight:r}}(i,e,s,t,n);o>0&&d+g+2*r>h&&(c+=u+r,l.push({width:u,height:d}),p+=u+r,f++,u=d=0),a[o]={left:p,top:d,col:f,width:m,height:g},u=Math.max(u,m),d+=g+r}),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:s}}=this,o=ci(s,this.left,this.width);if(this.isHorizontal()){let s=0,r=Ft(i,this.left+n,this.right-this.lineWidths[s]);for(const a of e)s!==a.row&&(s=a.row,r=Ft(i,this.left+n,this.right-this.lineWidths[s])),a.top+=this.top+t+n,a.left=o.leftForLtr(o.x(r),a.width),r+=a.width+n}else{let s=0,r=Ft(i,this.top+t+n,this.bottom-this.columnSizes[s].height);for(const a of e)a.col!==s&&(s=a.col,r=Ft(i,this.top+t+n,this.bottom-this.columnSizes[s].height)),a.top=r,a.left+=this.left+n,a.left=o.leftForLtr(o.x(a.left),a.width),r+=a.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;ue(t,this),this._draw(),de(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:s,labels:o}=t,r=ne.color,a=ci(t.rtl,this.left,this.width),l=Ee(o.font),{padding:h}=o,c=l.size,u=c/2;let d;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:p,boxHeight:f,itemHeight:m}=uo(o,c),g=this.isHorizontal(),_=this._computeTitleHeight();d=g?{x:Ft(s,this.left+h,this.right-i[0]),y:this.top+h+_,line:0}:{x:this.left+h,y:Ft(s,this.top+_+h,this.bottom-e[0].height),line:0},ui(this.ctx,t.textDirection);const v=m+h;this.legendItems.forEach((y,b)=>{n.strokeStyle=y.fontColor,n.fillStyle=y.fontColor;const x=n.measureText(y.text).width,w=a.textAlign(y.textAlign||(y.textAlign=o.textAlign)),M=p+u+x;let k=d.x,L=d.y;if(a.setWidth(this.width),g?b>0&&k+M+h>this.right&&(L=d.y+=v,d.line++,k=d.x=Ft(s,this.left+h,this.right-i[d.line])):b>0&&L+v>this.bottom&&(k=d.x=k+e[d.line].width+h,d.line++,L=d.y=Ft(s,this.top+_+h,this.bottom-e[d.line].height)),function(t,e,i){if(isNaN(p)||p<=0||isNaN(f)||f<0)return;n.save();const s=j(i.lineWidth,1);if(n.fillStyle=j(i.fillStyle,r),n.lineCap=j(i.lineCap,"butt"),n.lineDashOffset=j(i.lineDashOffset,0),n.lineJoin=j(i.lineJoin,"miter"),n.lineWidth=s,n.strokeStyle=j(i.strokeStyle,r),n.setLineDash(j(i.lineDash,[])),o.usePointStyle){const r={radius:f*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:s},l=a.xPlus(t,p/2);he(n,r,l,e+u,o.pointStyleWidth&&p)}else{const o=e+Math.max((c-f)/2,0),r=a.leftForLtr(t,p),l=Le(i.borderRadius);n.beginPath(),Object.values(l).some(t=>0!==t)?ve(n,{x:r,y:o,w:p,h:f,radius:l}):n.rect(r,o,p,f),n.fill(),0!==s&&n.stroke()}n.restore()}(a.x(k),L,y),k=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(w,k+p+u,g?k+M:this.right,t.rtl),function(t,e,i){_e(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:a.textAlign(i.textAlign)})}(a.x(k),L,y),g)d.x+=M+h;else if("string"!=typeof y.text){const t=l.lineHeight;d.y+=fo(y,t)+h}else d.y+=v}),di(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Ee(e.font),n=Oe(e.padding);if(!e.display)return;const s=ci(t.rtl,this.left,this.width),o=this.ctx,r=e.position,a=i.size/2,l=n.top+a;let h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+l,c=Ft(t.align,c,this.right-u);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);h=l+Ft(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=Ft(r,c,c+u);o.textAlign=s.textAlign(zt(r)),o.textBaseline="middle",o.strokeStyle=e.color,o.fillStyle=e.color,o.font=i.string,_e(o,e.text,d,h,i)}_computeTitleHeight(){const t=this.options.title,e=Ee(t.font),i=Oe(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,s;if(Ot(t,this.left,this.right)&&Ot(e,this.top,this.bottom))for(s=this.legendHitBoxes,i=0;i<s.length;++i)if(n=s[i],Ot(t,n.left,n.left+n.width)&&Ot(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const o=this._hoveredItem,r=(s=i,null!==(n=o)&&null!==s&&n.datasetIndex===s.datasetIndex&&n.index===s.index);o&&!r&&H(e.onLeave,[t,o,this],this),this._hoveredItem=i,i&&!r&&H(e.onHover,[t,i,this],this)}else i&&H(e.onClick,[t,i,this],this);var n,s}}function fo(t,e){return e*(t.text?t.text.length:0)}var mo={id:"legend",_element:po,start(t,e,i){const n=t.legend=new po({ctx:t.ctx,options:i,chart:t});_n.configure(t,n,i),_n.addBox(t,n)},stop(t){_n.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;_n.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,s=i.chart;s.isDatasetVisible(n)?(s.hide(n),e.hidden=!0):(s.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(i?0:void 0),h=Oe(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:o,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:s||l.textAlign,borderRadius:r&&(a||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};class go extends zn{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display)return void(this.width=this.height=this.right=this.bottom=0);this.width=this.right=t,this.height=this.bottom=e;const n=F(i.text)?i.text.length:1;this._padding=Oe(i.padding);const s=n*Ee(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=s:this.width=s}isHorizontal(){const t=this.options.position;return"top"===t||"bottom"===t}_drawArgs(t){const{top:e,left:i,bottom:n,right:s,options:o}=this,r=o.align;let a,l,h,c=0;return this.isHorizontal()?(l=Ft(r,i,s),h=e+t,a=s-i):("left"===o.position?(l=i+t,h=Ft(r,n,e),c=-.5*nt):(l=s-t,h=Ft(r,e,n),c=.5*nt),a=n-e),{titleX:l,titleY:h,maxWidth:a,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Ee(e.font),n=i.lineHeight/2+this._padding.top,{titleX:s,titleY:o,maxWidth:r,rotation:a}=this._drawArgs(n);_e(t,e.text,0,0,i,{color:e.color,maxWidth:r,rotation:a,textAlign:zt(e.align),textBaseline:"middle",translation:[s,o]})}}var _o={id:"title",_element:go,start(t,e,i){!function(t,e){const i=new go({ctx:t.ctx,options:e,chart:t});_n.configure(t,i,e),_n.addBox(t,i),t.titleBlock=i}(t,i)},stop(t){const e=t.titleBlock;_n.removeBox(t,e),delete t.titleBlock},beforeUpdate(t,e,i){const n=t.titleBlock;_n.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const vo=new WeakMap;var yo={id:"subtitle",start(t,e,i){const n=new go({ctx:t.ctx,options:i,chart:t});_n.configure(t,n,i),_n.addBox(t,n),vo.set(t,n)},stop(t){_n.removeBox(t,vo.get(t)),vo.delete(t)},beforeUpdate(t,e,i){const n=vo.get(t);_n.configure(t,n,i),n.options=i},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const bo={average(t){if(!t.length)return!1;let e,i,n=new Set,s=0,o=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),s+=t.y,++o}}return 0!==o&&0!==n.size&&{x:[...n].reduce((t,e)=>t+e)/n.size,y:s/o}},nearest(t,e){if(!t.length)return!1;let i,n,s,o=e.x,r=e.y,a=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=xt(e,n.getCenterPoint());t<a&&(a=t,s=n)}}if(s){const t=s.tooltipPosition();o=t.x,r=t.y}return{x:o,y:r}}};function xo(t,e){return e&&(F(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function wo(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function Mo(t,e){const{element:i,datasetIndex:n,index:s}=e,o=t.getDatasetMeta(n).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:t,label:r,parsed:o.getParsed(s),raw:t.data.datasets[n].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:n,element:i}}function ko(t,e){const i=t.chart.ctx,{body:n,footer:s,title:o}=t,{boxWidth:r,boxHeight:a}=e,l=Ee(e.bodyFont),h=Ee(e.titleFont),c=Ee(e.footerFont),u=o.length,d=s.length,p=n.length,f=Oe(e.padding);let m=f.height,g=0,_=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);_+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),_&&(m+=p*(e.displayColors?Math.max(a,l.lineHeight):l.lineHeight)+(_-p)*l.lineHeight+(_-1)*e.bodySpacing),d&&(m+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let v=0;const y=function(t){g=Math.max(g,i.measureText(t).width+v)};return i.save(),i.font=h.string,$(t.title,y),i.font=l.string,$(t.beforeBody.concat(t.afterBody),y),v=e.displayColors?r+2+e.boxPadding:0,$(n,t=>{$(t.before,y),$(t.lines,y),$(t.after,y)}),v=0,i.font=c.string,$(t.footer,y),i.restore(),g+=f.width,{width:g,height:m}}function Lo(t,e,i,n){const{x:s,width:o}=i,{width:r,chartArea:{left:a,right:l}}=t;let h="center";return"center"===n?h=s<=(a+l)/2?"left":"right":s<=o/2?h="left":s>=r-o/2&&(h="right"),function(t,e,i,n){const{x:s,width:o}=n,r=i.caretSize+i.caretPadding;return"left"===t&&s+o+r>e.width||"right"===t&&s-o-r<0||void 0}(h,t,e,i)&&(h="center"),h}function Oo(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||Lo(t,e,i,n),yAlign:n}}function Eo(t,e,i,n){const{caretSize:s,caretPadding:o,cornerRadius:r}=t,{xAlign:a,yAlign:l}=i,h=s+o,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:p}=Le(r);let f=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,a);const m=function(t,e,i){let{y:n,height:s}=t;return"top"===e?n+=i:n-="bottom"===e?s+i:s/2,n}(e,l,h);return"center"===l?"left"===a?f+=h:"right"===a&&(f-=h):"left"===a?f-=Math.max(c,d)+s:"right"===a&&(f+=Math.max(u,p)+s),{x:Lt(f,0,n.width-e.width),y:Lt(m,0,n.height-e.height)}}function So(t,e,i){const n=Oe(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function Ao(t){return xo([],wo(t))}function Po(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const Co={beforeTitle:I,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:I,beforeBody:I,beforeLabel:I,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return z(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:I,afterBody:I,beforeFooter:I,footer:I,afterFooter:I};function To(t,e,i,n){const s=t[e].call(i,n);return void 0===s?Co[e].call(i,n):s}class Io extends zn{static positioners=bo;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,s=new Oi(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=Ae(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:i}=e,n=To(i,"beforeTitle",this,t),s=To(i,"title",this,t),o=To(i,"afterTitle",this,t);let r=[];return r=xo(r,wo(n)),r=xo(r,wo(s)),r=xo(r,wo(o)),r}getBeforeBody(t,e){return Ao(To(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return $(t,t=>{const e={before:[],lines:[],after:[]},s=Po(i,t);xo(e.before,wo(To(s,"beforeLabel",this,t))),xo(e.lines,To(s,"label",this,t)),xo(e.after,wo(To(s,"afterLabel",this,t))),n.push(e)}),n}getAfterBody(t,e){return Ao(To(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=To(i,"beforeFooter",this,t),s=To(i,"footer",this,t),o=To(i,"afterFooter",this,t);let r=[];return r=xo(r,wo(n)),r=xo(r,wo(s)),r=xo(r,wo(o)),r}_createItems(t){const e=this._active,i=this.chart.data,n=[],s=[],o=[];let r,a,l=[];for(r=0,a=e.length;r<a;++r)l.push(Mo(this.chart,e[r]));return t.filter&&(l=l.filter((e,n,s)=>t.filter(e,n,s,i))),t.itemSort&&(l=l.sort((e,n)=>t.itemSort(e,n,i))),$(l,e=>{const i=Po(t.callbacks,e);n.push(To(i,"labelColor",this,e)),s.push(To(i,"labelPointStyle",this,e)),o.push(To(i,"labelTextColor",this,e))}),this.labelColors=n,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let s,o=[];if(n.length){const t=bo[i.position].call(this,n,this._eventPosition);o=this._createItems(i),this.title=this.getTitle(o,i),this.beforeBody=this.getBeforeBody(o,i),this.body=this.getBody(o,i),this.afterBody=this.getAfterBody(o,i),this.footer=this.getFooter(o,i);const e=this._size=ko(this,i),r=Object.assign({},t,e),a=Oo(this.chart,i,r),l=Eo(i,r,a,this.chart);this.xAlign=a.xAlign,this.yAlign=a.yAlign,s={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(s={opacity:0});this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const s=this.getCaretPosition(t,i,n);e.lineTo(s.x1,s.y1),e.lineTo(s.x2,s.y2),e.lineTo(s.x3,s.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:s}=this,{caretSize:o,cornerRadius:r}=i,{topLeft:a,topRight:l,bottomLeft:h,bottomRight:c}=Le(r),{x:u,y:d}=t,{width:p,height:f}=e;let m,g,_,v,y,b;return"center"===s?(y=d+f/2,"left"===n?(m=u,g=m-o,v=y+o,b=y-o):(m=u+p,g=m+o,v=y-o,b=y+o),_=m):(g="left"===n?u+Math.max(a,h)+o:"right"===n?u+p-Math.max(l,c)-o:this.caretX,"top"===s?(v=d,y=v-o,m=g-o,_=g+o):(v=d+f,y=v+o,m=g+o,_=g-o),b=v),{x1:m,x2:g,x3:_,y1:v,y2:y,y3:b}}drawTitle(t,e,i){const n=this.title,s=n.length;let o,r,a;if(s){const l=ci(i.rtl,this.x,this.width);for(t.x=So(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",o=Ee(i.titleFont),r=i.titleSpacing,e.fillStyle=i.titleColor,e.font=o.string,a=0;a<s;++a)e.fillText(n[a],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+r,a+1===s&&(t.y+=i.titleMarginBottom-r)}}_drawColorBox(t,e,i,n,s){const o=this.labelColors[i],r=this.labelPointStyles[i],{boxHeight:a,boxWidth:l}=s,h=Ee(s.bodyFont),c=So(this,"left",s),u=n.x(c),d=a<h.lineHeight?(h.lineHeight-a)/2:0,p=e.y+d;if(s.usePointStyle){const e={radius:Math.min(l,a)/2,pointStyle:r.pointStyle,rotation:r.rotation,borderWidth:1},i=n.leftForLtr(u,l)+l/2,h=p+a/2;t.strokeStyle=s.multiKeyBackground,t.fillStyle=s.multiKeyBackground,le(t,e,i,h),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,le(t,e,i,h)}else{t.lineWidth=R(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const e=n.leftForLtr(u,l),i=n.leftForLtr(n.xPlus(u,1),l-2),r=Le(o.borderRadius);Object.values(r).some(t=>0!==t)?(t.beginPath(),t.fillStyle=s.multiKeyBackground,ve(t,{x:e,y:p,w:l,h:a,radius:r}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),ve(t,{x:i,y:p+1,w:l-2,h:a-2,radius:r}),t.fill()):(t.fillStyle=s.multiKeyBackground,t.fillRect(e,p,l,a),t.strokeRect(e,p,l,a),t.fillStyle=o.backgroundColor,t.fillRect(i,p+1,l-2,a-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:s,bodyAlign:o,displayColors:r,boxHeight:a,boxWidth:l,boxPadding:h}=i,c=Ee(i.bodyFont);let u=c.lineHeight,d=0;const p=ci(i.rtl,this.x,this.width),f=function(i){e.fillText(i,p.x(t.x+d),t.y+u/2),t.y+=u+s},m=p.textAlign(o);let g,_,v,y,b,x,w;for(e.textAlign=o,e.textBaseline="middle",e.font=c.string,t.x=So(this,m,i),e.fillStyle=i.bodyColor,$(this.beforeBody,f),d=r&&"right"!==m?"center"===o?l/2+h:l+2+h:0,y=0,x=n.length;y<x;++y){for(g=n[y],_=this.labelTextColors[y],e.fillStyle=_,$(g.before,f),v=g.lines,r&&v.length&&(this._drawColorBox(e,t,y,p,i),u=Math.max(c.lineHeight,a)),b=0,w=v.length;b<w;++b)f(v[b]),u=c.lineHeight;$(g.after,f)}d=0,u=c.lineHeight,$(this.afterBody,f),t.y-=s}drawFooter(t,e,i){const n=this.footer,s=n.length;let o,r;if(s){const a=ci(i.rtl,this.x,this.width);for(t.x=So(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=a.textAlign(i.footerAlign),e.textBaseline="middle",o=Ee(i.footerFont),e.fillStyle=i.footerColor,e.font=o.string,r=0;r<s;++r)e.fillText(n[r],a.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:s,yAlign:o}=this,{x:r,y:a}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:p}=Le(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(r+c,a),"top"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+l-u,a),e.quadraticCurveTo(r+l,a,r+l,a+u),"center"===o&&"right"===s&&this.drawCaret(t,e,i,n),e.lineTo(r+l,a+h-p),e.quadraticCurveTo(r+l,a+h,r+l-p,a+h),"bottom"===o&&this.drawCaret(t,e,i,n),e.lineTo(r+d,a+h),e.quadraticCurveTo(r,a+h,r,a+h-d),"center"===o&&"left"===s&&this.drawCaret(t,e,i,n),e.lineTo(r,a+c),e.quadraticCurveTo(r,a,r+c,a),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,s=i&&i.y;if(n||s){const i=bo[t.position].call(this,this._active,this._eventPosition);if(!i)return;const o=this._size=ko(this,t),r=Object.assign({},i,this._size),a=Oo(e,t,r),l=Eo(t,r,a,e);n._to===l.x&&s._to===l.y||(this.xAlign=a.xAlign,this.yAlign=a.yAlign,this.width=o.width,this.height=o.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},s={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const o=Oe(e.padding),r=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&r&&(t.save(),t.globalAlpha=i,this.drawBackground(s,t,n,e),ui(t,e.textDirection),s.y+=o.top,this.drawTitle(s,t,e),this.drawBody(s,t,e),this.drawFooter(s,t,e),di(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),s=!Z(i,n),o=this._positionChanged(n,e);(s||o)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,s=this._active||[],o=this._getActiveElements(t,s,e,i),r=this._positionChanged(o,t),a=e||!Z(o,s)||r;return a&&(this._active=o,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),a}_getActiveElements(t,e,i,n){const s=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const o=this.chart.getElementsAtEventForMode(t,s.mode,s,i);return s.reverse&&o.reverse(),o}_positionChanged(t,e){const{caretX:i,caretY:n,options:s}=this,o=bo[s.position].call(this,t,e);return!1!==o&&(i!==o.x||n!==o.y)}}var Do={id:"tooltip",_element:Io,positioners:bo,afterInit(t,e,i){i&&(t.tooltip=new Io({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Co},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},zo=Object.freeze({__proto__:null,Colors:Zs,Decimation:Us,Filler:co,Legend:mo,SubTitle:yo,Title:_o,Tooltip:Do});function Fo(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}function Ro(t,e,{horizontal:i,minRotation:n}){const s=_t(n),o=(i?Math.sin(s):Math.cos(s))||.001,r=.75*e*(""+t).length;return Math.min(e/o,r)}class No extends Zn{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return z(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:s}=this;const o=t=>n=e?n:t,r=t=>s=i?s:t;if(t){const t=dt(n),e=dt(s);t<0&&e<0?r(0):t>0&&e>0&&o(0)}if(n===s){let e=0===s?1:Math.abs(.05*s);r(s+e),t||o(n-e)}this.min=n,this.max=s}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:s,min:o,max:r,precision:a,count:l,maxTicks:h,maxDigits:c,includeBounds:u}
vendor: 9,524 bytes, line 2
2=t,d=s||1,p=h-1,{min:f,max:m}=e,g=!z(o),_=!z(r),v=!z(l),y=(m-f)/(c+1);let b,x,w,M,k=ft((m-f)/p/d)*d;if(k<1e-14&&!g&&!_)return[{value:f},{value:m}];M=Math.ceil(m/k)-Math.floor(f/k),M>p&&(k=ft(M*k/p/d)*d),z(a)||(b=Math.pow(10,a),k=Math.ceil(k*b)/b),"ticks"===n?(x=Math.floor(f/k)*k,w=Math.ceil(m/k)*k):(x=f,w=m),g&&_&&s&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((r-o)/s,k/1e3)?(M=Math.round(Math.min((r-o)/k,h)),k=(r-o)/M,x=o,w=r):v?(x=g?o:x,w=_?r:w,M=l-1,k=(w-x)/M):(M=(w-x)/k,M=pt(M,Math.round(M),k/1e3)?Math.round(M):Math.ceil(M));const L=Math.max(yt(k),yt(x));b=Math.pow(10,z(a)?L:a),x=Math.round(x*b)/b,w=Math.round(w*b)/b;let O=0;for(g&&(u&&x!==o?(i.push({value:o}),x<o&&O++,pt(Math.round((x+O*k)*b)/b,o,Ro(o,y,t))&&O++):x<o&&O++);O<M;++O){const t=Math.round((x+O*k)*b)/b;if(_&&t>r)break;i.push({value:t})}return _&&u&&w!==r?i.length&&pt(i[i.length-1].value,r,Ro(r,y,t))?i[i.length-1].value=r:i.push({value:r}):_&&w!==r||i.push({value:w}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&gt(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Yt(t,this.chart.options.locale,this.options.ticks.format)}}class Bo extends No{static id="linear";static defaults={ticks:{callback:Xt.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=N(t)?t:0,this.max=N(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=_t(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,s.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const jo=t=>Math.floor(ut(t)),Vo=(t,e)=>Math.pow(10,jo(t)+e);function Ho(t){return 1===t/Math.pow(10,jo(t))}function $o(t,e,i){const n=Math.pow(10,i),s=Math.floor(t/n);return Math.ceil(e/n)-s}class Zo extends Zn{static id="logarithmic";static defaults={ticks:{callback:Xt.formatters.logarithmic,major:{enabled:!0}}};constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=No.prototype.parse.apply(this,[t,e]);if(0!==i)return N(i)&&i>0?i:null;this._zero=!0}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=N(t)?Math.max(0,t):null,this.max=N(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!N(this._userMin)&&(this.min=t===Vo(this.min,0)?Vo(this.min,-1):Vo(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,n=this.max;const s=e=>i=t?i:e,o=t=>n=e?n:t;i===n&&(i<=0?(s(1),o(10)):(s(Vo(i,-1)),o(Vo(n,1)))),i<=0&&s(Vo(n,-1)),n<=0&&o(Vo(i,1)),this.min=i,this.max=n}buildTicks(){const t=this.options,e=function(t,{min:e,max:i}){e=B(t.min,e);const n=[],s=jo(e);let o=function(t,e){let i=jo(e-t);for(;$o(t,e,i)>10;)i++;for(;$o(t,e,i)<10;)i--;return Math.min(i,jo(t))}(e,i),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),l=s>o?Math.pow(10,s):0,h=Math.round((e-l)*r)/r,c=Math.floor((e-l)/a/10)*a*10;let u=Math.floor((h-c)/Math.pow(10,o)),d=B(t.min,Math.round((l+c+u*Math.pow(10,o))*r)/r);for(;d<i;)n.push({value:d,major:Ho(d),significand:u}),u>=10?u=u<15?15:20:u++,u>=20&&(o++,u=2,r=o>=0?1:r),d=Math.round((l+c+u*Math.pow(10,o))*r)/r;const p=B(t.max,d);return n.push({value:p,major:Ho(p),significand:u}),n}({min:this._userMin,max:this._userMax},this);return"ticks"===t.bounds&&gt(e,this,"value"),t.reverse?(e.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),e}getLabelForValue(t){return void 0===t?"0":Yt(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=ut(t),this._valueRange=ut(this.max)-ut(t)}getPixelForValue(t){return void 0!==t&&0!==t||(t=this.min),null===t||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(ut(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}function Wo(t){const e=t.ticks;if(e.display&&t.display){const t=Oe(e.backdropPadding);return j(e.font&&e.font.size,ne.font.size)+t.height}return 0}function qo(t,e,i){return i=F(i)?i:[i],{w:oe(t,e.string,i),h:i.length*e.lineHeight}}function Uo(t,e,i,n,s){return t===n||t===s?{start:e-i/2,end:e+i/2}:t<n||t>s?{start:e-i,end:e}:{start:e,end:e+i}}function Ko(t,e,i,n,s){const o=Math.abs(Math.sin(i)),r=Math.abs(Math.cos(i));let a=0,l=0;n.start<e.l?(a=(e.l-n.start)/o,t.l=Math.min(t.l,e.l-a)):n.end>e.r&&(a=(n.end-e.r)/o,t.r=Math.max(t.r,e.r+a)),s.start<e.t?(l=(e.t-s.start)/r,t.t=Math.min(t.t,e.t-l)):s.end>e.b&&(l=(s.end-e.b)/r,t.b=Math.max(t.b,e.b+l))}function Yo(t,e,i){const n=t.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=i,l=t.getPointPosition(e,n+s+r,o),h=Math.round(vt(Mt(l.angle+lt))),c=function(t,e,i){return 90===i||270===i?t-=e/2:(i>270||i<90)&&(t-=e),t}(l.y,a.h,h),u=function(t){return 0===t||180===t?"center":t<180?"left":"right"}(h),d=(p=l.x,f=a.w,"right"===(m=u)?p-=f:"center"===m&&(p-=f/2),p);var p,f,m;return{visible:!0,x:l.x,y:c,textAlign:u,left:d,top:c,right:d+a.w,bottom:c+a.h}}function Go(t,e){if(!e)return!0;const{left:i,top:n,right:s,bottom:o}=t;return!(ce({x:i,y:n},e)||ce({x:i,y:o},e)||ce({x:s,y:n},e)||ce({x:s,y:o},e))}function Xo(t,e,i){const{left:n,top:s,right:o,bottom:r}=i,{backdropColor:a}=e;if(!z(a)){const i=Le(e.borderRadius),l=Oe(e.backdropPadding);t.fillStyle=a;const h=n-l.left,c=s-l.top,u=o-n+l.width,d=r-s+l.height;Object.values(i).some(t=>0!==t)?(t.beginPath(),ve(t,{x:h,y:c,w:u,h:d,radius:i}),t.fill()):t.fillRect(h,c,u,d)}}function Jo(t,e,i,n){const{ctx:s}=t;if(i)s.arc(t.xCenter,t.yCenter,e,0,st);else{let i=t.getPointPosition(0,e);s.moveTo(i.x,i.y);for(let o=1;o<n;o++)i=t.getPointPosition(o,e),s.lineTo(i.x,i.y)}}class Qo extends No{static id="radialLinear";static defaults={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:Xt.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback:t=>t,padding:5,centerPointLabels:!1}};static defaultRoutes={"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"};static descriptors={angleLines:{_fallback:"grid"}};constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Oe(Wo(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=N(t)&&!isNaN(t)?t:0,this.max=N(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Wo(this.options))}generateTickLabels(t){No.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((t,e)=>{const i=H(this.options.pointLabels.callback,[t,e],this);return i||0===i?i:""}).filter((t,e)=>this.chart.getDataVisibility(e))}fit(){const t=this.options;t.display&&t.pointLabels.display?function(t){const e={l:t.left+t._padding.left,r:t.right-t._padding.right,t:t.top+t._padding.top,b:t.bottom-t._padding.bottom},i=Object.assign({},e),n=[],s=[],o=t._pointLabels.length,r=t.options.pointLabels,a=r.centerPointLabels?nt/o:0;for(let l=0;l<o;l++){const o=r.setContext(t.getPointLabelContext(l));s[l]=o.padding;const h=t.getPointPosition(l,t.drawingArea+s[l],a),c=Ee(o.font),u=qo(t.ctx,c,t._pointLabels[l]);n[l]=u;const d=Mt(t.getIndexAngle(l)+a),p=Math.round(vt(d));Ko(i,e,d,Uo(p,h.x,u.w,0,180),Uo(p,h.y,u.h,90,270))}t.setCenterPoint(e.l-i.l,i.r-e.r,e.t-i.t,i.b-e.b),t._pointLabelItems=function(t,e,i){const n=[],s=t._pointLabels.length,o=t.options,{centerPointLabels:r,display:a}=o.pointLabels,l={extra:Wo(o)/2,additionalAngle:r?nt/s:0};let h;for(let o=0;o<s;o++){l.padding=i[o],l.size=e[o];const s=Yo(t,o,l);n.push(s),"auto"===a&&(s.visible=Go(s,h),s.visible&&(h=s))}return n}(t,n,s)}(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,n){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-n)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,n))}getIndexAngle(t){return Mt(t*(st/(this._pointLabels.length||1))+_t(this.options.startAngle||0))}getDistanceFromCenterForValue(t){if(z(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(z(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];
vendor: 10,283 bytes, line 2
2return function(t,e,i){return Ae(t,{label:i,index:e,type:"pointLabel"})}(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const n=this.getIndexAngle(t)-lt+i;return{x:Math.cos(n)*e+this.xCenter,y:Math.sin(n)*e+this.yCenter,angle:n}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:n,bottom:s}=this._pointLabelItems[t];return{left:e,top:i,right:n,bottom:s}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),Jo(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:n,border:s}=e,o=this._pointLabels.length;let r,a,l;if(e.pointLabels.display&&function(t,e){const{ctx:i,options:{pointLabels:n}}=t;for(let s=e-1;s>=0;s--){const e=t._pointLabelItems[s];if(!e.visible)continue;const o=n.setContext(t.getPointLabelContext(s));Xo(i,o,e);const r=Ee(o.font),{x:a,y:l,textAlign:h}=e;_e(i,t._pointLabels[s],a,l+r.lineHeight/2,r,{color:o.color,textAlign:h,textBaseline:"middle"})}}(this,o),n.display&&this.ticks.forEach((t,e)=>{if(0!==e||0===e&&this.min<0){a=this.getDistanceFromCenterForValue(t.value);const i=this.getContext(e),r=n.setContext(i),l=s.setContext(i);!function(t,e,i,n,s){const o=t.ctx,r=e.circular,{color:a,lineWidth:l}=e;!r&&!n||!a||!l||i<0||(o.save(),o.strokeStyle=a,o.lineWidth=l,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),Jo(t,i,r,n),o.closePath(),o.stroke(),o.restore())}(this,r,a,o,l)}}),i.display){for(t.save(),r=o-1;r>=0;r--){const n=i.setContext(this.getPointLabelContext(r)),{color:s,lineWidth:o}=n;o&&s&&(t.lineWidth=o,t.strokeStyle=s,t.setLineDash(n.borderDash),t.lineDashOffset=n.borderDashOffset,a=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),l=this.getPointPosition(r,a),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(l.x,l.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const n=this.getIndexAngle(0);let s,o;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(n),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((n,r)=>{if(0===r&&this.min>=0&&!e.reverse)return;const a=i.setContext(this.getContext(r)),l=Ee(a.font);if(s=this.getDistanceFromCenterForValue(this.ticks[r].value),a.showLabelBackdrop){t.font=l.string,o=t.measureText(n.label).width,t.fillStyle=a.backdropColor;const e=Oe(a.backdropPadding);t.fillRect(-o/2-e.left,-s-l.size/2-e.top,o+e.width,l.size+e.height)}_e(t,n.label,0,-s,l,{color:a.color,strokeColor:a.textStrokeColor,strokeWidth:a.textStrokeWidth})}),t.restore()}drawTitle(){}}const tr={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},er=Object.keys(tr);function ir(t,e){return t-e}function nr(t,e){if(z(e))return null;const i=t._adapter,{parser:n,round:s,isoWeekday:o}=t._parseOpts;let r=e;return"function"==typeof n&&(r=n(r)),N(r)||(r="string"==typeof n?i.parse(r,n):i.parse(r)),null===r?null:(s&&(r="week"!==s||!mt(o)&&!0!==o?i.startOf(r,s):i.startOf(r,"isoWeek",o)),+r)}function sr(t,e,i,n){const s=er.length;for(let o=er.indexOf(t);o<s-1;++o){const t=tr[er[o]],s=t.steps?t.steps:Number.MAX_SAFE_INTEGER;if(t.common&&Math.ceil((i-e)/(s*t.size))<=n)return er[o]}return er[s-1]}function or(t,e,i){if(i){if(i.length){const{lo:n,hi:s}=Et(i,e);t[i[n]>=e?i[n]:i[s]]=!0}}else t[e]=!0}function rr(t,e,i){const n=[],s={},o=e.length;let r,a;for(r=0;r<o;++r)a=e[r],s[a]=r,n.push({value:a,major:!1});return 0!==o&&i?function(t,e,i,n){const s=t._adapter,o=+s.startOf(e[0].value,n),r=e[e.length-1].value;let a,l;for(a=o;a<=r;a=+s.add(a,1,n))l=i[a],l>=0&&(e[l].major=!0);return e}(t,n,s,i):n}class ar extends Zn{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),n=this._adapter=new Ji(t.adapters.date);n.init(e),Y(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return void 0===t?null:nr(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:n,max:s,minDefined:o,maxDefined:r}=this.getUserBounds();function a(t){o||isNaN(t.min)||(n=Math.min(n,t.min)),r||isNaN(t.max)||(s=Math.max(s,t.max))}o&&r||(a(this._getLabelBounds()),"ticks"===t.bounds&&"labels"===t.ticks.source||a(this.getMinMax(!1))),n=N(n)&&!isNaN(n)?n:+e.startOf(Date.now(),i),s=N(s)&&!isNaN(s)?s:+e.endOf(Date.now(),i)+1,this.min=Math.min(n,s-1),this.max=Math.max(n+1,s)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,n="labels"===i.source?this.getLabelTimestamps():this._generate();"ticks"===t.bounds&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const s=this.min,o=function(t,e,i){let n=0,s=t.length;for(;n<s&&t[n]<e;)n++;for(;s>n&&t[s-1]>i;)s--;return n>0||s<t.length?t.slice(n,s):t}(n,s,this.max);return this._unit=e.unit||(i.autoSkip?sr(e.minUnit,this.min,this.max,this._getLabelCapacity(s)):function(t,e,i,n,s){for(let o=er.length-1;o>=er.indexOf(i);o--){const i=er[o];if(tr[i].common&&t._adapter.diff(s,n,i)>=e-1)return i}return er[i?er.indexOf(i):0]}(this,o.length,e.minUnit,this.min,this.max)),this._majorUnit=i.major.enabled&&"year"!==this._unit?function(t){for(let e=er.indexOf(t)+1,i=er.length;e<i;++e)if(tr[er[e]].common)return er[e]}(this._unit):void 0,this.initOffsets(n),t.reverse&&o.reverse(),rr(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e,i,n=0,s=0;this.options.offset&&t.length&&(e=this.getDecimalForValue(t[0]),n=1===t.length?1-e:(this.getDecimalForValue(t[1])-e)/2,i=this.getDecimalForValue(t[t.length-1]),s=1===t.length?i:(i-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;n=Lt(n,0,o),s=Lt(s,0,o),this._offsets={start:n,end:s,factor:1/(n+1+s)}}_generate(){const t=this._adapter,e=this.min,i=this.max,n=this.options,s=n.time,o=s.unit||sr(s.minUnit,e,i,this._getLabelCapacity(e)),r=j(n.ticks.stepSize,1),a="week"===o&&s.isoWeekday,l=mt(a)||!0===a,h={};let c,u,d=e;if(l&&(d=+t.startOf(d,"isoWeek",a)),d=+t.startOf(d,l?"day":o),t.diff(i,e,o)>1e5*r)throw new Error(e+" and "+i+" are too far apart with stepSize of "+r+" "+o);const p="data"===n.ticks.source&&this.getDataTimestamps();for(c=d,u=0;c<i;c=+t.add(c,r,o),u++)or(h,c,p);return c!==i&&"ticks"!==n.bounds&&1!==u||or(h,c,p),Object.keys(h).sort(ir).map(t=>+t)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const i=this.options.time.displayFormats,n=this._unit,s=e||i[n];return this._adapter.format(t,s)}_tickFormatFunction(t,e,i,n){const s=this.options,o=s.ticks.callback;if(o)return H(o,[t,e,i],this);const r=s.time.displayFormats,a=this._unit,l=this._majorUnit,h=a&&r[a],c=l&&r[l],u=i[e],d=l&&c&&u&&u.major;return this._adapter.format(t,n||(d?c:h))}generateTickLabels(t){let e,i,n;for(e=0,i=t.length;e<i;++e)n=t[e],n.label=this._tickFormatFunction(n.value,e,t)}getDecimalForValue(t){return null===t?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,n=_t(this.isHorizontal()?e.maxRotation:e.minRotation),s=Math.cos(n),o=Math.sin(n),r=this._resolveTickFontOptions(0).size;return{w:i*s+r*o,h:i*o+r*s}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,n=i[e.unit]||i.millisecond,s=this._tickFormatFunction(t,0,rr(this,[t],this._majorUnit),n),o=this._getLabelSize(s),r=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return r>0?r:1}getDataTimestamps(){let t,e,i=this._cache.data||[];if(i.length)return i;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(t=0,e=n.length;t<e;++t)i=i.concat(n[t].controller.getAllParsedValues(this));return this._cache.data=this.normalize(i)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const n=this.getLabels();for(e=0,i=n.length;e<i;++e)t.push(nr(this,n[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Tt(t.sort(ir))}}function lr(t,e,i){let n,s,o,r,a=0,l=t.length-1;i?(e>=t[a].pos&&e<=t[l].pos&&({lo:a,hi:l}=St(t,"pos",e)),({pos:n,time:o}=t[a]),({pos:s,time:r}=t[l])):(e>=t[a].time&&e<=t[l].time&&({lo:a,hi:l}=St(t,"time",e)),({time:n,pos:o}=t[a]),({time:s,pos:r}=t[l]));const h=s-n;return h?o+(r-o)*(e-n)/h:o}var hr=Object.freeze({__proto__:null,CategoryScale:class extends Zn{static id="category";static defaults={ticks:{callback:Fo}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(z(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:Lt(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,
2i,n){const s=t.indexOf(e);return-1===s?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):s!==t.lastIndexOf(e)?i:s}(i,t,j(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let s=this.getLabels();s=0===t&&e===s.length-1?s:s.slice(t,e+1),this._valueRange=Math.max(s.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return Fo.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}},LinearScale:Bo,LogarithmicScale:Zo,RadialLinearScale:Qo,TimeScale:ar,TimeSeriesScale:class extends ar{static id="timeseries";static defaults=ar.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=lr(e,this.min),this._tableRange=lr(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,n=[],s=[];let o,r,a,l,h;for(o=0,r=t.length;o<r;++o)l=t[o],l>=e&&l<=i&&n.push(l);if(n.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(o=0,r=n.length;o<r;++o)h=n[o+1],a=n[o-1],l=n[o],Math.round((h+a)/2)!==l&&s.push({time:l,pos:o/(r-1)});return s}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return i.includes(t)&&i.length||i.splice(0,0,t),i.includes(e)&&1!==i.length||i.push(e),i.sort((t,e)=>t-e)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return t=e.length&&i.length?this.normalize(e.concat(i)):e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(lr(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return lr(this._table,i*this._tableRange+this._minPos,!0)}}});const cr=[Yi,Ns,zo,hr]},276:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(8344).then(i.bind(i,8344)).then(t=>{this.application.register(this.identifier,t.default)})}}},283:(t,e,i)=>{"use strict";var n=i(9504),s=i(9039),o=i(4901),r=i(9297),a=i(3724),l=i(350).CONFIGURABLE,h=i(3706),c=i(1181),u=c.enforce,d=c.get,p=String,f=Object.defineProperty,m=n("".slice),g=n("".replace),_=n([].join),v=a&&!s(function(){return 8!==f(function(){},"length",{value:8}).length}),y=String(String).split("String"),b=t.exports=function(t,e,i){"Symbol("===m(p(e),0,7)&&(e="["+g(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),i&&i.getter&&(e="get "+e),i&&i.setter&&(e="set "+e),(!r(t,"name")||l&&t.name!==e)&&(a?f(t,"name",{value:e,configurable:!0}):t.name=e),v&&i&&r(i,"arity")&&t.length!==i.arity&&f(t,"length",{value:i.arity});try{i&&r(i,"constructor")&&i.constructor?a&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var n=u(t);return r(n,"source")||(n.source=_(y,"string"==typeof e?e:"")),t};Function.prototype.toString=b(function(){return o(this)&&d(this).source||h(this)},"toString")},350:(t,e,i)=>{"use strict";var n=i(3724),s=i(9297),o=Function.prototype,r=n&&Object.getOwnPropertyDescriptor,a=s(o,"name"),l=a&&"something"===function(){}.name,h=a&&(!n||n&&r(o,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:h}},397:(t,e,i)=>{"use strict";var n=i(7751);t.exports=n("document","documentElement")},421:t=>{"use strict";
2t.exports={}},616:(t,e,i)=>{"use strict";var n=i(9039);t.exports=!n(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})},687:(t,e,i)=>{"use strict";var n=i(4913).f,s=i(9297),o=i(8227)("toStringTag");t.exports=function(t,e,i){t&&!i&&(t=t.prototype),t&&!s(t,o)&&n(t,o,{configurable:!0,value:e})}},741:t=>{"use strict";var e=Math.ceil,i=Math.floor;t.exports=Math.trunc||function(t){var n=+t;return(n>0?i:e)(n)}},757:(t,e,i)=>{"use strict";var n=i(7751),s=i(4901),o=i(1625),r=i(7040),a=Object;t.exports=r?function(t){return"symbol"==typeof t}:function(t){var e=n("Symbol");return s(e)&&o(e.prototype,a(t))}},758:(t,e,i)=>{var n={"./back-to-top-controller.js":5826,"./csrf_protection_controller.js":1899,"./distance-between-controller.js":2721,"./distance-controller.js":2994,"./distance-toggle-controller.js":2535,"./favorite-handle-controller.js":3150,"./modal-popup-controller.js":7299,"./node-favorite-load-controller.js":5269,"./recaptcha-controller.js":2954,"./splide-controller.js":1434,"./toggle-group-controller.js":1165};function s(t){var e=o(t);return i(e)}function o(t){if(!i.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}s.keys=function(){return Object.keys(n)},s.resolve=o,t.exports=s,s.id=758},867:(t,e,i)=>{"use strict";function n(){return window.getComputedStyle(document.querySelector("body"),"::before").getPropertyValue("content").replace(/\"/g,"")}i.d(e,{A:()=>n})},872:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(6972).then(i.bind(i,6972)).then(t=>{this.application.register(this.identifier,t.default)})}}},1072:(t,e,i)=>{"use strict";var n=i(1828),s=i(8727);t.exports=Object.keys||function(t){return n(t,s)}},1088:(t,e,i)=>{"use strict";var n=i(6518),s=i(9565),o=i(6395),r=i(350),a=i(4901),l=i(3994),h=i(2787),c=i(2967),u=i(687),d=i(6699),p=i(6840),f=i(8227),m=i(6269),g=i(7657),_=r.PROPER,v=r.CONFIGURABLE,y=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,x=f("iterator"),w="keys",M="values",k="entries",L=function(){return this};t.exports=function(t,e,i,r,f,g,O){l(i,e,r);var E,S,A,P=function(t){if(t===f&&z)return z;if(!b&&t&&t in I)return I[t];switch(t){case w:case M:case k:return function(){return new i(this,t)}}return function(){return new i(this)}},C=e+" Iterator",T=!1,I=t.prototype,D=I[x]||I["@@iterator"]||f&&I[f],z=!b&&D||P(f),F="Array"===e&&I.entries||D;if(F&&(E=h(F.call(new t)))!==Object.prototype&&E.next&&(o||h(E)===y||(c?c(E,y):a(E[x])||p(E,x,L)),u(E,C,!0,!0),o&&(m[C]=L)),_&&f===M&&D&&D.name!==M&&(!o&&v?d(I,"name",M):(T=!0,z=function(){return s(D,this)})),f)if(S={values:P(M),keys:g?z:P(w),entries:P(k)},O)for(A in S)(b||T||!(A in I))&&p(I,A,S[A]);else n({target:e,proto:!0,forced:b||T},S);return o&&!O||I[x]===z||p(I,x,z,{name:f}),m[e]=z,S}},1165:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(5937).then(i.bind(i,5937)).then(t=>{this.application.register(this.identifier,t.default)})}}},1181:(t,e,i)=>{"use strict";var n,s,o,r=i(8622),a=i(4576),l=i(34),h=i(6699),c=i(9297),u=i(7629),d=i(6119),p=i(421),f="Object already initialized",m=a.TypeError,g=a.WeakMap;if(r||u.state){var _=u.state||(u.state=new g);_.get=_.get,_.has=_.has,_.set=_.set,n=function(t,e){if(_.has(t))throw new m(f);return e.facade=t,_.set(t,e),e},s=function(t){return _.get(t)||{}},o=function(t){return _.has(t)}}else{var v=d("state");p[v]=!0,n=function(t,e){if(c(t,v))throw new m(f);return e.facade=t,h(t,v,e),e},s=function(t){return c(t,v)?t[v]:{}},o=function(t){return c(t,v)}}t.exports={set:n,get:s,has:o,enforce:function(t){return o(t)?s(t):n(t,{})},getterFor:function(t){return function(e){var i;if(!l(e)||(i=s(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return i}}}}
2,1291:(t,e,i)=>{"use strict";var n=i(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:n(e)}},1434:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(902).then(i.bind(i,902)).then(t=>{this.application.register(this.identifier,t.default)})}}},1625:(t,e,i)=>{"use strict";var n=i(9504);t.exports=n({}.isPrototypeOf)},1828:(t,e,i)=>{"use strict";var n=i(9504),s=i(9297),o=i(5397),r=i(9617).indexOf,a=i(421),l=n([].push);t.exports=function(t,e){var i,n=o(t),h=0,c=[];for(i in n)!s(a,i)&&s(n,i)&&l(c,i);for(;e.length>h;)s(n,i=e[h++])&&(~r(c,i)||l(c,i));return c}},1899:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(5575).then(i.bind(i,5575)).then(t=>{this.application.register(this.identifier,t.default)})}}},2195:(t,e,i)=>{"use strict";var n=i(9504),s=n({}.toString),o=n("".slice);t.exports=function(t){return o(s(t),8,-1)}},2211:(t,e,i)=>{"use strict";var n=i(9039);t.exports=!n(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})},2354:(t,e,i)=>{"use strict";function n(t,e){t.split(/\s+/).forEach(t=>{e(t)})}i.d(e,{A:()=>yt});class s{constructor(){this._events={}}on(t,e){n(t,t=>{const i=this._events[t]||[];i.push(e),this._events[t]=i})}off(t,e){var i=arguments.length;0!==i?n(t,t=>{if(1===i)return void delete this._events[t];const n=this._events[t];void 0!==n&&(n.splice(n.indexOf(e),1),this._events[t]=n)}):this._events={}}trigger(t,...e){var i=this;n(t,t=>{const n=i._events[t];void 0!==n&&n.forEach(t=>{t.apply(i,e)})})}}const o=t=>(t=t.filter(Boolean)).length<2?t[0]||"":1==c(t)?"["+t.join("")+"]":"(?:"+t.join("|")+")",r=t=>{if(!l(t))return t.join("");let e="",i=0;const n=()=>{i>1&&(e+="{"+i+"}")};return t.forEach((s,o)=>{s!==t[o-1]?(n(),e+=s,i=1):i++}),n(),e},a=t=>{let e=Array.from(t);return o(e)},l=t=>new Set(t).size!==t.length,h=t=>(t+"").replace(/([\$\(\)\*\+\.\?\[\]\^\{\|\}\\])/gu,"\\$1"),c=t=>t.reduce((t,e)=>Math.max(t,u(e)),0),u=t=>Array.from(t).length,d=t=>{if(1===t.length)return[[t]];let e=[];const i=t.substring(1);return d(i).forEach(function(i){let n=i.slice(0);n[0]=t.charAt(0)+n[0],e.push(n),n=i.slice(0),n.unshift(t.charAt(0)),e.push(n)}),e},p=[[0,65535]];let f,m;const g={},_={"/":"⁄∕",0:"߀",a:"ⱥɐɑ",aa:"ꜳ",ae:"æǽǣ",ao:"ꜵ",au:"ꜷ",av:"ꜹꜻ",ay:"ꜽ",b:"ƀɓƃ",c:"ꜿƈȼↄ",d:"đɗɖᴅƌꮷԁɦ",e:"ɛǝᴇɇ",f:"ꝼƒ",g:"ǥɠꞡᵹꝿɢ",h:"ħⱨⱶɥ",i:"ɨı",j:"ɉȷ",k:"ƙⱪꝁꝃꝅꞣ",l:"łƚɫⱡꝉꝇꞁɭ",m:"ɱɯϻ",n:"ꞥƞɲꞑᴎлԉ",o:"øǿɔɵꝋꝍᴑ",oe:"œ",oi:"ƣ",oo:"ꝏ",ou:"ȣ",p:"ƥᵽꝑꝓꝕρ",q:"ꝗꝙɋ",r:"ɍɽꝛꞧꞃ",s:"ßȿꞩꞅʂ",t:"ŧƭʈⱦꞇ",th:"þ",tz:"ꜩ",u:"ʉ",v:"ʋꝟʌ",vy:"ꝡ",w:"ⱳ",y:"ƴɏỿ",z:"ƶȥɀⱬꝣ",hv:"ƕ"};for(let t in _){let e=_[t]||"";for(let i=0;i<e.length;i++){let n=e.substring(i,i+1);g[n]=t}}const v=new RegExp(Object.keys(g).join("|")+"|[̀-ͯ·ʾʼ]","gu"),y=(t,e="NFKD")=>t.normalize(e),b=t=>Array.from(t).reduce((t,e)=>t+x(e),""),x=t=>(t=y(t).toLowerCase().replace(v,t=>g[t]||""),y(t,"NFC")),w=t=>{const e=(t=>{const e={},i=(t,i)=>{const n=e[t]||new Set,s=new RegExp("^"+a(n)+"$","iu");i.match(s)||(n.add(h(i)),e[t]=n)};for(let e of function*(t){for(const[e,i]of t)for(let t=e;t<=i;t++){let e=String.fromCharCode(t),i=b(e);i!=e.toLowerCase()&&(i.length>3||0!=i.length&&(yield{folded:i,composed:e,code_point:t}))}}(t))i(e.folded,e.folded),i(e.folded,e.composed);return e})(t),i={};let n=[];for(let t in e){let s=e[t];s&&(i[t]=a(s)),t.length>1&&n.push(h(t))}n.sort((t,e)=>e.length-t.length);const s=o(n);return m=new RegExp("^"+s,"u"),i},M=(t,e=1)=>(e=Math.max(e,t.length-1),o(d(t).map(t=>((t,e=1)=>{let i=0;return t=t.map(t=>(f[t]&&(i+=t.length),f[t]||t)),i>=e?r(t):""})(t,e)))),k=(t,e=!0)=>{let i=t.length>1?1:0;return o(t.map(t=>{let n=[];const s=e?t.length():t.length()-1;for(let e=0;e<s;e++)n.push(M(t.substrs[e]||"",i));return r(n)}))},L=(t,e)=>{for(const i of e){if(i.start!=t.start||i.end!=t.end)continue;if(i.substrs.join("")!==t.substrs.join(""))continue;let e=t.parts;const n=t=>{for(const i of e){if(i.start===t.start&&i.substr===t.substr)return!1;if(1!=t.length&&1!=i.length){if(t.start<i.start&&t.end>i.start)return!0;
vendor: 34,805 bytes, line 2
2if(i.start<t.start&&i.end>t.start)return!0}}return!1};if(!(i.parts.filter(n).length>0))return!0}return!1};class O{parts;substrs;start;end;constructor(){this.parts=[],this.substrs=[],this.start=0,this.end=0}add(t){t&&(this.parts.push(t),this.substrs.push(t.substr),this.start=Math.min(t.start,this.start),this.end=Math.max(t.end,this.end))}last(){return this.parts[this.parts.length-1]}length(){return this.parts.length}clone(t,e){let i=new O,n=JSON.parse(JSON.stringify(this.parts)),s=n.pop();for(const t of n)i.add(t);let o=e.substr.substring(0,t-s.start),r=o.length;return i.add({start:s.start,end:s.start+r,length:r,substr:o}),i}}const E=(t,e)=>{if(t)return t[e]},S=(t,e)=>{if(t){for(var i,n=e.split(".");(i=n.shift())&&(t=t[i]););return t}},A=(t,e,i)=>{var n,s;return t?(t+="",null==e.regex||-1===(s=t.search(e.regex))?0:(n=e.string.length/t.length,0===s&&(n+=.5),n*i)):0},P=(t,e)=>{var i=t[e];if("function"==typeof i)return i;i&&!Array.isArray(i)&&(t[e]=[i])},C=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},T=(t,e)=>"number"==typeof t&&"number"==typeof e?t>e?1:t<e?-1:0:(t=b(t+"").toLowerCase())>(e=b(e+"").toLowerCase())?1:e>t?-1:0;class I{items;settings;constructor(t,e){this.items=t,this.settings=e||{diacritics:!0}}tokenize(t,e,i){if(!t||!t.length)return[];const n=[],s=t.split(/\s+/);var o;return i&&(o=new RegExp("^("+Object.keys(i).map(h).join("|")+"):(.*)$")),s.forEach(t=>{let i,s=null,r=null;o&&(i=t.match(o))&&(s=i[1],t=i[2]),t.length>0&&(r=this.settings.diacritics?(t=>{void 0===f&&(f=w(p)),t=b(t);let e="",i=[new O];for(let n=0;n<t.length;n++){let s=t.substring(n).match(m);const o=t.substring(n,n+1),r=s?s[0]:null;let a=[],l=new Set;for(const t of i){const e=t.last();if(!e||1==e.length||e.end<=n)if(r){const e=r.length;t.add({start:n,end:n+e,length:e,substr:r}),l.add("1")}else t.add({start:n,end:n+1,length:1,substr:o}),l.add("2");else if(r){let i=t.clone(n,e);const s=r.length;i.add({start:n,end:n+s,length:s,substr:r}),a.push(i)}else l.add("3")}if(a.length>0){a=a.sort((t,e)=>t.length()-e.length());for(let t of a)L(t,i)||i.push(t)}else if(n>0&&1==l.size&&!l.has("3")){e+=k(i,!1);let t=new O;const n=i[0];n&&t.add(n.last()),i=[t]}}return e+=k(i,!0),e})(t)||null:h(t),r&&e&&(r="\\b"+r)),n.push({string:t,regex:r?new RegExp(r,"iu"):null,field:s})}),n}getScoreFunction(t,e){var i=this.prepareSearch(t,e);return this._getScoreFunction(i)}_getScoreFunction(t){const e=t.tokens,i=e.length;if(!i)return function(){return 0};const n=t.options.fields,s=t.weights,o=n.length,r=t.getAttrFn;if(!o)return function(){return 1};const a=1===o?function(t,e){const i=n[0].field;return A(r(e,i),t,s[i]||1)}:function(t,e){var i=0;if(t.field){const n=r(e,t.field);!t.regex&&n?i+=1/o:i+=A(n,t,1)}else C(s,(n,s)=>{i+=A(r(e,s),t,n)});return i/o};return 1===i?function(t){return a(e[0],t)}:"and"===t.options.conjunction?function(t){var n,s=0;for(let i of e){if((n=a(i,t))<=0)return 0;s+=n}return s/i}:function(t){var n=0;return C(e,e=>{n+=a(e,t)}),n/i}}getSortFunction(t,e){var i=this.prepareSearch(t,e);return this._getSortFunction(i)}_getSortFunction(t){var e,i=[];const n=this,s=t.options,o=!t.query&&s.sort_empty?s.sort_empty:s.sort;if("function"==typeof o)return o.bind(this);const r=function(e,i){return"$score"===e?i.score:t.getAttrFn(n.items[i.id],e)};if(o)for(let e of o)(t.query||"$score"!==e.field)&&i.push(e);if(t.query){e=!0;for(let t of i)if("$score"===t.field){e=!1;break}e&&i.unshift({field:"$score",direction:"desc"})}else i=i.filter(t=>"$score"!==t.field);return i.length?function(t,e){var n,s;for(let o of i)if(s=o.field,n=("desc"===o.direction?-1:1)*T(r(s,t),r(s,e)))return n;return 0}:null}prepareSearch(t,e){const i={};var n=Object.assign({},e);if(P(n,"sort"),P(n,"sort_empty"),n.fields){P(n,"fields");const t=[];n.fields.forEach(e=>{"string"==typeof e&&(e={field:e,weight:1}),t.push(e),i[e.field]="weight"in e?e.weight:1}),n.fields=t}return{options:n,query:t.toLowerCase().trim(),tokens:this.tokenize(t,n.respect_word_boundaries,i),total:0,items:[],weights:i,getAttrFn:n.nesting?S:E}}search(t,e){var i,n,s=this;n=this.prepareSearch(t,e),e=n.options,t=n.query;const o=e.score||s._getScoreFunction(n);t.length?C(s.items,(t,s)=>{i=o(t),(!1===e.filter||i>0)&&n.items.push({score:i,id:s})}):C(s.items,(t,e)=>{n.items.push({score:1,id:e})});const r=s._getSortFunction(n);return r&&n.items.sort(r),n.total=n.items.length,"number"==typeof e.limit&&(n.items=n.items.slice(0,e.limit)),n}}const D=t=>null==t?null:z(t),z=t=>"boolean"==typeof t?t?"1":"0":t+"",F=t=>(t+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"),R=(t,e)=>{var i;return function(n,s){var o=this;i&&(o.loading=Math.max(o.loading-1,0),clearTimeout(i)),i=setTimeout(function(){i=null,o.loadedSearches[n]=!0,t.call(o,n,s)},e)}},N=(t,e,i)=>{var n,s=t.trigger,o={};for(n of(t.trigger=function(){var i=arguments[0];if(-1===e.indexOf(i))return s.apply(t,arguments);o[i]=arguments},i.apply(t,[]),t.trigger=s,e))n in o&&s.apply(t,o[n])},B=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},j=(t,e,i,n)=>{t.addEventListener(e,i,n)},V=(t,e)=>!!e&&!!e[t]&&1==(e.altKey?1:0)+(e.ctrlKey?1:0)+(e.shiftKey?1:0)+(e.metaKey?1:0),H=(t,e)=>t.getAttribute("id")||(t.setAttribute("id",e),e),$=t=>t.replace(/[\\"']/g,"\\$&"),Z=(t,e)=>{e&&t.append(e)},W=(t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)},q=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(U(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},U=t=>"string"==typeof t&&t.indexOf("<")>-1,K=(t,e)=>{var i=document.createEvent("HTMLEvents");i.initEvent(e,!0,!1),t.dispatchEvent(i)},Y=(t,e)=>{Object.assign(t.style,e)},G=(t,...e)=>{var i=J(e);(t=Q(t)).map(t=>{i.map(e=>{t.classList.add(e)})})},X=(t,...e)=>{var i=J(e);(t=Q(t)).map(t=>{i.map(e=>{t.classList.remove(e)})})},J=t=>{var e=[];return W(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)},Q=t=>(Array.isArray(t)||(t=[t]),t),tt=(t,e,i)=>{if(!i||i.contains(t))for(;t&&t.matches;){if(t.matches(e))return t;t=t.parentNode}},et=(t,e=0)=>e>0?t[t.length-1]:t[0],it=(t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i},nt=(t,e)=>{W(e,(e,i)=>{null==e?t.removeAttribute(i):t.setAttribute(i,""+e)})},st=(t,e)=>{t.parentNode&&t.parentNode.replaceChild(e,t)},ot="undefined"!=typeof navigator&&/Mac/.test(navigator.userAgent)?"metaKey":"ctrlKey",rt={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:null,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,shouldOpen:null,maxOptions:50,maxItems:null,hideSelected:null,duplicates:!1,addPrecedence:!1,selectOnTab:!1,preload:null,allowEmptyOption:!1,refreshThrottle:300,loadThrottle:300,loadingClass:"loading",dataAttr:null,optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",mode:null,wrapperClass:"ts-wrapper",controlClass:"ts-control",dropdownClass:"ts-dropdown",dropdownContentClass:"ts-dropdown-content",itemClass:"item",optionClass:"option",dropdownParent:null,controlInput:'<input type="text" autocomplete="off" size="1" />',copyClassesToDropdown:!1,placeholder:null,hidePlaceholder:null,shouldLoad:function(t){return t.length>0},render:{}};function at(t,e){var i=Object.assign({},rt,e),n=i.dataAttr,s=i.labelField,o=i.valueField,r=i.disabledField,a=i.optgroupField,l=i.optgroupLabelField,h=i.optgroupValueField,c=t.tagName.toLowerCase(),u=t.getAttribute("placeholder")||t.getAttribute("data-placeholder");if(!u&&!i.allowEmptyOption){let e=t.querySelector('option[value=""]');e&&(u=e.textContent)}var d={placeholder:u,options:[],optgroups:[],items:[],maxItems:null};return"select"===c?(()=>{var e,c=d.options,u={},p=1;let f=0;var m=t=>{var e=Object.assign({},t.dataset),i=n&&e[n];return"string"==typeof i&&i.length&&(e=Object.assign(e,JSON.parse(i))),e},g=(t,e)=>{var n=D(t.value);if(null!=n&&(n||i.allowEmptyOption)){if(u.hasOwnProperty(n)){if(e){var l=u[n][a];l?Array.isArray(l)?l.push(e):u[n][a]=[l,e]:u[n][a]=e}}else{var h=m(t);h[s]=h[s]||t.textContent,h[o]=h[o]||n,h[r]=h[r]||t.disabled,h[a]=h[a]||e,h.$option=t,h.$order=h.$order||++f,u[n]=h,c.push(h)}t.selected&&d.items.push(n)}};d.maxItems=t.hasAttribute("multiple")?null:1,W(t.children,t=>{var i,n,s;"optgroup"===(e=t.tagName.toLowerCase())?((s=m(i=t))[l]=s[l]||i.getAttribute("label")||"",s[h]=s[h]||p++,s[r]=s[r]||i.disabled,s.$order=s.$order||++f,d.optgroups.push(s),n=s[h],W(i.children,t=>{g(t,n)})):"option"===e&&g(t)})})():(()=>{const e=t.getAttribute(n);if(e)d.options=JSON.parse(e),W(d.options,t=>{d.items.push(t[o])});else{var r=t.value.trim()||"";if(!i.allowEmptyOption&&!r.length)return;const e=r.split(i.delimiter);W(e,t=>{const e={};e[s]=t,e[o]=t,d.options.push(e)}),d.items=e}})(),Object.assign({},rt,d,e)}var lt=0;class ht extends(function(t){return t.plugins={},class extends t{constructor(){super(...arguments),this.plugins={names:[],settings:{},requested:{},loaded:{}}}static define(e,i){t.plugins[e]={name:e,fn:i}}initializePlugins(t){var e,i;const n=this,s=[];if(Array.isArray(t))t.forEach(t=>{"string"==typeof t?s.push(t):(n.plugins.settings[t.name]=t.options,s.push(t.name))});else if(t)for(e in t)t.hasOwnProperty(e)&&(n.plugins.settings[e]=t[e],s.push(e));for(;i=s.shift();)n.require(i)}loadPlugin(e){var i=this,n=i.plugins,s=t.plugins[e];if(!t.plugins.hasOwnProperty(e))throw new Error('Unable to find "'+e+'" plugin');n.requested[e]=!0,n.loaded[e]=s.fn.apply(i,[i.plugins.settings[e]||{}]),n.names.push(e)}require(t){var e=this,i=e.plugins;if(!e.plugins.loaded.hasOwnProperty(t)){if(i.requested[t])throw new Error('Plugin has circular dependency ("'+t+'")');e.loadPlugin(t)}return i.loaded[t]}}}(s)){constructor(t,e){var i;super(),this.order=0,this.isOpen=!1,this.isDisabled=!1,this.isReadOnly=!1,this.isInvalid=!1,this.isValid=!0,this.isLocked=!1,this.isFocused=!1,this.isInputHidden=!1,this.isSetup=!1,this.ignoreFocus=!1,this.ignoreHover=!1,this.hasOptions=!1,this.lastValue="",this.caretPos=0,this.loading=0,this.loadedSearches={},this.activeOption=null,this.activeItems=[],this.optgroups={},this.options={},this.userOptions={},this.items=[],this.refreshTimeout=null,lt++;var n=q(t);if(n.tomselect)throw new Error("Tom Select already initialized on this element");n.tomselect=this,i=(window.getComputedStyle&&window.getComputedStyle(n,null)).getPropertyValue("direction");const s=at(n,e);this.settings=s,this.input=n,this.tabIndex=n.tabIndex||0,this.is_select_tag="select"===n.tagName.toLowerCase(),this.rtl=/rtl/i.test(i),this.inputId=H(n,"tomselect-"+lt),this.isRequired=n.required,this.sifter=new I(this.options,{diacritics:s.diacritics}),s.mode=s.mode||(1===s.maxItems?"single":"multi"),"boolean"!=typeof s.hideSelected&&(s.hideSelected="multi"===s.mode),"boolean"!=typeof s.hidePlaceholder&&(s.hidePlaceholder="multi"!==s.mode);var o=s.createFilter;"function"!=typeof o&&("string"==typeof o&&(o=new RegExp(o)),o instanceof RegExp?s.createFilter=t=>o.test(t):s.createFilter=t=>this.settings.duplicates||!this.options[t]),this.initializePlugins(s.plugins),this.setupCallbacks(),this.setupTemplates();const r=q("<div>"),a=q("<div>"),l=this._render("dropdown"),h=q('<div role="listbox" tabindex="-1">'),c=this.input.getAttribute("class")||"",u=s.mode;var d;G(r,s.wrapperClass,c,u),G(a,s.controlClass),Z(r,a),G(l,s.dropdownClass,u),s.copyClassesToDropdown&&G(l,c),G(h,s.dropdownContentClass),Z(l,h),q(s.dropdownParent||r).appendChild(l),U(s.controlInput)?(d=q(s.controlInput),W(["autocorrect","autocapitalize","autocomplete","spellcheck"],t=>{n.getAttribute(t)&&nt(d,{[t]:n.getAttribute(t)})}),d.tabIndex=-1,a.appendChild(d),this.focus_node=d):s.controlInput?(d=q(s.controlInput),this.focus_node=d):(d=q("<input/>"),this.focus_node=a),this.wrapper=r,this.dropdown=l,this.dropdown_content=h,this.control=a,this.control_input=d,this.setup()}setup(){const t=this,e=t.settings,i=t.control_input,n=t.dropdown,s=t.dropdown_content,o=t.wrapper,r=t.control,a=t.input,l=t.focus_node,c={passive:!0},u=t.inputId+"-ts-dropdown";nt(s,{id:u}),nt(l,{role:"combobox","aria-haspopup":"listbox","aria-expanded":"false","aria-controls":u});const d=H(l,t.inputId+"-ts-control"),p="label[for='"+(t=>t.replace(/['"\\]/g,"\\$&"))(t.inputId)+"']",f=document.querySelector(p),m=t.focus.bind(t);if(f){j(f,"click",m),nt(f,{for:d});const e=H(f,t.inputId+"-ts-label");nt(l,{"aria-labelledby":e}),nt(s,{"aria-labelledby":e})}if(o.style.width=a.style.width,t.plugins.names.length){const e="plugin-"+t.plugins.names.join(" plugin-");G([o,n],e)}(null===e.maxItems||e.maxItems>1)&&t.is_select_tag&&nt(a,{multiple:"multiple"}),e.placeholder&&nt(i,{placeholder:e.placeholder}),!e.splitOn&&e.delimiter&&(e.splitOn=new RegExp("\\s*"+h(e.delimiter)+"+\\s*")),e.load&&e.loadThrottle&&(e.load=R(e.load,e.loadThrottle)),j(n,"mousemove",()=>{t.ignoreHover=!1}),j(n,"mouseenter",e=>{var i=tt(e.target,"[data-selectable]",n);i&&t.onOptionHover(e,i)},{capture:!0}),j(n,"click",e=>{const i=tt(e.target,"[data-selectable]");i&&(t.onOptionSelect(e,i),B(e,!0))}),j(r,"click",e=>{var n=tt(e.target,"[data-ts-item]",r);n&&t.onItemSelect(e,n)?B(e,!0):""==i.value&&(t.onClick(),B(e,!0))}),j(l,"keydown",e=>t.onKeyDown(e)),j(i,"keypress",e=>t.onKeyPress(e)),j(i,"input",e=>t.onInput(e)),j(l,"blur",e=>t.onBlur(e)),j(l,"focus",e=>t.onFocus(e)),j(i,"paste",e=>t.onPaste(e));const g=e=>{const s=e.composedPath()[0];if(!o.contains(s)&&!n.contains(s))return t.isFocused&&t.blur(),void t.inputState();s==i&&t.isOpen?e.stopPropagation():B(e,!0)},_=()=>{t.isOpen&&t.positionDropdown()};j(document,"mousedown",g),j(window,"scroll",_,c),j(window,"resize",_,c),this._destroy=()=>{document.removeEventListener("mousedown",g),window.removeEventListener("scroll",_),window.removeEventListener("resize",_),f&&f.removeEventListener("click",m)},this.revertSettings={innerHTML:a.innerHTML,tabIndex:a.tabIndex},a.tabIndex=-1,a.insertAdjacentElement("afterend",t.wrapper),t.sync(!1),e.items=[],delete e.optgroups,delete e.options,j(a,"invalid",()=>{t.isValid&&(t.isValid=!1,t.isInvalid=!0,t.refreshState())}),t.updateOriginalInput(),t.refreshItems(),t.close(!1),t.inputState(),t.isSetup=!0,a.disabled?t.disable():a.readOnly?t.setReadOnly(!0):t.enable(),t.on("change",this.onChange),G(a,"tomselected","ts-hidden-accessible"),t.trigger("initialize"),!0===e.preload&&t.preload()}setupOptions(t=[],e=[]){this.addOptions(t),W(e,t=>{this.registerOptionGroup(t)})}setupTemplates(){var t=this,e=t.settings.labelField,i=t.settings.optgroupLabelField,n={optgroup:t=>{let e=document.createElement("div");return e.className="optgroup",e.appendChild(t.options),e},optgroup_header:(t,e)=>'<div class="optgroup-header">'+e(t[i])+"</div>",option:(t,i)=>"<div>"+i(t[e])+"</div>",item:(t,i)=>"<div>"+i(t[e])+"</div>",option_create:(t,e)=>'<div class="create">Add <strong>'+e(t.input)+"</strong>&hellip;</div>",no_results:()=>'<div class="no-results">No results found</div>',loading:()=>'<div class="spinner"></div>',not_loading:()=>{},dropdown:()=>"<div></div>"};t.settings.render=Object.assign({},n,t.settings.render)}setupCallbacks(){var t,e,i={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",item_select:"onItemSelect",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur"};for(t in i)(e=this.settings[i[t]])&&this.on(t,e)}sync(t=!0){const e=this,i=t?at(e.input,{delimiter:e.settings.delimiter}):e.settings;e.setupOptions(i.options,i.optgroups),e.setValue(i.items||[],!0),e.lastQuery=null}onClick(){var t=this;if(t.activeItems.length>0)return t.clearActiveItems(),void t.focus();t.isFocused&&t.isOpen?t.blur():t.focus()}onMouseDown(){}onChange(){K(this.input,"input"),K(this.input,"change")}onPaste(t){var e=this;e.isInputHidden||e.isLocked?B(t):e.settings.splitOn&&setTimeout(()=>{var t=e.inputValue();if(t.match(e.settings.splitOn)){var i=t.trim().split(e.settings.splitOn);W(i,t=>{D(t)&&(this.options[t]?e.addItem(t):e.createItem(t))})}},0)}onKeyPress(t){var e=this;if(!e.isLocked){var i=String.fromCharCode(t.keyCode||t.which);return e.settings.create&&"multi"===e.settings.mode&&i===e.settings.delimiter?(e.createItem(),void B(t)):void 0}B(t)}onKeyDown(t){var e=this;if(e.ignoreHover=!0,e.isLocked)9!==t.keyCode&&B(t);else{switch(t.keyCode){case 65:if(V(ot,t)&&""==e.control_input.value)return B(t),void e.selectAll();break;case 27:return e.isOpen&&(B(t,!0),e.close()),void e.clearActiveItems();case 40:if(!e.isOpen&&e.hasOptions)e.open();else if(e.activeOption){let t=e.getAdjacent(e.activeOption,1);t&&e.setActiveOption(t)}return void B(t);case 38:if(e.activeOption){let t=e.getAdjacent(e.activeOption,-1);t&&e.setActiveOption(t)}return void B(t);case 13:return void(e.canSelect(e.activeOption)?(e.onOptionSelect(t,e.activeOption),B(t)):(e.settings.create&&e.createItem()||document.activeElement==e.control_input&&e.isOpen)&&B(t));case 37:return void e.advanceSelection(-1,t);case 39:return void e.advanceSelection(1,t);case 9:return void(e.settings.selectOnTab&&(e.canSelect(e.activeOption)&&(e.onOptionSelect(t,e.activeOption),B(t)),e.settings.create&&e.createItem()&&B(t)));case 8:case 46:return void e.deleteSelection(t)}e.isInputHidden&&!V(ot,t)&&B(t)}}onInput(t){if(this.isLocked)return;const e=this.inputValue();var i,n;this.lastValue!==e&&(this.lastValue=e,""!=e?(this.refreshTimeout&&window.clearTimeout(this.refreshTimeout),this.refreshTimeout=(i=()=>{this.refreshTimeout=null,this._onInput()},(n=this.settings.refreshThrottle)>0?window.setTimeout(i,n):(i.call(null),null))):this._onInput())}_onInput(){const t=this.lastValue;this.settings.shouldLoad.call(this,t)&&this.load(t),this.refreshOptions(),this.trigger("type",t)}onOptionHover(t,e){this.ignoreHover||this.setActiveOption(e,!1)}onFocus(t){var e=this,i=e.isFocused;if(e.isDisabled||e.isReadOnly)return e.blur(),void B(t);e.ignoreFocus||(e.isFocused=!0,"focus"===e.settings.preload&&e.preload(),i||e.trigger("focus"),e.activeItems.length||(e.inputState(),e.refreshOptions(!!e.settings.openOnFocus)),e.refreshState())}onBlur(t){if(!1!==document.hasFocus()){var e=this;if(e.isFocused){e.isFocused=!1,e.ignoreFocus=!1;var i=()=>{e.close(),e.setActiveItem(),e.setCaret(e.items.length),e.trigger("blur")};e.settings.create&&e.settings.createOnBlur?e.createItem(null,i):i()}}}onOptionSelect(t,e){var i,n=this;e.parentElement&&e.parentElement.matches("[data-disabled]")||(e.classList.contains("create")?n.createItem(null,()=>{n.settings.closeAfterSelect&&n.close()}):void 0!==(i=e.dataset.value)&&(n.lastQuery=null,n.addItem(i),n.settings.closeAfterSelect&&n.close(),!n.settings.hideSelected&&t.type&&/click/.test(t.type)&&n.setActiveOption(e)))}canSelect(t){return!!(this.isOpen&&t&&this.dropdown_content.contains(t))}onItemSelect(t,e){var i=this;return!i.isLocked&&"multi"===i.settings.mode&&(B(t),i.setActiveItem(e,t),!0)}canLoad(t){return!!this.settings.load&&!this.loadedSearches.hasOwnProperty(t)}load(t){const e=this;if(!e.canLoad(t))return;G(e.wrapper,e.settings.loadingClass),e.loading++;const i=e.loadCallback.bind(e);e.settings.load.call(e,t,i)}loadCallback(t,e){const i=this;i.loading=Math.max(i.loading-1,0),i.lastQuery=null,i.clearActiveOption(),i.setupOptions(t,e),i.refreshOptions(i.isFocused&&!i.isInputHidden),i.loading||X(i.wrapper,i.settings.loadingClass),i.trigger("load",t,e)}preload(){var t=this.wrapper.classList;t.contains("preloaded")||(t.add("preloaded"),this.load(""))}setTextboxValue(t=""){var e=this.control_input;e.value!==t&&(e.value=t,K(e,"update"),this.lastValue=t)}getValue(){return this.is_select_tag&&this.input.hasAttribute("multiple")?this.items:this.items.join(this.settings.delimiter)}setValue(t,e){N(this,e?[]:["change"],()=>{this.clear(e),this.addItems(t,e)})}setMaxItems(t){0===t&&(t=null),this.settings.maxItems=t,this.refreshState()}setActiveItem(t,e){var i,n,s,o,r,a,l=this;if("single"!==l.settings.mode){if(!t)return l.clearActiveItems(),void(l.isFocused&&l.inputState());if("click"===(i=e&&e.type.toLowerCase())&&V("shiftKey",e)&&l.activeItems.length){for(a=l.getLastActive(),(s=Array.prototype.indexOf.call(l.control.children,a))>(o=Array.prototype.indexOf.call(l.control.children,t))&&(r=s,s=o,o=r),n=s;n<=o;n++)t=l.control.children[n],-1===l.activeItems.indexOf(t)&&l.setActiveItemClass(t);B(e)}else"click"===i&&V(ot,e)||"keydown"===i&&V("shiftKey",e)?t.classList.contains("active")?l.removeActiveItem(t):l.setActiveItemClass(t):(l.clearActiveItems(),l.setActiveItemClass(t));l.inputState(),l.isFocused||l.focus()}}setActiveItemClass(t){const e=this,i=e.control.querySelector(".last-active");i&&X(i,"last-active"),G(t,"active last-active"),e.trigger("item_select",t),-1==e.activeItems.indexOf(t)&&e.activeItems.push(t)}removeActiveItem(t){var e=this.activeItems.indexOf(t);this.activeItems.splice(e,1),X(t,"active")}clearActiveItems(){X(this.activeItems,"active"),this.activeItems=[]}setActiveOption(t,e=!0){t!==this.activeOption&&(this.clearActiveOption(),t&&(this.activeOption=t,nt(this.focus_node,{"aria-activedescendant":t.getAttribute("id")}),nt(t,{"aria-selected":"true"}),G(t,"active"),e&&this.scrollToOption(t)))}scrollToOption(t,e){if(!t)return;const i=this.dropdown_content,n=i.clientHeight,s=i.scrollTop||0,o=t.offsetHeight,r=t.getBoundingClientRect().top-i.getBoundingClientRect().top+s;r+o>n+s?this.scroll(r-n+o,e):r<s&&this.scroll(r,e)}scroll(t,e){const i=this.dropdown_content;e&&(i.style.scrollBehavior=e),i.scrollTop=t,i.style.scrollBehavior=""}clearActiveOption(){this.activeOption&&(X(this.activeOption,"active"),nt(this.activeOption,{"aria-selected":null})),this.activeOption=null,nt(this.focus_node,{"aria-activedescendant":null})}selectAll(){const t=this;if("single"===t.settings.mode)return;const e=t.controlChildren();e.length&&(t.inputState(),t.close(),t.activeItems=e,W(e,e=>{t.setActiveItemClass(e)}))}inputState(){var t=this;t.control.contains(t.control_input)&&(nt(t.control_input,{placeholder:t.settings.placeholder}),t.activeItems.length>0||!t.isFocused&&t.settings.hidePlaceholder&&t.items.length>0?(t.setTextboxValue(),t.isInputHidden=!0):(t.settings.hidePlaceholder&&t.items.length>0&&nt(t.control_input,{placeholder:""}),t.isInputHidden=!1),t.wrapper.classList.toggle("input-hidden",t.isInputHidden))}inputValue(){return this.control_input.value.trim()}focus(){var t=this;t.isDisabled||t.isReadOnly||(t.ignoreFocus=!0,t.control_input.offsetWidth?t.control_input.focus():t.focus_node.focus(),setTimeout(()=>{t.ignoreFocus=!1,t.onFocus()},0))}blur(){this.focus_node.blur(),this.onBlur()}getScoreFunction(t){return this.sifter.getScoreFunction(t,this.getSearchOptions())}getSearchOptions(){var t=this.settings,e=t.sortField;return"string"==typeof t.sortField&&(e=[{field:t.sortField}]),{fields:t.searchField,conjunction:t.searchConjunction,sort:e,nesting:t.nesting}}search(t){var e,i,n=this,s=this.getSearchOptions();if(n.settings.score&&"function"!=typeof(i=n.settings.score.call(n,t)))throw new Error('Tom Select "score" setting must be a function that returns a function');return t!==n.lastQuery?(n.lastQuery=t,e=n.sifter.search(t,Object.assign(s,{score:i})),n.currentResults=e):e=Object.assign({},n.currentResults),n.settings.hideSelected&&(e.items=e.items.filter(t=>{let e=D(t.id);return!(e&&-1!==n.items.indexOf(e))})),e}refreshOptions(t=!0){var e,i,n,s,o,r,a,l,h,c;const u={},d=[];var p=this,f=p.inputValue();const m=f===p.lastQuery||""==f&&null==p.lastQuery;var g=p.search(f),_=null,v=p.settings.shouldOpen||!1,y=p.dropdown_content;m&&(_=p.activeOption)&&(h=_.closest("[data-group]")),s=g.items.length,"number"==typeof p.settings.maxOptions&&(s=Math.min(s,p.settings.maxOptions)),s>0&&(v=!0);const b=(t,e)=>{let i=u[t];if(void 0!==i){let t=d[i];if(void 0!==t)return[i,t.fragment]}let n=document.createDocumentFragment();return i=d.length,d.push({fragment:n,order:e,optgroup:t}),[i,n]};for(e=0;e<s;e++){let t=g.items[e];if(!t)continue;let s=t.id,a=p.options[s];if(void 0===a)continue;let l=z(s),c=p.getOption(l,!0);for(p.settings.hideSelected||c.classList.toggle("selected",p.items.includes(l)),o=a[p.settings.optgroupField]||"",i=0,n=(r=Array.isArray(o)?o:[o])&&r.length;i<n;i++){o=r[i];let t=a.$order,e=p.optgroups[o];void 0===e?o="":t=e.$order;const[n,l]=b(o,t);i>0&&(c=c.cloneNode(!0),nt(c,{id:a.$id+"-clone-"+i,"aria-selected":null}),c.classList.add("ts-cloned"),X(c,"active"),p.activeOption&&p.activeOption.dataset.value==s&&h&&h.dataset.group===o.toString()&&(_=c)),l.appendChild(c),""!=o&&(u[o]=n)}}var x;p.settings.lockOptgroupOrder&&d.sort((t,e)=>t.order-e.order),a=document.createDocumentFragment(),W(d,t=>{let e=t.fragment,i=t.optgroup;if(!e||!e.children.length)return;let n=p.optgroups[i];if(void 0!==n){let t=document.createDocumentFragment(),i=p.render("optgroup_header",n);Z(t,i),Z(t,e);let s=p.render("optgroup",{group:n,options:t});Z(a,s)}else Z(a,e)}),y.innerHTML="",Z(y,a),p.settings.highlight&&(x=y.querySelectorAll("span.highlight"),Array.prototype.forEach.call(x,function(t){var e=t.parentNode;e.replaceChild(t.firstChild,t),e.normalize()}),g.query.length&&g.tokens.length&&W(g.tokens,t=>{((t,e)=>{if(null===e)return;if("string"==typeof e){if(!e.length)return;e=new RegExp(e,"i")}const i=t=>3===t.nodeType?(t=>{var i=t.data.match(e);if(i&&t.data.length>0){var n=document.createElement("span");n.className="highlight";var s=t.splitText(i.index);s.splitText(i[0].length);var o=s.cloneNode(!0);return n.appendChild(o),st(s,n),1}return 0})(t):((t=>{1!==t.nodeType||!t.childNodes||/(script|style)/i.test(t.tagName)||"highlight"===t.className&&"SPAN"===t.tagName||Array.from(t.childNodes).forEach(t=>{i(t)})})(t),0);i(t)})(y,t.regex)}));var w=t=>{let e=p.render(t,{input:f});return e&&(v=!0,y.insertBefore(e,y.firstChild)),e};if(p.loading?w("loading"):p.settings.shouldLoad.call(p,f)?0===g.items.length&&w("no_results"):w("not_loading"),(l=p.canCreate(f))&&(c=w("option_create")),p.hasOptions=g.items.length>0||l,v){if(g.items.length>0){if(_||"single"!==p.settings.mode||null==p.items[0]||(_=p.getOption(p.items[0])),!y.contains(_)){let t=0;c&&!p.settings.addPrecedence&&(t=1),_=p.selectable()[t]}}else c&&(_=c);t&&!p.isOpen&&(p.open(),p.scrollToOption(_,"auto")),p.setActiveOption(_)}else p.clearActiveOption(),t&&p.isOpen&&p.close(!1)}selectable(){return this.dropdown_content.querySelectorAll("[data-selectable]")}addOption(t,e=!1){const i=this;if(Array.isArray(t))return i.addOptions(t,e),!1;const n=D(t[i.settings.valueField]);return null!==n&&!i.options.hasOwnProperty(n)&&(t.$order=t.$order||++i.order,t.$id=i.inputId+"-opt-"+t.$order,i.options[n]=t,i.lastQuery=null,e&&(i.userOptions[n]=e,i.trigger("option_add",n,t)),n)}addOptions(t,e=!1){W(t,t=>{this.addOption(t,e)})}registerOption(t){return this.addOption(t)}registerOptionGroup(t){var e=D(t[this.settings.optgroupValueField]);return null!==e&&(t.$order=t.$order||++this.order,this.optgroups[e]=t,e)}addOptionGroup(t,e){var i;e[this.settings.optgroupValueField]=t,(i=this.registerOptionGroup(e))&&this.trigger("optgroup_add",i,e)}removeOptionGroup(t){this.optgroups.hasOwnProperty(t)&&(delete this.optgroups[t],this.clearCache(),this.trigger("optgroup_remove",t))}clearOptionGroups(){this.optgroups={},this.clearCache(),this.trigger("optgroup_clear")}updateOption(t,e){const i=this;var n,s;const o=D(t),r=D(e[i.settings.valueField]);if(null===o)return;const a=i.options[o];if(null==a)return;if("string"!=typeof r)throw new Error("Value must be set in option data");const l=i.getOption(o),h=i.getItem(o);if(e.$order=e.$order||a.$order,delete i.options[o],i.uncacheValue(r),i.options[r]=e,l){if(i.dropdown_content.contains(l)){const t=i._render("option",e);st(l,t),i.activeOption===l&&i.setActiveOption(t)}l.remove()}h&&(-1!==(s=i.items.indexOf(o))&&i.items.splice(s,1,r),n=i._render("item",e),h.classList.contains("active")&&G(n,"active"),st(h,n)),i.lastQuery=null}removeOption(t,e){const i=this;t=z(t),i.uncacheValue(t),delete i.userOptions[t],delete i.options[t],i.lastQuery=null,i.trigger("option_remove",t),i.removeItem(t,e)}clearOptions(t){const e=(t||this.clearFilter).bind(this);this.loadedSearches={},this.userOptions={},this.clearCache();const i={};W(this.options,(t,n)=>{e(t,n)&&(i[n]=t)}),this.options=this.sifter.items=i,this.lastQuery=null,this.trigger("option_clear")}clearFilter(t,e){return this.items.indexOf(e)>=0}getOption(t,e=!1){const i=D(t);if(null===i)return null;const n=this.options[i];if(null!=n){if(n.$div)return n.$div;if(e)return this._render("option",n)}return null}getAdjacent(t,e,i="option"){var n;if(!t)return null;n="item"==i?this.controlChildren():this.dropdown_content.querySelectorAll("[data-selectable]");for(let i=0;i<n.length;i++)if(n[i]==t)return e>0?n[i+1]:n[i-1];return null}getItem(t){if("object"==typeof t)return t;var e=D(t);return null!==e?this.control.querySelector(`[data-value="${$(e)}"]`):null}addItems(t,e){var i=this,n=Array.isArray(t)?t:[t];const s=(n=n.filter(t=>-1===i.items.indexOf(t)))[n.length-1];n.forEach(t=>{i.isPending=t!==s,i.addItem(t,e)})}addItem(t,e){N(this,e?[]:["change","dropdown_close"],()=>{var i,n;const s=this,o=s.settings.mode,r=D(t);if((!r||-1===s.items.indexOf(r)||("single"===o&&s.close(),"single"!==o&&s.settings.duplicates))&&null!==r&&s.options.hasOwnProperty(r)&&("single"===o&&s.clear(e),"multi"!==o||!s.isFull())){if(i=s._render("item",s.options[r]),s.control.contains(i)&&(i=i.cloneNode(!0)),n=s.isFull(),s.items.splice(s.caretPos,0,r),s.insertAtCaret(i),s.isSetup){if(!s.isPending&&s.settings.hideSelected){let t=s.getOption(r),e=s.getAdjacent(t,1);e&&s.setActiveOption(e)}s.isPending||s.settings.closeAfterSelect||s.refreshOptions(s.isFocused&&"single"!==o),0!=s.settings.closeAfterSelect&&s.isFull()?s.close():s.isPending||s.positionDropdown(),s.trigger("item_add",r,i),s.isPending||s.updateOriginalInput({silent:e})}(!s.isPending||!n&&s.isFull())&&(s.inputState(),s.refreshState())}})}removeItem(t=null,e){const i=this;if(!(t=i.getItem(t)))return;var n,s;const o=t.dataset.value;n=it(t),t.remove(),t.classList.contains("active")&&(s=i.activeItems.indexOf(t),i.activeItems.splice(s,1),X(t,"active")),i.items.splice(n,1),i.lastQuery=null,!i.settings.persist&&i.userOptions.hasOwnProperty(o)&&i.removeOption(o,e),n<i.caretPos&&i.setCaret(i.caretPos-1),i.updateOriginalInput({silent:e}),i.refreshState(),i.positionDropdown(),i.trigger("item_remove",o,t)}createItem(t=null,e=()=>{}){3===arguments.length&&(e=arguments[2]),"function"!=typeof e&&(e=()=>{});var i,n=this,s=n.caretPos;if(t=t||n.inputValue(),!n.canCreate(t))return e(),!1;n.lock();var o=!1,r=t=>{if(n.unlock(),!t||"object"!=typeof t)return e();var i=D(t[n.settings.valueField]);if("string"!=typeof i)return e();n.setTextboxValue(),n.addOption(t,!0),n.setCaret(s),n.addItem(i),e(t),o=!0};return i="function"==typeof n.settings.create?n.settings.create.call(this,t,r):{[n.settings.labelField]:t,[n.settings.valueField]:t},o||r(i),!0}refreshItems(){var t=this;t.lastQuery=null,t.isSetup&&t.addItems(t.items),t.updateOriginalInput(),t.refreshState()}refreshState(){const t=this;t.refreshValidityState();const e=t.isFull(),i=t.isLocked;t.wrapper.classList.toggle("rtl",t.rtl);const n=t.wrapper.classList;var s;n.toggle("focus",t.isFocused),n.toggle("disabled",t.isDisabled),n.toggle("readonly",t.isReadOnly),n.toggle("required",t.isRequired),n.toggle("invalid",!t.isValid),n.toggle("locked",i),n.toggle("full",e),n.toggle("input-active",t.isFocused&&!t.isInputHidden),n.toggle("dropdown-active",t.isOpen),n.toggle("has-options",(s=t.options,0===Object.keys(s).length)),n.toggle("has-items",t.items.length>0)}refreshValidityState(){var t=this;t.input.validity&&(t.isValid=t.input.validity.valid,t.isInvalid=!t.isValid)}isFull(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems}updateOriginalInput(t={}){const e=this;var i,n;const s=e.input.querySelector('option[value=""]');if(e.is_select_tag){const o=[],r=e.input.querySelectorAll("option:checked").length;function a(t,i,n){return t||(t=q('<option value="'+F(i)+'">'+F(n)+"</option>")),t!=s&&e.input.append(t),o.push(t),(t!=s||r>0)&&(t.selected=!0),t}e.input.querySelectorAll("option:checked").forEach(t=>{t.selected=!1}),0==e.items.length&&"single"==e.settings.mode?a(s,"",""):e.items.forEach(t=>{i=e.options[t],n=i[e.settings.labelField]||"",o.includes(i.$option)?a(e.input.querySelector(`option[value="${$(t)}"]:not(:checked)`),t,n):i.$option=a(i.$option,t,n)})}else e.input.value=e.getValue();e.isSetup&&(t.silent||e.trigger("change",e.getValue()))}open(){var t=this;t.isLocked||t.isOpen||"multi"===t.settings.mode&&t.isFull()||(t.isOpen=!0,nt(t.focus_node,{"aria-expanded":"true"}),t.refreshState(),Y(t.dropdown,{visibility:"hidden",display:"block"}),t.positionDropdown(),Y(t.dropdown,{visibility:"visible",display:"block"}),t.focus(),t.trigger("dropdown_open",t.dropdown))}close(t=!0){var e=this,i=e.isOpen;t&&(e.setTextboxValue(),"single"===e.settings.mode&&e.items.length&&e.inputState()),e.isOpen=!1,nt(e.focus_node,{"aria-expanded":"false"}),Y(e.dropdown,{display:"none"}),e.settings.hideSelected&&e.clearActiveOption(),e.refreshState(),i&&e.trigger("dropdown_close",e.dropdown)}positionDropdown(){if("body"===this.settings.dropdownParent){var t=this.control,e=t.getBoundingClientRect(),i=t.offsetHeight+e.top+window.scrollY,n=e.left+window.scrollX;Y(this.dropdown,{width:e.width+"px",top:i+"px",left:n+"px"})}}clear(t){var e=this;if(e.items.length){var i=e.controlChildren();W(i,t=>{e.removeItem(t,!0)}),e.inputState(),t||e.updateOriginalInput(),e.trigger("clear")}}insertAtCaret(t){const e=this,i=e.caretPos,n=e.control;n.insertBefore(t,n.children[i]||null),e.setCaret(i+1)}deleteSelection(t){var e,i,n,s,o,r=this;e=t&&8===t.keyCode?-1:1,i={start:(o=r.control_input).selectionStart||0,length:(o.selectionEnd||0)-(o.selectionStart||0)};const a=[];if(r.activeItems.length)s=et(r.activeItems,e),n=it(s),e>0&&n++,W(r.activeItems,t=>a.push(t));else if((r.isFocused||"single"===r.settings.mode)&&r.items.length){const t=r.controlChildren();let n;e<0&&0===i.start&&0===i.length?n=t[r.caretPos-1]:e>0&&i.start===r.inputValue().length&&(n=t[r.caretPos]),void 0!==n&&a.push(n)}if(!r.shouldDelete(a,t))return!1;for(B(t,!0),void 0!==n&&r.setCaret(n);a.length;)r.removeItem(a.pop());return r.inputState(),r.positionDropdown(),r.refreshOptions(!1),!0}shouldDelete(t,e){const i=t.map(t=>t.dataset.value);return!(!i.length||"function"==typeof this.settings.onDelete&&!1===this.settings.onDelete(i,e))}advanceSelection(t,e){var i,n,s=this;
2s.rtl&&(t*=-1),s.inputValue().length||(V(ot,e)||V("shiftKey",e)?(n=(i=s.getLastActive(t))?i.classList.contains("active")?s.getAdjacent(i,t,"item"):i:t>0?s.control_input.nextElementSibling:s.control_input.previousElementSibling)&&(n.classList.contains("active")&&s.removeActiveItem(i),s.setActiveItemClass(n)):s.moveCaret(t))}moveCaret(t){}getLastActive(t){let e=this.control.querySelector(".last-active");if(e)return e;var i=this.control.querySelectorAll(".active");return i?et(i,t):void 0}setCaret(t){this.caretPos=this.items.length}controlChildren(){return Array.from(this.control.querySelectorAll("[data-ts-item]"))}lock(){this.setLocked(!0)}unlock(){this.setLocked(!1)}setLocked(t=this.isReadOnly||this.isDisabled){this.isLocked=t,this.refreshState()}disable(){this.setDisabled(!0),this.close()}enable(){this.setDisabled(!1)}setDisabled(t){this.focus_node.tabIndex=t?-1:this.tabIndex,this.isDisabled=t,this.input.disabled=t,this.control_input.disabled=t,this.setLocked()}setReadOnly(t){this.isReadOnly=t,this.input.readOnly=t,this.control_input.readOnly=t,this.setLocked()}destroy(){var t=this,e=t.revertSettings;t.trigger("destroy"),t.off(),t.wrapper.remove(),t.dropdown.remove(),t.input.innerHTML=e.innerHTML,t.input.tabIndex=e.tabIndex,X(t.input,"tomselected","ts-hidden-accessible"),t._destroy(),delete t.input.tomselect}render(t,e){var i,n;const s=this;if("function"!=typeof this.settings.render[t])return null;if(!(n=s.settings.render[t].call(this,e,F)))return null;if(n=q(n),"option"===t||"option_create"===t?e[s.settings.disabledField]?nt(n,{"aria-disabled":"true"}):nt(n,{"data-selectable":""}):"optgroup"===t&&(i=e.group[s.settings.optgroupValueField],nt(n,{"data-group":i}),e.group[s.settings.disabledField]&&nt(n,{"data-disabled":""})),"option"===t||"item"===t){const i=z(e[s.settings.valueField]);nt(n,{"data-value":i}),"item"===t?(G(n,s.settings.itemClass),nt(n,{"data-ts-item":""})):(G(n,s.settings.optionClass),nt(n,{role:"option",id:e.$id}),e.$div=n,s.options[i]=e)}return n}_render(t,e){const i=this.render(t,e);if(null==i)throw"HTMLElement expected";return i}clearCache(){W(this.options,t=>{t.$div&&(t.$div.remove(),delete t.$div)})}uncacheValue(t){const e=this.getOption(t);e&&e.remove()}canCreate(t){return this.settings.create&&t.length>0&&this.settings.createFilter.call(this,t)}hook(t,e,i){var n=this,s=n[e];n[e]=function(){var e,o;return"after"===t&&(e=s.apply(n,arguments)),o=i.apply(n,arguments),"instead"===t?o:("before"===t&&(e=s.apply(n,arguments)),e)}}}const ct=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},ut=(t,e,i,n)=>{t.addEventListener(e,i,n)},dt=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(pt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},pt=t=>"string"==typeof t&&t.indexOf("<")>-1,ft=(t,e,i,n)=>{t.addEventListener(e,i,n)},mt=(t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())},gt=(t,e,i,n)=>{t.addEventListener(e,i,n)},_t=t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if(vt(t)){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}return document.querySelector(t)},vt=t=>"string"==typeof t&&t.indexOf("<")>-1;ht.define("change_listener",function(){var t;t=()=>{this.sync()},this.input.addEventListener("change",t,undefined)}),ht.define("checkbox_options",function(t){var e=this,i=e.onOptionSelect;e.settings.hideSelected=!1;const n=Object.assign({className:"tomselect-checkbox",checkedClassNames:void 0,uncheckedClassNames:void 0},t);var s=function(t,e){e?(t.checked=!0,n.uncheckedClassNames&&t.classList.remove(...n.uncheckedClassNames),n.checkedClassNames&&t.classList.add(...n.checkedClassNames)):(t.checked=!1,n.checkedClassNames&&t.classList.remove(...n.checkedClassNames),n.uncheckedClassNames&&t.classList.add(...n.uncheckedClassNames))},o=function(t){setTimeout(()=>{var e=t.querySelector("input."+n.className);e instanceof HTMLInputElement&&s(e,t.classList.contains("selected"))},1)};e.hook("after","setupTemplates",()=>{var t=e.settings.render.option;e.settings.render.option=(i,o)=>{var r=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if("string"==typeof(i=t)&&i.indexOf("<")>-1){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}var i;return document.querySelector(t)})(t.call(e,i,o)),a=document.createElement("input");n.className&&a.classList.add(n.className),a.addEventListener("click",function(t){ct(t)}),a.type="checkbox";const l=null==(h=i[e.settings.valueField])?null:(t=>"boolean"==typeof t?t?"1":"0":t+"")(h);var h;return s(a,!!(l&&e.items.indexOf(l)>-1)),r.prepend(a),r}}),e.on("item_remove",t=>{var i=e.getOption(t);
2i&&(i.classList.remove("selected"),o(i))}),e.on("item_add",t=>{var i=e.getOption(t);i&&o(i)}),e.hook("instead","onOptionSelect",(t,n)=>{if(n.classList.contains("selected"))return n.classList.remove("selected"),e.removeItem(n.dataset.value),e.refreshOptions(),void ct(t,!0);i.call(e,t,n),o(n)})}),ht.define("clear_button",function(t){const e=this,i=Object.assign({className:"clear-button",title:"Clear All",html:t=>`<div class="${t.className}" title="${t.title}">&#10799;</div>`},t);e.on("initialize",()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if("string"==typeof(i=t)&&i.indexOf("<")>-1){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}var i;return document.querySelector(t)})(i.html(i));t.addEventListener("click",t=>{e.isLocked||(e.clear(),"single"===e.settings.mode&&e.settings.allowEmptyOption&&e.addItem(""),t.preventDefault(),t.stopPropagation())}),e.control.appendChild(t)})}),ht.define("drag_drop",function(){var t=this;if("multi"!==t.settings.mode)return;var e=t.lock,i=t.unlock;let n,s=!0;t.hook("after","setupTemplates",()=>{var e=t.settings.render.item;t.settings.render.item=(i,o)=>{const r=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if("string"==typeof(i=t)&&i.indexOf("<")>-1){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}var i;return document.querySelector(t)})(e.call(t,i,o));var a;a=r,((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i],i)})({draggable:"true"},(t,e)=>{null==t?a.removeAttribute(e):a.setAttribute(e,""+t)});const l=t=>{t.preventDefault(),r.classList.add("ts-drag-over"),h(r,n)},h=(t,e)=>{var i,n,s;void 0!==e&&(((t,e)=>{do{var i;if(t==(e=null==(i=e)?void 0:i.previousElementSibling))return!0}while(e&&e.previousElementSibling);return!1})(e,r)?(n=e,null==(s=(i=t).parentNode)||s.insertBefore(n,i.nextSibling)):((t,e)=>{var i;null==(i=t.parentNode)||i.insertBefore(e,t)})(t,e))};return ut(r,"mousedown",t=>{s||((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t),t.stopPropagation()}),ut(r,"dragstart",t=>{n=r,setTimeout(()=>{r.classList.add("ts-dragging")},0)}),ut(r,"dragenter",l),ut(r,"dragover",l),ut(r,"dragleave",()=>{r.classList.remove("ts-drag-over")}),ut(r,"dragend",()=>{var e;document.querySelectorAll(".ts-drag-over").forEach(t=>t.classList.remove("ts-drag-over")),null==(e=n)||e.classList.remove("ts-dragging"),n=void 0;var i=[];t.control.querySelectorAll("[data-value]").forEach(t=>{if(t.dataset.value){let e=t.dataset.value;e&&i.push(e)}}),t.setValue(i)}),r}}),t.hook("instead","lock",()=>(s=!1,e.call(t))),t.hook("instead","unlock",()=>(s=!0,i.call(t)))}),ht.define("dropdown_header",function(t){const e=this,i=Object.assign({title:"Untitled",headerClass:"dropdown-header",titleRowClass:"dropdown-header-title",labelClass:"dropdown-header-label",closeClass:"dropdown-header-close",html:t=>'<div class="'+t.headerClass+'"><div class="'+t.titleRowClass+'"><span class="'+t.labelClass+'">'+t.title+'</span><a class="'+t.closeClass+'">&times;</a></div></div>'},t);e.on("initialize",()=>{var t=(t=>{if(t.jquery)return t[0];if(t instanceof HTMLElement)return t;if("string"==typeof(i=t)&&i.indexOf("<")>-1){var e=document.createElement("template");return e.innerHTML=t.trim(),e.content.firstChild}var i;return document.querySelector(t)})(i.html(i)),n=t.querySelector("."+i.closeClass);n&&n.addEventListener("click",t=>{((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(t,!0),e.close()}),e.dropdown.insertBefore(t,e.dropdown.firstChild)})}),ht.define("caret_position",function(){var t=this;t.hook("instead","setCaret",e=>{"single"!==t.settings.mode&&t.control.contains(t.control_input)?(e=Math.max(0,Math.min(t.items.length,e)))==t.caretPos||t.isPending||t.controlChildren().forEac
2h((i,n)=>{n<e?t.control_input.insertAdjacentElement("beforebegin",i):t.control.appendChild(i)}):e=t.items.length,t.caretPos=e}),t.hook("instead","moveCaret",e=>{if(!t.isFocused)return;const i=t.getLastActive(e);if(i){const a=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i})(i);t.setCaret(e>0?a+1:a),t.setActiveItem(),s=i,n=[],((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i])})(["last-active"],t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(n=n.concat(t))}),r=n.filter(Boolean),(o=s,Array.isArray(o)||(o=[o]),s=o).map(t=>{r.map(e=>{t.classList.remove(e)})})}else t.setCaret(t.caretPos+e);var n,s,o,r})}),ht.define("dropdown_input",function(){const t=this;t.settings.shouldOpen=!0,t.hook("before","setup",()=>{t.focus_node=t.control,((t,...e)=>{var i,n=(t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i])})(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)})(e);(i=t,Array.isArray(i)||(i=[i]),t=i).map(t=>{n.map(e=>{t.classList.add(e)})})})(t.control_input,"dropdown-input");const e=dt('<div class="dropdown-input-wrap">');e.append(t.control_input),t.dropdown.insertBefore(e,t.dropdown.firstChild);const i=dt('<input class="items-placeholder" tabindex="-1" />');i.placeholder=t.settings.placeholder||"",t.control.append(i)}),t.on("initialize",()=>{t.control_input.addEventListener("keydown",e=>{switch(e.keyCode){case 27:return t.isOpen&&(((t,e=!1)=>{t&&(t.preventDefault(),e&&t.stopPropagation())})(e,!0),t.close()),void t.clearActiveItems();case 9:t.focus_node.tabIndex=-1}return t.onKeyDown.call(t,e)}),t.on("blur",()=>{t.focus_node.tabIndex=t.isDisabled?-1:t.tabIndex}),t.on("dropdown_open",()=>{t.control_input.focus()});const e=t.onBlur;var i;t.hook("instead","onBlur",i=>{if(!i||i.relatedTarget!=t.control_input)return e.call(t)}),i=()=>t.onBlur(),t.control_input.addEventListener("blur",i,undefined),t.hook("before","close",()=>{t.isOpen&&t.focus_node.focus({preventScroll:!0})})})}),ht.define("input_autogrow",function(){var t=this;t.on("initialize",()=>{var e=document.createElement("span"),i=t.control_input;e.style.cssText="position:absolute; top:-99999px; left:-99999px; width:auto; padding:0; white-space:pre; ",t.wrapper.appendChild(e);for(const t of["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"])e.style[t]=i.style[t];var n=()=>{e.textContent=i.value,i.style.width=e.clientWidth+"px"};n(),t.on("update item_add item_remove",n),ft(i,"input",n),ft(i,"keyup",n),ft(i,"blur",n),ft(i,"update",n)})}),ht.define("no_backspace_delete",function(){var t=this,e=t.deleteSelection;this.hook("instead","deleteSelection",i=>!!t.activeItems.length&&e.call(t,i))}),ht.define("no_active_items",function(){this.hook("instead","setActiveItem",()=>{}),this.hook("instead","selectAll",()=>{})}),ht.define("optgroup_columns",function(){var t=this,e=t.onKeyDown;t.hook("instead","onKeyDown",i=>{var n,s,o,r;if(!t.isOpen||37!==i.keyCode&&39!==i.keyCode)return e.call(t,i);t.ignoreHover=!0,r=(t=>{for(;t&&t.matches;){if(t.matches("[data-group]"))return t;t=t.parentNode}})(t.activeOption),n=((t,e)=>{if(!t)return-1;e=e||t.nodeName;for(var i=0;t=t.previousElementSibling;)t.matches(e)&&i++;return i})(t.activeOption,"[data-selectable]"),r&&(r=37===i.keyCode?r.previousSibling:r.nextSibling)&&(s=(o=r.querySelectorAll("[data-selectable]"))[Math.min(o.length-1,n)])&&t.setActiveOption(s)})}),ht.define("remove_button",function(t){const e=Object.assign({label:"&times;",title:"Remove",className:"remove",append:!0},t);var i=this;if(e.append){var n='<a href="javascript:void(0)" class="'+e.className+'" tabindex="-1" title="'+(e.title+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")+'">'+e.label+"</a>";i.hook("after","setupTemplates",()=>{var t=i.settings.render.item;i.settings.render.item=(e,s)=>{var o=_t(t.call(i,e,s)),r=_t(n);return o.appendChild(r),gt(r,"mousedown",t=>{mt(t,!0)}),gt(r,"click",t=>{i.isLocked||(mt(t,!0),i.isLocked||i.shouldDelete([o],t)&&(i.removeItem(o),i.refreshOptions(!1),i.inputState()))}),o}})}}),ht.define("restore_on_backspace",function(t){const e=this,i=Object.assign({text:t=>t[e.settings.labelField]},t);e.on("item_remove",function(t){if(e.isFocused&&""===e.control_input.value.trim()){var n=e.options[t];n&&e.setTextboxValue(i.text.call(e,n))}})}),ht.define("virtual_scroll",function(){const t=this,e=t.canLoad,i=t.clearActiveOption,n=t.loadCallback;var s,o,r={},a=!1,l=[];
2if(t.settings.shouldLoadMore||(t.settings.shouldLoadMore=()=>{if(s.clientHeight/(s.scrollHeight-s.scrollTop)>.9)return!0;if(t.activeOption){var e=t.selectable();if(Array.from(e).indexOf(t.activeOption)>=e.length-2)return!0}return!1}),!t.settings.firstUrl)throw"virtual_scroll plugin requires a firstUrl() method";t.settings.sortField=[{field:"$order"},{field:"$score"}];const h=e=>!("number"==typeof t.settings.maxOptions&&s.children.length>=t.settings.maxOptions||!(e in r)||!r[e]),c=(e,i)=>t.items.indexOf(i)>=0||l.indexOf(i)>=0;t.setNextUrl=(t,e)=>{r[t]=e},t.getUrl=e=>{if(e in r){const t=r[e];return r[e]=!1,t}return t.clearPagination(),t.settings.firstUrl.call(t,e)},t.clearPagination=()=>{r={}},t.hook("instead","clearActiveOption",()=>{if(!a)return i.call(t)}),t.hook("instead","canLoad",i=>i in r?h(i):e.call(t,i)),t.hook("instead","loadCallback",(e,i)=>{if(a){if(o){const i=e[0];void 0!==i&&(o.dataset.value=i[t.settings.valueField])}}else t.clearOptions(c);n.call(t,e,i),a=!1}),t.hook("after","refreshOptions",()=>{const e=t.lastValue;var i;h(e)?(i=t.render("loading_more",{query:e}))&&(i.setAttribute("data-selectable",""),o=i):e in r&&!s.querySelector(".no-results")&&(i=t.render("no_more_results",{query:e})),i&&(((t,...e)=>{var i,n=(t=>{var e=[];return((t,e)=>{if(Array.isArray(t))t.forEach(e);else for(var i in t)t.hasOwnProperty(i)&&e(t[i])})(t,t=>{"string"==typeof t&&(t=t.trim().split(/[\t\n\f\r\s]/)),Array.isArray(t)&&(e=e.concat(t))}),e.filter(Boolean)})(e);(i=t,Array.isArray(i)||(i=[i]),t=i).map(t=>{n.map(e=>{t.classList.add(e)})})})(i,t.settings.optionClass),s.append(i))}),t.on("initialize",()=>{l=Object.keys(t.options),s=t.dropdown_content,t.settings.render=Object.assign({},{loading_more:()=>'<div class="loading-more-results">Loading more results ... </div>',no_more_results:()=>'<div class="no-more-results">No more results</div>'},t.settings.render),s.addEventListener("scroll",()=>{t.settings.shouldLoadMore.call(t)&&h(t.lastValue)&&(a||(a=!0,t.load.call(t,t.lastValue)))})})});const yt=ht},2360:(t,e,i)=>{"use strict";var n,s=i(8551),o=i(6801),r=i(8727),a=i(421),l=i(397),h=i(4055),c=i(6119),u="prototype",d="script",p=c("IE_PROTO"),f=function(){},m=function(t){return"<"+d+">"+t+"</"+d+">"},g=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},_=function(){try{n=new ActiveXObject("htmlfile")}catch(t){}var t,e,i;_="undefined"!=typeof document?document.domain&&n?g(n):(e=h("iframe"),i="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(i),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):g(n);for(var s=r.length;s--;)delete _[u][r[s]];return _()};a[p]=!0,t.exports=Object.create||function(t,e){var i;return null!==t?(f[u]=s(t),i=new f,f[u]=null,i[p]=t):i=_(),void 0===e?i:o.f(i,e)}},2529:t=>{"use strict";t.exports=function(t,e){return{value:t,done:e}}},2535:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(9451).then(i.bind(i,9451)).then(t=>{this.application.register(this.identifier,t.default)})}}},2721:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(2685).then(i.bind(i,2685)).then(t=>{this.application.register(this.identifier,t.default)})}}},2725:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(3249).then(i.bind(i,5630)).then(t=>{this.application.register(this.identifier,t.default)})}}},2735:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>
2t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(888).then(i.bind(i,888)).then(t=>{this.application.register(this.identifier,t.default)})}}},2777:(t,e,i)=>{"use strict";var n=i(9565),s=i(34),o=i(757),r=i(5966),a=i(4270),l=i(8227),h=TypeError,c=l("toPrimitive");t.exports=function(t,e){if(!s(t)||o(t))return t;var i,l=r(t,c);if(l){if(void 0===e&&(e="default"),i=n(l,t,e),!s(i)||o(i))return i;throw new h("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},2787:(t,e,i)=>{"use strict";var n=i(9297),s=i(4901),o=i(8981),r=i(6119),a=i(2211),l=r("IE_PROTO"),h=Object,c=h.prototype;t.exports=a?h.getPrototypeOf:function(t){var e=o(t);if(n(e,l))return e[l];var i=e.constructor;return s(i)&&e instanceof i?i.prototype:e instanceof h?c:null}},2796:(t,e,i)=>{"use strict";var n=i(9039),s=i(4901),o=/#|\.prototype\./,r=function(t,e){var i=l[a(t)];return i===c||i!==h&&(s(e)?n(e):!!e)},a=r.normalize=function(t){return String(t).replace(o,".").toLowerCase()},l=r.data={},h=r.NATIVE="N",c=r.POLYFILL="P";t.exports=r},2839:(t,e,i)=>{"use strict";var n=i(4576).navigator,s=n&&n.userAgent;t.exports=s?String(s):""},2891:(t,e,i)=>{"use strict";i.d(e,{lg:()=>K,xI:()=>st});class n{constructor(t,e,i){this.eventTarget=t,this.eventName=e,this.eventOptions=i,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=function(t){if("immediatePropagationStopped"in t)return t;{const{stopImmediatePropagation:e}=t;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}(t);for(const t of this.bindings){if(e.immediatePropagationStopped)break;t.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort((t,e)=>{const i=t.index,n=e.index;return i<n?-1:i>n?1:0})}}class s{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach(t=>t.connect()))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach(t=>t.disconnect()))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce((t,e)=>t.concat(Array.from(e.values())),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,i={}){this.application.handleError(t,`Error ${e}`,i)}clearEventListenersForBinding(t){const e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){const{eventTarget:e,eventName:i,eventOptions:n}=t,s=this.fetchEventListenerMapForEventTarget(e),o=this.cacheKey(i,n);s.delete(o),0==s.size&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:i,eventOptions:n}=t;return this.fetchEventListener(e,i,n)}fetchEventListener(t,e,i){const n=this.fetchEventListenerMapForEventTarget(t),s=this.cacheKey(e,i);let o=n.get(s);return o||(o=this.createEventListener(t,e,i),n.set(s,o)),o}createEventListener(t,e,i){const s=new n(t,e,i);return this.started&&s.connect(),s}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const i=[t];return Object.keys(e).sort().forEach(t=>{i.push(`${e[t]?"":"!"}${t}`)}),i.join(":")}}const o={stop:({event:t,value:e})=>(e&&t.stopPropagation(),!0),prevent:({event:t,value:e})=>(e&&t.preventDefault(),!0),self:({event:t,value:e,element:i})=>!e||i===t.target},r=/^(?:(?:([^.]+?)\+)?(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function a(t){return t.replace(/(?:[_-])([a-z0-9])/g,(t,e)=>e.toUpperCase())}function l(t){return a(t.replace(/--/g,"-").replace(/__/g,"_"))}function h(t){return t.charAt(0).toUpperCase()+t.slice(1)}function c(t){return t.replace(/([A-Z])/g,(t,e)=>`-${e.toLowerCase()}`)}function u(t){return null!=t}function d(t,e){return Object.prototype.hasOwnProperty.call(t,e)}const p=["meta","ctrl","alt","shift"];class f{constructor(t,e,i,n){this.element=t,this.index=e,this.eventTarget=i.eventTarget||t,this.eventName=i.eventName||function(t){const e=t.tagName.toLowerCase();if(e in m)return m[e](t)}(t)||g("missing event name"),this.eventOptions=i.eventOptions||{},this.identifier=i.identifier||g("missing identifier"),this.methodName=i.methodName||g("missing method n
2ame"),this.keyFilter=i.keyFilter||"",this.schema=n}static forToken(t,e){return new this(t.element,t.index,function(t){const e=t.trim().match(r)||[];let i=e[2],n=e[3];return n&&!["keydown","keyup","keypress"].includes(i)&&(i+=`.${n}`,n=""),{eventTarget:(s=e[4],"window"==s?window:"document"==s?document:void 0),eventName:i,eventOptions:e[7]?(o=e[7],o.split(":").reduce((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)}),{})):{},identifier:e[5],methodName:e[6],keyFilter:e[1]||n};var s,o}(t.content),e)}toString(){const t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}shouldIgnoreKeyboardEvent(t){if(!this.keyFilter)return!1;const e=this.keyFilter.split("+");if(this.keyFilterDissatisfied(t,e))return!0;const i=e.filter(t=>!p.includes(t))[0];return!!i&&(d(this.keyMappings,i)||g(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[i].toLowerCase()!==t.key.toLowerCase())}shouldIgnoreMouseEvent(t){if(!this.keyFilter)return!1;const e=[this.keyFilter];return!!this.keyFilterDissatisfied(t,e)}get params(){const t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:i,value:n}of Array.from(this.element.attributes)){const s=i.match(e),o=s&&s[1];o&&(t[a(o)]=_(n))}return t}get eventTargetName(){return(t=this.eventTarget)==window?"window":t==document?"document":void 0;var t}get keyMappings(){return this.schema.keyMappings}keyFilterDissatisfied(t,e){const[i,n,s,o]=p.map(t=>e.includes(t));return t.metaKey!==i||t.ctrlKey!==n||t.altKey!==s||t.shiftKey!==o}}const m={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:t=>"submit"==t.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function g(t){throw new Error(t)}function _(t){try{return JSON.parse(t)}catch(e){return t}}class v{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){const e=this.prepareActionEvent(t);this.willBeInvokedByEvent(t)&&this.applyEventModifiers(e)&&this.invokeWithEvent(e)}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if("function"==typeof t)return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){const{element:e}=this.action,{actionDescriptorFilters:i}=this.context.application,{controller:n}=this.context;let s=!0;for(const[o,r]of Object.entries(this.eventOptions))if(o in i){const a=i[o];s=s&&a({name:o,value:r,event:t,element:e,controller:n})}return s}prepareActionEvent(t){return Object.assign(t,{params:this.action.params})}invokeWithEvent(t){const{target:e,currentTarget:i}=t;try{this.method.call(this.controller,t),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:i,action:this.methodName})}catch(e){const{identifier:i,controller:n,element:s,index:o}=this,r={identifier:i,controller:n,element:s,index:o,event:t};this.context.handleError(e,`invoking action "${this.action}"`,r)}}willBeInvokedByEvent(t){const e=t.target;return!(t instanceof KeyboardEvent&&this.action.shouldIgnoreKeyboardEvent(t))&&!(t instanceof MouseEvent&&this.action.shouldIgnoreMouseEvent(t))&&(this.element===e||(e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element)))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class y{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver(t=>this.processMutations(t))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes
vendor: 33,149 bytes, line 2
2),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){this.elements.has(t)?this.delegate.elementAttributeChanged&&this.matchElement(t)?this.delegate.elementAttributeChanged(t,e):this.removeElement(t):this.matchElement(t)&&this.addElement(t)}processRemovedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.processTree(t,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.elementIsActive(t)&&this.processTree(t,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const i of this.matchElementsInTree(t))e.call(this,i)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class b{constructor(t,e,i){this.attributeName=e,this.delegate=i,this.elementObserver=new y(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],i=Array.from(t.querySelectorAll(this.selector));return e.concat(i)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}function x(t,e){let i=t.get(e);return i||(i=new Set,t.set(e,i)),i}class w{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce((t,e)=>t.concat(Array.from(e)),[])}get size(){return Array.from(this.valuesByKey.values()).reduce((t,e)=>t+e.size,0)}add(t,e){!function(t,e,i){x(t,e).add(i)}(this.valuesByKey,t,e)}delete(t,e){!function(t,e,i){x(t,e).delete(i),function(t,e){const i=t.get(e);null!=i&&0==i.size&&t.delete(e)}(t,e)}(this.valuesByKey,t,e)}has(t,e){const i=this.valuesByKey.get(t);return null!=i&&i.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some(e=>e.has(t))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter(([e,i])=>i.has(t)).map(([t,e])=>t)}}class M{constructor(t,e,i,n){this._selector=e,this.details=n,this.elementObserver=new y(t,this),this.delegate=i,this.matchesByElement=new w}get started(){return this.elementObserver.started}get selector(){return this._selector}set selector(t){this._selector=t,this.refresh()}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){const{selector:e}=this;if(e){const i=t.matches(e);return this.delegate.selectorMatchElement?i&&this.delegate.selectorMatchElement(t,this.details):i}return!1}matchElementsInTree(t){const{selector:e}=this;if(e){const i=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(e)).filter(t=>this.matchElement(t));return i.concat(n)}return[]}elementMatched(t){const{selector:e}=this;e&&this.selectorMatched(t,e)}elementUnmatched(t){const e=this.matchesByElement.getKeysForValue(t);for(const i of e)this.selectorUnmatched(t,i)}elementAttributeChanged(t,e){const{selector:i}=this;if(i){const e=this.matchElement(t),n=this.matchesByElement.has(i,t);e&&!n?this.selectorMatched(t,i):!e&&n&&this.selectorUnmatched(t,i)}}selectorMatched(t,e){this.delegate.selectorMatched(t,e,this.details),this.matchesByElement.add(e,t)}selectorUnmatched(t,e){this.delegate.selectorUnmatched(t,e,this.details),this.matchesByElement.delete(e,t)}}class k{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver(t=>this.processMutations(t))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const i=this.delegate.getStringMapKeyForAttribute(t);if(null!=i){this.stringMap.has(t)||this.stringMapKeyAdded(i,t);const n=this.element.getAttribute(t);if(this.stringMap.get(t)!=n&&this.stringMapValueChanged(n,i,e),null==n){const e=this.stringMap.get(t);this.stringMap.delete(t),e&&this.stringMapKeyRemoved(i,t,e)}else this.stringMap.set(t,n)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,i){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,i)}stringMapKeyRemoved(t,e,i){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,i)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map(t=>t.name)}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class L{constructor(t,e,i){this.attributeObserver=new b(t,e,this),this.delegate=i,this.tokensByElement=new w}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,i]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(i)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach(t=>this.tokenMatched(t))}tokensUnmatched(t){t.forEach(t=>this.tokenUnmatched(t))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),i=this.readTokensForElement(t),n=function(t,e){const i=Math.max(t.length,e.length);return Array.from({length:i},(i,n)=>[t[n],e[n]])}(e,i).findIndex(([t,e])=>{return n=e,!((i=t)&&n&&i.index==n.index&&i.content==n.content);var i,n});return-1==n?[[],[]]:[e.slice(n),i.slice(n)]}readTokensForElement(t){const e=this.attributeName;return function(t,e,i){return t.trim().split(/\s+/).filter(t=>t.length).map((t,n)=>({element:e,attributeName:i,content:t,index:n}))}(t.getAttribute(e)||"",t,e)}}class O{constructor(t,e,i){this.tokenListObserver=new L(t,e,this),this.delegate=i,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).set(t,i),this.delegate.elementMatchedValue(e,i))}tokenUnmatched(t){const{element:e}=t,{value:i}=this.fetchParseResultForToken(t);i&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,i))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(t){return{error:t}}}}class E{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new O(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){const e=new v(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach(t=>this.delegate.bindingDisconnected(t,!0)),this.bindingsByAction.clear()}parseValueForToken(t){const e=f.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class S{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new k(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const i=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,i.writer(this.receiver[t]),i.writer(i.defaultValue))}stringMapValueChanged(t,e,i){const n=this.valueDescriptorNameMap[e];null!==t&&(null===i&&(i=n.writer(n.defaultValue)),this.invokeChangedCallback(e,t,i))}stringMapKeyRemoved(t,e,i){const n=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,n.writer(this.receiver[t]),i):this.invokeChangedCallback(t,n.writer(n.defaultValue),i)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:i,writer:n}of this.valueDescriptors)null==i||this.controller.data.has(t)||this.invokeChangedCallback(e,n(i),void 0)}invokeChangedCallback(t,e,i){const n=`${t}Changed`,s=this.receiver[n];if("function"==typeof s){const n=this.valueDescriptorNameMap[t];try{const t=n.reader(e);let o=i;i&&(o=n.reader(i)),s.call(this.receiver,t,o)}catch(t){throw t instanceof TypeError&&(t.message=`Stimulus Value "${this.context.identifier}.${n.name}" - ${t.message}`),t}}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map(e=>t[e])}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach(e=>{const i=this.valueDescriptorMap[e];t[i.name]=i}),t}hasValue(t){const e=`has${h(this.valueDescriptorNameMap[t].name)}`;return this.receiver[e]}}class A{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new w}start(){this.tokenListObserver||(this.tokenListObserver=new L(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var i;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),null===(i=this.tokenListObserver)||void 0===i||i.pause(()=>this.delegate.targetConnected(t,e)))}disconnectTarget(t,e){var i;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),null===(i=this.tokenListObserver)||void 0===i||i.pause(()=>this.delegate.targetDisconnected(t,e)))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function P(t,e){const i=C(t);return Array.from(i.reduce((t,i)=>(function(t,e){const i=t[e];return Array.isArray(i)?i:[]}(i,e).forEach(e=>t.add(e)),t),new Set))}function C(t){const e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}class T{constructor(t,e){this.started=!1,this.context=t,this.delegate=e,this.outletsByName=new w,this.outletElementsByName=new w,this.selectorObserverMap=new Map,this.attributeObserverMap=new Map}start(){this.started||(this.outletDefinitions.forEach(t=>{this.setupSelectorObserverForOutlet(t),this.setupAttributeObserverForOutlet(t)}),this.started=!0,this.dependentContexts.forEach(t=>t.refresh()))}refresh(){this.selectorObserverMap.forEach(t=>t.refresh()),this.attributeObserverMap.forEach(t=>t.refresh())}stop(){this.started&&(this.started=!1,this.disconnectAllOutlets(),this.stopSelectorObservers(),this.stopAttributeObservers())}stopSelectorObservers(){this.selectorObserverMap.size>0&&(this.selectorObserverMap.forEach(t=>t.stop()),this.selectorObserverMap.clear())}stopAttributeObservers(){this.attributeObserverMap.size>0&&(this.attributeObserverMap.forEach(t=>t.stop()),this.attributeObserverMap.clear())}selectorMatched(t,e,{outletName:i}){const n=this.getOutlet(t,i);n&&this.connectOutlet(n,t,i)}selectorUnmatched(t,e,{outletName:i}){const n=this.getOutletFromMap(t,i);n&&this.disconnectOutlet(n,t,i)}selectorMatchElement(t,{outletName:e}){const i=this.selector(e),n=this.hasOutlet(t,e),s=t.matches(`[${this.schema.controllerAttribute}~=${e}]`);return!!i&&n&&s&&t.matches(i)}elementMatchedAttribute(t,e){const i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}elementAttributeValueChanged(t,e){const i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}elementUnmatchedAttribute(t,e){const i=this.getOutletNameFromOutletAttributeName(e);i&&this.updateSelectorObserverForOutlet(i)}connectOutlet(t,e,i){var n;this.outletElementsByName.has(i,e)||(this.outletsByName.add(i,t),this.outletElementsByName.add(i,e),null===(n=this.selectorObserverMap.get(i))||void 0===n||n.pause(()=>this.delegate.outletConnected(t,e,i)))}disconnectOutlet(t,e,i){var n;this.outletElementsByName.has(i,e)&&(this.outletsByName.delete(i,t),this.outletElementsByName.delete(i,e),null===(n=this.selectorObserverMap.get(i))||void 0===n||n.pause(()=>this.delegate.outletDisconnected(t,e,i)))}disconnectAllOutlets(){for(const t of this.outletElementsByName.keys)for(const e of this.outletElementsByName.getValuesForKey(t))for(const i of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(i,e,t)}updateSelectorObserverForOutlet(t){const e=this.selectorObserverMap.get(t);e&&(e.selector=this.selector(t))}setupSelectorObserverForOutlet(t){const e=this.selector(t),i=new M(document.body,e,this,{outletName:t});this.selectorObserverMap.set(t,i),i.start()}setupAttributeObserverForOutlet(t){const e=this.attributeNameForOutletName(t),i=new b(this.scope.element,e,this);this.attributeObserverMap.set(t,i),i.start()}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}attributeNameForOutletName(t){return this.scope.schema.outletAttributeForScope(this.identifier,t)}getOutletNameFromOutletAttributeName(t){return this.outletDefinitions.find(e=>this.attributeNameForOutletName(e)===t)}get outletDependencies(){const t=new w;return this.router.modules.forEach(e=>{P(e.definition.controllerConstructor,"outlets").forEach(i=>t.add(i,e.identifier))}),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const t=this.dependentControllerIdentifiers;return this.router.contexts.filter(e=>t.includes(e.identifier))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find(e=>e.element===t)}get scope(){return this.context.scope}get schema(){return this.context.schema}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class I{constructor(t,e){this.logDebugActivity=(t,e={})=>{const{identifier:i,controller:n,element:s}=this;e=Object.assign({identifier:i,controller:n,element:s},e),this.application.logDebugActivity(this.identifier,t,e)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new E(this,this.dispatcher),this.valueObserver=new S(this,this.controller),this.targetObserver=new A(this,this),this.outletObserver=new T(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(t){this.handleError(t,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,i={}){const{identifier:n,controller:s,element:o}=this;i=Object.assign({identifier:n,controller:s,element:o},i),this.application.handleError(t,`Error ${e}`,i)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,i){this.invokeControllerMethod(`${l(i)}OutletConnected`,t,e)}outletDisconnected(t,e,i){this.invokeControllerMethod(`${l(i)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){const i=this.controller;"function"==typeof i[t]&&i[t](...e)}}const D="function"==typeof Object.getOwnPropertySymbols?t=>[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]:Object.getOwnPropertyNames,z=(()=>{function t(t){function e(){return Reflect.construct(t,arguments,new.target)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{return function(){const e=t(function(){this.a.call(this)});e.prototype.a=function(){},new e}(),t}catch(t){return t=>class extends t{}}})();class F{constructor(t,e){this.application=t,this.definition=function(t){return{identifier:t.identifier,controllerConstructor:(e=t.controllerConstructor,function(t,e){const i=z(t),n=function(t,e){return D(e).reduce((i,n)=>{const s=function(t,e,i){const n=Object.getOwnPropertyDescriptor(t,i);if(!n||!("value"in n)){const t=Object.getOwnPropertyDescriptor(e,i).value;return n&&(t.get=n.get||t.get,t.set=n.set||t.set),t}}(t,e,n);return s&&Object.assign(i,{[n]:s}),i},{})}(t.prototype,e);return Object.defineProperties(i.prototype,n),i}(e,function(t){return P(t,"blessings").reduce((e,i)=>{const n=i(t);for(const t in n){const i=e[t]||{};e[t]=Object.assign(i,n[t])}return e},{})}(e)))};var e}(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new I(this,t),this.contextsByScope.set(t,e)),e}}class R{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){return(this.data.get(this.getDataKey(t))||"").match(/[^\s]+/g)||[]}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class N{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const i=this.getAttributeNameForKey(t);return this.element.setAttribute(i,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${c(t)}`}}class B{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,i){let n=this.warnedKeysByObject.get(t);n||(n=new Set,this.warnedKeysByObject.set(t,n)),n.has(e)||(n.add(e),this.logger.warn(i,t))}}function j(t,e){return`[${t}~="${e}"]`}class V{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce((t,e)=>t||this.findTarget(e)||this.findLegacyTarget(e),void 0)}findAll(...t){return t.reduce((t,e)=>[...t,...this.findAllTargets(e),...this.findAllLegacyTargets(e)],[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){return j(this.schema.targetAttributeForScope(this.identifier),t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map(e=>this.deprecate(e,t))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return j(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:i}=this,n=this.schema.targetAttribute,s=this.schema.targetAttributeForScope(i);this.guide.warn(t,`target:${e}`,`Please replace ${n}="${i}.${e}" with ${s}="${e}". The ${n} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class H{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce((t,e)=>t||this.findOutlet(e),void 0)}findAll(...t){return t.reduce((t,e)=>[...t,...this.findAllOutlets(e)],[])}getSelectorForOutletName(t){const e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){const e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){const e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter(i=>this.matchesElement(i,t,e))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter(i=>this.matchesElement(i,t,e))}matchesElement(t,e,i){const n=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&n.split(" ").includes(i)}}class ${constructor(t,e,i,n){this.targets=new V(this),this.classes=new R(this),this.data=new N(this),this.containsElement=t=>t.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=i,this.guide=new B(n),this.outlets=new H(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return j(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new $(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class Z{constructor(t,e,i){this.element=t,this.schema=e,this.delegate=i,this.valueListObserver=new O(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){const{element:e,content:i}=t;return this.parseValueForElementAndIdentifier(e,i)}parseValueForElementAndIdentifier(t,e){const i=this.fetchScopesByIdentifierForElement(t);let n=i.get(e);return n||(n=this.delegate.createScopeForElementAndIdentifier(t,e),i.set(e,n)),n}elementMatchedValue(t,e){const i=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,i),1==i&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const i=this.scopeReferenceCounts.get(e);i&&(this.scopeReferenceCounts.set(e,i-1),1==i&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class W{constructor(t){this.application=t,this.scopeObserver=new Z(this.element,this.schema,this),this.scopesByIdentifier=new w,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce((t,e)=>t.concat(e.contexts),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new F(this.application,t);this.connectModule(e);const i=t.controllerConstructor.afterLoad;i&&i.call(t.controllerConstructor,t.identifier,this.application)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const i=this.modulesByIdentifier.get(e);if(i)return i.contexts.find(e=>e.element==t)}proposeToConnectScopeForElementAndIdentifier(t,e){const i=this.scopeObserver.parseValueForElementAndIdentifier(t,e);i?this.scopeObserver.elementMatchedValue(i.element,i):console.error(`Couldn't find or create scope for identifier: "${e}" and element:`,t)}handleError(t,e,i){this.application.handleError(t,e,i)}createScopeForElementAndIdentifier(t,e){return new $(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(e=>t.connectContextForScope(e))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier),this.scopesByIdentifier.getValuesForKey(t.identifier).forEach(e=>t.disconnectContextForScope(e))}}const q={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:t=>`data-${t}-target`,outletAttributeForScope:(t,e)=>`data-${t}-${e}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",page_up:"PageUp",page_down:"PageDown"},U("abcdefghijklmnopqrstuvwxyz".split("").map(t=>[t,t]))),U("0123456789".split("").map(t=>[t,t])))};function U(t){return t.reduce((t,[e,i])=>Object.assign(Object.assign({},t),{[e]:i}),{})}class K{constructor(t=document.documentElement,e=q){this.logger=console,this.debug=!1,this.logDebugActivity=(t,e,i={})=>{this.debug&&this.logFormattedMessage(t,e,i)},this.element=t,this.schema=e,this.dispatcher=new s(this),this.router=new W(this),this.actionDescriptorFilters=Object.assign({},o)}static start(t,e){const i=new this(t,e);return i.start(),i}async start(){await new Promise(t=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",()=>t()):t()}),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(t=>{t.controllerConstructor.shouldLoad&&this.router.loadDefinition(t)})}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach(t=>this.router.unloadIdentifier(t))}get controllers(){return this.router.contexts.map(t=>t.controller)}getControllerForElementAndIdentifier(t,e){const i=this.router.getContextForElementAndIdentifier(t,e);return i?i.controller:null}handleError(t,e,i){var n;this.logger.error("%s\n\n%o\n\n%o",e,t,i),null===(n=window.onerror)||void 0===n||n.call(window,e,"",0,0,t)}logFormattedMessage(t,e,i={}){i=Object.assign({application:this},i),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},i)),this.logger.groupEnd()}}function Y(t,e,i){return t.application.getControllerForElementAndIdentifier(e,i)}function G(t,e,i){let n=Y(t,e,i);return n||(t.application.router.proposeToConnectScopeForElementAndIdentifier(e,i),n=Y(t,e,i),n||void 0)}function X([t,e],i){return function(t){const{token:e,typeDefinition:i}=t,n=`${c(e)}-value`,s=function(t){const{controller:e,token:i,typeDefinition:n}=t,s=function(t){const{controller:e,token:i,typeObject:n}=t,s=u(n.type),o=u(n.default),r=s&&o,a=s&&!o,l=!s&&o,h=J(n.type),c=Q(t.typeObject.default);if(a)return h;if(l)return c;if(h!==c)throw new Error(`The specified default value for the Stimulus Value "${e?`${e}.${i}`:i}" must match the defined type "${h}". The provided default value of "${n.default}" is of type "${c}".`);return r?h:void 0}({controller:e,token:i,typeObject:n}),o=Q(n),r=J(n),a=s||o||r;if(a)return a;throw new Error(`Unknown value type "${e?`${e}.${n}`:i}" for "${i}" value`)}(t);return{type:s,key:n,name:a(n),get defaultValue(){return function(t){const e=J(t);if(e)return tt[e];const i=d(t,"default"),n=d(t,"type"),s=t;if(i)return s.default;if(n){const{type:t}=s,e=J(t);if(e)return tt[e]}return t}(i)},get hasCustomDefaultValue(){return void 0!==Q(i)},reader:et[s],writer:it[s]||it.default}}({controller:i,token:t,typeDefinition:e})}function J(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function Q(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}const tt={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},et={array(t){const e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${t}" of type "${Q(e)}"`);return e},boolean:t=>!("0"==t||"false"==String(t).toLowerCase()),number:t=>Number(t.replace(/_/g,"")),object(t){const e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${t}" of type "${Q(e)}"`);return e},string:t=>t},it={default:function(t){return`${t}`},array:nt,object:nt};function nt(t){return JSON.stringify(t)}class st{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}get application(){return this.context.application}get scope(){return this.context.scope}
2get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:i={},prefix:n=this.identifier,bubbles:s=!0,cancelable:o=!0}={}){const r=new CustomEvent(n?`${n}:${t}`:t,{detail:i,bubbles:s,cancelable:o});return e.dispatchEvent(r),r}}st.blessings=[function(t){return P(t,"classes").reduce((t,e)=>{return Object.assign(t,(i=e,{[`${i}Class`]:{get(){const{classes:t}=this;if(t.has(i))return t.get(i);{const e=t.getAttributeName(i);throw new Error(`Missing attribute "${e}"`)}}},[`${i}Classes`]:{get(){return this.classes.getAll(i)}},[`has${h(i)}Class`]:{get(){return this.classes.has(i)}}}));var i},{})},function(t){return P(t,"targets").reduce((t,e)=>{return Object.assign(t,(i=e,{[`${i}Target`]:{get(){const t=this.targets.find(i);if(t)return t;throw new Error(`Missing target element "${i}" for "${this.identifier}" controller`)}},[`${i}Targets`]:{get(){return this.targets.findAll(i)}},[`has${h(i)}Target`]:{get(){return this.targets.has(i)}}}));var i},{})},function(t){const e=function(t,e){return C(t).reduce((t,i)=>(t.push(...function(t,e){const i=t[e];return i?Object.keys(i).map(t=>[t,i[t]]):[]}(i,e)),t),[])}(t,"values"),i={valueDescriptorMap:{get(){return e.reduce((t,e)=>{const i=X(e,this.identifier),n=this.data.getAttributeNameForKey(i.key);return Object.assign(t,{[n]:i})},{})}}};return e.reduce((t,e)=>Object.assign(t,function(t){const e=X(t,void 0),{key:i,name:n,reader:s,writer:o}=e;return{[n]:{get(){const t=this.data.get(i);return null!==t?s(t):e.defaultValue},set(t){void 0===t?this.data.delete(i):this.data.set(i,o(t))}},[`has${h(n)}`]:{get(){return this.data.has(i)||e.hasCustomDefaultValue}}}}(e)),i)},function(t){return P(t,"outlets").reduce((t,e)=>Object.assign(t,function(t){const e=l(t);return{[`${e}Outlet`]:{get(){const e=this.outlets.find(t),i=this.outlets.getSelectorForOutletName(t);if(e){const i=G(this,e,t);if(i)return i;throw new Error(`The provided outlet element is missing an outlet controller "${t}" instance for host controller "${this.identifier}"`)}throw new Error(`Missing outlet element "${t}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${e}Outlets`]:{get(){const e=this.outlets.findAll(t);return e.length>0?e.map(e=>{const i=G(this,e,t);if(i)return i;console.warn(`The provided outlet element is missing an outlet controller "${t}" instance for host controller "${this.identifier}"`,e)}).filter(t=>t):[]}},[`${e}OutletElement`]:{get(){const e=this.outlets.find(t),i=this.outlets.getSelectorForOutletName(t);if(e)return e;throw new Error(`Missing outlet element "${t}" for host controller "${this.identifier}". Stimulus couldn't find a matching outlet element using selector "${i}".`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(t)}},[`has${h(e)}Outlet`]:{get(){return this.outlets.has(t)}}}}(e)),{})}],st.targets=[],st.outlets=[],st.values={}},2953:(t,e,i)=>{"use strict";var n=i(4576),s=i(7400),o=i(9296),r=i(3792),a=i(6699),l=i(687),h=i(8227)("iterator"),c=r.values,u=function(t,e){if(t){if(t[h]!==c)try{a(t,h,c)}catch(e){t[h]=c}if(l(t,e,!0),s[e])for(var i in r)if(t[i]!==r[i])try{a(t,i,r[i])}catch(e){t[i]=r[i]}}};for(var d in s)u(n[d]&&n[d].prototype,d);u(o,"DOMTokenList")},2954:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>o});var n=i(2891),s=i(3249);const o=class extends n.xI{static values={siteKey:String};async connect(){const t=this.element.closest('[data-controller~="live"]'),e=await(0,s.QQ)(t);this.run(e)}run(t){window.grecaptcha?this.execute(t):window.addEventListener("recaptchaLoaded",()=>this.execute(t),{once:!0})}async execute(t){grecaptcha.ready(()=>{grecaptcha.execute(this.siteKeyValue,{action:"login"}).then(t=>{this.element.value=t,this.element.dispatchEvent(new Event("input",{bubbles:!0}))})})}}},2965:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>
2t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(7729).then(i.bind(i,7729)).then(t=>{this.application.register(this.identifier,t.default)})}}},2967:(t,e,i)=>{"use strict";var n=i(6706),s=i(34),o=i(7750),r=i(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{(t=n(Object.prototype,"__proto__","set"))(i,[]),e=i instanceof Array}catch(t){}return function(i,n){return o(i),r(n),s(i)?(e?t(i,n):i.__proto__=n,i):i}}():void 0)},2994:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(9686).then(i.bind(i,9686)).then(t=>{this.application.register(this.identifier,t.default)})}}},3150:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(4778).then(i.bind(i,4778)).then(t=>{this.application.register(this.identifier,t.default)})}}},3220:(t,e,i)=>{"use strict";i.d(e,{A:()=>s,on:()=>n});const n=(t,e,i,n)=>{Array.isArray(t)||(t=t.split(/[ ,]+/).filter(Boolean)),n||(n={}),n.once&&(n.once=!1);const s=function(t){const n=t.target;n instanceof Element&&(e===document||n.matches(e))&&i(t)};for(let e=0;e<t.length;e++)document.addEventListener(t[e],s,n);return{events:t,fn:s,options:n}},s=t=>{for(let e=0;e<t.events.length;e++)document.removeEventListener(t.events[e],t.fn,t.options)}},3249:(t,e,i)=>{"use strict";i.d(e,{Ay:()=>Z,QQ:()=>u});var n=i(2891),s=class{constructor(t,e,i){this.isResolved=!1,this.promise=t,this.promise.then(t=>(this.isResolved=!0,t)),this.actions=e,this.updatedModels=i}containsOneOfActions(t){return this.actions.filter(e=>t.includes(e)).length>0}areAnyModelsUpdated(t){return this.updatedModels.filter(e=>t.includes(e)).length>0}},o=class{constructor(t,e="post",i="same-origin"){this.url=t,this.method=e,this.credentials=i}buildRequest(t,e,i,n,s,o){const r=this.url.split("?");let[a]=r;const[,l]=r,h=new URLSearchParams(l||""),c={};c.credentials=this.credentials,c.headers={Accept:"application/vnd.live-component+html","X-Requested-With":"XMLHttpRequest","X-Live-Url":window.location.pathname+window.location.search};const u=Object.entries(o).reduce((t,e)=>t+e.length,0),d=Object.keys(n).length>0;if(0===e.length&&0===u&&"get"===this.method&&this.willDataFitInUrl(JSON.stringify(t),JSON.stringify(i),h,JSON.stringify(n),JSON.stringify(s)))h.set("props",JSON.stringify(t)),h.set("updated",JSON.stringify(i)),Object.keys(s).length>0&&h.set("propsFromParent",JSON.stringify(s)),d&&h.set("children",JSON.stringify(n)),c.method="GET";else{c.method="POST";const r={props:t,updated:i};Object.keys(s).length>0&&(r.propsFromParent=s),d&&(r.children=n),e.length>0&&(1===e.length?(r.args=e[0].args,a+=`/${encodeURIComponent(e[0].name)}`):(a+="/_batch",r.actions=e));const l=new FormData;l.append("data",JSON.stringify(r));for(const[t,e]of Object.entries(o)){const i=e.length;for(let n=0;n<i;++n)l.append(t,e[n])}c.body=l}const p=h.toString();return{url:`${a}${p.length>0?`?${p}`:""}`,fetchOptions:c}}willDataFitInUrl(t,e,i,n,s){return(new URLSearchParams(t+e+n+s).toString()+i.toString()).length<1500}},r=class{constructor(t,e="post",i="same-origin"){this.requestBuilder=new o(t,e,i)}makeRequest(t,e,i,n,o,r){const{url:a,fetchOptions:l}=this.requestBuilder.buildRequest(t,e,i,n,o,r);return new s(fetch(a,l),e.map(t=>t.name),Object.keys(i))}},a=class{constructor(t){this.response=t}async getBody(){return this.body||(this.body=await this.response.text()),this.body}getLiveUrl(){return void 0===this.liveUrl&&(this.liveUrl=this.response.headers.get("X-Live-Url")),this.liveUrl}};function l(t){return t.innerHTML?t.outerHTML.slice(0,t.outerHTML.indexOf(t.innerHTML)):t.outerHTML}let h=new WeakMap,c=new Map;const u=t=>new Promise((e,i)=>{let n=0;const s=setInterval(()=>{const o=h.get(t);o&&(clearInterval(s),e(o)),n++,n>10&&(clearInterval(s),i(new Error(`Component not found for element ${l(t)}`)))},5)});function d(t){const e=[];
2if(!t)return e;let i="",n="",s=[],o=[],r="action";const a=()=>{if(i)return i;if(0===e.length)throw new Error("Could not find any directives");return e[e.length-1].action},l=()=>{e.push({action:i,args:s,modifiers:o,getString:()=>t}),i="",n="",s=[],o=[],r="action"},h=()=>{s.push(n.trim()),n=""},c=()=>{if(s.length>1)throw new Error(`The modifier "${i}()" does not support multiple arguments.`);o.push({name:i,value:s.length>0?s[0]:null}),i="",s=[],r="action"};for(let e=0;e<t.length;e++){const s=t[e];switch(r){case"action":if("("===s){r="arguments";break}if(" "===s){i&&l();break}if("|"===s){c();break}i+=s;break;case"arguments":if(")"===s){h(),r="after_arguments";break}if(","===s){h();break}n+=s;break;case"after_arguments":if("|"===s){c();break}if(" "!==s)throw new Error(`Missing space after ${a()}()`);l()}}switch(r){case"action":case"after_arguments":i&&l();break;default:throw new Error(`Did you forget to add a closing ")" after "${i}"?`)}return e}function p(t){const e=[];return t.forEach(t=>{var i;e.push(...(i=t,i.replace(/[\s]+/g," ").trim()).split(" "))}),e}function f(t){return t.replace(/\[]$/,"").split("[").map(t=>t.replace("]","")).join(".")}function m(t,e){if(t instanceof HTMLInputElement){if("checkbox"===t.type){const i=v(t,!1);if(null!==i){const n=e.get(i.action);if(Array.isArray(n))return x(t,n);if(Object(n)===n)return x(t,Object.values(n))}return t.hasAttribute("value")?t.checked?t.getAttribute("value"):null:t.checked}return w(t)}return t instanceof HTMLSelectElement?t.multiple?Array.from(t.selectedOptions).map(t=>t.value):t.value:t.hasAttribute("data-value")?t.dataset.value:"value"in t?t.value:t.hasAttribute("value")?t.getAttribute("value"):null}function g(t,e){if(t instanceof HTMLInputElement){if("file"===t.type)return;if("radio"===t.type)return void(t.checked=t.value==e);if("checkbox"===t.type)return void(Array.isArray(e)?t.checked=e.some(e=>e==t.value):t.hasAttribute("value")?t.checked=t.value==e:t.checked=e)}if(t instanceof HTMLSelectElement){const i=[].concat(e).map(t=>`${t}`);return void Array.from(t.options).forEach(t=>{t.selected=i.includes(t.value)})}e=void 0===e?"":e,t.value=e}function _(t){if(!t.dataset.model)return[];const e=d(t.dataset.model);return e.forEach(e=>{if(e.args.length>0)throw new Error(`The data-model="${t.dataset.model}" format is invalid: it does not support passing arguments to the model.`);e.action=f(e.action)}),e}function v(t,e=!0){const i=_(t);if(i.length>0)return i[0];if(t.getAttribute("name")){const e=t.closest("form");if(e&&"model"in e.dataset){const i=d(e.dataset.model||"*")[0];if(i.args.length>0)throw new Error(`The data-model="${e.dataset.model}" format is invalid: it does not support passing arguments to the model.`);return i.action=f(t.getAttribute("name")),i}}if(!e)return null;throw new Error(`Cannot determine the model name for "${l(t)}": the element must either have a "data-model" (or "name" attribute living inside a <form data-model="*">).`)}function y(t,e){return e.element===t||!!e.element.contains(t)&&t.closest('[data-controller~="live"]')===e.element}function b(t){const e=t.cloneNode(!0);if(!(e instanceof HTMLElement))throw new Error("Could not clone element");return e}const x=(t,e)=>{const i=[...e],n=w(t),s=e.indexOf(n);return t.checked?(-1===s&&i.push(n),i):(s>-1&&i.splice(s,1),i)},w=t=>t.dataset.value?t.dataset.value:t.value;var M=class{constructor(){this.hooks=new Map}register(t,e){const i=this.hooks.get(t)||[];i.push(e),this.hooks.set(t,i)}unregister(t,e){const i=this.hooks.get(t)||[],n=i.indexOf(e);-1!==n&&(i.splice(n,1),this.hooks.set(t,i))}triggerHook(t,...e){(this.hooks.get(t)||[]).forEach(t=>{t(...e)})}},k=function(){let t=new Set,e={morphStyle:"outerHTML",callbacks:{beforeNodeAdded:c,afterNodeAdded:c,beforeNodeMorphed:c,afterNodeMorphed:c,beforeNodeRemoved:c,afterNodeRemoved:c,beforeAttributeUpdated:c},head:{style:"merge",shouldPreserve:function(t){return"true"===t.getAttribute("im-preserve")},shouldReAppend:function(t){return"true"===t.getAttribute("im-re-append")},shouldRemove:c,afterHeadMorphed:c}};function i(t,e,n){if(n.head.block){let s=t.querySelector("head"),o=e.querySelector("head");if(s&&o){let r=l(o,s,n);return void Promise.all(r).then(function(){i(t,e,Object.assign(n,{head:{block:!1,ignore:!0}}))})}}if("innerHTML"===n.morphStyle)return o(e,t,n),t.children;if("outerHTML"===n.morphStyle||null==n.morphStyle){let i=function(t,e,
2i){let n;n=t.firstChild;let s=n,o=0;for(;n;){let t=g(n,e,i);t>o&&(s=n,o=t),n=n.nextSibling}return s}(e,t,n),o=i?.previousSibling,r=i?.nextSibling,a=s(t,i,n);return i?function(t,e,i){let n=[],s=[];for(;null!=t;)n.push(t),t=t.previousSibling;for(;n.length>0;){let t=n.pop();s.push(t),e.parentElement.insertBefore(t,e)}for(s.push(e);null!=i;)n.push(i),s.push(i),i=i.nextSibling;for(;n.length>0;)e.parentElement.insertBefore(n.pop(),e.nextSibling);return s}(o,a,r):[]}throw"Do not understand how to morph style "+n.morphStyle}function n(t,e){return e.ignoreActiveValue&&t===document.activeElement}function s(t,e,i){if(!i.ignoreActive||t!==document.activeElement)return null==e?!1===i.callbacks.beforeNodeRemoved(t)?t:(t.remove(),i.callbacks.afterNodeRemoved(t),null):d(t,e)?(!1===i.callbacks.beforeNodeMorphed(t,e)||(t instanceof HTMLHeadElement&&i.head.ignore||(t instanceof HTMLHeadElement&&"morph"!==i.head.style?l(e,t,i):(function(t,e,i){let s=t.nodeType;if(1===s){const n=t.attributes,s=e.attributes;for(const t of n)r(t.name,e,"update",i)||e.getAttribute(t.name)!==t.value&&e.setAttribute(t.name,t.value);for(let n=s.length-1;0<=n;n--){const o=s[n];r(o.name,e,"remove",i)||t.hasAttribute(o.name)||e.removeAttribute(o.name)}}8!==s&&3!==s||e.nodeValue!==t.nodeValue&&(e.nodeValue=t.nodeValue),n(e,i)||function(t,e,i){if(t instanceof HTMLInputElement&&e instanceof HTMLInputElement&&"file"!==t.type){let n=t.value,s=e.value;a(t,e,"checked",i),a(t,e,"disabled",i),t.hasAttribute("value")?n!==s&&(r("value",e,"update",i)||(e.setAttribute("value",n),e.value=n)):r("value",e,"remove",i)||(e.value="",e.removeAttribute("value"))}else if(t instanceof HTMLOptionElement)a(t,e,"selected",i);else if(t instanceof HTMLTextAreaElement&&e instanceof HTMLTextAreaElement){let n=t.value,s=e.value;if(r("value",e,"update",i))return;n!==s&&(e.value=n),e.firstChild&&e.firstChild.nodeValue!==n&&(e.firstChild.nodeValue=n)}}(t,e,i)}(e,t,i),n(t,i)||o(e,t,i))),i.callbacks.afterNodeMorphed(t,e)),t):!1===i.callbacks.beforeNodeRemoved(t)||!1===i.callbacks.beforeNodeAdded(e)?t:(t.parentElement.replaceChild(e,t),i.callbacks.afterNodeAdded(e),i.callbacks.afterNodeRemoved(t),e)}function o(t,e,i){let n,o=t.firstChild,r=e.firstChild;for(;o;){if(n=o,o=n.nextSibling,null==r){if(!1===i.callbacks.beforeNodeAdded(n))return;e.appendChild(n),i.callbacks.afterNodeAdded(n),b(i,n);continue}if(u(n,r,i)){s(r,n,i),r=r.nextSibling,b(i,n);continue}let a=f(t,e,n,r,i);if(a){r=p(r,a,i),s(a,n,i),b(i,n);continue}let l=m(t,0,n,r,i);if(l)r=p(r,l,i),s(l,n,i),b(i,n);else{if(!1===i.callbacks.beforeNodeAdded(n))return;e.insertBefore(n,r),i.callbacks.afterNodeAdded(n),b(i,n)}}for(;null!==r;){let t=r;r=r.nextSibling,_(t,i)}}function r(t,e,i,n){return!("value"!==t||!n.ignoreActiveValue||e!==document.activeElement)||!1===n.callbacks.beforeAttributeUpdated(t,e,i)}function a(t,e,i,n){if(t[i]!==e[i]){let s=r(i,e,"update",n);s||(e[i]=t[i]),t[i]?s||e.setAttribute(i,t[i]):r(i,e,"remove",n)||e.removeAttribute(i)}}function l(t,e,i){let n=[],s=[],o=[],r=[],a=i.head.style,l=new Map;for(const e of t.children)l.set(e.outerHTML,e);for(const t of e.children){let e=l.has(t.outerHTML),n=i.head.shouldReAppend(t),h=i.head.shouldPreserve(t);e||h?n?s.push(t):(l.delete(t.outerHTML),o.push(t)):"append"===a?n&&(s.push(t),r.push(t)):!1!==i.head.shouldRemove(t)&&s.push(t)}r.push(...l.values());let c=[];for(const t of r){h();let s=document.createRange().createContextualFragment(t.outerHTML).firstChild;if(h(),!1!==i.callbacks.beforeNodeAdded(s)){if(s.href||s.src){let t=null,e=new Promise(function(e){t=e});s.addEventListener("load",function(){t()}),c.push(e)}e.appendChild(s),i.callbacks.afterNodeAdded(s),n.push(s)}}for(const t of s)!1!==i.callbacks.beforeNodeRemoved(t)&&(e.removeChild(t),i.callbacks.afterNodeRemoved(t));return i.head.afterHeadMorphed(e,{added:n,kept:o,removed:s}),c}function h(){}function c(){}function u(t,e,i){return null!=t&&null!=e&&t.nodeType===e.nodeType&&t.tagName===e.tagName&&(""!==t.id&&t.id===e.id||x(i,t,e)>0)}function d(t,e){return null!=t&&null!=e&&t.nodeType===e.nodeType&&t.tagName===e.tagName}function p(t,e,i){for(;t!==e;){let e=t;t=t.nextSibling,_(e,i)}return b(i,e),e.nextSibling}function f(t,e,i,n,s){let o=x(s,i,e);if(o>0){let e=n,r=0;for(;null!=e;){if(u(i,e,s))return e;if(r+=x(s,e,t),r>o)return null;e=e.nextSibling}}return null}function m(t,e,i,n,s){let o=n,r=i.nextSibling,a=0;for(;null!=o;){if(x(s,o,t)>0)return null;if(d(i,o))return o;if(d(r,o)&&(a++,r=r.nextSibling,a>=2))return null;o=o.nextSibling}return o}function g(t,e,i){return d(t,e)?.5+x(i,t,e):0}function _(t,e){b(e,t),!1!==e.callbacks.beforeNodeRemoved(t)&&(t.remove(),e.callbacks.afterNodeRemoved(t))}function v(t,e){return!t.deadIds.has(e)}function y(e,i,n){return(e.idMap.get(n)||t).has(i)}function b(e,i){let n=e.idMap.get(i)||t;for(const t of n)e.deadIds.add(t)}function x(e,i,n){let s=e.idMap.get(i)||t,o=0;
2for(const t of s)v(e,t)&&y(e,t,n)&&++o;return o}function w(t,e){let i=t.parentElement,n=t.querySelectorAll("[id]");for(const t of n){let n=t;for(;n!==i&&null!=n;){let i=e.get(n);null==i&&(i=new Set,e.set(n,i)),i.add(t.id),n=n.parentElement}}}function M(t,e){let i=new Map;return w(t,i),w(e,i),i}return{morph:function(t,n,s={}){t instanceof Document&&(t=t.documentElement),"string"==typeof n&&(n=function(t){let e=new DOMParser,i=t.replace(/<svg(\s[^>]*>|>)([\s\S]*?)<\/svg>/gim,"");if(i.match(/<\/html>/)||i.match(/<\/head>/)||i.match(/<\/body>/)){let n=e.parseFromString(t,"text/html");if(i.match(/<\/html>/))return n.generatedByIdiomorph=!0,n;{let t=n.firstChild;return t?(t.generatedByIdiomorph=!0,t):null}}{let i=e.parseFromString("<body><template>"+t+"</template></body>","text/html").body.querySelector("template").content;return i.generatedByIdiomorph=!0,i}}(n));let o=function(t){if(null==t)return document.createElement("div");if(t.generatedByIdiomorph)return t;if(t instanceof Node){const e=document.createElement("div");return e.append(t),e}{const e=document.createElement("div");for(const i of[...t])e.append(i);return e}}(n),r=function(t,i,n){return{target:t,newContent:i,config:n=function(t){let i={};return Object.assign(i,e),Object.assign(i,t),i.callbacks={},Object.assign(i.callbacks,e.callbacks),Object.assign(i.callbacks,t.callbacks),i.head={},Object.assign(i.head,e.head),Object.assign(i.head,t.head),i}(n),morphStyle:n.morphStyle,ignoreActive:n.ignoreActive,ignoreActiveValue:n.ignoreActiveValue,idMap:M(t,i),deadIds:new Set,callbacks:n.callbacks,head:n.head}}(t,o,s);return i(t,o,r)},defaults:e}}();function L(t){t instanceof HTMLInputElement&&"file"===t.type||("value"in t?t.setAttribute("value",t.value):t.hasAttribute("value")&&t.setAttribute("value","")),Array.from(t.children).forEach(t=>{L(t)})}var O=class{constructor(){this.changedItems=new Map,this.removedItems=new Map}setItem(t,e,i){if(this.removedItems.has(t)){const i=this.removedItems.get(t);if(this.removedItems.delete(t),i.original===e)return}if(this.changedItems.has(t)){const i=this.changedItems.get(t);return i.original===e?void this.changedItems.delete(t):void this.changedItems.set(t,{original:i.original,new:e})}this.changedItems.set(t,{original:i,new:e})}removeItem(t,e){let i=e;this.changedItems.has(t)&&(i=this.changedItems.get(t).original,this.changedItems.delete(t),null===i)||this.removedItems.has(t)||this.removedItems.set(t,{original:i})}getChangedItems(){return Array.from(this.changedItems,([t,{new:e}])=>({name:t,value:e}))}getRemovedItems(){return Array.from(this.removedItems.keys())}isEmpty(){return 0===this.changedItems.size&&0===this.removedItems.size}},E=class{constructor(){this.addedClasses=new Set,this.removedClasses=new Set,this.styleChanges=new O,this.attributeChanges=new O}addClass(t){this.removedClasses.delete(t)||this.addedClasses.add(t)}removeClass(t){this.addedClasses.delete(t)||this.removedClasses.add(t)}addStyle(t,e,i){this.styleChanges.setItem(t,e,i)}removeStyle(t,e){this.styleChanges.removeItem(t,e)}addAttribute(t,e,i){this.attributeChanges.setItem(t,e,i)}removeAttribute(t,e){this.attributeChanges.removeItem(t,e)}getAddedClasses(){return[...this.addedClasses]}getRemovedClasses(){return[...this.removedClasses]}getChangedStyles(){return this.styleChanges.getChangedItems()}getRemovedStyles(){return this.styleChanges.getRemovedItems()}getChangedAttributes(){return this.attributeChanges.getChangedItems()}getRemovedAttributes(){return this.attributeChanges.getRemovedItems()}applyToElement(t){t.classList.add(...this.addedClasses),t.classList.remove(...this.removedClasses),this.styleChanges.getChangedItems().forEac
2h(e=>{/!\s*important/i.test(e.value)?t.style.setProperty(e.name,e.value.replace(/!\s*important/i,"").trim(),"important"):t.style.setProperty(e.name,e.value)}),this.styleChanges.getRemovedItems().forEach(e=>{t.style.removeProperty(e)}),this.attributeChanges.getChangedItems().forEach(e=>{t.setAttribute(e.name,e.value)}),this.attributeChanges.getRemovedItems().forEach(e=>{t.removeAttribute(e)})}isEmpty(){return 0===this.addedClasses.size&&0===this.removedClasses.size&&this.styleChanges.isEmpty()&&this.attributeChanges.isEmpty()}},S=class{constructor(t,e){this.changedElements=new WeakMap,this.changedElementsCount=0,this.addedElements=[],this.removedElements=[],this.isStarted=!1,this.element=t,this.shouldTrackChangeCallback=e,this.mutationObserver=new MutationObserver(this.onMutations.bind(this))}start(){this.isStarted||(this.mutationObserver.observe(this.element,{childList:!0,subtree:!0,attributes:!0,attributeOldValue:!0}),this.isStarted=!0)}stop(){this.isStarted&&(this.mutationObserver.disconnect(),this.isStarted=!1)}getChangedElement(t){return this.changedElements.has(t)?this.changedElements.get(t):null}getAddedElements(){return this.addedElements}wasElementAdded(t){return this.addedElements.includes(t)}handlePendingChanges(){this.onMutations(this.mutationObserver.takeRecords())}onMutations(t){const e=new WeakMap;for(const i of t){const t=i.target;if(!this.shouldTrackChangeCallback(t))continue;if(this.isElementAddedByTranslation(t))continue;let n=!1;for(const e of this.addedElements)if(e.contains(t)){n=!0;break}if(!n)switch(i.type){case"childList":this.handleChildListMutation(i);break;case"attributes":e.has(t)||e.set(t,[]),e.get(t).includes(i.attributeName)||(this.handleAttributeMutation(i),e.set(t,[...e.get(t),i.attributeName]))}}}handleChildListMutation(t){t.addedNodes.forEach(t=>{t instanceof Element&&(this.removedElements.includes(t)?this.removedElements.splice(this.removedElements.indexOf(t),1):this.isElementAddedByTranslation(t)||this.addedElements.push(t))}),t.removedNodes.forEach(t=>{t instanceof Element&&(this.addedElements.includes(t)?this.addedElements.splice(this.addedElements.indexOf(t),1):this.removedElements.push(t))})}handleAttributeMutation(t){const e=t.target;this.changedElements.has(e)||(this.changedElements.set(e,new E),this.changedElementsCount++);const i=this.changedElements.get(e);switch(t.attributeName){case"class":this.handleClassAttributeMutation(t,i);break;case"style":this.handleStyleAttributeMutation(t,i);break;default:this.handleGenericAttributeMutation(t,i)}i.isEmpty()&&(this.changedElements.delete(e),this.changedElementsCount--)}handleClassAttributeMutation(t,e){const i=t.target,n=(t.oldValue||"").match(/(\S+)/gu)||[],s=[].slice.call(i.classList),o=s.filter(t=>!n.includes(t)),r=n.filter(t=>!s.includes(t));o.forEach(t=>{e.addClass(t)}),r.forEach(t=>{e.removeClass(t)})}handleStyleAttributeMutation(t,e){const i=t.target,n=t.oldValue||"",s=this.extractStyles(n),o=i.getAttribute("style")||"",r=this.extractStyles(o),a=Object.keys(r).filter(t=>void 0===s[t]||s[t]!==r[t]),l=Object.keys(s).filter(t=>!r[t]);a.forEach(t=>{e.addStyle(t,r[t],void 0===s[t]?null:s[t])}),l.forEach(t=>{e.removeStyle(t,s[t])})}handleGenericAttributeMutation(t,e){const i=t.attributeName,n=t.target;let s=t.oldValue,o=n.getAttribute(i);if(s===i&&(s=""),o===i&&(o=""),n.hasAttribute(i))o!==s&&e.addAttribute(i,n.getAttribute(i),t.oldValue);else{if(null===s)return;e.removeAttribute(i,t.oldValue)}}extractStyles(t){const e={};return t.split(";").forEach(t=>{const i=t.split(":");if(1===i.length)return;const n=i[0].trim();e[n]=i.slice(1).join(":").trim()}),e}isElementAddedByTranslation(t){return"FONT"===t.tagName&&"vertical-align: inherit;"===t.getAttribute("style")}},A=class{constructor(t,e){this.elementEventListeners=[{event:"input",callback:t=>this.handleInputEvent(t)}],this.component=t,this.modelElementResolver=e,this.unsyncedInputs=new P}activate(){this.elementEventListeners.forEach(({event:t,callback:e})=>{this.component.element.addEventListener(t,e)})}deactivate(){this.elementEventListeners.forEach(({event:t,callback:e})=>{this.component.element.removeEventListener(t,e)})}markModelAsSynced(t){this.unsyncedInputs.markModelAsSynced(t)}handleInputEvent(t){const e=t.target;e&&this.updateModelFromElement(e)}updateModelFromElement(t){if(!y(t,this.component))return;if(!(t instanceof HTMLElement))throw new Error("Could not update model for non HTMLElement");const e=this.modelElementResolver.getModelName(t);this.unsyncedInputs.add(t,e)}getUnsyncedInputs(){return this.unsyncedInputs.allUnsyncedInputs()}getUnsyncedModels(){return Array.from(this.unsyncedInputs.getUnsyncedModelNames())}resetUnsyncedFields(){this.unsyncedInputs.resetUnsyncedFields()}},P=class{constructor(){this.unsyncedNonModelFields=[],this.unsyncedModelNames=[],this.unsyncedModelFields=new Map}add(t,e=null){if(e)return this.unsyncedModelFields.set(e,t),void(this.unsyncedModelNames.includes(e)||this.unsyncedModelNames.push(e));this.unsyncedNonModelFields.push(t)}resetUnsyncedFields(){this.unsyncedModelFields.forEach((t,e)=>{this.unsyncedModelNames.includes(e)||this.unsyncedModelFields.delete(e)})}allUnsyncedInputs(){return[...this.unsyncedNonModelFields,...this.unsyncedModelFields.values()]}markModelAsSynced(t){const e=this.unsyncedModelNames.indexOf(t);-1!==e&&this.unsyncedModelNames.splice(e,1)}getUnsyncedModelNames(){return this.unsyncedModelNames}};var C=class{constructor(t){this.props={},this.dirtyProps={},this.pendingProps={},this.updatedPropsFromParent={},this.props=t}get(t){const e=f(t);return void 0!==this.dirtyProps[e]?this.dirtyProps[e]:void 0!==this.pendingProps[e]?this.pendingProps[e]:void 0!==this.props[e]?this.props[e]:function(t,e){const{currentLevelData:i,finalKey:n}=((t,e)=>{const i=JSON.parse(JSON.stringify(t));let n=i;const s=e.split(".");for(let t=0;t<s.length-1;t++)n=n[s[t]];return{currentLevelData:n,finalData:i,finalKey:s[s.length-1],parts:s}})(t,e);if(void 0!==i)return i[n]}(this.props,e)}has(t){return void 0!==this.get(t)}set(t,e){const i=f(t);return this.get(i)!==e&&(this.dirtyProps[i]=e,!0)}getOriginalProps(){return{...this.props}}getDirtyProps(){return{...this.dirtyProps}}getUpdatedPropsFromParent(){return{...this.updatedPropsFromParent}}flushDirtyPropsToPending(){this.pendingProps={...this.dirtyProps},this.dirtyProps={}}reinitializeAllProps(t){this.props=t,this.updatedPropsFromParent={},this.pendingProps={}}pushPendingPropsBackToDirty(){this.dirtyProps={...this.pendingProps,...this.dirtyProps},this.pendingProps={}}storeNewPropsFromParent(t){let e=!1;for(const[i,n]of Object.entries(t))this.get(i)!==n&&(e=!0);return e&&(this.updatedPropsFromParent=t),e}},T=class{constructor(t,e,i,n,s,o,r){this.fingerprint="",this.defaultDebounce=150,this.backendRequest=null,this.pendingActions=[],this.pendingFiles={},this.isRequestPending=!1,this.requestDebounceTimeout=null,this.element=t,this.name=e,this.backend=o,this.elementDriver=r,this.id=s,this.listeners=new Map,n.forEac
2h(t=>{this.listeners.has(t.event)||this.listeners.set(t.event,[]),this.listeners.get(t.event)?.push(t.action)}),this.valueStore=new C(i),this.unsyncedInputsTracker=new A(this,r),this.hooks=new M,this.resetPromise(),this.externalMutationTracker=new S(this.element,t=>y(t,this)),this.externalMutationTracker.start()}addPlugin(t){t.attachToComponent(this)}connect(){var t;t=this,h.set(t.element,t),c.set(t,t.name),this.hooks.triggerHook("connect",this),this.unsyncedInputsTracker.activate(),this.externalMutationTracker.start()}disconnect(){h.delete(this.element),c.delete(this),this.hooks.triggerHook("disconnect",this),this.clearRequestDebounceTimeout(),this.unsyncedInputsTracker.deactivate(),this.externalMutationTracker.stop()}on(t,e){this.hooks.register(t,e)}off(t,e){this.hooks.unregister(t,e)}set(t,e,i=!1,n=!1){const s=this.nextRequestPromise,o=f(t);if(!this.valueStore.has(o))throw new Error(`Invalid model name "${t}".`);const r=this.valueStore.set(o,e);return this.hooks.triggerHook("model:set",t,e,this),this.unsyncedInputsTracker.markModelAsSynced(o),i&&r&&this.debouncedStartRequest(n),s}getData(t){const e=f(t);if(!this.valueStore.has(e))throw new Error(`Invalid model "${t}".`);return this.valueStore.get(e)}action(t,e={},i=!1){const n=this.nextRequestPromise;return this.pendingActions.push({name:t,args:e}),this.debouncedStartRequest(i),n}files(t,e){this.pendingFiles[t]=e}render(){const t=this.nextRequestPromise;return this.tryStartingRequest(),t}getUnsyncedModels(){return this.unsyncedInputsTracker.getUnsyncedModels()}emit(t,e,i=null){this.performEmit(t,e,!1,i)}emitUp(t,e,i=null){this.performEmit(t,e,!0,i)}emitSelf(t,e){this.doEmit(t,e)}performEmit(t,e,i,n){((t,e,i)=>{const n=[];return c.forEach((s,o)=>{(!e||t!==o&&o.element.contains(t.element))&&(i&&s!==i||n.push(o))}),n})(this,i,n).forEach(i=>{i.doEmit(t,e)})}doEmit(t,e){this.listeners.has(t)&&(this.listeners.get(t)||[]).forEach(t=>{this.action(t,e,1)})}isTurboEnabled(){return"undefined"!=typeof Turbo&&!this.element.closest('[data-turbo="false"]')}tryStartingRequest(){this.backendRequest?this.isRequestPending=!0:this.performRequest()}performRequest(){const t=this.nextRequestPromiseResolve;this.resetPromise(),this.unsyncedInputsTracker.resetUnsyncedFields();const e={};for(const[t,i]of Object.entries(this.pendingFiles))i.files&&(e[t]=i.files);const i=this.pendingActions.slice(0,50),n=this.pendingActions.slice(50),s={props:this.valueStore.getOriginalProps(),actions:i,updated:this.valueStore.getDirtyProps(),children:{},updatedPropsFromParent:this.valueStore.getUpdatedPropsFromParent(),files:e};this.hooks.triggerHook("request:started",s),this.backendRequest=this.backend.makeRequest(s.props,s.actions,s.updated,s.children,s.updatedPropsFromParent,s.files),this.hooks.triggerHook("loading.state:started",this.element,this.backendRequest),this.pendingActions=n,this.valueStore.flushDirtyPropsToPending(),this.isRequestPending=n.length>0,this.backendRequest.promise.then(async e=>{const i=new a(e),n=await i.getBody();for(const t of Object.values(this.pendingFiles))t.value="";const s=i.response.headers;if(!s.get("Content-Type")?.includes("application/vnd.live-component+html")&&!s.get("X-Live-Redirect")){const s={displayError:!0};return this.valueStore.pushPendingPropsBackToDirty(),this.hooks.triggerHook("response:error",i,s),s.displayError&&this.renderError(n),this.backendRequest=null,t(i),e}const o=i.getLiveUrl();return o&&history.replaceState(history.state,"",new URL(o+window.location.hash,window.location.origin)),this.processRerender(n,i),this.backendRequest=null,t(i),this.isRequestPending&&(this.isRequestPending=!1,this.performRequest()),e})}processRerender(t,e){const i={shouldRender:!0};if(this.hooks.triggerHook("render:started",t,e,i),!i.shouldRender)return;if(e.response.headers.get("Location"))return void(this.isTurboEnabled()?Turbo.visit(e.response.headers.get("Location")):window.location.href=e.response.headers.get("Location")||"");this.hooks.triggerHook("loading.state:finished",this.element);const n={};let s;Object.keys(this.valueStore.getDirtyProps()).forEach(t=>{n[t]=this.valueStore.get(t)});try{if(s=function(t){const e=document.createElement("template");if(t=t.trim(),e.innerHTML=t,e.content.childElementCount>1)throw new Error(`Component HTML contains ${e.content.childElementCount} elements, but only 1 root element is allowed.`);const i=e.content.firstElementChild;if(!i)throw new Error("Child not found");if(!(i instanceof HTMLElement))throw new Error(`Created element is not an HTMLElement: ${t.trim()}`);return i}(t),!s.matches("[data-controller~=live]"))throw new Error("A live component template must contain a single root controller element.")}catch(t){throw console.error(`There was a problem with the '${this.name}' component HTML returned:`,{id:this.id}),t}this.externalMutationTracker.handlePendingChanges(),this.externalMutationTracker.stop(),function(t,e,
2i,n,s){const o=[],r=new Map,a=(t,e)=>{const i=r.get(t);if(!(i instanceof HTMLElement))throw new Error(`Original element with id ${t} not found`);if(o.push(t),!e)return null;const n=b(i);return i.replaceWith(n),n};e.querySelectorAll("[data-live-preserve]").forEach(e=>{const i=e.id;if(!i)throw new Error("The data-live-preserve attribute requires an id attribute to be set on the element");const n=t.querySelector(`#${i}`);if(!(n instanceof HTMLElement))throw new Error(`The element with id "${i}" was not found in the original HTML`);e.removeAttribute("data-live-preserve"),r.set(i,n),((t,e)=>{for(let i=0;i<t.attributes.length;i++){const n=t.attributes[i];e.setAttribute(n.name,n.value)}})(e,n)}),k.morph(t,e,{callbacks:{beforeNodeMorphed:(e,o)=>{if(!(e instanceof Element&&o instanceof Element))return!0;if(e===t)return!0;if(e.id&&r.has(e.id)){if(e.id===o.id)return!1;const t=a(e.id,!0);if(!t)throw new Error("missing clone");return k.morph(t,o),!1}if(e instanceof HTMLElement&&o instanceof HTMLElement){if(void 0!==e.__x){if(!window.Alpine)throw new Error("Unable to access Alpine.js though the global window.Alpine variable. Please make sure Alpine.js is loaded before Symfony UX LiveComponent.");if("function"!=typeof window.Alpine.morph)throw new Error("Unable to access Alpine.js morph function. Please make sure the Alpine.js Morp
2h plugin is installed and loaded, see https://alpinejs.dev/plugins/morph for more information.");window.Alpine.morph(e.__x,o)}if(s.wasElementAdded(e))return e.insertAdjacentElement("afterend",o),!1;i.includes(e)&&g(o,n(e)),e===document.activeElement&&e!==document.body&&null!==v(e,!1)&&g(o,n(e));const t=s.getChangedElement(e);if(t&&t.applyToElement(o),"OPTION"!==e.nodeName.toUpperCase()&&e.isEqualNode(o)){const t=b(e);L(t);const i=b(o);if(L(i),t.isEqualNode(i))return!1}}return e.hasAttribute("data-skip-morph")||e.id&&e.id!==o.id?(e.innerHTML=o.innerHTML,!0):!e.parentElement?.hasAttribute("data-skip-morph")&&!e.hasAttribute("data-live-ignore")},beforeNodeRemoved:t=>!(t instanceof HTMLElement&&(t.id&&r.has(t.id)?(a(t.id,!1),0):s.wasElementAdded(t)||t.hasAttribute("data-live-ignore")))}}),o.forEach(e=>{const i=t.querySelector(`#${e}`),n=r.get(e);if(!(i instanceof HTMLElement&&n instanceof HTMLElement))throw new Error("Missing elements.");i.replaceWith(n)})}(this.element,s,this.unsyncedInputsTracker.getUnsyncedInputs(),t=>m(t,this.valueStore),this.externalMutationTracker),this.externalMutationTracker.start();const o=this.elementDriver.getComponentProps();this.valueStore.reinitializeAllProps(o);const r=this.elementDriver.getEventsToEmit(),a=this.elementDriver.getBrowserEventsToDispatch();Object.keys(n).forEach(t=>{this.valueStore.set(t,n[t])}),r.forEach(({event:t,data:e,target:i,componentName:n})=>{"up"!==i?"self"!==i?this.emit(t,e,n):this.emitSelf(t,e):this.emitUp(t,e,n)}),a.forEach(({event:t,payload:e})=>{this.element.dispatchEvent(new CustomEvent(t,{detail:e,bubbles:!0}))}),this.hooks.triggerHook("render:finished",this)}calculateDebounce(t){return!0===t?this.defaultDebounce:!1===t?0:t}clearRequestDebounceTimeout(){this.requestDebounceTimeout&&(clearTimeout(this.requestDebounceTimeout),this.requestDebounceTimeout=null)}debouncedStartRequest(t){this.clearRequestDebounceTimeout(),this.requestDebounceTimeout=window.setTimeout(()=>{this.render()},this.calculateDebounce(t))}renderError(t){let e=document.getElementById("live-component-error");e?e.innerHTML="":(e=document.createElement("div"),e.id="live-component-error",e.style.padding="50px",e.style.backgroundColor="rgba(0, 0, 0, .5)",e.style.zIndex="100000",e.style.position="fixed",e.style.top="0px",e.style.bottom="0px",e.style.left="0px",e.style.right="0px",e.style.display="flex",e.style.flexDirection="column");const i=document.createElement("iframe");i.style.borderRadius="5px",i.style.flexGrow="1",e.appendChild(i),document.body.prepend(e),document.body.style.overflow="hidden",i.contentWindow&&(i.contentWindow.document.open(),i.contentWindow.document.write(t),i.contentWindow.document.close());const n=t=>{t&&(t.outerHTML=""),document.body.style.overflow="visible"};e.addEventListener("click",()=>n(e)),e.setAttribute("tabindex","0"),e.addEventListener("keydown",t=>{"Escape"===t.key&&n(e)}),e.focus()}resetPromise(){this.nextRequestPromise=new Promise(t=>{this.nextRequestPromiseResolve=t})}_updateFromParentProps(t){this.valueStore.storeNewPropsFromParent(t)&&this.render()}},I=class{constructor(t){this.controller=t}getModelName(t){const e=v(t,!1);return e?e.action:null}getComponentProps(){return this.controller.propsValue}getEventsToEmit(){return this.controller.eventsToEmitValue}getBrowserEventsToDispatch(){return this.controller.eventsToDispatchValue}};function D(t){let e=!0,i=null,n=!1,s=null,o=null,r=null,a=null;t.modifiers.forEach(l=>{switch(l.name){case"on":if(!l.value)throw new Error(`The "on" modifier in ${t.getString()} requires a value - e.g. on(change).`);if(!["input","change"].includes(l.value))throw new Error(`The "on" modifier in ${t.getString()} only accepts the arguments "input" or "change".`);i=l.value;break;case"norender":e=!1;break;case"debounce":n=!l.value||Number.parseInt(l.value);break;case"min_length":s=l.value?Number.parseInt(l.value):null;break;case"max_length":o=l.value?Number.parseInt(l.value):null;break;case"min_value":r=l.value?Number.parseFloat(l.value):null;break;case"max_value":a=l.value?Number.parseFloat(l.value):null;break;default:throw new Error(`Unknown modifier "${l.name}" in data-model="${t.getString()}".`)}});const[l,h]=t.action.split(":");return{modelName:l,innerModelName:h||null,shouldRender:e,debounce:n,targetEventName:i,minLength:s,maxLength:o,minValue:r,maxValue:a}}var z=class{constructor(t){this.parentModelBindings=[],this.component=t,this.parentModelBindings=_(this.component.element).map(D)}attachToComponent(t){t.on("request:started",t=>{t.children=this.getChildrenFingerprints()}),t.on("model:set",(t,e)=>{this.notifyParentModelChange(t,e)})}getChildrenFingerprints(){const t={};
2return this.getChildren().forEach(e=>{if(!e.id)throw new Error("missing id");t[e.id]={fingerprint:e.fingerprint,tag:e.element.tagName.toLowerCase()}}),t}notifyParentModelChange(t,e){const i=(()=>{let t=this.component.element.parentElement;for(;t;){const e=h.get(t);if(e)return e;t=t.parentElement}return null})();i&&this.parentModelBindings.forEach(n=>{(n.innerModelName||"value")===t&&i.set(n.modelName,e,n.shouldRender,n.debounce)})}getChildren(){return(t=>{const e=[];return c.forEach((i,n)=>{if(t===n)return;if(!t.element.contains(n.element))return;let s=!1;c.forEach((t,e)=>{s||e!==n&&e.element.contains(n.element)&&(s=!0)}),e.push(n)}),e})(this.component)}},F=class{constructor(){this.intersectionObserver=null}attachToComponent(t){"lazy"===t.element.attributes.getNamedItem("loading")?.value&&(t.on("connect",()=>{this.getObserver().observe(t.element)}),t.on("disconnect",()=>{this.intersectionObserver?.unobserve(t.element)}))}getObserver(){return this.intersectionObserver||(this.intersectionObserver=new IntersectionObserver((t,e)=>{t.forEach(t=>{t.isIntersecting&&(t.target.dispatchEvent(new CustomEvent("live:appear")),e.unobserve(t.target))})})),this.intersectionObserver}},R=class{attachToComponent(t){t.on("loading.state:started",(e,i)=>{this.startLoading(t,e,i)}),t.on("loading.state:finished",e=>{this.finishLoading(t,e)}),this.finishLoading(t,t.element)}startLoading(t,e,i){this.handleLoadingToggle(t,!0,e,i)}finishLoading(t,e){this.handleLoadingToggle(t,!1,e,null)}handleLoadingToggle(t,e,i,n){e?this.addAttributes(i,["busy"]):this.removeAttributes(i,["busy"]),this.getLoadingDirectives(t,i).forEach(({element:t,directives:i})=>{e?this.addAttributes(t,["data-live-is-loading"]):this.removeAttributes(t,["data-live-is-loading"]),i.forEach(i=>{this.handleLoadingDirective(t,e,i,n)})})}handleLoadingDirective(t,e,i,n){const s=N(i.action,e),o=[],r=[];let a=0;const l=new Map;if(l.set("delay",t=>{e&&(a=t.value?Number.parseInt(t.value):200)}),l.set("action",t=>{if(!t.value)throw new Error(`The "action" in data-loading must have an action name - e.g. action(foo). It's missing for "${i.getString()}"`);o.push(t.value)}),l.set("model",t=>{if(!t.value)throw new Error(`The "model" in data-loading must have an action name - e.g. model(foo). It's missing for "${i.getString()}"`);r.push(t.value)}),i.modifiers.forEach(t=>{if(!l.has(t.name))throw new Error(`Unknown modifier "${t.name}" used in data-loading="${i.getString()}". Available modifiers are: ${Array.from(l.keys()).join(", ")}.`);(l.get(t.name)??(()=>{}))(t)}),e&&o.length>0&&n&&!n.containsOneOfActions(o))return;if(e&&r.length>0&&n&&!n.areAnyModelsUpdated(r))return;let h;switch(s){case"show":h=()=>this.showElement(t);break;case"hide":h=()=>this.hideElement(t);break;case"addClass":h=()=>this.addClass(t,i.args);break;case"removeClass":h=()=>this.removeClass(t,i.args);break;case"addAttribute":h=()=>this.addAttributes(t,i.args);break;case"removeAttribute":h=()=>this.removeAttributes(t,i.args);break;default:throw new Error(`Unknown data-loading action "${s}"`)}a?window.setTimeout(()=>{n&&!n.isResolved&&h()},a):h()}getLoadingDirectives(t,e){const i=[];let n=Array.from(e.querySelectorAll("[data-loading]"));return n=n.filter(e=>y(e,t)),e.hasAttribute("data-loading")&&(n=[e,...n]),n.forEach(t=>{if(!(t instanceof HTMLElement||t instanceof SVGElement))throw new Error("Invalid Element Type");const e=d(t.dataset.loading||"show");i.push({element:t,directives:e})}),i}showElement(t){t.style.display="revert"}hideElement(t){t.style.display="none"}addClass(t,e){t.classList.add(...p(e))}removeClass(t,e){t.classList.remove(...p(e)),0===t.classList.length&&t.removeAttribute("class")}addAttributes(t,e){e.forEach(e=>{t.setAttribute(e,"")})}removeAttributes(t,e){e.forEach(e=>{t.removeAttribute(e)})}};const N=(t,e)=>{switch(t){case"show":return e?"show":"hide";case"hide":return e?"hide":"show";case"addClass":return e?"addClass":"removeClass";case"removeClass":return e?"removeClass":"addClass";case"addAttribute":return e?"addAttribute":"removeAttribute";case"removeAttribute":return e?"removeAttribute":"addAttribute"}throw new Error(`Unknown data-loading action "${t}"`)};var B=class{constructor(){this.isConnected=!1}attachToComponent(t){t.on("render:started",(t,e,i)=>{this.isConnected||(i.shouldRender=!1)}),t.on("connect",()=>{this.isConnected=!0}),t.on("disconnect",()=>{this.isConnected=!1})}},j=class{constructor(t){this.isPollingActive=!0,this.pollingIntervals=[],this.component=t}addPoll(t,e){this.polls.push({actionName:t,duration:e}),this.isPollingActive&&this.initiatePoll(t,e)}startAllPolling(){this.isPollingActive||(this.isPollingActive=!0,this.polls.forEac
2h(({actionName:t,duration:e})=>{this.initiatePoll(t,e)}))}stopAllPolling(){this.isPollingActive=!1,this.pollingIntervals.forEach(t=>{clearInterval(t)})}clearPolling(){this.stopAllPolling(),this.polls=[],this.startAllPolling()}initiatePoll(t,e){let i;i="$render"===t?()=>{this.component.render()}:()=>{this.component.action(t,{},0)};const n=window.setInterval(()=>{i()},e);this.pollingIntervals.push(n)}},V=class{attachToComponent(t){this.element=t.element,this.pollingDirector=new j(t),this.initializePolling(),t.on("connect",()=>{this.pollingDirector.startAllPolling()}),t.on("disconnect",()=>{this.pollingDirector.stopAllPolling()}),t.on("render:finished",()=>{this.initializePolling()})}addPoll(t,e){this.pollingDirector.addPoll(t,e)}clearPolling(){this.pollingDirector.clearPolling()}initializePolling(){if(this.clearPolling(),void 0===this.element.dataset.poll)return;const t=this.element.dataset.poll;d(t||"$render").forEach(e=>{let i=2e3;e.modifiers.forEach(e=>{"delay"===e.name?e.value&&(i=Number.parseInt(e.value)):console.warn(`Unknown modifier "${e.name}" in data-poll "${t}".`)}),this.addPoll(e.action,i)})}},H=class{attachToComponent(t){this.synchronizeValueOfModelFields(t),t.on("render:finished",()=>{this.synchronizeValueOfModelFields(t)})}synchronizeValueOfModelFields(t){t.element.querySelectorAll("[data-model]").forEach(e=>{if(!(e instanceof HTMLElement))throw new Error("Invalid element using data-model.");if(e instanceof HTMLFormElement)return;if(!y(e,t))return;const i=v(e);if(!i)return;const n=i.action;t.getUnsyncedModels().includes(n)||(t.valueStore.has(n)&&g(e,t.valueStore.get(n)),e instanceof HTMLSelectElement&&!e.multiple&&t.valueStore.set(n,m(e,t.valueStore)))})}},$=class{attachToComponent(t){t.on("model:set",e=>{this.handleModelSet(e,t.valueStore)})}handleModelSet(t,e){if(e.has("validatedFields")){const i=[...e.get("validatedFields")];i.includes(t)||i.push(t),e.set("validatedFields",i)}}},Z=class t extends n.xI{constructor(...t){super(...t),this.pendingActionTriggerModelElement=null,this.elementEventListeners=[{event:"input",callback:t=>this.handleInputEvent(t)},{event:"change",callback:t=>this.handleChangeEvent(t)}],this.pendingFiles={}}initialize(){this.mutationObserver=new MutationObserver(this.onMutations.bind(this)),this.createComponent()}connect(){this.connectComponent(),this.mutationObserver.observe(this.element,{attributes:!0})}disconnect(){this.disconnectComponent(),this.mutationObserver.disconnect()}update(t){if("input"===t.type||"change"===t.type)throw new Error(`Since LiveComponents 2.3, you no longer need data-action="live#update" on form elements. Found on element: ${l(t.currentTarget)}`);this.updateModelFromElementEvent(t.currentTarget,null)}action(t){const e=t.params;if(!e.action)throw new Error(`No action name provided on element: ${l(t.currentTarget)}. Did you forget to add the "data-live-action-param" attribute?`);const i=e.action,n={...e};delete n.action;const s=d(i);let o=!1;s.forEach(e=>{let s={};const r=new Map;r.set("stop",()=>{t.stopPropagation()}),r.set("self",()=>{t.target,t.currentTarget}),r.set("debounce",t=>{o=!t.value||Number.parseInt(t.value)}),r.set("files",t=>{t.value?this.pendingFiles[t.value]&&(s[t.value]=this.pendingFiles[t.value]):s=this.pendingFiles}),e.modifiers.forEach(t=>{r.has(t.name)?(r.get(t.name)??(()=>{}))(t):console.warn(`Unknown modifier ${t.name} in action "${i}". Available modifiers are: ${Array.from(r.keys()).join(", ")}.`)});for(const[t,e]of Object.entries(s))e.files&&this.component.files(t,e),delete this.pendingFiles[t];this.component.action(e.action,n,o),v(t.currentTarget,!1)&&(this.pendingActionTriggerModelElement=t.currentTarget)})}$render(){return this.component.render()}emit(t){this.getEmitDirectives(t).forEach(({name:t,data:e,nameMatch:i})=>{this.component.emit(t,e,i)})}emitUp(t){this.getEmitDirectives(t).forEach(({name:t,data:e,nameMatch:i})=>{this.component.emitUp(t,e,i)})}emitSelf(t){this.getEmitDirectives(t).forEach(({name:t,data:e})=>{this.component.emitSelf(t,e)})}$updateModel(t,e,i=!0,n=!0){return this.component.set(t,e,i,n)}propsUpdatedFromParentValueChanged(){this.component._updateFromParentProps(this.propsUpdatedFromParentValue)}fingerprintValueChanged(){this.component.fingerprint=this.fingerprintValue}getEmitDirectives(t){const e=t.params;if(!e.event)throw new Error(`No event name provided on element: ${l(t.currentTarget)}. Did you forget to add the "data-live-event-param" attribute?`);const i=e.event,n={...e};delete n.event;const s=d(i),o=[];
2return s.forEach(t=>{let e=null;t.modifiers.forEach(t=>{if("name"!==t.name)throw new Error(`Unknown modifier ${t.name} in event "${i}".`);e=t.value}),o.push({name:t.action,data:n,nameMatch:e})}),o}createComponent(){const e=this.element.id||null;var i;this.component=new T(this.element,this.nameValue,this.propsValue,this.listenersValue,e,t.backendFactory(this),new I(this)),this.proxiedComponent=(i=this.component,new Proxy(i,{get(t,e){if(e in t||"string"!=typeof e){if("function"==typeof t[e]){const i=t[e];return(...e)=>i.apply(t,e)}return Reflect.get(t,e)}return t.valueStore.has(e)?t.getData(e):i=>t.action.apply(t,[e,i])},set:(t,e,i)=>e in t?(t[e]=i,!0):(t.set(e,i),!0)})),Object.defineProperty(this.element,"__component",{value:this.proxiedComponent,writable:!0}),this.hasDebounceValue&&(this.component.defaultDebounce=this.debounceValue),[new R,new F,new $,new B,new V,new H,new z(this.component)].forEach(t=>{this.component.addPlugin(t)})}connectComponent(){this.component.connect(),this.mutationObserver.observe(this.element,{attributes:!0}),this.elementEventListeners.forEach(({event:t,callback:e})=>{this.component.element.addEventListener(t,e)}),this.dispatchEvent("connect")}disconnectComponent(){this.component.disconnect(),this.elementEventListeners.forEach(({event:t,callback:e})=>{this.component.element.removeEventListener(t,e)}),this.dispatchEvent("disconnect")}handleInputEvent(t){const e=t.target;e&&this.updateModelFromElementEvent(e,"input")}handleChangeEvent(t){const e=t.target;e&&this.updateModelFromElementEvent(e,"change")}updateModelFromElementEvent(t,e){if(!y(t,this.component))return;if(!(t instanceof HTMLElement))throw new Error("Could not update model for non HTMLElement");if(t instanceof HTMLInputElement&&"file"===t.type){const e=t.name;t.files?.length?this.pendingFiles[e]=t:this.pendingFiles[e]&&delete this.pendingFiles[e]}const i=v(t,!1);if(!i)return;const n=D(i);if(n.targetEventName||(n.targetEventName="input"),this.pendingActionTriggerModelElement===t&&(n.shouldRender=!1),"change"===e&&"input"===n.targetEventName&&(n.targetEventName="change"),e&&n.targetEventName!==e)return;!1===n.debounce&&("input"===n.targetEventName?n.debounce=!0:n.debounce=0);const s=m(t,this.component.valueStore),o=""===s||null==s;if((r=t)instanceof HTMLInputElement&&["text","email","password","search","tel","url"].includes(r.type)||function(t){return t instanceof HTMLTextAreaElement}(t)){if(!o&&null!==n.minLength&&"string"==typeof s&&s.length<n.minLength)return;if(!o&&null!==n.maxLength&&"string"==typeof s&&s.length>n.maxLength)return}var r;if(function(t){return t instanceof HTMLInputElement&&["number","range"].includes(t.type)}(t)&&!o){const t=Number(s);if(null!==n.minValue&&t<n.minValue)return;if(null!==n.maxValue&&t>n.maxValue)return}this.component.set(n.modelName,s,n.shouldRender,n.debounce)}dispatchEvent(t,e={},i=!0,n=!1){e.controller=this,e.component=this.proxiedComponent,this.dispatch(t,{detail:e,prefix:"live",cancelable:n,bubbles:i})}onMutations(t){t.forEach(t=>{"attributes"===t.type&&"id"===t.attributeName&&this.element.id!==this.component.id&&(this.disconnectComponent(),this.createComponent(),this.connectComponent())})}};Z.values={name:String,url:String,props:{type:Object,default:{}},propsUpdatedFromParent:{type:Object,default:{}},listeners:{type:Array,default:[]},eventsToEmit:{type:Array,default:[]},eventsToDispatch:{type:Array,default:[]},debounce:{type:Number,default:150},fingerprint:{type:String,default:""},requestMethod:{type:String,default:"post"},fetchCredentials:{type:String,default:"same-origin"}},Z.backendFactory=t=>new r(t.urlValue,t.requestMethodValue,t.fetchCredentialsValue)},3392:(t,e,i)=>{"use strict";var n=i(9504),s=0,o=Math.random(),r=n(1.1.toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+r(++s+o,36)}},3459:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||Promise.all([i.e(9389),i.e(6039)]).then(i.bind(i,6039)).then(t=>{this.application.register(this.identifier,t.default)})}}},3481:function(t,e){!function(t){"use strict";function e(t){var e,i,n,s;for(i=1,n=arguments.length;i<n;i++)for(e in s=arguments[i])t[e]=s[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function n(t,e){var i=Array.prototype.slice;
vendor: 6,996 bytes, line 2
2if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}var s=0;function o(t){return"_leaflet_id"in t||(t._leaflet_id=++s),t._leaflet_id}function r(t,e,i){var n,s,o,r;return r=function(){n=!1,s&&(o.apply(i,s),s=!1)},o=function(){n?s=arguments:(t.apply(i,arguments),setTimeout(r,e),n=!0)},o}function a(t,e,i){var n=e[1],s=e[0],o=n-s;return t===n&&i?t:((t-s)%o+o)%o+s}function l(){return!1}function h(t,e){if(!1===e)return t;var i=Math.pow(10,void 0===e?6:e);return Math.round(t*i)/i}function c(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function u(t){return c(t).split(/\s+/)}function d(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function p(t,e,i){var n=[];for(var s in t)n.push(encodeURIComponent(i?s.toUpperCase():s)+"="+encodeURIComponent(t[s]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}var f=/\{ *([\w_ -]+) *\}/g;function m(t,e){return t.replace(f,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}var g=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function _(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var v="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var b=0;function x(t){var e=+new Date,i=Math.max(0,16-(e-b));return b=e+i,window.setTimeout(t,i)}var w=window.requestAnimationFrame||y("RequestAnimationFrame")||x,M=window.cancelAnimationFrame||y("CancelAnimationFrame")||y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function k(t,e,i){if(!i||w!==x)return w.call(window,n(t,e));t.call(e)}function O(t){t&&M.call(window,t)}var E={__proto__:null,extend:e,create:i,bind:n,get lastId(){return s},stamp:o,throttle:r,wrapNum:a,falseFn:l,formatNum:h,trim:c,splitWords:u,setOptions:d,getParamString:p,template:m,isArray:g,indexOf:_,emptyImageUrl:v,requestFn:w,cancelFn:M,requestAnimFrame:k,cancelAnimFrame:O};function S(){}S.extend=function(t){var n=function(){d(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},s=n.__super__=this.prototype,o=i(s);for(var r in o.constructor=n,n.prototype=o,this)Object.prototype.hasOwnProperty.call(this,r)&&"prototype"!==r&&"__super__"!==r&&(n[r]=this[r]);return t.statics&&e(n,t.statics),t.includes&&(function(t){if("undefined"!=typeof L&&L&&L.Mixin){t=g(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===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)}}(t.includes),e.apply(null,[o].concat(t.includes))),e(o,t),delete o.statics,delete o.includes,o.options&&(o.options=s.options?i(s.options):{},e(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){s.callInitHooks&&s.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},n},S.include=function(t){var i=this.prototype.options;return e(this.prototype,t),t.options&&(this.prototype.options=i,this.mergeOptions(t.options)),this},S.mergeOptions=function(t){return e(this.prototype.options,t),this},S.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var A={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var s=0,o=(t=u(t)).length;s<o;s++)this._on(t[s],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=u(t);for(var s=1===arguments.length,o=0,r=t.length;o<r;o++)s?this._off(t[o]):this._off(t[o],e,i)}else delete this._events;return this},_on:function(t,e,i,n){if("function"==typeof e){if(!1===this._listens(t,e,i)){i===this&&(i=void 0);var s={fn:e,ctx:i};n&&(s.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(s)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,i){var n,s,o;if(this._events&&(n=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var r=this._listens(t,e,i);if(!1!==r){var a=n[r];this._firingCount&&(a.fn=l,this._events[t]=n=n.slice()),n.splice(r,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(s=0,o=n.length;s<o;s++)n[s].fn=l;delete this._events[t]}},fire:function(t,i,n){if(!this.listens(t,n))return this;var s=e({},i,{type:t,target:this,sourceTarget:i&&i.sourceTarget||this});if(this._events){var o=this._events[t];if(o){this._firingCount=this._firingCount+1||1;for(var r=0,a=o.length;r<a;r++){var l=o[r],h=l.fn;l.once&&this.off(t,h,l.ctx),h.call(l.ctx||this,s)}this._firingCount--}}return n&&this._propagateEvent(s),this},listens:function(t,e,i,n){"string"!=typeof t&&console.warn('"string" type argument expected');var s=e;"function"!=typeof e&&(n=!!e,s=void 0,i=void 0);var o=this._events&&this._events[t];if(o&&o.length&&!1!==this._listens(t,s,i))return!0;if(n)for(var r in this._eventParents)if(this._eventParents[r].listens(t,e,i,n))return!0;return!1},_listens:function(t,e,i){if(!this._events)return!1;var n=this._events[t]||[];if(!e)return!!n.length;i===this&&(i=void 0);for(var s=0,o=n.length;s<o;s++)if(n[s].fn===e&&n[s].ctx===i)return s;return!1},once:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e,!0);else for(var s=0,o=(t=u(t)).length;s<o;s++)this._on(t[s],e,i,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[o(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[o(t)],this},_propagateEvent:function(t){for(var i in this._eventParents)this._eventParents[i].fire(t.type,e({layer:t.target,propagatedFrom:t.target},t),!0)}};A.addEventListener=A.on,A.removeEventListener=A.clearAllEventListeners=A.off,A.addOneTimeEventListener=A.once,A.fireEvent=A.fire,A.hasEventListeners=A.listens;var P=S.extend(A);function C(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e}var T=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,i){return t instanceof C?t:g(t)?new C(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new C(t.x,t.y):new C(t,e,i)}function D(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function z(t,e){return!t||t instanceof D?t:new D(t,e)}function F(t,e){if(t)for(var i=e?[t,e]:t,n=0,s=i.length;n<s;n++)this.extend(i[n])}function R(t,e){return t instanceof F?t:new F(t,e)}function N(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)}
vendor: 4,175 bytes, line 2
2function B(t,e,i){return t instanceof N?t:g(t)&&"object"!=typeof t[0]?3===t.length?new N(t[0],t[1],t[2]):2===t.length?new N(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new N(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new N(t,e,i)}C.prototype={clone:function(){return new C(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(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 C(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new C(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=T(this.x),this.y=T(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}},D.prototype={extend:function(t){var e,i;if(!t)return this;if(t instanceof C||"number"==typeof t[0]||"x"in t)e=i=I(t);else if(e=(t=z(t)).min,i=t.max,!e||!i)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(i.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(i.y,this.max.y)):(this.min=e.clone(),this.max=i.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(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 e,i;return(t="number"==typeof t[0]||t instanceof C?I(t):z(t))instanceof D?(e=t.min,i=t.max):e=i=t,e.x>=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>=e.x&&n.x<=i.x,r=s.y>=e.y&&n.y<=i.y;return o&&r},overlaps:function(t){t=z(t);var e=this.min,i=this.max,n=t.min,s=t.max,o=s.x>e.x&&n.x<i.x,r=s.y>e.y&&n.y<i.y;return o&&r},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,i=this.max,n=Math.abs(e.x-i.x)*t,s=Math.abs(e.y-i.y)*t;return z(I(e.x-n,e.y-s),I(i.x+n,i.y+s))},equals:function(t){return!!t&&(t=z(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},F.prototype={extend:function(t){var e,i,n=this._southWest,s=this._northEast;if(t instanceof N)e=t,i=t;else{if(!(t instanceof F))return t?this.extend(B(t)||R(t)):this;if(e=t._southWest,i=t._northEast,!e||!i)return this}return n||s?(n.lat=Math.min(e.lat,n.lat),n.lng=Math.min(e.lng,n.lng),s.lat=Math.max(i.lat,s.lat),s.lng=Math.max(i.lng,s.lng)):(this._southWest=new N(e.lat,e.lng),this._northEast=new N(i.lat,i.lng)),this},pad:function(t){var e=this._southWest,i=this._northEast,n=Math.abs(e.lat-i.lat)*t,s=Math.abs(e.lng-i.lng)*t;return new F(new N(e.lat-n,e.lng-s),new N(i.lat+n,i.lng+s))},getCenter:function(){return new N((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 N(this.getNorth(),this.getWest())},getSouthEast:function(){return new N(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat}
vendor: 2,435 bytes, line 2
2,getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof N||"lat"in t?B(t):R(t);var e,i,n=this._southWest,s=this._northEast;return t instanceof F?(e=t.getSouthWest(),i=t.getNorthEast()):e=i=t,e.lat>=n.lat&&i.lat<=s.lat&&e.lng>=n.lng&&i.lng<=s.lng},intersects:function(t){t=R(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>=e.lat&&n.lat<=i.lat,r=s.lng>=e.lng&&n.lng<=i.lng;return o&&r},overlaps:function(t){t=R(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),s=t.getNorthEast(),o=s.lat>e.lat&&n.lat<i.lat,r=s.lng>e.lng&&n.lng<i.lng;return o&&r},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=R(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},N.prototype={equals:function(t,e){return!!t&&(t=B(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+h(this.lat,t)+", "+h(this.lng,t)+")"},distanceTo:function(t){return H.distance(this,B(t))},wrap:function(){return H.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,i=e/Math.cos(Math.PI/180*this.lat);return R([this.lat-e,this.lng-i],[this.lat+e,this.lng+i])},clone:function(){return new N(this.lat,this.lng,this.alt)}};var j,V={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},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 e=this.projection.bounds,i=this.scale(t);return new D(this.transformation.transform(e.min,i),this.transformation.transform(e.max,i))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?a(t.lng,this.wrapLng,!0):t.lng;return new N(this.wrapLat?a(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),i=this.wrapLatLng(e),n=e.lat-i.lat,s=e.lng-i.lng;if(0===n&&0===s)return t;
vendor: 7,824 bytes, line 2
2var o=t.getSouthWest(),r=t.getNorthEast();return new F(new N(o.lat-n,o.lng-s),new N(r.lat-n,r.lng-s))}},H=e({},V,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,s=e.lat*i,o=Math.sin((e.lat-t.lat)*i/2),r=Math.sin((e.lng-t.lng)*i/2),a=o*o+Math.cos(n)*Math.cos(s)*r*r,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),$=6378137,Z={R:$,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,i=this.MAX_LATITUDE,n=Math.max(Math.min(i,t.lat),-i),s=Math.sin(n*e);return new C(this.R*t.lng*e,this.R*Math.log((1+s)/(1-s))/2)},unproject:function(t){var e=180/Math.PI;return new N((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(j=$*Math.PI,new D([-j,-j],[j,j]))};function W(t,e,i,n){if(g(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=i,this._d=n}function q(t,e,i,n){return new W(t,e,i,n)}W.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new C((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var U=e({},H,{code:"EPSG:3857",projection:Z,transformation:function(){var t=.5/(Math.PI*Z.R);return q(t,.5,-t,.5)}()}),K=e({},U,{code:"EPSG:900913"});function Y(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function G(t,e){var i,n,s,o,r,a,l="";for(i=0,s=t.length;i<s;i++){for(n=0,o=(r=t[i]).length;n<o;n++)l+=(n?"L":"M")+(a=r[n]).x+" "+a.y;l+=e?Dt.svg?"z":"x":""}return l||"M0 0"}var X,J=document.documentElement.style,Q="ActiveXObject"in window,tt=Q&&!document.addEventListener,et="msLaunchUri"in navigator&&!("documentMode"in document),it=It("webkit"),nt=It("android"),st=It("android 2")||It("android 3"),ot=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),rt=nt&&It("Google")&&ot<537&&!("AudioNode"in window),at=!!window.opera,lt=!et&&It("chrome"),ht=It("gecko")&&!it&&!at&&!Q,ct=!lt&&It("safari"),ut=It("phantom"),dt="OTransition"in J,pt=0===navigator.platform.indexOf("Win"),ft=Q&&"transition"in J,mt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,gt="MozPerspective"in J,_t=!window.L_DISABLE_3D&&(ft||mt||gt)&&!dt&&!ut,vt="undefined"!=typeof orientation||It("mobile"),yt=vt&&it,bt=vt&&mt,xt=!window.PointerEvent&&window.MSPointerEvent,wt=!(!window.PointerEvent&&!xt),Mt="ontouchstart"in window||!!window.TouchEvent,kt=!window.L_NO_TOUCH&&(Mt||wt),Lt=vt&&at,Ot=vt&&ht,Et=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,St=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",l,e),window.removeEventListener("testPassiveEventSupport",l,e)}catch(t){}return t}(),At=!!document.createElement("canvas").getContext,Pt=!(!document.createElementNS||!Y("svg").createSVGRect),Ct=!!Pt&&((X=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(X.firstChild&&X.firstChild.namespaceURI)),Tt=!Pt&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function It(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Dt={ie:Q,ielt9:tt,edge:et,webkit:it,android:nt,android23:st,androidStock:rt,opera:at,chrome:lt,gecko:ht,safari:ct,phantom:ut,opera12:dt,win:pt,ie3d:ft,webkit3d:mt,gecko3d:gt,any3d:_t,mobile:vt,mobileWebkit:yt,mobileWebkit3d:bt,msPointer:xt,pointer:wt,touch:kt,touchNative:Mt,mobileOpera:Lt,mobileGecko:Ot,retina:Et,passiveEvents:St,canvas:At,svg:Pt,vml:Tt,inlineSvg:Ct,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},zt=Dt.msPointer?"MSPointerDown":"pointerdown",Ft=Dt.msPointer?"MSPointerMove":"pointermove",Rt=Dt.msPointer?"MSPointerUp":"pointerup",Nt=Dt.msPointer?"MSPointerCancel":"pointercancel",Bt={touchstart:zt,touchmove:Ft,touchend:Rt,touchcancel:Nt},jt={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&Re(e),Ut(t,e)},touchmove:Ut,touchend:Ut,touchcancel:Ut},Vt={},Ht=!1;function $t(t,e,i){return"touchstart"===e&&(Ht||(document.addEventListener(zt,Zt,!0),document.addEventListener(Ft,Wt,!0),document.addEventListener(Rt,qt,!0),document.addEventListener(Nt,qt,!0),Ht=!0)),jt[e]?(i=jt[e].bind(this,i),t.addEventListener(Bt[e],i,!1),i):(console.warn("wrong event specified:",e),l)}function Zt(t){Vt[t.pointerId]=t}function Wt(t){Vt[t.pointerId]&&(Vt[t.pointerId]=t)}function qt(t){delete Vt[t.pointerId]}function Ut(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],Vt)e.touches.push(Vt[i]);e.changedTouches=[e],t(e)}}var Kt,Yt,Gt,Xt,Jt,Qt=me(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),te=me(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),ee="webkitTransition"===te||"OTransition"===te?te+"End":"transitionend";function ie(t){return"string"==typeof t?document.getElementById(t):t}function ne(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function se(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function oe(t){var e=t.parentNode;e&&e.removeChild(t)}function re(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function ae(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function le(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function he(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=pe(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function ce(t,e){if(void 0!==t.classList)for(var i=u(e),n=0,s=i.length;n<s;n++)t.classList.add(i[n]);else if(!he(t,e)){var o=pe(t);de(t,(o?o+" ":"")+e)}}function ue(t,e){void 0!==t.classList?t.classList.remove(e):de(t,c((" "+pe(t)+" ").replace(" "+e+" "," ")))}function de(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function pe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function fe(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(t){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"}(t,e)}function me(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1}function ge(t,e,i){var n=e||new C(0,0);t.style[Qt]=(Dt.ie3d?"translate("+n.x+"px,"+n.y+"px)":"translate3d("+n.x+"px,"+n.y+"px,0)")+(i?" scale("+i+")":"")}function _e(t,e){t._leaflet_pos=e,Dt.any3d?ge(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function ve(t){return t._leaflet_pos||new C(0,0)}if("onselectstart"in document)Kt=function(){Ee(window,"selectstart",Re)},Yt=function(){Ae(window,"selectstart",Re)};else{var ye=me(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);Kt=function(){if(ye){var t=document.documentElement.style;Gt=t[ye],t[ye]="none"}},Yt=function(){ye&&(document.documentElement.style[ye]=Gt,Gt=void 0)}}function be(){Ee(window,"dragstart",Re)}function xe(){Ae(window,"dragstart",Re)}function we(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Me(),Xt=t,Jt=t.style.outlineStyle,t.style.outlineStyle="none",Ee(window,"keydown",Me))}function Me(){Xt&&(Xt.style.outlineStyle=Jt,Xt=void 0,Jt=void 0,Ae(window,"keydown",Me))}function ke(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Le(t){var e=t.getBoundingClientRect();
vendor: 1,064 bytes, line 2
2return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Oe={__proto__:null,TRANSFORM:Qt,TRANSITION:te,TRANSITION_END:ee,get:ie,getStyle:ne,create:se,remove:oe,empty:re,toFront:ae,toBack:le,hasClass:he,addClass:ce,removeClass:ue,setClass:de,getClass:pe,setOpacity:fe,testProp:me,setTransform:ge,setPosition:_e,getPosition:ve,get disableTextSelection(){return Kt},get enableTextSelection(){return Yt},disableImageDrag:be,enableImageDrag:xe,preventOutline:we,restoreOutline:Me,getSizedParentNode:ke,getScale:Le};function Ee(t,e,i,n){if(e&&"object"==typeof e)for(var s in e)Te(t,s,e[s],i);else for(var o=0,r=(e=u(e)).length;o<r;o++)Te(t,e[o],i,n);return this}var Se="_leaflet_events";function Ae(t,e,i,n){if(1===arguments.length)Pe(t),delete t[Se];else if(e&&"object"==typeof e)for(var s in e)Ie(t,s,e[s],i);else if(e=u(e),2===arguments.length)Pe(t,function(t){return-1!==_(e,t)});else for(var o=0,r=e.length;o<r;o++)Ie(t,e[o],i,n);return this}function Pe(t,e){for(var i in t[Se]){var n=i.split(/\d/)[0];e&&!e(n)||Ie(t,n,null,null,i)}}
vendor: 5,011 bytes, line 2
2var Ce={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function Te(t,e,i,n){var s=e+o(i)+(n?"_"+o(n):"");if(t[Se]&&t[Se][s])return this;var r=function(e){return i.call(n||t,e||window.event)},a=r;!Dt.touchNative&&Dt.pointer&&0===e.indexOf("touch")?r=$t(t,e,r):Dt.touch&&"dblclick"===e?r=function(t,e){t.addEventListener("dblclick",e);var i,n=0;function s(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var s=Be(t);if(!s.some(function(t){return t instanceof HTMLLabelElement&&t.attributes.for})||s.some(function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement})){var o=Date.now();o-n<=200?2===++i&&e(function(t){var e,i,n={};for(i in t)e=t[i],n[i]=e&&e.bind?e.bind(t):e;return t=n,n.type="dblclick",n.detail=2,n.isTrusted=!1,n._simulated=!0,n}(t)):i=1,n=o}}}else i=t.detail}return t.addEventListener("click",s),{dblclick:e,simDblclick:s}}(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ce[e]||e,r,!!Dt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,$e(t,e)&&a(e)},t.addEventListener(Ce[e],r,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,r),t[Se]=t[Se]||{},t[Se][s]=r}function Ie(t,e,i,n,s){s=s||e+o(i)+(n?"_"+o(n):"");var r=t[Se]&&t[Se][s];if(!r)return this;!Dt.touchNative&&Dt.pointer&&0===e.indexOf("touch")?function(t,e,i){Bt[e]?t.removeEventListener(Bt[e],i,!1):console.warn("wrong event specified:",e)}(t,e,r):Dt.touch&&"dblclick"===e?function(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}(t,r):"removeEventListener"in t?t.removeEventListener(Ce[e]||e,r,!1):t.detachEvent("on"+e,r),t[Se][s]=null}function De(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function ze(t){return Te(t,"wheel",De),this}function Fe(t){return Ee(t,"mousedown touchstart dblclick contextmenu",De),t._leaflet_disable_click=!0,this}function Re(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ne(t){return Re(t),De(t),this}function Be(t){if(t.composedPath)return t.composedPath();for(var e=[],i=t.target;i;)e.push(i),i=i.parentNode;return e}function je(t,e){if(!e)return new C(t.clientX,t.clientY);var i=Le(e),n=i.boundingClientRect;return new C((t.clientX-n.left)/i.x-e.clientLeft,(t.clientY-n.top)/i.y-e.clientTop)}var Ve=Dt.linux&&Dt.chrome?window.devicePixelRatio:Dt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function He(t){return Dt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Ve:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function $e(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var Ze={__proto__:null,on:Ee,off:Ae,stopPropagation:De,disableScrollPropagation:ze,disableClickPropagation:Fe,preventDefault:Re,stop:Ne,getPropagationPath:Be,getMousePosition:je,getWheelDelta:He,isExternalTarget:$e,addListener:Ee,removeListener:Ae},We=P.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=ve(t),this._offset=e.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=k(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;e<i?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var i=this._startPos.add(this._offset.multiplyBy(t));e&&i._round(),_e(this._el,i),this.fire("step")},_complete:function(){O(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),qe=P.extend({options:{crs:U,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,e){e=d(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=n(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(B(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=te&&Dt.any3d&&!Dt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),Ee(this._proxy,ee,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)}
vendor: 1,335 bytes, line 2
2,setView:function(t,i,n){return i=void 0===i?this._zoom:this._limitZoom(i),t=this._limitCenter(B(t),i,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&!0!==n&&(void 0!==n.animate&&(n.zoom=e({animate:n.animate},n.zoom),n.pan=e({animate:n.animate,duration:n.duration},n.pan)),this._zoom!==i?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,i,n.zoom):this._tryAnimatedPan(t,n.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,i,n.pan&&n.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Dt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Dt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),s=this.getSize().divideBy(2),o=(t instanceof C?t:this.latLngToContainerPoint(t)).subtract(s).multiplyBy(1-1/n),r=this.containerPointToLatLng(s.add(o));return this.setView(r,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():R(t);var i=I(e.paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),s=this.getBoundsZoom(t,!1,i.add(n));if((s="number"==typeof e.maxZoom?Math.min(e.maxZoom,s):s)===1/0)return{center:t.getCenter(),zoom:s};
vendor: 4,176 bytes, line 2
2var o=n.subtract(i).divideBy(2),r=this.project(t.getSouthWest(),s),a=this.project(t.getNorthEast(),s);return{center:this.unproject(r.add(a).divideBy(2).add(o),s),zoom:s}},fitBounds:function(t,e){if(!(t=R(t)).isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new We,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){ce(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,i){if(!1===(i=i||{}).animate||!Dt.any3d)return this.setView(t,e,i);this._stop();var n=this.project(this.getCenter()),s=this.project(t),o=this.getSize(),r=this._zoom;t=B(t),e=void 0===e?r:e;var a=Math.max(o.x,o.y),l=a*this.getZoomScale(r,e),h=s.distanceTo(n)||1,c=1.42,u=2.0164;function d(t){var e=(l*l-a*a+(t?-1:1)*u*u*h*h)/(2*(t?l:a)*u*h),i=Math.sqrt(e*e+1)-e;return i<1e-9?-18:Math.log(i)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}var m=d(0);function g(t){return a*(f(m)*(p(e=m+c*t)/f(e))-p(m))/u;var e}var _=Date.now(),v=(d(1)-m)/c,y=i.duration?1e3*i.duration:1e3*v*.8;return this._moveStart(!0,i.noMoveStart),function i(){var o=(Date.now()-_)/y,l=function(t){return 1-Math.pow(1-t,1.5)}(o)*v;o<=1?(this._flyToFrame=k(i,this),this._move(this.unproject(n.add(s.subtract(n).multiplyBy(g(l)/h)),r),this.getScaleZoom(a/function(t){return a*(f(m)/f(m+c*t))}(l),r),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}.call(this),this},flyToBounds:function(t,e){var i=this._getBoundsCenterZoom(t,e);return this.flyTo(i.center,i.zoom,e)},setMaxBounds:function(t){return t=R(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 e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,R(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=I(e.paddingBottomRight||e.padding||[0,0]),s=this.project(this.getCenter()),o=this.project(t),r=this.getPixelBounds(),a=z([r.min.add(i),r.max.subtract(n)]),l=a.getSize();if(!a.contains(o)){this._enforcingBounds=!0;var h=o.subtract(a.getCenter()),c=a.extend(o).getSize().subtract(l);s.x+=h.x<0?-c.x:c.x,s.y+=h.y<0?-c.y:c.y,this.panTo(this.unproject(s),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var s=this.getSize(),o=i.divideBy(2).round(),r=s.divideBy(2).round(),a=o.subtract(r);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(n(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:s})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()}
vendor: 11,943 bytes, line 2
2,locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=n(this._handleGeolocationResponse,this),s=n(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,s,t):navigator.geolocation.getCurrentPosition(i,s,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 e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new N(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var s=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(s,n.maxZoom):s)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var r in t.coords)"number"==typeof t.coords[r]&&(o[r]=t.coords[r]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(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(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),oe(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(O(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)oe(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=se("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},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();return new F(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=R(t),i=I(i||[0,0]);var n=this.getZoom()||0,s=this.getMinZoom(),o=this.getMaxZoom(),r=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=z(this.project(a,n),this.project(r,n)).getSize(),c=Dt.any3d?this.options.zoomSnap:1,u=l.x/h.x,d=l.y/h.y,p=e?Math.max(u,d):Math.min(u,d);return n=this.getScaleZoom(p,n),c&&(n=Math.round(n/(c/100))*(c/100),n=e?Math.ceil(n/c)*c:Math.floor(n/c)*c),Math.max(s,Math.min(o,n))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new C(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new D(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(B(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(B(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(B(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(R(t))},distance:function(t,e){return this.options.crs.distance(B(t),B(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(B(t)))},mouseEventToContainerPoint:function(t){return je(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 e=this._container=ie(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");Ee(e,"scroll",this._onScroll,this),this._containerId=o(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Dt.any3d,ce(t,"leaflet-container"+(Dt.touch?" leaflet-touch":"")+(Dt.retina?" leaflet-retina":"")+(Dt.ielt9?" leaflet-oldie":"")+(Dt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=ne(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(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),_e(this._mapPane,new C(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(ce(t.markerPane,"leaflet-zoom-hide"),ce(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){_e(this._mapPane,new C(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var s=this._zoom!==e;this._moveStart(s,i)._move(t,e)._moveEnd(s),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var s=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((s||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 O(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){_e(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[o(this._container)]=this;var e=t?Ae:Ee;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Dt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){O(this._resizeRequest),this._resizeRequest=k(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,e){for(var i,n=[],s="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((i=this._targets[o(r)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){a=!0;break}if(i&&i.listens(e,!0)){if(s&&!$e(r,t))break;if(n.push(i),s)break}if(r===this._container)break;r=r.parentNode}return n.length||a||s||!this.listens(e,!0)||(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&we(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var s=e({},t);s.type="preclick",this._fireDOMEvent(s,s.type,n)}var o=this._findEventTargets(t,i);if(n){for(var r=[],a=0;a<n.length;a++)n[a].listens(i,!0)&&r.push(n[a]);o=r.concat(o)}if(o.length){"contextmenu"===i&&Re(t);var l=o[0],h={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var c=l.getLatLng&&(!l._radius||l._radius<=10);h.containerPoint=c?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),h.layerPoint=this.containerPointToLayerPoint(h.containerPoint),h.latlng=c?l.getLatLng():this.layerPointToLatLng(h.layerPoint)}for(a=0;a<o.length;a++)if(o[a].fire(i,h,!0),h.originalEvent._stopped||!1===o[a].options.bubblingMouseEvents&&-1!==_(this._mouseEvents,i))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return ve(this._mapPane)||new C(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return z([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),s=this.getSize().divideBy(2),o=new D(n.subtract(s),n.add(s)),r=this._getBoundsOffset(o,i,e);return Math.abs(r.x)<=1&&Math.abs(r.y)<=1?t:this.unproject(n.add(r),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new D(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=z(this.project(e.getNorthEast(),i),this.project(e.getSouthWest
vendor: 4,156 bytes, line 2
2(),i)),s=n.min.subtract(t.min),o=n.max.subtract(t.max);return new C(this._rebound(s.x,-o.x),this._rebound(s.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=Dt.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){ue(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(i)||(this.panBy(i,e),0))},_createAnimProxy:function(){var t=this._proxy=se("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=Qt,i=this._proxy.style[e];ge(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),i===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){oe(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ge(this._proxy,this.project(t,e),this.getZoomScale(e,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,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),s=this._getCenterOffset(t)._divideBy(1-1/n);return!(!0!==i.animate&&!this.getSize().contains(s)||(k(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),0))},_animateZoom:function(t,e,i,s){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,ce(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:s}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(n(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&ue(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))}});var Ue=S.extend({options:{position:"topright"},initialize:function(t){d(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return ce(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(oe(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()}}),Ke=function(t){return new Ue(t)};qe.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=se("div",e+"control-container",this._container);function n(n,s){var o=e+n+" "+e+s;t[n+s]=se("div",o,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)oe(this._controlCorners[t]);oe(this._controlContainer),delete this._controlCorners,delete this._controlContainer}}
vendor: 6,404 bytes, line 2
2);var Ye=Ue.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i<n?-1:n<i?1:0}},initialize:function(t,e,i){for(var n in d(this,i),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[n],n);for(n in e)this._addLayer(e[n],n,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].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,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(o(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){ce(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?(ce(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):ue(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return ue(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=se("div",t),i=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Fe(e),ze(e);var n=this._section=se("section",t+"-list");i&&(this._map.on("click",this.collapse,this),Ee(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var s=this._layersLink=se("a",t+"-toggle",e);s.href="#",s.title="Layers",s.setAttribute("role","button"),Ee(s,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){Re(t),this._expandSafely()}},this),i||this.expand(),this._baseLayersList=se("div",t+"-base",n),this._separator=se("div",t+"-separator",n),this._overlaysList=se("div",t+"-overlays",n),e.appendChild(n)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&o(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,i){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:i}),this.options.sortLayers&&this._layers.sort(n(function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)},this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;re(this._baseLayersList),re(this._overlaysList),this._layerControlInputs=[];var t,e,i,n,s=0;for(i=0;i<this._layers.length;i++)n=this._layers[i],this._addItem(n),e=e||n.overlay,t=t||!n.overlay,s+=n.overlay?0:1;return this.options.hideSingleBase&&(t=t&&s>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(o(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",n=document.createElement("div");return n.innerHTML=i,n.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+o(this),n),this._layerControlInputs.push(e),e.layerId=o(t.layer),Ee(e,"click",this._onInputClick,this);var s=document.createElement("span");s.innerHTML=" "+t.name;var r=document.createElement("span");return i.appendChild(r),r.appendChild(e),r.appendChild(s),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],s=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||s.push(e);for(o=0;o<s.length;o++)this._map.hasLayer(s[o])&&this._map.removeLayer(s[o]);for(o=0;o<n.length;o++)this._map.hasLayer(n[o])||this._map.addLayer(n[o]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,i=this._layerControlInputs,n=this._map.getZoom(),s=i.length-1;s>=0;s--)t=i[s],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&n<e.options.minZoom||void 0!==e.options.maxZoom&&n>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,Ee(t,"click",Re),this.expand();var e=this;setTimeout(function(){Ae(t,"click",Re),e._preventClick=!1})}}),Ge=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 e="leaflet-control-zoom",i=se("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-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))}
vendor: 4,638 bytes, line 2
2,_createButton:function(t,e,i,n,s){var o=se("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Fe(o),Ee(o,"click",Ne),Ee(o,"click",s,this),Ee(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";ue(this._zoomInButton,e),ue(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(ce(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(ce(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});qe.mergeOptions({zoomControl:!0}),qe.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new Ge,this.addControl(this.zoomControl))});var Xe=Ue.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=se("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.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,e,i){t.metric&&(this._mScale=se("div",e,i)),t.imperial&&(this._iScale=se("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),i=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,i,e/t)},_updateImperial:function(t){var e,i,n,s=3.2808399*t;s>5280?(e=s/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(s),this._updateScale(this._iScale,n+" ft",n/s))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),Je=Ue.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Dt.inlineSvg?'<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> ':"")+"Leaflet</a>"},initialize:function(t){d(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=se("div","leaflet-control-attribution"),Fe(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].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 e in this._attributions)this._attributions[e]&&t.push(e);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> ')}}});qe.mergeOptions({attributionControl:!0}),qe.addInitHook(function(){this.options.attributionControl&&(new Je).addTo(this)});Ue.Layers=Ye,Ue.Zoom=Ge,Ue.Scale=Xe,Ue.Attribution=Je,Ke.layers=function(t,e,i){return new Ye(t,e,i)},Ke.zoom=function(t){return new Ge(t)},Ke.scale=function(t){return new Xe(t)},Ke.attribution=function(t){return new Je(t)};var Qe=S.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Qe.addTo=function(t,e){return t.addHandler(e,this),this};var ti={Events:A},ei=Dt.touch?"touchstart mousedown":"mousedown",ii=P.extend({options:{clickTolerance:3}
vendor: 2,894 bytes, line 2
2,initialize:function(t,e,i,n){d(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(Ee(this._dragStartTarget,ei,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ii._dragging===this&&this.finishDrag(!0),Ae(this._dragStartTarget,ei,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!he(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)ii._dragging===this&&this.finishDrag();else if(!(ii._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(ii._dragging=this,this._preventOutline&&we(this._element),be(),Kt(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,i=ke(this._element);this._startPoint=new C(e.clientX,e.clientY),this._startPos=ve(this._element),this._parentScale=Le(i);var n="mousedown"===t.type;Ee(document,n?"mousemove":"touchmove",this._onMove,this),Ee(document,n?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new C(e.clientX,e.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,Re(t),this._moved||(this.fire("dragstart"),this._moved=!0,ce(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),ce(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),_e(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){ue(document.body,"leaflet-dragging"),this._lastTarget&&(ue(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),Ae(document,"mousemove touchmove",this._onMove,this),Ae(document,"mouseup touchend touchcancel",this._onUp,this),xe(),Yt();var e=this._moved&&this._moving;this._moving=!1,ii._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function ni(t,e,i){var n,s,o,r,a,l,h,c,u,d=[1,4,2,8];for(s=0,h=t.length;s<h;s++)t[s]._code=pi(t[s],e);for(r=0;r<4;r++){for(c=d[r],n=[],s=0,o=(h=t.length)-1;s<h;o=s++)a=t[s],l=t[o],a._code&c?l._code&c||((u=di(l,a,c,e,i))._code=pi(u,e),n.push(u)):(l._code&c&&((u=di(l,a,c,e,i))._code=pi(u,e),n.push(u)),n.push(a));t=n}return t}function si(t,e){var i,n,s,o,r,a,l,h,c;if(!t||0===t.length)throw new Error("latlngs not passed");gi(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=B([0,0]),d=R(t);
vendor: 2,247 bytes, line 2
2d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(u=oi(t));var p=t.length,f=[];for(i=0;i<p;i++){var m=B(t[i]);f.push(e.project(B([m.lat-u.lat,m.lng-u.lng])))}for(a=l=h=0,i=0,n=p-1;i<p;n=i++)s=f[i],o=f[n],r=s.y*o.x-o.y*s.x,l+=(s.x+o.x)*r,h+=(s.y+o.y)*r,a+=3*r;c=0===a?f[0]:[l/a,h/a];var g=e.unproject(I(c));return B([g.lat+u.lat,g.lng+u.lng])}function oi(t){for(var e=0,i=0,n=0,s=0;s<t.length;s++){var o=B(t[s]);e+=o.lat,i+=o.lng,n++}return B([e/n,i/n])}var ri,ai={__proto__:null,clipPolygon:ni,polygonCenter:si,centroid:oi};function li(t,e){if(!e||!t.length)return t.slice();var i=e*e;return function(t,e){var i=t.length,n=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(i);n[0]=n[i-1]=1,ci(t,n,e,0,i-1);var s,o=[];for(s=0;s<i;s++)n[s]&&o.push(t[s]);return o}(t=function(t,e){for(var i=[t[0]],n=1,s=0,o=t.length;n<o;n++)fi(t[n],t[s])>e&&(i.push(t[n]),s=n);return s<o-1&&i.push(t[o-1]),i}(t,i),i)}function hi(t,e,i){return Math.sqrt(mi(t,e,i,!0))}function ci(t,e,i,n,s){var o,r,a,l=0;for(r=n+1;r<=s-1;r++)(a=mi(t[r],t[n],t[s],!0))>l&&(o=r,l=a);l>i&&(e[o]=1,ci(t,e,i,n,o),ci(t,e,i,o,s))}function ui(t,e,i,n,s){var o,r,a,l=n?ri:pi(t,i),h=pi(e,i);for(ri=h;;){if(!(l|h))return[t,e];if(l&h)return!1;a=pi(r=di(t,e,o=l||h,i,s),i),o===l?(t=r,l=a):(e=r,h=a)}}function di(t,e,i,n,s){var o,r,a=e.x-t.x,l=e.y-t.y,h=n.min,c=n.max;return 8&i?(o=t.x+a*(c.y-t.y)/l,r=c.y):4&i?(o=t.x+a*(h.y-t.y)/l,r=h.y):2&i?(o=c.x,r=t.y+l*(c.x-t.x)/a):1&i&&(o=h.x,r=t.y+l*(h.x-t.x)/a),new C(o,r,s)}function pi(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i}function fi(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n}function mi(t,e,i,n){var s,o=e.x,r=e.y,a=i.x-o,l=i.y-r,h=a*a+l*l;return h>0&&((s=((t.x-o)*a+(t.y-r)*l)/h)>1?(o=i.x,r=i.y):s>0&&(o+=a*s,r+=l*s)),a=t.x-o,l=t.y-r,n?a*a+l*l:new C(o,r)}function gi(t){return!g(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function _i(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),gi(t)}function vi(t,e){var i,n,s,o,r,a,l,h;if(!t||0===t.length)throw new Error("latlngs not passed");gi(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var c=B([0,0]),u=R(t);
vendor: 4,224 bytes, line 2
2u.getNorthWest().distanceTo(u.getSouthWest())*u.getNorthEast().distanceTo(u.getNorthWest())<1700&&(c=oi(t));var d=t.length,p=[];for(i=0;i<d;i++){var f=B(t[i]);p.push(e.project(B([f.lat-c.lat,f.lng-c.lng])))}for(i=0,n=0;i<d-1;i++)n+=p[i].distanceTo(p[i+1])/2;if(0===n)h=p[0];else for(i=0,o=0;i<d-1;i++)if(r=p[i],a=p[i+1],(o+=s=r.distanceTo(a))>n){l=(o-n)/s,h=[a.x-l*(a.x-r.x),a.y-l*(a.y-r.y)];break}var m=e.unproject(I(h));return B([m.lat+c.lat,m.lng+c.lng])}var yi={__proto__:null,simplify:li,pointToSegmentDistance:hi,closestPointOnSegment:function(t,e,i){return mi(t,e,i)},clipSegment:ui,_getEdgeIntersection:di,_getBitCode:pi,_sqClosestPointOnSegment:mi,isFlat:gi,_flat:_i,polylineCenter:vi},bi={project:function(t){return new C(t.lng,t.lat)},unproject:function(t){return new N(t.y,t.x)},bounds:new D([-180,-90],[180,90])},xi={R:6378137,R_MINOR:6356752.314245179,bounds:new D([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,s=this.R_MINOR/i,o=Math.sqrt(1-s*s),r=o*Math.sin(n),a=Math.tan(Math.PI/4-n/2)/Math.pow((1-r)/(1+r),o/2);return n=-i*Math.log(Math.max(a,1e-10)),new C(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,s=this.R_MINOR/n,o=Math.sqrt(1-s*s),r=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(r),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)e=o*Math.sin(a),e=Math.pow((1-e)/(1+e),o/2),a+=h=Math.PI/2-2*Math.atan(r*e)-a;return new N(a*i,t.x*i/n)}},wi={__proto__:null,LonLat:bi,Mercator:xi,SphericalMercator:Z},Mi=e({},H,{code:"EPSG:3395",projection:xi,transformation:function(){var t=.5/(Math.PI*xi.R);return q(t,.5,-t,.5)}()}),ki=e({},H,{code:"EPSG:4326",projection:bi,transformation:q(1/180,1,-1/180,.5)}),Li=e({},V,{projection:bi,transformation:q(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});V.Earth=H,V.EPSG3395=Mi,V.EPSG3857=U,V.EPSG900913=K,V.EPSG4326=ki,V.Simple=Li;var Oi=P.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[o(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[o(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});qe.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=o(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=o(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return o(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){for(var e=0,i=(t=t?g(t)?t:[t]:[]).length;e<i;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[o(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=o(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,i=this._getZoomSpan();for(var n in this._zoomBoundLayers){var s=this._zoomBoundLayers[n].options;t=void 0===s.minZoom?t:Math.min(t,s.minZoom),e=void 0===s.maxZoom?e:Math.max(e,s.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,i!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZo
vendor: 42,057 bytes, line 2
2om&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var Ei=Oi.extend({initialize:function(t,e){var i,n;if(d(this,e),this._layers={},t)for(i=0,n=t.length;i<n;i++)this.addLayer(t[i])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)(i=this._layers[e])[t]&&i[t].apply(i,n);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var i in this._layers)t.call(e,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 o(t)}}),Si=Ei.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),Ei.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),Ei.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 F;for(var e in this._layers){var i=this._layers[e];t.extend(i.getBounds?i.getBounds():i.getLatLng())}return t}}),Ai=S.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){d(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),n},_setIconStyles:function(t,e){var i=this.options,n=i[e+"Size"];"number"==typeof n&&(n=[n,n]);var s=I(n),o=I("shadow"===e&&i.shadowAnchor||i.iconAnchor||s&&s.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),s&&(t.style.width=s.x+"px",t.style.height=s.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Dt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});var Pi=Ai.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"string"!=typeof Pi.imagePath&&(Pi.imagePath=this._detectIconPath()),(this.options.imagePath||Pi.imagePath)+Ai.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,i){var n=e.exec(t);return n&&n[i]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=se("div","leaflet-default-icon-path",document.body),e=ne(t,"background-image")||ne(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var i=document.querySelector('link[href$="leaflet.css"]');return i?i.href.substring(0,i.href.length-11-1):""}}),Ci=Qe.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new ii(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),ce(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&&ue(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,i=e._map,n=this._marker.options.autoPanSpeed,s=this._marker.options.autoPanPadding,o=ve(e._icon),r=i.getPixelBounds(),a=i.getPixelOrigin(),l=z(r.min._subtract(a).add(s),r.max._subtract(a).subtract(s));if(!l.contains(o)){var h=I((Math.max(l.max.x,o.x)-l.max.x)/(r.max.x-l.max.x)-(Math.min(l.min.x,o.x)-l.min.x)/(r.min.x-l.min.x),(Math.max(l.max.y,o.y)-l.max.y)/(r.max.y-l.max.y)-(Math.min(l.min.y,o.y)-l.min.y)/(r.min.y-l.min.y)).multiplyBy(n);i.panBy(h,{animate:!1}),this._draggable._newPos._add(h),this._draggable._startPos._add(h),_e(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=k(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&&(O(this._panRequest),this._panRequest=k(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,i=e._shadow,n=ve(e._icon),s=e._map.layerPointToLatLng(n);i&&_e(i,n),e._latlng=s,t.latlng=s,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){O(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),Ti=Oi.extend({options:{icon:new Pi,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,e){d(this,e),this._latlng=B(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 e=this._latlng;return this._latlng=B(t),this.update(),this.fire("move",{oldLatLng:e,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,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),"IMG"===i.tagName&&(i.alt=t.alt||"")),ce(i,e),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&&Ee(i,"focus",this._panOnFocus,this);var s=t.icon.createShadow(this._shadow),o=!1;s!==this._shadow&&(this._removeShadow(),o=!0),s&&(ce(s,e),s.alt=""),this._shadow=s,t.opacity<1&&this._updateOpacity(),n&&this.getPane().appendChild(this._icon),this._initInteraction(),s&&o&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&Ae(this._icon,"focus",this._panOnFocus,this),oe(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&oe(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&_e(this._icon,t),this._shadow&&_e(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 e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(ce(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),Ci)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new Ci(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&&fe(this._icon,t),this._shadow&&fe(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,i=e.iconSize?I(e.iconSize):I(0,0),n=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:n,paddingBottomRight:i.subtract(n)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});var Ii=Oi.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 d(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)}}),Di=Ii.extend({options:{fill:!0,radius:10},initialize:function(t,e){d(this,e),this._latlng=B(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=B(t),this.redraw(),this.fire("move",{oldLatLng:e,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 e=t&&t.radius||this._radius;return Ii.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new D(this._point.subtract(n),this._point.add(n))},_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()}});var zi=Di.extend({initialize:function(t,i,n){if("number"==typeof i&&(i=e({},n,{radius:i})),d(this,i),this._latlng=B(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 F(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:Ii.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,i=this._map,n=i.options.crs;if(n.distance===H.distance){var s=Math.PI/180,o=this._mRadius/H.R/s,r=i.project([e+o,t]),a=i.project([e-o,t]),l=r.add(a).divideBy(2),h=i.unproject(l).lat,c=Math.acos((Math.cos(o*s)-Math.sin(e*s)*Math.sin(h*s))/(Math.cos(e*s)*Math.cos(h*s)))/s;(isNaN(c)||0===c)&&(c=o/Math.cos(Math.PI/180*e)),this._point=l.subtract(i.getPixelOrigin()),this._radius=isNaN(c)?0:l.x-i.project([h,t-c]).x,this._radiusY=l.y-r.y}else{var u=n.unproject(n.project(this._latlng).subtract([this._mRadius,0]));this._point=i.latLngToLayerPoint(this._latlng),this._radius=this._point.x-i.latLngToLayerPoint(u).x}this._updateBounds()}});var Fi=Ii.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){d(this,e),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 e,i,n=1/0,s=null,o=mi,r=0,a=this._parts.length;r<a;r++)for(var l=this._parts[r],h=1,c=l.length;h<c;h++){var u=o(t,e=l[h-1],i=l[h],!0);u<n&&(n=u,s=o(t,e,i))}return s&&(s.distance=Math.sqrt(n)),s},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return vi(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=B(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new F,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return gi(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=gi(t),n=0,s=t.length;n<s;n++)i?(e[n]=B(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new D;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(),e=new C(t,t);this._rawPxBounds&&(this._pxBounds=new D([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,i){var n,s,o=t[0]instanceof N,r=t.length;if(o){for(s=[],n=0;n<r;n++)s[n]=this._map.latLngToLayerPoint(t[n]),i.extend(s[n]);e.push(s)}else for(n=0;n<r;n++)this._projectLatlngs(t[n],e,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;else{var e,i,n,s,o,r,a,l=this._parts;for(e=0,n=0,s=this._rings.length;e<s;e++)for(i=0,o=(a=this._rings[e]).length;i<o-1;i++)(r=ui(a[i],a[i+1],t,i,!0))&&(l[n]=l[n]||[],l[n].push(r[0]),r[1]===a[i+1]&&i!==o-2||(l[n].push(r[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;i<n;i++)t[i]=li(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var i,n,s,o,r,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(i=0,o=this._parts.length;i<o;i++)for(n=0,s=(r=(a=this._parts[i]).length)-1;n<r;s=n++)if((e||0!==n)&&hi(t,a[s],a[n])<=l)return!0;return!1}});Fi._flat=_i;var Ri=Fi.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 si(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=Fi.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof N&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){Fi.prototype._setLatLngs.call(this,t),gi(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return gi(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new C(e,e);if(t=new D(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var n,s=0,o=this._rings.length;s<o;s++)(n=ni(this._rings[s],t,!0)).length&&this._parts.push(n)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,i,n,s,o,r,a,l,h=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(s=0,a=this._parts.length;s<a;s++)for(o=0,r=(l=(e=this._parts[s]).length)-1;o<l;r=o++)i=e[o],n=e[r],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||Fi.prototype._containsPoint.call(this,t,!0)}});var Ni=Si.extend({initialize:function(t,e){d(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,s=g(t)?t:t.features;if(s){for(e=0,i=s.length;e<i;e++)((n=s[e]).geometries||n.geometry||n.features||n.coordinates)&&this.addData(n);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var r=Bi(t,o);return r?(r.feature=qi(t),r.defaultOptions=r.options,this.resetStyle(r),o.onEachFeature&&o.onEachFeature(t,r),this.addLayer(r)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=e({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer(function(e){this._setLayerStyle(e,t)},this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function Bi(t,e){var i,n,s,o,r="Feature"===t.type?t.geometry:t,a=r?r.coordinates:null,l=[],h=e&&e.pointToLayer,c=e&&e.coordsToLatLng||Vi;if(!a&&!r)return null;switch(r.type){case"Point":return ji(h,t,i=c(a),e);case"MultiPoint":for(s=0,o=a.length;s<o;s++)i=c(a[s]),l.push(ji(h,t,i,e));return new Si(l);case"LineString":case"MultiLineString":return n=Hi(a,"LineString"===r.type?0:1,c),new Fi(n,e);case"Polygon":case"MultiPolygon":return n=Hi(a,"Polygon"===r.type?1:2,c),new Ri(n,e);case"GeometryCollection":for(s=0,o=r.geometries.length;s<o;s++){var u=Bi({geometry:r.geometries[s],type:"Feature",properties:t.properties},e);u&&l.push(u)}return new Si(l);case"FeatureCollection":for(s=0,o=r.features.length;s<o;s++){var d=Bi(r.features[s],e);d&&l.push(d)}return new Si(l);default:throw new Error("Invalid GeoJSON object.")}}function ji(t,e,i,n){return t?t(e,i):new Ti(i,n&&n.markersInheritOptions&&n)}function Vi(t){return new N(t[1],t[0],t[2])}function Hi(t,e,i){for(var n,s=[],o=0,r=t.length;o<r;o++)n=e?Hi(t[o],e-1,i):(i||Vi)(t[o]),s.push(n);return s}function $i(t,e){return void 0!==(t=B(t)).alt?[h(t.lng,e),h(t.lat,e),h(t.alt,e)]:[h(t.lng,e),h(t.lat,e)]}function Zi(t,e,i,n){for(var s=[],o=0,r=t.length;o<r;o++)s.push(e?Zi(t[o],gi(t[o])?0:e-1,i,n):$i(t[o],n));return!e&&i&&s.length>0&&s.push(s[0].slice()),s}function Wi(t,i){return t.feature?e({},t.feature,{geometry:i}):qi(i)}function qi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var Ui={toGeoJSON:function(t){return Wi(this,{type:"Point",coordinates:$i(this.getLatLng(),t)})}};function Ki(t,e){return new Ni(t,e)}Ti.include(Ui),zi.include(Ui),Di.include(Ui),Fi.include({toGeoJSON:function(t){var e=!gi(this._latlngs);return Wi(this,{type:(e?"Multi":"")+"LineString",coordinates:Zi(this._latlngs,e?1:0,!1,t)})}}),Ri.include({toGeoJSON:function(t){var e=!gi(this._latlngs),i=e&&!gi(this._latlngs[0]),n=Zi(this._latlngs,i?2:e?1:0,!0,t);return e||(n=[n]),Wi(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),Ei.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),Wi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return this.eachLayer(function(e){if(e.toGeoJSON){var s=e.toGeoJSON(t);if(i)n.push(s.geometry);else{var o=qi(s);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i?Wi(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var Yi=Ki,Gi=Oi.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=R(e),d(this,i)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(ce(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){oe(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&&ae(this._image),this},bringToBack:function(){return this._map&&le(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=R(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="IMG"===this._url.tagName,e=this._image=t?this._url:se("img");ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onload=n(this.fire,this,"load"),e.onerror=n(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ge(this._image,i,e)},_reset:function(){var t=this._image,e=new D(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();_e(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){fe(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(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()}}),Xi=Gi.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:se("video");if(ce(e,"leaflet-image-layer"),this._zoomAnimated&&ce(e,"leaflet-zoom-animated"),this.options.className&&ce(e,this.options.className),e.onselectstart=l,e.onmousemove=l,e.onloadeddata=n(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),s=[],o=0;o<i.length;o++)s.push(i[o].src);this._url=i.length>0?s:[e.src]}else{g(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var r=0;r<this._url.length;r++){var a=se("source");a.src=this._url[r],e.appendChild(a)}}}});var Ji=Gi.extend({_initImage:function(){var t=this._image=this._url;ce(t,"leaflet-image-layer"),this._zoomAnimated&&ce(t,"leaflet-zoom-animated"),this.options.className&&ce(t,this.options.className),t.onselectstart=l,t.onmousemove=l}});var Qi=Oi.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof N||g(t))?(this._latlng=B(t),d(this,e)):(d(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).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&&fe(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&fe(this._container,1),this.bringToFront(),this.options.interactive&&(ce(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(fe(this._container,0),this._removeTimeout=setTimeout(n(oe,void 0,this._container),200)):oe(this._container),this.options.interactive&&(ue(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=B(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&&ae(this._container),this},bringToBack:function(){return this._map&&le(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Si){e=null;var i=this._source._layers;for(var n in i)if(i[n]._map){e=i[n];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),i=this._getAnchor();this._zoomAnimated?_e(this._container,t.add(i)):e=e.add(t).add(i);var n=this._containerBottom=-e.y,s=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=n+"px",this._container.style.left=s+"px"}},_getAnchor:function(){return[0,0]}});qe.include({_initOverlay:function(t,e,i,n){var s=e;return s instanceof t||(s=new t(n).setContent(e)),i&&s.setLatLng(i),s}}),Oi.include({_initOverlay:function(t,e,i,n){var s=i;return s instanceof t?(d(s,n),s._source=this):(s=e&&!n?e:new t(n,this)).setContent(i),s}});var tn=Qi.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).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Qi.prototype.openOn.call(this,t)},onAdd:function(t){Qi.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof Ii||this._source.on("preclick",De))},onRemove:function(t){Qi.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof Ii||this._source.off("preclick",De))},getEvents:function(){var t=Qi.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?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",e=this._container=se("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),i=this._wrapper=se("div",t+"-content-wrapper",e);if(this._contentNode=se("div",t+"-content",i),Fe(e),ze(this._contentNode),Ee(e,"contextmenu",De),this._tipContainer=se("div",t+"-tip-container",e),this._tip=se("div",t+"-tip",this._tipContainer),this.options.closeButton){var n=this._closeButton=se("a",t+"-close-button",e);n.setAttribute("role","button"),n.setAttribute("aria-label","Close popup"),n.href="#close",n.innerHTML='<span aria-hidden="true">&#215;</span>',Ee(n,"click",function(t){Re(t),this.close()},this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var i=t.offsetWidth;i=Math.min(i,this.options.maxWidth),i=Math.max(i,this.options.minWidth),e.width=i+1+"px",e.whiteSpace="",e.height="";var n=t.offsetHeight,s=this.options.maxHeight,o="leaflet-popup-scrolled";s&&n>s?(e.height=s+"px",ce(t,o)):ue(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();_e(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(ne(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,s=new C(this._containerLeft,-i-this._containerBottom);s._add(ve(this._container));var o=t.layerPointToContainerPoint(s),r=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||r),l=I(this.options.autoPanPaddingBottomRight||r),h=t.getSize(),c=0,u=0;o.x+n+l.x>h.x&&(c=o.x+n-h.x+l.x),o.x-c-a.x<0&&(c=o.x-a.x),o.y+i+l.y>h.y&&(u=o.y+i-h.y+l.y),o.y-u-a.y<0&&(u=o.y-a.y),(c||u)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([c,u]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});qe.mergeOptions({closePopupOnClick:!0}),qe.include({openPopup:function(t,e,i){return this._initOverlay(tn,t,e,i).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Oi.include({bindPopup:function(t,e){return this._popup=this._initOverlay(tn,this._popup,t,e),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 Si||(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()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ne(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof Ii?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var en=Qi.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Qi.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){Qi.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=Qi.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=se("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+o(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,s=this._container,o=n.latLngToContainerPoint(n.getCenter()),r=n.layerPointToContainerPoint(t),a=this.options.direction,l=s.offsetWidth,h=s.offsetHeight,c=I(this.options.offset),u=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):"center"===a?(e=l/2,i=h/2):"right"===a?(e=0,i=h/2):"left"===a?(e=l,i=h/2):r.x<o.x?(a="right",e=0,i=h/2):(a="left",e=l+2*(c.x+u.x),i=h/2),t=t.subtract(I(e,i,!0)).add(c).add(u),ue(s,"leaflet-tooltip-right"),ue(s,"leaflet-tooltip-left"),ue(s,"leaflet-tooltip-top"),ue(s,"leaflet-tooltip-bottom"),ce(s,"leaflet-tooltip-"+a),_e(s,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&fe(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}});qe.include({openTooltip:function(t,e,i){return this._initOverlay(en,t,e,i).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Oi.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(en,this._tooltip,t,e),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 e=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[e](i),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Si||(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 e="function"==typeof t.getElement&&t.getElement();e&&(Ee(e,"focus",function(){this._tooltip._source=t,this.openTooltip()},this),Ee(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.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 e=this;this._map.once("moveend",function(){e._openOnceFlag=!1,e._openTooltip(t)})}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,i,n=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),i=this._map.containerPointToLayerPoint(e),n=this._map.layerPointToLatLng(i)),this._tooltip.setLatLng(n)}});var nn=Ai.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),i=this.options;if(i.html instanceof Element?(re(e),e.appendChild(i.html)):e.innerHTML=!1!==i.html?i.html:"",i.bgPos){var n=I(i.bgPos);e.style.backgroundPosition=-n.x+"px "+-n.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});Ai.Default=Pi;var sn=Oi.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Dt.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){d(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),oe(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(ae(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(le(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=r(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 C?t:new C(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-1/0,1/0),s=0,o=i.length;s<o;s++)e=i[s].style.zIndex,i[s]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Dt.ielt9){fe(this._container,this.options.opacity);var t=+new Date,e=!1,i=!1;for(var n in this._tiles){var s=this._tiles[n];if(s.current&&s.loaded){var o=Math.min(1,(t-s.loaded)/200);fe(s.el,o),o<1?e=!0:(s.active?i=!0:this._onOpaqueTile(s),s.active=!0)}}i&&!this._noPrune&&this._pruneTiles(),e&&(O(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this))}},_onOpaqueTile:l,_initContainer:function(){this._container||(this._container=se("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,e=this.options.maxZoom;if(void 0!==t){for(var i in this._levels)i=Number(i),this._levels[i].el.children.length||i===t?(this._levels[i].el.style.zIndex=e-Math.abs(t-i),this._onUpdateLevel(i)):(oe(this._levels[i].el),this._removeTilesAtZoom(i),this._onRemoveLevel(i),delete this._levels[i]);var n=this._levels[t],s=this._map;return n||((n=this._levels[t]={}).el=se("div","leaflet-tile-container leaflet-zoom-animated",this._container),n.el.style.zIndex=e,n.origin=s.project(s.unproject(s.getPixelOrigin()),t).round(),n.zoom=t,this._setZoomTransform(n,s.getCenter(),s.getZoom()),n.el.offsetWidth,this._onCreateLevel(n)),this._level=n,n}},_onUpdateLevel:l,_onRemoveLevel:l,_onCreateLevel:l,_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)oe(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0}
vendor: 4,955 bytes, line 2
2,_retainParent:function(t,e,i,n){var s=Math.floor(t/2),o=Math.floor(e/2),r=i-1,a=new C(+s,+o);a.z=+r;var l=this._tileCoordsToKey(a),h=this._tiles[l];return h&&h.active?(h.retain=!0,!0):(h&&h.loaded&&(h.retain=!0),r>n&&this._retainParent(s,o,r,n))},_retainChildren:function(t,e,i,n){for(var s=2*t;s<2*t+2;s++)for(var o=2*e;o<2*e+2;o++){var r=new C(s,o);r.z=i+1;var a=this._tileCoordsToKey(r),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),i+1<n&&this._retainChildren(s,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,i,n){var s=Math.round(e);s=void 0!==this.options.maxZoom&&s>this.options.maxZoom||void 0!==this.options.minZoom&&s<this.options.minZoom?void 0:this._clampZoom(s);var o=this.options.updateWhenZooming&&s!==this._tileZoom;n&&!o||(this._tileZoom=s,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==s&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var n=this._map.getZoomScale(i,t.zoom),s=t.origin.multiplyBy(n).subtract(this._map._getNewPixelOrigin(e,i)).round();Dt.any3d?ge(t.el,s,n):_e(t.el,s)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,s=this._map.getPixelWorldBounds(this._tileZoom);s&&(this._globalTileRange=this._pxBoundsToTileRange(s)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),s=e.project(t,this._tileZoom).floor(),o=e.getSize().divideBy(2*n);return new D(s.subtract(o),s.add(o))},_update:function(t){var e=this._map;if(e){var i=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),s=this._pxBoundsToTileRange(n),o=s.getCenter(),r=[],a=this.options.keepBuffer,l=new D(s.getBottomLeft().subtract([a,-a]),s.getTopRight().add([a,-a]));if(!(isFinite(s.min.x)&&isFinite(s.min.y)&&isFinite(s.max.x)&&isFinite(s.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var h in this._tiles){var c=this._tiles[h].coords;c.z===this._tileZoom&&l.contains(new C(c.x,c.y))||(this._tiles[h].current=!1)}if(Math.abs(i-this._tileZoom)>1)this._setView(t,i);else{for(var u=s.min.y;u<=s.max.y;u++)for(var d=s.min.x;d<=s.max.x;d++){var p=new C(d,u);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:r.push(p)}}if(r.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==r.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<r.length;d++)this._addTile(r[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return R(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),s=n.add(i);return[e.unproject(n,t.z),e.unproject(s,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new F(e[0],e[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 e=t.split(":"),i=new C(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(oe(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){ce(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=l,t.onmousemove=l,Dt.ielt9&&this.options.opacity<1&&fe(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),s=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),n(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&k(n(this._tileReady,this,t,null,o)),_e(o,i),this._tiles[s]={el:o,c
vendor: 6,071 bytes, line 2
2oords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var s=this._tileCoordsToKey(t);(i=this._tiles[s])&&(i.loaded=+new Date,this._map._fadeAnimated?(fe(i.el,0),O(this._fadeFrame),this._fadeFrame=k(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(ce(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Dt.ielt9||!this._map._fadeAnimated?k(this._pruneTiles,this):setTimeout(n(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new C(this._wrapX?a(t.x,this._wrapX):t.x,this._wrapY?a(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new D(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});var on=sn.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=d(this,e)).detectRetina&&Dt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return Ee(i,"load",n(this._tileOnLoad,this,e,i)),Ee(i,"error",n(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var i={r:Dt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=n),i["-y"]=n}return m(this._url,e(i,this.options))},_tileOnLoad:function(t,e){Dt.ielt9?setTimeout(n(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=l,e.onerror=l,!e.complete)){e.src=v;var i=this._tiles[t].coords;oe(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",v),sn.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==v))return sn.prototype._tileReady.call(this,t,e,i)}});function rn(t,e){return new on(t,e)}var an=on.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,i){this._url=t;var n=e({},this.defaultWmsParams);for(var s in i)s in this.options||(n[s]=i[s]);var o=(i=d(this,i)).detectRetina&&Dt.retina?2:1,r=this.getTileSize();n.width=r.x*o,n.height=r.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,on.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=z(i.project(e[0]),i.project(e[1])),s=n.min,o=n.max,r=(this._wmsVersion>=1.3&&this._crs===ki?[s.y,s.x,o.y,o.x]:[s.x,s.y,o.x,o.y]).join(","),a=on.prototype.getTileUrl.call(this,t);return a+p(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+r},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});on.WMS=an,rn.wms=function(t,e){return new an(t,e)};var ln=Oi.extend({options:{padding:.1},initialize:function(t){d(this,t),o(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),ce(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,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),s=this._map.project(this._center,e),o=n.multiplyBy(-i).add(s).subtract(this._map._getNewPixelOrigin(t,e));Dt.any3d?ge(this._container,o,i):_e(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),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,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).roun
vendor: 5,439 bytes, line 2
2d();this._bounds=new D(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),hn=ln.extend({options:{tolerance:0},getEvents:function(){var t=ln.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){ln.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");Ee(t,"mousemove",this._onMouseMove,this),Ee(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),Ee(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){O(this._redrawRequest),delete this._ctx,oe(this._container),Ae(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){ln.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=Dt.retina?2:1;_e(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",Dt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){ln.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[o(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[o(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("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),s=[];for(i=0;i<n.length;i++){if(e=Number(n[i]),isNaN(e))return;s.push(e)}t.options._dashArray=s}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||k(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new D,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_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 e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.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,e=this._redrawBounds;if(this._ctx.save(),e){var i=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,i.x,i.y),this._ctx.clip()}this._drawing=!0;for(var n=this._drawFirst;n;n=n.next)t=n.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var i,n,s,o,r=t._parts,a=r.length,l=this._ctx;if(a){for(l.beginPath(),i=0;i<a;i++){for(n=0,s=r[i].length;n<s;n++)o=r[i][n],l[n?"lineTo":"moveTo"](o.x,o.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,i=this._ctx,n=Math.max(Math.round(t._radius),1),s=(Math.max(Math.round(t._radiusY),1)||n)/n;1!==s&&(i.save(),i.scale(1,s)),i.beginPath(),i.arc(e.x,e.y/s,n,0,2*Math.PI,!1),1!==s&&i.restore(),this._fillStroke(i,t)}},_fillStroke:function(t,e){var i=e.options;i.fill&&(t.globalAlpha=i.fillOpacity,t.fillStyle=i.fillColor||i.color,t.fill(i.fillRule||"evenodd")),i.stroke&&0!==i.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.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 e,i,n=this._map.mouseEventToLayerPoint(t),s=this._drawFirst;s;s=s.next)(e=s.layer).options.interactive&&e._containsPoint(n)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(i=e);this._fireEvent(!!i&&[i],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(ue(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var i,s,o=this._drawFirst;o;o=o.next)(i=o.layer).options.interactive&&i._containsPoint(e)&&(s=i);s!==this._hoveredLayer&&(this._handleMouseOut(t),s&&(ce(this._container,"leaflet-interactive"),this._fireEvent([s],t,"mouseover"),this._hoveredLayer=s)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(n(function(){this._mouseHoverThrottled=!1},this),32)}}
vendor: 5,351 bytes, line 2
2,_fireEvent:function(t,e,i){this._map._fireDOMEvent(e,i||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;i&&(i.prev=n,n?n.next=i:i&&(this._drawFirst=i),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var i=e.next,n=e.prev;n&&(n.next=i,i?i.prev=n:n&&(this._drawLast=n),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function cn(t){return Dt.canvas?new hn(t):null}var un=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),dn={_initContainer:function(){this._container=se("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(ln.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=un("shape");ce(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=un("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;oe(e),t.removeInteractiveTarget(e),delete this._layers[o(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,s=t._container;s.stroked=!!n.stroke,s.filled=!!n.fill,n.stroke?(e||(e=t._stroke=un("stroke")),s.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=g(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(s.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=un("fill")),s.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(s.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){ae(t._container)},_bringToBack:function(t){le(t._container)}},pn=Dt.vml?un:Y,fn=ln.extend({_initContainer:function(){this._container=pn("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=pn("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){oe(this._container),Ae(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){ln.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),_e(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=pn("path");t.options.className&&ce(e,t.options.className),t.options.interactive&&ce(e,"leaflet-interactive"),this._updateStyle(t),this._layers[o(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){oe(t._path),t.removeInteractiveTarget(t._path),delete this._layers[o(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,G(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n="a"+i+","+(Math.max(Math.round(t._radiusY),1)||i)+" 0 1,0 ",s=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+n+2*i+",0 "+n+2*-i+",0 ";this._setPath(t,s)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){ae(t._path)},_bringToBack:function(t){le(t._path)}});function mn(t){return Dt.svg||Dt.vml?new fn(t):null}Dt.vml&&fn.include(dn),qe.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&cn(t)||mn(t)}});var gn=Ri.extend({initialize:function(t,e){Ri.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))}
vendor: 12,261 bytes, line 2
2,_boundsToLatLngs:function(t){return[(t=R(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});fn.create=pn,fn.pointsToPath=G,Ni.geometryToLayer=Bi,Ni.coordsToLatLng=Vi,Ni.coordsToLatLngs=Hi,Ni.latLngToCoords=$i,Ni.latLngsToCoords=Zi,Ni.getFeature=Wi,Ni.asFeature=qi,qe.mergeOptions({boxZoom:!0});var _n=Qe.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(){Ee(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){Ae(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){oe(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),Kt(),be(),this._startPoint=this._map.mouseEventToContainerPoint(t),Ee(document,{contextmenu:Ne,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=se("div","leaflet-zoom-box",this._container),ce(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new D(this._point,this._startPoint),i=e.getSize();_e(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(oe(this._box),ue(this._container,"leaflet-crosshair")),Yt(),xe(),Ae(document,{contextmenu:Ne,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(n(this._resetState,this),0);var e=new F(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});qe.addInitHook("addHandler","boxZoom",_n),qe.mergeOptions({doubleClickZoom:!0});var vn=Qe.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,s=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(s):e.setZoomAround(t.containerPoint,s)}});qe.addInitHook("addHandler","doubleClickZoom",vn),qe.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var yn=Qe.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ii(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))}ce(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){ue(this._map._container,"leaflet-grab"),ue(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 e=R(this._map.options.maxBounds);this._offsetLimit=z(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.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 e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}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),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,s=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,r=Math.abs(s+i)<Math.abs(o+i)?s:o;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=r},_onDragEnd:function(t){var e=this._map,i=e.options,n=!i.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),n)e.fire("moveend");else{this._prunePositions(+new Date);var s=this._lastPos.subtract(this._positions[0]),o=(this._lastTime-this._times[0])/1e3,r=i.easeLinearity,a=s.multiplyBy(r/o),l=a.distanceTo([0,0]),h=Math.min(i.inertiaMaxSpeed,l),c=a.multiplyBy(h/l),u=h/(i.inertiaDeceleration*r),d=c.multiplyBy(-u/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),k(function(){e.panBy(d,{duration:u,easeLinearity:r,noMoveStart:!0,animate:!0})})):e.fire("moveend")}}});qe.addInitHook("addHandler","dragging",yn),qe.mergeOptions({keyboard:!0,keyboardPanDelta:80});var bn=Qe.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"),Ee(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(),Ae(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,e=document.documentElement,i=t.scrollTop||e.scrollTop,n=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(n,i)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,i,n=this._panKeys={},s=this.keyCodes;for(e=0,i=s.left.length;e<i;e++)n[s.left[e]]=[-1*t,0];for(e=0,i=s.right.length;e<i;e++)n[s.right[e]]=[t,0];for(e=0,i=s.down.length;e<i;e++)n[s.down[e]]=[0,t];for(e=0,i=s.up.length;e<i;e++)n[s.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,i,n=this._zoomKeys={},s=this.keyCodes;for(e=0,i=s.zoomIn.length;e<i;e++)n[s.zoomIn[e]]=t;for(e=0,i=s.zoomOut.length;e<i;e++)n[s.zoomOut[e]]=-t},_addHooks:function(){Ee(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){Ae(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,i=t.keyCode,n=this._map;if(i in this._panKeys){if(!n._panAnim||!n._panAnim._inProgress)if(e=this._panKeys[i],t.shiftKey&&(e=I(e).multiplyBy(3)),n.options.maxBounds&&(e=n._limitOffset(I(e),n.options.maxBounds)),n.options.worldCopyJump){var s=n.wrapLatLng(n.unproject(n.project(n.getCenter()).add(e)));n.panTo(s)}else n.panBy(e)}else if(i in this._zoomKeys)n.setZoom(n.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[i]);else{if(27!==i||!n._popup||!n._popup.options.closeOnEscapeKey)return;n.closePopup()}Ne(t)}}});qe.addInitHook("addHandler","keyboard",bn),qe.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var xn=Qe.extend({addHooks:function(){Ee(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){Ae(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=He(t),i=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var s=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(n(this._performZoom,this),s),Ne(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),i=this._map.options.zoomSnap||0;t._stop();var n=this._delta/(4*this._map.options.wheelPxPerZoomLevel),s=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,o=i?Math.ceil(s/i)*i:s,r=t._limitZoom(e+(this._delta>0?o:-o))-e;this._delta=0,this._startTime=null,r&&("center"===t.options.scrollWheelZoom?t.setZoom(e+r):t.setZoomAround(this._lastMousePos,e+r))}});qe.addInitHook("addHandler","scrollWheelZoom",xn);qe.mergeOptions({tapHold:Dt.touchNative&&Dt.safari&&Dt.mobile,tapTolerance:15});var wn=Qe.extend({addHooks:function(){Ee(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){Ae(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new C(e.clientX,e.clientY),this._holdTimeout=setTimeout(n(function(){this._cancel(),this._isTapValid()&&(Ee(document,"touchend",Re),Ee(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),Ee(document,"touchend touchcancel contextmenu",this._cancel,this),Ee(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){Ae(document,"touchend",Re),Ae(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),Ae(document,"touchend touchcancel contextmenu",this._cancel,this),Ae(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new C(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});qe.addInitHook("addHandler","tapHold",wn),qe.mergeOptions({touchZoom:Dt.touch,bounceAtZoomLimits:!0});var Mn=Qe.extend({addHooks:function(){ce(this._map._container,"leaflet-touch-zoom"),Ee(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){ue(this._map._container,"leaflet-touch-zoom"),Ae(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),Ee(document,"touchmove",this._onTouchMove,this),Ee(document,"touchend touchcancel",this._onTouchEnd,this),Re(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),s=e.mouseEventToContainerPoint(t.touches[1]),o=i.distanceTo(s)/this._startDist;if(this._zoom=e.getScaleZoom(o,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMin
2Zoom()&&o<1||this._zoom>e.getMaxZoom()&&o>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===o)return}else{var r=i._add(s)._divideBy(2)._subtract(this._centerPoint);if(1===o&&0===r.x&&0===r.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(r),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),O(this._animRequest);var a=n(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=k(a,this,!0),Re(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,O(this._animRequest),Ae(document,"touchmove",this._onTouchMove,this),Ae(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))):this._zooming=!1}});qe.addInitHook("addHandler","touchZoom",Mn),qe.BoxZoom=_n,qe.DoubleClickZoom=vn,qe.Drag=yn,qe.Keyboard=bn,qe.ScrollWheelZoom=xn,qe.TapHold=wn,qe.TouchZoom=Mn,t.Bounds=D,t.Browser=Dt,t.CRS=V,t.Canvas=hn,t.Circle=zi,t.CircleMarker=Di,t.Class=S,t.Control=Ue,t.DivIcon=nn,t.DivOverlay=Qi,t.DomEvent=Ze,t.DomUtil=Oe,t.Draggable=ii,t.Evented=P,t.FeatureGroup=Si,t.GeoJSON=Ni,t.GridLayer=sn,t.Handler=Qe,t.Icon=Ai,t.ImageOverlay=Gi,t.LatLng=N,t.LatLngBounds=F,t.Layer=Oi,t.LayerGroup=Ei,t.LineUtil=yi,t.Map=qe,t.Marker=Ti,t.Mixin=ti,t.Path=Ii,t.Point=C,t.PolyUtil=ai,t.Polygon=Ri,t.Polyline=Fi,t.Popup=tn,t.PosAnimation=We,t.Projection=wi,t.Rectangle=gn,t.Renderer=ln,t.SVG=fn,t.SVGOverlay=Ji,t.TileLayer=on,t.Tooltip=en,t.Transformation=W,t.Util=E,t.VideoOverlay=Xi,t.bind=n,t.bounds=z,t.canvas=cn,t.circle=function(t,e,i){return new zi(t,e,i)},t.circleMarker=function(t,e){return new Di(t,e)},t.control=Ke,t.divIcon=function(t){return new nn(t)},t.extend=e,t.featureGroup=function(t,e){return new Si(t,e)},t.geoJSON=Ki,t.geoJson=Yi,t.gridLayer=function(t){return new sn(t)},t.icon=function(t){return new Ai(t)},t.imageOverlay=function(t,e,i){return new Gi(t,e,i)},t.latLng=B,t.latLngBounds=R,t.layerGroup=function(t,e){return new Ei(t,e)},t.map=function(t,e){return new qe(t,e)},t.marker=function(t,e){return new Ti(t,e)},t.point=I,t.polygon=function(t,e){return new Ri(t,e)},t.polyline=function(t,e){return new Fi(t,e)},t.popup=function(t,e){return new tn(t,e)},t.rectangle=function(t,e){return new gn(t,e)},t.setOptions=d,t.stamp=o,t.svg=mn,t.svgOverlay=function(t,e,i){return new Ji(t,e,i)},t.tileLayer=rn,t.tooltip=function(t,e){return new en(t,e)},t.transformation=q,t.version="1.9.4",t.videoOverlay=function(t,e,i){return new Xi(t,e,i)};var kn=window.L;t.noConflict=function(){return window.L=kn,this},window.L=t}(e)},3506:(t,e,i)=>{"use strict";var n=i(3925),s=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o("Can't set "+s(t)+" as a prototype")}},3589:(t,e,i)=>{"use strict";class n{constructor(t){this.compare=t,this.heapArray=[],this._limit=0}static getChildrenIndexOf(t){return[2*t+1,2*t+2]}static getParentIndexOf(t){if(t<=0)return-1;const e=t%2?1:2;return Math.floor((t-e)/2)}push(t){return this._sortNodeUp(this.heapArray.push(t)-1),!0}length(){return this.heapArray.length}peek(){return this.heapArray[0]}pop(){const t=this.heapArray.pop();return this.length()>0&&void 0!==t?this.replace(t):t}replace(t){const e=this.heapArray[0];return this.heapArray[0]=t,this._sortNodeDown(0),e}size(){return this.length()}_moveNode(t,e){[this.heapArray[t],this.heapArray[e]]=[this.heapArray[e],this.heapArray[t]]}_sortNodeDown(t){let e=t<this.heapArray.length-1;const i=this.heapArray[t],s=(t,e)=>(this.heapArray.length>e&&this.compare(this.heapArray[e],this.heapArray[t])<0&&(t=e),t);for(;e;){const o=n.getChildrenIndexOf(t),r=o.reduce(s,o[0]),a=this.heapArray[r];void 0!==a&&this.compare(i,a)>0?(this._moveNode(t,r),t=r):e=!1}}_sortNodeUp(t){let e=t>0;for(;e;){const i=n.getParentIndexOf(t);i>=0&&this.compare(this.heapArray[i],this.heapArray[t])>0?(this._moveNode(t,i),t=i):e=!1}}}function s(t,e){return t.prio-e.prio||t.counter-e.counter}class o{constructor(t,e){this.maxConcurrent=t||1,this.minCycle=e||0,this.queueRunning=new Map,this.queueWaiting=new n(s),this.lastRun=0,this.nextTimer=null,this.counter=0}tryRun(){for(;this.queueWaiting.size()>0&&this.queueRunning.size<this.maxConcurrent;){if(Date.now()-this.lastRun<this.minCycle)return void(null===this.nextTimer&&(this.nextTimer=new Promise(t=>setTimeout(()=>{this.nextTimer=null,this.tryRun(),t()},this.minCycle-Date.now()+this.lastRun))));const t=this.queueWaiting.pop();if(void 0!==t){let e;const i={wait:new Promise(t=>{e=t}),signal:e},n={hash:t.hash,prio:t.prio,finish:i};if(this.queueRunning.has(t.hash))throw new Error("async-await-queue: duplicate hash "+t.hash);this.queueRunning.set(t.hash,n),this.lastRun=Date.now(),t.start.signal()}}}end(t){const e=this.queueRunning.get(t);if(void 0===e)throw new Error("async-await-queue: queue desync for "+t);this.queueRunning.delete(t),e.finish.signal(),this.tryRun()}async wait(t,e){const i=null!=e?e:0;let n;const s=new Promise(t=>{n=t}),o={hash:t,prio:i,start:{signal:n,wait:s},counter:this.counter++};this.queueWaiting.push(o),this.tryRun(),await s,this.lastRun=Date.now()}run(t,e){const i=null!=e?e:0,n=Symbol();return this.wait(n,i).then(t).finally(()=>{this.end(n)})}stat(){return{running:this.queueRunning.size,waiting:this.queueWaiting.size(),last:this.lastRun}}async flush(t){for(;this.queueRunning.size>0||this.queueWaiting.size()>0;){const e=this.queueWaiting.peek();if(e&&await e.start.wait,void 0!==t&&this.queueWaiting.size()<t)return;if(this.queueRunning.size>0){const t=this.queueRunning.values().next().value;await t.finish.wait}}}}
2var r=i(4954),a=i(3220);const l=new o(10),h=new o(1),c=(t,e,i=null,n=null)=>{let s=null;(0,r.A)(t,async n=>{if(null!==i||null===s)for(const o of n){const r=Symbol(`parallel+ ${t}`),a=Symbol(`serial+ ${t}`),c=h.wait(a);if(null===s){await l.wait(r);try{s=await e(o)}catch(t){await c,h.end(a)}finally{l.end(r)}}if(null===s||null===i)return await c,void h.end(a);await c;try{await i(s,o,n)}finally{h.end(a)}}},async e=>{if(null!==s&&null!==n)for(const i of e){const e=Symbol(`serial- ${t}`);await h.wait(e);try{await n(i,s)}finally{h.end(e)}}})},u={},d=(t,e,i,n=null,s=!1)=>{const o=((t,e)=>`${Array.isArray(t)?t.sort().join(";"):t}--${e}`)(t,e);null===n&&null!==u[o]||(0,a.on)(t,e,async t=>{s&&t.preventDefault();const e=Symbol(`asyncOn-parallel ${o}`),r=Symbol(`asyncOn-serial ${o}`),a=h.wait(r);await l.wait(e);try{void 0===u[o]&&(u[o]=await i())}catch(t){throw await a,h.end(r),t}finally{l.end(e)}if(null===n)return await a,void h.end(r);await a;try{await n(u[o],t)}finally{h.end(r)}})};c("[data-controller]",()=>Promise.resolve().then(i.bind(i,5116))),(0,a.on)("click","[data-switch-class], [data-switch-class] *",t=>{const e=t.target,i=e.closest("[data-switch-class]");null!==e.closest("a")&&t.preventDefault(),function(t,e=!1){let i=t.getAttribute("data-switch-target"),n=t.getAttribute("data-switch-class"),s=[];if(!1===e&&(e=t.getAttribute("data-switch-method")),null!==n){s=null===i?[t]:document.querySelectorAll(i);for(let t=0;t<s.length;t++)switch(e){case"add":s[t].classList.add(n);break;case"remove":s[t].classList.remove(n);break;default:s[t].classList.toggle(n)}}}(i)});const p="_listenerToken";(0,r.A)("img[data-preview]",t=>{for(let e of t){const t=e.dataset.preview;e[p]=(0,a.on)("change",t,t=>{t.target.value&&m(t)?(e.classList.add("has-file"),f(t,e)):e.classList.remove("has-file")})}},t=>{for(let e of t)p in e&&((0,a.A)(e[p]),delete e[p])}),(0,r.A)("p[data-preview]",t=>{for(let e of t){const t=e.dataset.preview;e[p]=(0,a.on)("change",t,t=>{const i=t.target.value.replace(/.*[\/\\]/,"");e.innerHTML=i,f(t,e)})}},t=>{for(let e of t)p in e&&((0,a.A)(e[p]),delete e[p])});const f=(t,e)=>{const i=t.target.files;if(i.length<1)return;const n=new FileReader;n.addEventListener("load",t=>{e.src=t.target.result},{once:!0}),n.readAsDataURL(i[0])},m=t=>{const e=t.target.files;return!(e.length<1)&&e[0].type.match("image.*")};c(".period--datepicker",()=>Promise.all([i.e(6802),i.e(9311)]).then(i.bind(i,9311)),(t,e)=>t.init(e),(t,e)=>e.destroy(t)),(0,a.on)("change",".calendar-range",t=>{const{target:e}=t;void 0!==e.value&&10===e.value.length&&t.stopImmediatePropagation()}),d("click","button[data-modal-ajax]",()=>i.e(8615).then(i.bind(i,8615)),(t,e)=>t.default(e)),d("click","button[data-modal-close]",()=>i.e(3617).then(i.bind(i,3617)),(t,e)=>t.default(e)),d("submit","form[data-modal-form-submit]",()=>i.e(5379).then(i.bind(i,5379)),(t,e)=>t.default(e),!0),c("[data-modal-lightbox][data-modal-lightbox-index]",()=>i.e(9582).then(i.bind(i,9582))),c("[data-modal-target]",()=>i.e(722).then(i.bind(i,722)));var g=i(867),_=i(5649);const v=()=>{const t=document.querySelectorAll(".main-nav__parent-wrapper.active");t.length>0&&t.forEach(t=>{t.classList.toggle("active"),t.querySelector(".main-nav__link--has-children").classList.toggle("main-nav__link--active"),t.querySelector(".menu__children").classList.toggle("is-open")})};document.addEventListener("touchstart",t=>{"desktop"!==(0,g.A)()||t.target.classList.contains("main-nav__link")||v()}),(0,a.on)("touchstart",".main-nav__link--has-children",t=>{if("desktop"===(0,g.A)()){const e=t.target,i=e.parentElement,n=i.querySelector(".menu__children");i.classList.contains("active")||(t.preventDefault(),n.classList.toggle("is-open"),v()),e.classList.toggle("main-nav__link--active"),i.classList.toggle("active")}},{passive:!1});const y=(t,e)=>{36!==e?35===e&&t[t.length-1].focus():t[0].focus()};(0,a.on)("keydown",".main-nav__link",t=>{const{keyCode:e}=t,i=35,n=36,s=37,o=38,r=39,a=40;if(!([i,n,s,o,r,a].indexOf(e)>-1))return;t.preventDefault();const l=t.target,h=l.closest(".main-nav__parent-wrapper"),c=h.querySelector(".main-nav__link-parent"),u=Array.from((0,_.A)(".main-nav__link-parent"));if([s,r].indexOf(e)>-1)((t,e,i)=>{const n=t.indexOf(e);37!==i?39===i&&(t[n+1]||t[0]).focus():(t[n-1]||t[t.length-1]).focus()})(u,c,e);else{if(l.classList.contains("main-nav__link-parent")){if(e===a&&l.classList.contains("main-nav__link--has-children"))return void l.nextElementSibling.querySelector(".main-nav__link-child").focus();if([n,i].indexOf(e)>-1)return void y(u,e)}if(l.classList.contains("main-nav__link-child")){const s=Array.from((0,_.A)(".main-nav__link-child",h)),r=s.indexOf(t.target);if(e===o)return 0===r?void c.focus():void(s[r-1]||s[0]).focus();if(e===a)return void(s[r+1]||s[0]).focus();[n,i].indexOf(e)>-1&&y(s,e)}}}),(0,a.on)("keydown",".main-header.navigation-is-open :focus",t=>{if("Tab"!==t.key)return;const e=t.target.closest(".main-header.navigation-is-open"),i=Array.from((0,_.A)(["a:not(.header__skiplink)",'[tabindex="0"]',"input:not([disabled])","button:not([disabled])"],e)).filter(t=>"hidden"!==window.getComputedStyle(t).visibility&&t.offsetWidth>0&&t.offsetHeight>0);if(!i.length)return;const n=i[0],s=i[i.length-1];if(t.shiftKey){if(document.activeElement!==n)return;return s.focus(),void t.preventDefault()}
2document.activeElement===s&&(n.focus(),t.preventDefault())}),c(".js-flatpickr input:first-child",()=>Promise.all([i.e(6802),i.e(5834)]).then(i.bind(i,5834)),(t,e)=>t.default(e)),c(".js-timepicker input:not(.flatpickr-mobile)",()=>Promise.all([i.e(6802),i.e(2329)]).then(i.bind(i,2329)),(t,e)=>t.default(e)),c("[data-show-selector][data-show-on]",()=>i.e(9136).then(i.bind(i,9136)),(t,e)=>t.default(e));var b=i(2),x=i(9470);let w,M=[],k=!0;const L=async t=>{for(const e of t){if(!w){const t=await Promise.all([i.e(2793),i.e(8887)]).then(i.bind(i,8887));w=t.default}if((0,x.A)(".is-active",e))continue;const t=(0,b.o5)(e);k&&t||w(e,(0,b._P)(t,M))}};(0,r.A)(".splide__carousel",L);let O=!1;(0,a.on)("cookie_types_accepted","body",t=>{if(!(0,b.e6)()){if(M=M.concat(t.detail),k)return k=!1,void L((0,_.A)(".splide__carousel"));(0,x.A)("[data-cookie-enable-on]")&&(O||(window.location.reload(),O=!0))}});const E=t=>{const e=t.closest(".splide__video");if(!e)return;const i=t.width/t.height,n=e.offsetHeight,s=e.offsetWidth;let o=s,r=n;i>s/n?o=n*i:r=s/i,t.style.minWidth=`${Math.ceil(o)}px`,t.style.minHeight=`${Math.ceil(r)}px`,t.setAttribute("tabindex",-1)};(0,r.A)('.splide__slide[data-show-controls="0"] iframe',t=>{for(const e of t)E(e)}),window.addEventListener("resize",()=>{for(const t of(0,_.A)('.splide__slide[data-show-controls="0"] iframe'))E(t)}),(0,a.on)("click","[data-class-toggle-source]",t=>{const{target:e}=t,i=e.dataset.classToggleSource;if(!i)return;const n=i.split(","),s=e.closest(`[data-class-toggle-parent="${i}"]`);if(s)return void n.forEach(t=>s.classList.toggle(t));const o=e.closest(`[data-class-toggle-container="${i}"]`);if(!o)return;const r=`[data-class-toggle-target="${i}"]`;for(const t of(0,_.A)(r,o))n.forEach(e=>t.classList.toggle(e))}),(0,a.on)("keydown",'[data-a11y="close"], [data-a11y="close"] a, [data-a11y="close"] button, [data-a11y="close"] input',t=>{const e=t.target,{keyCode:i}=t;27===i&&e.blur()}),(0,a.on)("mousemove",'[data-a11y="close"], [data-a11y="close"] *',t=>{const e=t.target.closest('[data-a11y="close"]');function i(){e.classList.remove("hover--disabled"),document.removeEventListener("mouseout",i)}function n(t){const{keyCode:s}=t;27===s&&e.classList.add("hover--disabled"),document.removeEventListener("keydown",n),document.addEventListener("mousemove",i)}document.addEventListener("keydown",n),document.addEventListener("mouseout",function t(){document.removeEventListener("keydown",n),document.removeEventListener("mouseout",t)})}),(0,a.on)("keydown",'[data-a11y="focusarray"] :focus',t=>{const{keyCode:e}=t;if(9!==e)return;const i=t.target.closest('[data-a11y="focusarray"]'),n=Array.from((0,_.A)(["a","button"],i)).filter(t=>"hidden"!==window.getComputedStyle(t).visibility);if(!n)return;const s=n[0],o=n[n.length-1];if(t.shiftKey){if(document.activeElement!==s)return;return o.focus(),void t.preventDefault()}document.activeElement===o&&(s.focus(),t.preventDefault())}),d("click","[data-active-toggle]",()=>i.e(5250).then(i.bind(i,5250)),(t,e)=>t.default(e)),d("cookie_types_accepted","body",()=>i.e(9172).then(i.bind(i,9172)),(t,e)=>t.default(e)),c("[data-copy-text]",()=>i.e(6822).then(i.bind(i,6822))),c(".back_link-wrapper",()=>i.e(5521).then(i.bind(i,5521)),(t,e)=>t.default(e)),c("[data-form-message]",()=>i.e(2862).then(i.bind(i,2862)),(t,e)=>t.default(e)),c('[data-form-submit="button"]',()=>i.e(1806).then(i.bind(i,1806))),(0,a.on)("click keydown","[data-tabpanel]",t=>{const{target:e,keyCode:i}=t,n=e.closest('[role="tablist"]'),s=37,o=39,r=35,a=36;if(null===n)return;const l=(0,x.A)(".tabs__tab.tabs__tab--active",n);if(null===l)return;const h=(0,x.A)(".tabs__tab-link",l);if(null===h)return;const c=(0,x.A)(`#${h.dataset.tabpanel}`);if(null===c)return;const u=(0,x.A)(`#${e.dataset.tabpanel}`);if(null!==u){if([s,o,a,r].indexOf(i)>-1){t.preventDefault();const e=Array.from((0,_.A)("[data-tabpanel]")),l=e.indexOf(h);if(i===s){const t=e[l-1]||e[n.length-1];return t.focus(),void t.click()}if(i===o){const t=e[l+1]||e[0];return t.focus(),void t.click()}if(i===a){const t=e[0];return t.focus(),void t.click()}if(i===r){const t=e[e.length-1];return t.focus(),void t.click()}}l.classList.remove("tabs__tab--active"),h.removeAttribute("aria-selected"),h.setAttribute("tabindex",-1),c.setAttribute("aria-hidden",!0),e.closest(".tabs__tab").classList.add("tabs__tab--active"),e.setAttribute("aria-selected",!0),e.setAttribute("tabindex",0),u.removeAttribute("aria-hidden")}}),(0,a.on)("click","[data-toggle-page-scroll]",()=>{document.body.classList.toggle("scroll-disabled")});const S=t=>{new IntersectionObserver(([{isIntersecting:t,target:e}])=>{(0,x.A)(`[aria-controls="${e.id}"]`).setAttribute("aria-expanded",t?"true":"false")},{threshold:0}).observe(t)};for(const t of(0,_.A)("[aria-haspopup][aria-expanded][aria-controls]")){const e=`#${t.getAttribute("aria-controls")}`,i=(0,x.A)(e);i&&S(i)}
2c("[data-mimic-input]",()=>i.e(3649).then(i.bind(i,3649)),(t,e)=>t.default(e)),d(["click","keyup"],"[data-clear-field]",()=>i.e(2961).then(i.bind(i,2961)),(t,e)=>t.default(e));const A="input[type=checkbox][data-uncheck]";d("click",A,()=>i.e(9301).then(i.bind(i,9301)),(t,e)=>t.default(A,e)),d("change",'input[data-summary-label]:not([type="search"]),select[data-summary-label]',()=>i.e(3690).then(i.bind(i,3690)),(t,e)=>t.default(e)),d("change","select[data-order-field]",()=>i.e(250).then(i.bind(i,250)),(t,e)=>t.default(e));const P="select[data-coordinate-field]";d("change",P,()=>i.e(4331).then(i.bind(i,6712)),(t,e)=>t.handleChange(e.target,P)),c(P,async()=>i.e(4331).then(i.bind(i,6712)),(t,e)=>t.handleObserve(e,P)),d(["input","change","mouseup"],"[data-slider-name] input[data-slider-sibling]",()=>i.e(4235).then(i.bind(i,4235)),(t,e)=>t.default(e)),(0,a.on)("submit","form",t=>{for(const e of(0,_.A)("[data-slider-sibling]",t.target))e.disabled=!0}),d("click","[data-trigger-tom-select]",()=>i.e(6486).then(i.bind(i,6486)),(t,e)=>t.default(e)),d("mouseover","[data-drag]",()=>i.e(422).then(i.bind(i,422)),(t,e)=>t.default(e)),i(8789);const C="form[data-auto-submit]";var T;d("change",`${C} :is(input,select,textbox):not([data-auto-submit-disabled])`,()=>i.e(6597).then(i.bind(i,6597)),(t,e)=>t.default(e)),(0,r.A)(C,t=>{for(const e of t){const t=document.createElement("button");t.setAttribute("type","button"),t.disabled=!0,t.hidden=!0,e.prepend(t)}}),c(".odp-list-container[data-odp-list-ajax-url]",()=>i.e(2763).then(i.bind(i,2763)),(t,e)=>t.default(e)),(0,a.on)("click",".route-detail-directions-wrapper > ul > li, .route-detail-directions-wrapper > ol > li",t=>{t.target.classList.toggle("is-active")}),c("[data-route-tab]",t=>"none"===window.getComputedStyle(t).display?null:i.e(8150).then(i.bind(i,8150)),t=>t.default()),d("click","[data-openingtimes-loadmore]",()=>i.e(3435).then(i.bind(i,3435)),(t,e)=>t.default(e)),i(5116).default.load((T=i(3811)).keys().map(t=>function(t,e){const i=function(t){const e=(t.match(/^(?:\.\/)?(.+)(?:[/_-]controller\..+?)$/)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}(e);if(i)return function(t,e){const i=t.default;if("function"==typeof i)return{identifier:e,controllerConstructor:i}}(t(e),i)}(T,t)).filter(t=>t));const I=t=>{let e;try{e=window[t];const i="__storage_test__";return e.setItem(i,i),e.removeItem(i),!0}catch(t){return t instanceof DOMException&&(22===t.code||1014===t.code||"QuotaExceededError"===t.name||"NS_ERROR_DOM_QUOTA_REACHED"===t.name)&&e&&0!==e.length}},D=t=>I("localStorage")?window.localStorage.getItem(t):null,z=window;function F(t){z.dataLayer.push(t)}void 0===z.dataLayer&&(z.dataLayer=[]);var R=i(8385);const N=document,B=N.querySelector("[data-cookie-bar]"),j="cookie.preferences";function V(){null!==B&&B.hasAttribute("open")&&B.close()}function H(t){try{return JSON.parse(t)}catch(t){return!1}}function $(){return N.querySelectorAll("[data-cookie-accept]")}function Z(t){const e=D(j);if(null===e)return[];const i=H(e);return null===i?[]:i[t]||[]}function W(){return Z("types")}function q(){(0,R.A)("cookie_types_accepted",document.body,!0,!0,W())}function U(t,e,i){const n=JSON.stringify({version:i,types:t,consentTypes:e});((t,e)=>{I("localStorage")&&window.localStorage.setItem(t,e)})(j,n),q()}function K(t,e){!function(t){for(const e of t){const t=N.querySelectorAll(`[data-cookie-require="${e}"]`);for(const e of t){const t=document.createElement("script");for(const i of e.attributes)t.setAttribute(i.name,i.value);t.innerHTML=e.innerHTML,e.parentNode.replaceChild(t,e)}}}(t),function(t,e){const i={};for(const t of e)t&&(i[t]="granted");Object.keys(i).length>0&&function(){z.dataLayer.push(arguments)}("consent","update",i),F({event:"enableCookie",cookieTypes:t.join(",")});for(const e of t)F({event:"enableCookie",cookieType:e});F({event:"cookieConsentUpdate"})}(t,e)}!function(t){const e=document.readyState;"interactive"!==e&&"complete"!==e?document.addEventListener("DOMContentLoaded",t,{once:!0}):t()}(()=>{K(W(),Z("consentTypes")),(0,r.A)("[data-cookie-accept]",t=>{for(const e of t)for(const t of W())e.dataset.cookieAccept===t&&(e.checked=!0)});const t=N.querySelector("[data-cookie-version]"),e=t&&parseInt(t.dataset.cookieVersion);q(),(0,a.on)("click","[data-cookie-save]",()=>{!function(){for(const t of N.querySelectorAll("[data-cookie-require]"))t.type="text/plain"}();const t=Array.from(function*(){for(const t of $())t.checked&&(yield t.dataset.cookieAccept)}()),i=Array.from(function*(){for(const t of $())if(t.checked){const e=(t.dataset.cookieConsentTypes||"").split(",");for(const t of e)t&&(yield t)}}());U(t,i,e),K(t,i),V()},{capture:!0}),(0,a.on)("click","[data-cookie-accept-all]",t=>{const{dataset:i}=t.target,n=i.cookieAcceptAll.split(","),s=(i.cookieConsentTypes||"").split(",");U(n,s,e),K(n,s),V()},{once:!0}),function(t){const e=D(j);if(null===e)return!1;const i=H(e);return i&&i.version>=t}(e)||null!==B&&(B.show(),N.body.prepend(B))}),(0,a.on)("touchend",".toptask__task-full-clickable:not(.hover)",t=>{window.matchMedia("(min-width: 768px)").matches&&(t.target.classList.add("hover"),t.preventDefault())}),(0,a.on)("touchend",".content-grid__tile--has-content .hover-tap:not(.hover)",t=>{t.target.classList.add("hover"),t.preventDefault()}),i(2953);const Y=()=>{const t=document.body.classList,e=document.querySelector(".main-header").classList,i=document.querySelector(".main-header__nav").classList;t.toggle("scroll-disabled"),e.toggle("navigation-is-open"),i.toggle("is-open")},G=()=>{const t=document.querySelector(".main-header__nav");if(!t)return;if("desktop"!==(0,g.A)()){const e=document.querySelector(".main-nav__overlay");return t.parentElement.appendChild(t),void e.parentElement.appendChild(e)}const e=document.body.classList,i=document.querySelector(".main-header").classList,n=t.classList;e.remove("scroll-disabled"),i.remove("navigation-is-open"),n.remove("is-open");for(const t of(0,_.A)(".menu__children"))t.style.maxHeight=null};G(),window.addEventListener("resize",()=>{G()}),(0,a.on)("click",".handles__link--menu, .main-nav__overlay",()=>{Y()}),(0,a.on)("keydown",".main-header__nav.is-open a",t=>{const{keyCode:e}=t;27===e&&Y()}),(0,a.on)("click",".main-nav__link--has-children",t=>{const e=t.target,i=e.classList;document.querySelector(".main-header").classList.contains("navigation-is-open")&&!i.contains("is-open")&&(t.preventDefault(),(t=>{for(const t of(0,_.A)(".main-nav__link--has-children.is-open"))t.classList.remove("is-open");t.classList.add("is-open")})(e))});const X=(0,x.A)(".main-header"),J=()=>{document.documentElement.scrollTop>25?X.classList.add("main-header--sticky"):X.classList.remove("main-header--sticky")};window.addEventListener("scroll",()=>{J()},{passive:!0}),J()},3706:(t,e,i)=>{"use strict";var n=i(9504),s=i(4901),o=i(7629),r=n(Function.toString);s(o.inspectSource)||(o.inspectSource=function(t){return r(t)}),t.exports=o.inspectSource},3717:(t,e)=>{"use strict";e.f=Object.getOwnPropertySymbols},3724:(t,e,i)=>{"use strict";var n=i(9039);t.exports=!n(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}}
2)[1]})},3792:(t,e,i)=>{"use strict";var n=i(5397),s=i(6469),o=i(6269),r=i(1181),a=i(4913).f,l=i(1088),h=i(2529),c=i(6395),u=i(3724),d="Array Iterator",p=r.set,f=r.getterFor(d);t.exports=l(Array,"Array",function(t,e){p(this,{type:d,target:n(t),index:0,kind:e})},function(){var t=f(this),e=t.target,i=t.index++;if(!e||i>=e.length)return t.target=null,h(void 0,!0);switch(t.kind){case"keys":return h(i,!1);case"values":return h(e[i],!1)}return h([i,e[i]],!1)},"values");var m=o.Arguments=o.Array;if(s("keys"),s("values"),s("entries"),!c&&u&&"values"!==m.name)try{a(m,"name",{value:"values"})}catch(t){}},3811:(t,e,i)=>{var n={"./destroy-controller.js":5492,"./gpx-direction-controller.js":8557,"./map-async-onload-controller.js":7839,"./map-bounding-box-controller.js":9325,"./map-controller.js":2735,"./map-esri-vector-controller.js":7246,"./map-fit-bounds-controller.js":872,"./map-full-form-onload-controller.js":2965,"./map-fullscreen-controller.js":7658,"./map-gesture-handling-controller.js":276,"./map-info-window-controller.js":7586,"./map-loaded-controller.js":4346,"./map-locate-controller.js":4695,"./map-polygon-controller.js":2725,"./symfony--ux-leaflet-map--map-controller.js":3459};function s(t){var e=o(t);return i(e)}function o(t){if(!i.o(n,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return n[t]}s.keys=function(){return Object.keys(n)},s.resolve=o,t.exports=s,s.id=3811},3925:(t,e,i)=>{"use strict";var n=i(34);t.exports=function(t){return n(t)||null===t}},3994:(t,e,i)=>{"use strict";var n=i(7657).IteratorPrototype,s=i(2360),o=i(6980),r=i(687),a=i(6269),l=function(){return this};t.exports=function(t,e,i,h){var c=e+" Iterator";return t.prototype=s(n,{next:o(+!h,i)}),r(t,c,!1,!0),a[c]=l,t}},4055:(t,e,i)=>{"use strict";var n=i(4576),s=i(34),o=n.document,r=s(o)&&s(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},4117:t=>{"use strict";t.exports=function(t){return null==t}},4270:(t,e,i)=>{"use strict";var n=i(9565),s=i(4901),o=i(34),r=TypeError;t.exports=function(t,e){var i,a;if("string"===e&&s(i=t.toString)&&!o(a=n(i,t)))return a;if(s(i=t.valueOf)&&!o(a=n(i,t)))return a;if("string"!==e&&s(i=t.toString)&&!o(a=n(i,t)))return a;throw new r("Can't convert object to primitive value")}},4346:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(3166).then(i.bind(i,3166)).then(t=>{this.application.register(this.identifier,t.default)})}}},4424:(t,e,i)=>{"use strict";i.d(e,{A:()=>l});var n=i(9470),s=i(8385);function o(t){const e=(0,n.A)("[data-modal-close]",t.target);null!==e&&(t.preventDefault(),(0,s.A)("click",e))}let r=null;function a(t){const e=document.body;e.dataset.modalOpen="open",e.classList.add("scroll-disabled");const i=(0,n.A)("#modal-container");null!==i&&(i.innerHTML=t);const s=(0,n.A)("#modal");return null===s||s.hasAttribute("open")||(s.showModal(),s.addEventListener("cancel",o)),new Promise(t=>{r=t})}const l={hide:function(){null!==r&&r();const t=document.body;delete t.dataset.modalOpen,t.classList.remove("scroll-disabled");const e=(0,n.A)("#modal");null!==e&&(e.close(),e.removeEventListener("cancel",o));const i=(0,n.A)("#modal-container");null!==i&&(i.innerHTML="")},dom:a,ajax:async function(t){const e=(0,n.A)("#modal-spinner");null!==e&&(e.style.display="");const i=await fetch(t,{headers:{"X-Requested-With":"XMLHttpRequest"}});if(null!==e&&(e.style.display="none"),i.ok)return{closing:a(await i.text())}}}},4495:(t,e,i)=>{"use strict";var n=i(9519),s=i(9039),o=i(4576).String;t.exports=!!Object.getOwnPropertySymbols&&!s(function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41})},4576:function(t,e,i){"use strict";var n=function(t){return t&&t.Math===Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof i.g&&i.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},4695:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>
2t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(8964).then(i.bind(i,6583)).then(t=>{this.application.register(this.identifier,t.default)})}}},4771:(t,e,i)=>{"use strict";i.d(e,{E:()=>k});var n=i(2891),s=i(2354);function o(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function r(t,e,i){if("function"==typeof t?t===e:t.has(e))return arguments.length<3?e:i;throw new TypeError("Private element is not present on this object")}function a(t,e){return t.get(r(t,e))}var l=new WeakSet,h=new WeakMap,c=class extends n.xI{constructor(...t){var e;super(...t),o(this,e=l),e.add(this),this.isObserving=!1,this.hasLoadedChoicesPreviously=!1,this.originalOptions=[],function(t,e){o(t,e),e.set(t,t=>Array.isArray(t)?t.reduce((t,e)=>("string"==typeof e&&(t[e]={}),"object"==typeof e&&e.name&&(t[e.name]=e.options||{}),t),{}):t)}(this,h)}initialize(){this.mutationObserver||(this.mutationObserver=new MutationObserver(t=>{this.onMutations(t)}))}connect(){this.selectElement&&(this.originalOptions=this.createOptionsDataStructure(this.selectElement)),this.initializeTomSelect()}initializeTomSelect(){this.selectElement&&this.selectElement.setAttribute("data-skip-morph",""),this.urlValue?this.tomSelect=r(l,this,f).call(this,this.urlValue,this.hasMinCharactersValue?this.minCharactersValue:null):this.optionsAsHtmlValue?this.tomSelect=r(l,this,p).call(this):(this.tomSelect=r(l,this,d).call(this),this.startMutationObserver())}disconnect(){if(this.stopMutationObserver(),!this.tomSelect)return;let t=[];this.selectElement&&(t=this.selectElement.multiple?Array.from(this.selectElement.options).filter(t=>t.selected).map(t=>t.value):[this.selectElement.value]),this.tomSelect.destroy(),this.tomSelect=void 0,this.selectElement&&(this.selectElement.multiple?Array.from(this.selectElement.options).forEach(e=>{e.selected=t.includes(e.value)}):this.selectElement.value=t[0])}urlValueChanged(){this.resetTomSelect()}getMaxOptions(){return this.selectElement?this.selectElement.options.length:50}get selectElement(){return this.element instanceof HTMLSelectElement?this.element:null}get formElement(){if(!(this.element instanceof HTMLInputElement||this.element instanceof HTMLSelectElement))throw new Error("Autocomplete Stimulus controller can only be used on an <input> or <select>.");return this.element}dispatchEvent(t,e){this.dispatch(t,{detail:e,prefix:"autocomplete"})}get preload(){return this.hasPreloadValue?"false"!==this.preloadValue&&("true"===this.preloadValue||this.preloadValue):"focus"}resetTomSelect(){if(this.tomSelect){this.dispatchEvent("before-reset",{tomSelect:this.tomSelect}),this.stopMutationObserver();const t=this.element.innerHTML,e=this.tomSelect.getValue();this.tomSelect.destroy(),this.element.innerHTML=t,this.initializeTomSelect(),this.tomSelect.setValue(e)}}changeTomSelectDisabledState(t){this.tomSelect&&(this.stopMutationObserver(),t?this.tomSelect.disable():this.tomSelect.enable(),this.startMutationObserver())}startMutationObserver(){!this.isObserving&&this.mutationObserver&&(this.mutationObserver.observe(this.element,{childList:!0,subtree:!0,attributes:!0,characterData:!0,attributeOldValue:!0}),this.isObserving=!0)}stopMutationObserver(){this.isObserving&&this.mutationObserver&&(this.mutationObserver.disconnect(),this.isObserving=!1)}onMutations(t){let e=!1,i=!1;t.forEach(t=>{switch(t.type){case"attributes":if(t.target===this.element&&"disabled"===t.attributeName){e=!0;break}if(t.target===this.element&&"multiple"===t.attributeName){this.element.hasAttribute("multiple")!==("multiple"===t.oldValue)&&(i=!0);break}}});const n=this.selectElement?this.createOptionsDataStructure(this.selectElement):[];this.areOptionsEquivalent(n)&&!i||(this.originalOptions=n,this.resetTomSelect()),e&&this.changeTomSelectDisabledState(this.formElement.disabled)}createOptionsDataStructure(t){return Array.from(t.options).map(t=>({value:t.value,text:t.text}))}areOptionsEquivalent(t){const e=this.originalOptions.filter(t=>""!==t.value),i=t.filter(t=>""!==t.value),n=this.originalOptions.find(t=>""===t.value),s=t.find(t=>""===t.value);if(n&&s&&n.text!==s.text)return!1;if(e.length!==i.length)return!1;const o=t=>`${t.value}-${t.text}`,r=new Set(e.map(o)),a=new Set(i.map(o));return r.size===a.size&&[...r].every(t=>a.has(t))}};function u(){const t={},e=!this.selectElement||this.selectElement.multiple;this.formElement.disabled||e||(t.clear_button={title:""}),e&&(t.remove_button={title:""}),this.urlValue&&(t.virtual_scroll={});const i={render:{no_results:()=>`<div class="no-results">${this.noResultsFoundTextValue}</div>`,option_create:(t,e)=>`<div class="create">${this.createOptionTextValue.replace("%placeholder%",`<strong>${e(t.input)}</strong>`)}</div>`},plugins:t,onItemAdd:()=>{this.tomSelect?.setTextboxValue("")},closeAfterSelect:!0,onOptionAdd:(t,e)=>{if(!this.tomSelect)return;let i=this.tomSelect.input,n=null;const s=e[this.tomSelect.settings.optgroupField];if(s&&this.tomSelect.optgroups&&(n=this.tomSelect.optgroups[s],n)
2){const t=i.querySelector(`optgroup[label="${n.label}"]`);t&&(i=t)}const o=document.createElement("option");o.value=t,o.text=e[this.tomSelect.settings.labelField];const r=e.$order;let a=null;for(const[,t]of Object.entries(this.tomSelect.options))if(t.$order===r){a=i.querySelector(`:scope > option[value="${CSS.escape(t[this.tomSelect.settings.valueField])}"]`);break}a?a.insertAdjacentElement("afterend",o):r>=0?i.append(o):i.prepend(o)}};return this.selectElement||this.urlValue||(i.shouldLoad=()=>!1),r(l,this,g).call(this,i,this.tomSelectOptionsValue)}function d(){const t=r(l,this,g).call(this,r(l,this,u).call(this),{maxOptions:this.getMaxOptions()});return r(l,this,v).call(this,t)}function p(){const t=r(l,this,u).call(this),e=t.labelField??"text",i=r(l,this,g).call(this,t,{maxOptions:this.getMaxOptions(),score:t=>{const i=this.tomSelect?.getScoreFunction(t);return t=>i?.({...t,text:r(l,this,m).call(this,t[e])})},render:{...t.render,item:t=>`<div>${t[e]}</div>`,option:t=>`<div>${t[e]}</div>`}});return r(l,this,v).call(this,i)}function f(t,e){const i=r(l,this,u).call(this),n=i.labelField??"text",s=r(l,this,g).call(this,i,{firstUrl:e=>`${t}${t.includes("?")?"&":"?"}query=${encodeURIComponent(e)}`,load:function(t,e){const i=this.getUrl(t);fetch(i).then(t=>t.json()).then(i=>{this.setNextUrl(t,i.next_page),e(i.results.options||i.results,i.results.optgroups||[])}).catch(()=>e([],[]))},shouldLoad:t=>null!==e?t.length>=e:!!this.hasLoadedChoicesPreviously||(t.length>0&&(this.hasLoadedChoicesPreviously=!0),t.length>=3),optgroupField:"group_by",score:t=>t=>1,render:{option:(t,e)=>`<div>${this.optionsAsHtmlValue?t[n]:e(t[n])}</div>`,item:(t,e)=>`<div>${this.optionsAsHtmlValue?t[n]:e(t[n])}</div>`,loading_more:()=>`<div class="loading-more-results">${this.loadingMoreTextValue}</div>`,no_more_results:()=>`<div class="no-more-results">${this.noMoreResultsTextValue}</div>`,no_results:()=>`<div class="no-results">${this.noResultsFoundTextValue}</div>`,option_create:(t,e)=>`<div class="create">${this.createOptionTextValue.replace("%placeholder%",`<strong>${e(t.input)}</strong>`)}</div>`},onFocus:()=>{this.resetOnFocusValue&&this.tomSelect&&""===this.tomSelect.control_input.value.trim()&&(this.tomSelect.clearOptions(),this.tomSelect.loadedSearches={},"function"==typeof this.tomSelect.clearPagination&&this.tomSelect.clearPagination(),this.tomSelect.load(""))},preload:this.preload});return r(l,this,v).call(this,s)}function m(t){return t.replace(/(<([^>]+)>)/gi,"")}function g(t,e){return{...t,...e,plugins:r(l,this,_).call(this,{...a(h,this).call(this,t.plugins||{}),...a(h,this).call(this,e.plugins||{})})}}function _(t){return Object.entries(t).reduce((t,[e,i])=>(!1!==i&&(t[e]=i),t),{})}function v(t){const e={options:t};this.dispatchEvent("pre-connect",e);const i=new s.A(this.formElement,t),n={tomSelect:i,options:t};return this.dispatchEvent("connect",n),i}c.values={url:String,optionsAsHtml:Boolean,loadingMoreText:String,noResultsFoundText:String,noMoreResultsText:String,createOptionText:String,minCharacters:Number,tomSelectOptions:Object,preload:String,resetOnFocus:Boolean};var y=i(106);y.$L&&y.t1.register(...y.$L);let b=!1;var x=class extends n.xI{constructor(...t){super(...t),this.chart=null}connect(){if(b||(b=!0,this.dispatchEvent("init",{Chart:y.t1})),!(this.element instanceof HTMLCanvasElement))throw new Error("Invalid element");const t=this.viewValue;Array.isArray(t.options)&&0===t.options.length&&(t.options={}),this.dispatchEvent("pre-connect",{options:t.options,config:t});const e=this.element.getContext("2d");if(!e)throw new Error("Could not getContext() from Element");this.chart=new y.t1(e,t),this.dispatchEvent("connect",{chart:this.chart})}disconnect(){this.dispatchEvent("disconnect",{chart:this.chart}),this.chart&&(this.chart.destroy(),this.chart=null)}viewValueChanged(){if(this.chart){const t={data:this.viewValue.data,options:this.viewValue.options};Array.isArray(t.options)&&0===t.options.length&&(t.options={}),this.dispatchEvent("view-value-change",t),this.chart.data=t.data,this.chart.options=t.options,this.chart.update();const e=this.element.parentElement;if(e&&this.chart.options.responsive){const t=e.style.width;e.style.width=`${e.offsetWidth+1}px`,setTimeout(()=>{e.style.width=t},0)}}}dispatchEvent(t,e){this.dispatch(t,{detail:e,prefix:"chartjs"})}};x.values={view:Object};var w=i(3249);const M={"symfony--ux-autocomplete--autocomplete":c,"symfony--ux-chartjs--chart":x,"symfony--ux-leaflet-map--map":class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>
2t.identifier===this.identifier&&t.__stimulusLazyController)||Promise.all([i.e(3481),i.e(6547)]).then(i.bind(i,6547)).then(t=>{this.application.register(this.identifier,t.default)})}},live:w.Ay};function k(t){const e=n.lg.start();t&&e.load(function(t){return t.keys().map(e=>function(t,e){const i=function(t){const e=(t.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(e)return e.replace(/_/g,"-").replace(/\//g,"--")}(e);if(i)return function(t,e){const i=t.default;if("function"==typeof i)return{identifier:e,controllerConstructor:i}}(t(e),i)}(t,e)).filter(t=>t)}(t));for(const t in M)Object.prototype.hasOwnProperty.call(M,t)&&e.register(t,M[t]);return e}},4901:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},4913:(t,e,i)=>{"use strict";var n=i(3724),s=i(5917),o=i(8686),r=i(8551),a=i(6969),l=TypeError,h=Object.defineProperty,c=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",p="writable";e.f=n?o?function(t,e,i){if(r(t),e=a(e),r(i),"function"==typeof t&&"prototype"===e&&"value"in i&&p in i&&!i[p]){var n=c(t,e);n&&n[p]&&(t[e]=i.value,i={configurable:d in i?i[d]:n[d],enumerable:u in i?i[u]:n[u],writable:!1})}return h(t,e,i)}:h:function(t,e,i){if(r(t),e=a(e),r(i),s)try{return h(t,e,i)}catch(t){}if("get"in i||"set"in i)throw new l("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},4954:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var n=i(5649);let s=[],o=[];const r=document.documentElement;function a(t,e,i=null){!function(t,e){s.push({selector:t,callback:e});const i=r.querySelectorAll(t);i.length>0&&e(i)}(t,e),null!==i&&function(t,e){o.push({selector:t,callback:e})}(t,i)}function l(t,e){if(t instanceof Element)for(const i of e){const e=i.selector,s=i.callback;t.matches(e)?s([t]):s((0,n.A)(e,t))}}new MutationObserver(function(t){for(const e of t){for(const t of e.addedNodes)l(t,s);for(const t of e.removedNodes)l(t,o)}}).observe(r,{childList:!0,subtree:!0})},5031:(t,e,i)=>{"use strict";var n=i(7751),s=i(9504),o=i(8480),r=i(3717),a=i(8551),l=s([].concat);t.exports=n("Reflect","ownKeys")||function(t){var e=o.f(a(t)),i=r.f;return i?l(e,i(t)):e}},5116:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>n});const n=(0,i(4771).E)(i(758))},5269:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(8681).then(i.bind(i,8681)).then(t=>{this.application.register(this.identifier,t.default)})}}},5397:(t,e,i)=>{"use strict";var n=i(7055),s=i(7750);t.exports=function(t){return n(s(t))}},5492:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(6712).then(i.bind(i,4331)).then(t=>{this.application.register(this.identifier,t.default)})}}},5610:(t,e,i)=>{"use strict";var n=i(1291),s=Math.max,o=Math.min;t.exports=function(t,e){var i=n(t);return i<0?s(i+e,0):o(i,e)}},5649:(t,e,i)=>{"use strict";function*n(t,e){if(e=e||document,!/^(#?[_a-zA-Z0-9-]+|\.[_a-zA-Z0-9-.]+)$/.test(t))return void(yield*e.querySelectorAll(t));const i=t.charAt(0);if("#"===i)t=t.substr(1),yield document.getElementById(t);else if("."===i){var n=t.substr(1).replace(/\./g," ");yield*e.getElementsByClassName(n)}else yield*e.getElementsByTagName(t)}i.d(e,{A:()=>n})},5745:(t,e,i)=>{"use strict";var n=i(7629);t.exports=function(t,e){return n[t]||(n[t]=e||{})}},5826:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(3982).then(i.bind(i,3982)).then(t=>{this.application.register(this.identifier,t.default)})}}},5917:(t,e,i)=>{"use strict";var n=i(3724),s=i(9039),o=i(4055);t.exports=!n&&!s(function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},5966:(t,e,i)=>{"use strict";var n=i(9306),s=i(4117);t.exports=function(t,e){var i=t[e];return s(i)?void 0:n(i)}},6119:(t,e,i)=>{"use strict";var n=i(5745),s=i(3392),o=n("keys");t.exports=function(t){return o[t]||(o[t]=s(t))}},6198:(t,e,i)=>{"use strict";var n=i(8014);t.exports=function(t){return n(t.length)}},6269:t=>{"use strict";
vendor: 1,867 bytes, line 2
2t.exports={}},6395:t=>{"use strict";t.exports=!1},6469:(t,e,i)=>{"use strict";var n=i(8227),s=i(2360),o=i(4913).f,r=n("unscopables"),a=Array.prototype;void 0===a[r]&&o(a,r,{configurable:!0,value:s(null)}),t.exports=function(t){a[r][t]=!0}},6518:(t,e,i)=>{"use strict";var n=i(4576),s=i(7347).f,o=i(6699),r=i(6840),a=i(9433),l=i(7740),h=i(2796);t.exports=function(t,e){var i,c,u,d,p,f=t.target,m=t.global,g=t.stat;if(i=m?n:g?n[f]||a(f,{}):n[f]&&n[f].prototype)for(c in e){if(d=e[c],u=t.dontCallGetSet?(p=s(i,c))&&p.value:i[c],!h(m?c:f+(g?".":"#")+c,t.forced)&&void 0!==u){if(typeof d==typeof u)continue;l(d,u)}(t.sham||u&&u.sham)&&o(d,"sham",!0),r(i,c,d,t)}}},6699:(t,e,i)=>{"use strict";var n=i(3724),s=i(4913),o=i(6980);t.exports=n?function(t,e,i){return s.f(t,e,o(1,i))}:function(t,e,i){return t[e]=i,t}},6706:(t,e,i)=>{"use strict";var n=i(9504),s=i(9306);t.exports=function(t,e,i){try{return n(s(Object.getOwnPropertyDescriptor(t,e)[i]))}catch(t){}}},6801:(t,e,i)=>{"use strict";var n=i(3724),s=i(8686),o=i(4913),r=i(8551),a=i(5397),l=i(1072);e.f=n&&!s?Object.defineProperties:function(t,e){r(t);for(var i,n=a(e),s=l(e),h=s.length,c=0;h>c;)o.f(t,i=s[c++],n[i]);return t}},6823:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6840:(t,e,i)=>{"use strict";var n=i(4901),s=i(4913),o=i(283),r=i(9433);t.exports=function(t,e,i,a){a||(a={});var l=a.enumerable,h=void 0!==a.name?a.name:e;if(n(i)&&o(i,h,a),a.global)l?t[e]=i:r(e,i);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=i:s.f(t,e,{value:i,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},6969:(t,e,i)=>{"use strict";var n=i(2777),s=i(757);t.exports=function(t){var e=n(t,"string");return s(e)?e:e+""}},6980:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}}
2,7040:(t,e,i)=>{"use strict";var n=i(4495);t.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7055:(t,e,i)=>{"use strict";var n=i(9504),s=i(9039),o=i(2195),r=Object,a=n("".split);t.exports=s(function(){return!r("z").propertyIsEnumerable(0)})?function(t){return"String"===o(t)?a(t,""):r(t)}:r},7246:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(3042).then(i.bind(i,3042)).then(t=>{this.application.register(this.identifier,t.default)})}}},7299:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>o});var n=i(4424),s=i(2891);const o=class extends s.xI{static values={renderOnConnect:Boolean};connect(){this.checkPopup()}async checkPopup(){const t=this.element;t&&this.renderOnConnectValue&&(n.A.dom(t.innerHTML),this.showedPopup=!0)}}},7347:(t,e,i)=>{"use strict";var n=i(3724),s=i(9565),o=i(8773),r=i(6980),a=i(5397),l=i(6969),h=i(9297),c=i(5917),u=Object.getOwnPropertyDescriptor;e.f=n?u:function(t,e){if(t=a(t),e=l(e),c)try{return u(t,e)}catch(t){}if(h(t,e))return r(!s(o.f,t,e),t[e])}},7400:t=>{"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},7586:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(910).then(i.bind(i,910)).then(t=>{this.application.register(this.identifier,t.default)})}}},7629:(t,e,i)=>{"use strict";var n=i(6395),s=i(4576),o=i(9433),r="__core-js_shared__",a=t.exports=s[r]||o(r,{});(a.versions||(a.versions=[])).push({version:"3.46.0",mode:n?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.46.0/LICENSE",source:"https://github.com/zloirock/core-js"})},7657:(t,e,i)=>{"use strict";var n,s,o,r=i(9039),a=i(4901),l=i(34),h=i(2360),c=i(2787),u=i(6840),d=i(8227),p=i(6395),f=d("iterator"),m=!1;[].keys&&("next"in(o=[].keys())?(s=c(c(o)))!==Object.prototype&&(n=s):m=!0),!l(n)||r(function(){var t={};return n[f].call(t)!==t})?n={}:p&&(n=h(n)),a(n[f])||u(n,f,function(){return this}),t.exports={IteratorPrototype:n,BUGGY_SAFARI_ITERATORS:m}},7658:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(2942).then(i.bind(i,2942)).then(t=>{this.application.register(this.identifier,t.default)})}}},7740:(t,e,i)=>{"use strict";var n=i(9297),s=i(5031),o=i(7347),r=i(4913);t.exports=function(t,e,i){for(var a=s(e),l=r.f,h=o.f,c=0;c<a.length;c++){var u=a[c];n(t,u)||i&&n(i,u)||l(t,u,h(e,u))}}},7750:(t,e,i)=>{"use strict";var n=i(4117),s=TypeError;t.exports=function(t){if(n(t))throw new s("Can't call method on "+t);return t}},7751:(t,e,i)=>{"use strict";var n=i(4576),s=i(4901);t.exports=function(t,e){return arguments.length<2?(i=n[t],s(i)?i:void 0):n[t]&&n[t][e];var i}},7839:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(4867).then(i.bind(i,4867)).then(t=>{this.application.register(this.identifier,t.default)})}}},8014:(t,e,i)=>{"use strict";var n=i(1291),s=Math.min;t.exports=function(t){var e=n(t);return e>0?s(e,9007199254740991):0}},8227:(t,e,i)=>{"use strict";var n=i(4576),s=i(5745),o=i(9297),r=i(3392),a=i(4495),l=i(7040),h=n.Symbol,c=s("wks"),u=l?h.for||h:h&&h.withoutSetter||r;t.exports=function(t){return o(c,t)||(c[t]=a&&o(h,t)?h[t]:u("Symbol."+t)),c[t]}},8385:(t,e,i)=>{"use strict";function n(t,e,i=!0,n=!0,s=null){let o;"function"==typeof window.CustomEvent?o=new CustomEvent(t,{bubbles:!0,cancelable:!1,detail:s}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(t,i,n,s)),e.dispatchEvent(o)}i.d(e,{A:()=>n})}
2,8480:(t,e,i)=>{"use strict";var n=i(1828),s=i(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return n(t,s)}},8551:(t,e,i)=>{"use strict";var n=i(34),s=String,o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(s(t)+" is not an object")}},8557:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>s});var n=i(2891);const s=class extends n.xI{constructor(t){super(t),this.__stimulusLazyController=!0}initialize(){this.application.controllers.find(t=>t.identifier===this.identifier&&t.__stimulusLazyController)||i.e(1433).then(i.bind(i,1433)).then(t=>{this.application.register(this.identifier,t.default)})}}},8622:(t,e,i)=>{"use strict";var n=i(4576),s=i(4901),o=n.WeakMap;t.exports=s(o)&&/native code/.test(String(o))},8686:(t,e,i)=>{"use strict";var n=i(3724),s=i(9039);t.exports=n&&s(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},8727:t=>{"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},8773:(t,e)=>{"use strict";var i={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,s=n&&!i.call({1:2},1);e.f=s?function(t){var e=n(this,t);return!!e&&e.enumerable}:i},8789:()=>{let t,e,i,n,s,o=null,r=65,a=new Set;function l(t){n=performance.now();const e=t.target.closest("a");p(e)&&f(e.href,"high")}function h(t){if(performance.now()-n<1111)return;if(!("closest"in t.target))return;const e=t.target.closest("a");p(e)&&(e.addEventListener("mouseout",u,{passive:!0}),s=setTimeout(()=>{f(e.href,"high"),s=void 0},r))}function c(t){const e=t.target.closest("a");p(e)&&f(e.href,"high")}function u(t){t.relatedTarget&&t.target.closest("a")==t.relatedTarget.closest("a")||s&&(clearTimeout(s),s=void 0)}function d(t){if(performance.now()-n<1111)return;const e=t.target.closest("a");if(t.which>1||t.metaKey||t.ctrlKey)return;if(!e)return;e.addEventListener("click",function(t){1337!=t.detail&&t.preventDefault()},{capture:!0,passive:!1,once:!0});const i=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1,detail:1337});e.dispatchEvent(i)}function p(n){if(n&&n.href&&(!i||"instant"in n.dataset)){if(n.origin!=location.origin&&(!e&&!("instant"in n.dataset)||!o))return;if(["http:","https:"].includes(n.protocol)&&("http:"!=n.protocol||"https:"!=location.protocol)&&(t||!n.search||"instant"in n.dataset)&&!(n.hash&&n.pathname+n.search==location.pathname+location.search||"noInstant"in n.dataset))return!0}}function f(t,e="auto"){if(a.has(t))return;const i=document.createElement("link");i.rel="prefetch",i.href=t,i.fetchPriority=e,i.as="document",document.head.appendChild(i),a.add(t)}!function(){if(!document.createElement("link").relList.supports("prefetch"))return;const n="instantVaryAccept"in document.body.dataset||"Shopify"in window,s=navigator.userAgent.indexOf("Chrome/");if(s>
2-1&&(o=parseInt(navigator.userAgent.substring(s+7))),n&&o&&o<110)return;const a="instantMousedownShortcut"in document.body.dataset;t="instantAllowQueryString"in document.body.dataset,e="instantAllowExternalLinks"in document.body.dataset,i="instantWhitelist"in document.body.dataset;const u={capture:!0,passive:!0};let m=!1,g=!1,_=!1;if("instantIntensity"in document.body.dataset){const t=document.body.dataset.instantIntensity;if(t.startsWith("mousedown"))m=!0,"mousedown-only"==t&&(g=!0);else if(t.startsWith("viewport")){const e=navigator.connection&&navigator.connection.saveData,i=navigator.connection&&navigator.connection.effectiveType&&navigator.connection.effectiveType.includes("2g");e||i||("viewport"==t?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(_=!0):"viewport-all"==t&&(_=!0))}else{const e=parseInt(t);isNaN(e)||(r=e)}}if(g||document.addEventListener("touchstart",l,u),m?a||document.addEventListener("mousedown",c,u):document.addEventListener("mouseover",h,u),a&&document.addEventListener("mousedown",d,u),_){let t=window.requestIdleCallback;t||(t=t=>{t()}),t(function(){const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const i=e.target;t.unobserve(i),f(i.href)}})});document.querySelectorAll("a").forEach(e=>{p(e)&&t.observe(e)})},{timeout:1500})}}()},8829:()=>{},8981:(t,e,i)=>{"use strict";var n=i(7750),s=Object;t.exports=function(t){return s(n(t))}},9039:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},9296:(t,e,i)=>{"use strict";var n=i(4055)("span").classList,s=n&&n.constructor&&n.constructor.prototype;t.exports=s===Object.prototype?void 0:s},9297:(t,e,i)=>{"use strict";var n=i(9504),s=i(8981),o=n({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(s(t),e)}},9306:(t,e,i)=>{"use strict";var n=i(4901),s=i(6823),o=TypeError;t.exports=function(t){if(n(t))return t;throw new o(s(t)+" is not a function")}},9325:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>o});var n=i(2891),s=(i(3481),i(3249));const o=class extends n.xI{static values={lat:{type:Number,default:52.37},lng:{type:Number,default:4.9},zoom:{type:Number,default:12}};async initialize(){this.component=await(0,s.QQ)(this.element)}async connect(){this.element.addEventListener("ux:map:connect",t=>this._onConnect(t))}disconnect(){this.element.removeEventListener("ux:map:connect",this._onConnect)}_onConnect=async t=>{const{map:e}=t.detail;this.map=e,await this._updateLiveComponent(),this.map.on("moveend",()=>this._updateLiveComponent())};_updateLiveComponent=async()=>{this.component||(this.component=await(0,s.QQ)(this.element));const t=this.map.getZoom(),e=this.map.getBounds(),i=e.getNorthEast(),n=e.getSouthWest
2(),o={zoom:t,bounds:{ne:{lat:i.lat,lng:i.lng},sw:{lat:n.lat,lng:n.lng}}};this.component.emitSelf("map:viewportChange",{viewport:o})}}},9433:(t,e,i)=>{"use strict";var n=i(4576),s=Object.defineProperty;t.exports=function(t,e){try{s(n,t,{value:e,configurable:!0,writable:!0})}catch(i){n[t]=e}return e}},9470:(t,e,i)=>{"use strict";i.d(e,{A:()=>s});var n=i(5649);function s(t,e){for(const i of(0,n.A)(t,e))return i;return null}},9504:(t,e,i)=>{"use strict";var n=i(616),s=Function.prototype,o=s.call,r=n&&s.bind.bind(o,o);t.exports=n?r:function(t){return function(){return o.apply(t,arguments)}}},9519:(t,e,i)=>{"use strict";var n,s,o=i(4576),r=i(2839),a=o.process,l=o.Deno,h=a&&a.versions||l&&l.version,c=h&&h.v8;c&&(s=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!s&&r&&(!(n=r.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=r.match(/Chrome\/(\d+)/))&&(s=+n[1]),t.exports=s},9565:(t,e,i)=>{"use strict";var n=i(616),s=Function.prototype.call;t.exports=n?s.bind(s):function(){return s.apply(s,arguments)}},9617:(t,e,i)=>{"use strict";var n=i(5397),s=i(5610),o=i(6198),r=function(t){return function(e,i,r){var a=n(e),l=o(a);if(0===l)return!t&&-1;var h,c=s(r,l);if(t&&i!=i){for(;l>c;)if((h=a[c++])!=h)return!0}else for(;l>c;c++)if((t||c in a)&&a[c]===i)return t||c||0;return!t&&-1}};t.exports={includes:r(!0),indexOf:r(!1)}}},t=>{var e=e=>t(t.s=e);e(3589),e(8829)}]);

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