PageSourceSearch

https://atlas.infoflora.ch/atlas.js

js infoflora.ch collected 2026-09-24 08:59:06 UTC 1,118,166 bytes, 2 lines download raw bytes

vendor: 4,281 bytes, lines 1-2
1/*! For license information please see atlas.js.LICENSE.txt */
2(()=>{"use strict";var t={774(t,e,i){function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}i.d(e,{A:()=>n})}};const e={};function i(n){const s=e[n];if(void 0!==s)return s.exports;const r=e[n]={exports:{}};return t[n].call(r.exports,r,r.exports,i),r.exports}i.m=t,i.cw=t=>{var e;return()=>{if(t){var i=t;t=0,e={exports:{}},i.call(e.exports,e,e.exports)}return e.exports}},(()=>{const t=Object.getPrototypeOf;let e;i.t=function(n,s){if(1&s&&(n=this(n)),8&s)return n;if("object"==typeof n&&n){if(4&s&&n.__esModule)return n;if(16&s&&"function"==typeof n.then)return n}const r=Object.create(null);i.r(r);const o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&s&&n;("object"==typeof a||"function"==typeof a)&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach(t=>o[t]=()=>n[t]);return o.default=()=>n,i.d(r,o),r}})(),i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.f={},i.e=t=>Promise.all(Object.keys(i.f).reduce((e,n)=>(i.f[n](t,e),e),[])),i.u=t=>t+".js",i.miniCssF=t=>{},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{const t={},e="@infoflora/atlas:";i.l=(n,s,r,o)=>{if(t[n])return void t[n].push(s);let a,h;if(void 0!==r){const t=document.getElementsByTagName("script");for(var l=0;l<t.length;l++){const i=t[l];if(i.getAttribute("src")==n||i.getAttribute("data-webpack")==e+r){a=i;break}}}a||(h=!0,a=document.createElement("script"),a.charset="utf-8",i.nc&&a.setAttribute("nonce",i.nc),a.setAttribute("data-webpack",e+r),a.src=n),t[n]=[s];const c=(e,i)=>{a.onerror=a.onload=null,clearTimeout(u);const s=t[n];if(delete t[n],a.parentNode?.removeChild(a),s?.forEach(t=>t(i)),e)return e(i)},u=setTimeout(c.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=c.bind(null,a.onerror),a.onload=c.bind(null,a.onload),h&&document.head.appendChild(a)}})(),i.r=t=>{Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.dn=t=>{var e=Object.getOwnPropertyDescriptor(t,"name");(!e||!e.writable&&e.configurable)&&Object.defineProperty(t,"name",{value:"default",configurable:!0})},(()=>{let t;i.g.importScripts&&(t=i.g.location+"");const e=i.g.document;if(!t&&e&&("SCRIPT"===e.currentScript?.tagName.toUpperCase()&&(t=e.currentScript.src),!t)){const i=e.getElementsByTagName("script");if(i.length){let e=i.length-1;for(;e>-1&&(!t||!/^https?:/.test(t));)t=i[e--].src}}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/^blob:|[?#].*$/g,"").replace(/\/[^/]+$/,"/"),i.p=t})(),(()=>{const t={620:0};i.f.j=(e,n)=>{let s=i.o(t,e)?t[e]:void 0;if(0!==s)if(s)n.push(s[2]);else{const r=new Promise((i,n)=>s=t[e]=[i,n]);n.push(s[2]=r);const o=new Error,a=n=>{if(i.o(t,e)&&(s=t[e],0!==s&&(t[e]=void 0),s)){const t=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;o.message="Loading chunk "+e+" failed.\n("+t+": "+i+")",o.name="ChunkLoadError",o.type=t,o.request=i,o.event=n,s[1](o)}};i.l(i.p+i.u(e),a,"chunk-"+e,e)}};const e=(e,n)=>{let[s,r,o]=n;var a,h,l=0;if(s.some(e=>0!==t[e])){for(a in r)i.o(r,a)&&(i.m[a]=r[a]);o&&o(i)}for(e&&e(n);l<s.length;l++)h=s[l],i.o(t,h)&&t[h]&&t[h][0](),t[h]=0},n=self.webpackChunk_infoflora_atlas=self.webpackChunk_infoflora_atlas||[];n.forEach(e.bind(null,0)),n.push=e.bind(null,n.push.bind(n))})();var n={};i.r(n),i.d(n,{afterMain:()=>S,afterRead:()=>w,afterWrite:()=>C,applyStyles:()=>T,arrow:()=>Q,auto:()=>h,basePlacements:()=>l,beforeMain:()=>b,beforeRead:()=>v,beforeWrite:()=>E,bottom:()=>r,clippingParents:()=>d,computeStyles:()=>nt,createPopper:()=>It,createPopperBase:()=>Nt,createPopperLite:()=>Tt,detectOverflow:()=>vt,end:()=>u,eventListeners:()=>rt,flip:()=>yt,hide:()=>xt,left:()=>a,main:()=>x,modifierPhases:()=>M,offset:()=>St,placements:()=>_,popper:()=>p,popperGenerator:()=>kt,popperOffsets:()=>Et,preventOverflow:()=>At,read:()=>y,reference:()=>g,right:()=>
vendor: 4,653 bytes, line 2
2o,start:()=>c,top:()=>s,variationPlacements:()=>m,viewport:()=>f,write:()=>A});var s="top",r="bottom",o="right",a="left",h="auto",l=[s,r,o,a],c="start",u="end",d="clippingParents",f="viewport",p="popper",g="reference",m=l.reduce(function(t,e){return t.concat([e+"-"+c,e+"-"+u])},[]),_=[].concat(l,[h]).reduce(function(t,e){return t.concat([e,e+"-"+c,e+"-"+u])},[]),v="beforeRead",y="read",w="afterRead",b="beforeMain",x="main",S="afterMain",E="beforeWrite",A="write",C="afterWrite",M=[v,y,w,b,x,S,E,A,C];function L(t){return t?(t.nodeName||"").toLowerCase():null}function P(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof P(t).Element||t instanceof Element}function N(t){return t instanceof P(t).HTMLElement||t instanceof HTMLElement}function I(t){return"undefined"!=typeof ShadowRoot&&(t instanceof P(t).ShadowRoot||t instanceof ShadowRoot)}const T={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];N(s)&&L(s)&&(Object.assign(s.style,i),Object.keys(n).forEach(function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach(function(t){var n=e.elements[t],s=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce(function(t,e){return t[e]="",t},{});N(n)&&L(n)&&(Object.assign(n.style,r),Object.keys(s).forEach(function(t){n.removeAttribute(t)}))})}},requires:["computeStyles"]};function O(t){return t.split("-")[0]}var R=Math.max,F=Math.min,D=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function G(){return!/^((?!chrome|android).)*safari/i.test(j())}function B(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,r=1;e&&N(t)&&(s=t.offsetWidth>0&&D(n.width)/t.offsetWidth||1,r=t.offsetHeight>0&&D(n.height)/t.offsetHeight||1);var o=(k(t)?P(t):window).visualViewport,a=!G()&&i,h=(n.left+(a&&o?o.offsetLeft:0))/s,l=(n.top+(a&&o?o.offsetTop:0))/r,c=n.width/s,u=n.height/r;return{width:c,height:u,top:l,right:h+c,bottom:l+u,left:h,x:h,y:l}}function z(t){var e=B(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function q(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&I(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function U(t){return P(t).getComputedStyle(t)}function W(t){return["table","td","th"].indexOf(L(t))>=0}function V(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function H(t){return"html"===L(t)?t:t.assignedSlot||t.parentNode||(I(t)?t.host:null)||V(t)}function K(t){return N(t)&&"fixed"!==U(t).position?t.offsetParent:null}function $(t){for(var e=P(t),i=K(t);i&&W(i)&&"static"===U(i).position;)i=K(i);return i&&("html"===L(i)||"body"===L(i)&&"static"===U(i).position)?e:i||function(t){var e=/firefox/i.test(j());if(/Trident/i.test(j())&&N(t)&&"fixed"===U(t).position)return null;var i=H(t);for(I(i)&&(i=i.host);N(i)&&["html","body"].indexOf(L(i))<0;){var n=U(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function X(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Y(t,e,i){return R(t,F(e,i))}function Z(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function J(t,e){return e.reduce(function(e,i){return e[i]=t,e},{})}const Q={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,h=t.options,c=i.elements.arrow,u=i.modifiersData.popperOffsets,d=O(i.placement),f=X(d),p=[a,o].indexOf(d)>=0?"height":"width";if(c&&u){var g=function(t,e){return Z("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:J(t,l))}(h.padding,i),m=z(c),_="y"===f?s:a,v="y"===f?r:o,y=i.rects.reference[p]+i.rects.reference[f]-u[f]-i.rects.popper[p],w=u[f]-i.rects.reference[f],b=$(c),x=b?"
2y"===f?b.clientHeight||0:b.clientWidth||0:0,S=y/2-w/2,E=g[_],A=x-m[p]-g[v],C=x/2-m[p]/2+S,M=Y(E,C,A),L=f;i.modifiersData[n]=((e={})[L]=M,e.centerOffset=M-C,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&q(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function tt(t){return t.split("-")[1]}var et={top:"auto",right:"auto",bottom:"auto",left:"auto"};function it(t){var e,i=t.popper,n=t.popperRect,h=t.placement,l=t.variation,c=t.offsets,d=t.position,f=t.gpuAcceleration,p=t.adaptive,g=t.roundOffsets,m=t.isFixed,_=c.x,v=void 0===_?0:_,y=c.y,w=void 0===y?0:y,b="function"==typeof g?g({x:v,y:w}):{x:v,y:w};v=b.x,w=b.y;var x=c.hasOwnProperty("x"),S=c.hasOwnProperty("y"),E=a,A=s,C=window;if(p){var M=$(i),L="clientHeight",k="clientWidth";M===P(i)&&"static"!==U(M=V(i)).position&&"absolute"===d&&(L="scrollHeight",k="scrollWidth"),(h===s||(h===a||h===o)&&l===u)&&(A=r,w-=(m&&M===C&&C.visualViewport?C.visualViewport.height:M[L])-n.height,w*=f?1:-1),h!==a&&(h!==s&&h!==r||l!==u)||(E=o,v-=(m&&M===C&&C.visualViewport?C.visualViewport.width:M[k])-n.width,v*=f?1:-1)}var N,I=Object.assign({position:d},p&&et),T=!0===g?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:D(i*s)/s||0,y:D(n*s)/s||0}}({x:v,y:w},P(i)):{x:v,y:w};return v=T.x,w=T.y,f?Object.assign({},I,((N={})[A]=S?"0":"",N[E]=x?"0":"",N.transform=(C.devicePixelRatio||1)<=1?"translate("+v+"px, "+w+"px)":"translate3d("+v+"px, "+w+"px, 0)",N)):Object.assign({},I,((e={})[A]=S?w+"px":"",e[E]=x?v+"px":"",e.transform="",e))}const nt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,r=i.adaptive,o=void 0===r||r,a=i.roundOffsets,h=void 0===a||a,l={placement:O(e.placement),variation:tt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,it(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:h})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,it(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:h})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var st={passive:!0};const rt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,r=void 0===s||s,o=n.resize,a=void 0===o||o,h=P(e.elements.popper),l=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&l.forEach(function(t){t.addEventListener("scroll",i.update,st)}),a&&h.addEventListener("resize",i.update,st),function(){r&&l.forEach(function(t){t.removeEventListener("scroll",i.update,st)}),a&&h.removeEventListener("resize",i.update,st)}},data:{}};var ot={left:"right",right:"left",bottom:"top",top:"bottom"};function at(t){return t.replace(/left|right|bottom|top/g,function(t){return ot[t]})}var ht={start:"end",end:"start"};function lt(t){return t.replace(/start|end/g,function(t){return ht[t]})}function ct(t){var e=P(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ut(t){return B(V(t)).left+ct(t).scrollLeft}function dt(t){var e=U(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ft(t){return["html","body","#document"].indexOf(L(t))>=0?t.ownerDocument.body:N(t)&&dt(t)?t:ft(H(t))}function pt(t,e){var i;void 0===e&&(e=[]);var n=ft(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),r=P(n),o=s?[r].concat(r.visualViewport||[],dt(n)?n:[]):n,a=e.concat(o);return s?a:a.concat(pt(H(o)))}function gt(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function mt(t,e,i){return e===f?gt(function(t,e){var i=P(t),n=V(t),s=i.visualViewport,r=n.clientWidth,o=n.clientHeight,a=0,h=0;if(s){r=s.width,o=s.height;var l=G();(l||!l&&"fixed"===e)&&(a=s.offsetLeft,h=s.offsetTop)}return{width:r,height:o,x:a+ut(t),y:h}}(t,i)):k(e)?function(t,e){var i=B(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):gt(function(t){var e,i=V(t),n=ct(t),s=null==(e=t.ownerDocument)?void 0:e.body,r=R(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=R(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ut(t),h=-n.scrollTop;return"rtl"===U(s||i).direction&&(a+=R(i.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:h}}(V(t)))}function _t(t){var e,i=t.reference,n=t.element,h=t.placement,l=h?O(h):null,d=h?tt(h):null,f=i.x+i.width/2-n.width/2,p=i.y+i.height/2-n.height/2;switch(l){case s:e={x:f,y:i.y-n.height};break;case r:e={x:f,y:i.y+i.height};break;case o:e={x:i.x+i.width,y:p};break;case a:e={x:i.x-n.width,y:p};break;default:e={x:i.x,y:i.y}}var g=l?X(l):null;if(null!=g){var m="y"===g?"height":"width";switch(d){case c:e[g]=e[g]-(i[m]/2-n[m]/2);break;case u:e[g]=e[g]+(i[m]/2-n[m]/2)}}return e}function vt(t,e){void 0===e&&(e={});var i=e,n=i.placement,a=void 0===n?t.placement:n,h=i.strategy,c=void 0===h?t.strategy:h,u=i.boundary,m=void 0===u?d:u,_=i.rootBoundary,v=void 0===_?f:_,y=i.elementContext,w=void 0===y?p:y,b=i.altBoundary,x=void 0!==b&&b,S=i.padding,E=void 0===S?0:S,A=Z("number"!=typeof E?E:J(E,l)),C=w===
vendor: 19,471 bytes, line 2
2p?g:p,M=t.rects.popper,P=t.elements[x?C:w],I=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=pt(H(t)),i=["absolute","fixed"].indexOf(U(t).position)>=0&&N(t)?$(t):t;return k(i)?e.filter(function(t){return k(t)&&q(t,i)&&"body"!==L(t)}):[]}(t):[].concat(e),r=[].concat(s,[i]),o=r[0],a=r.reduce(function(e,i){var s=mt(t,i,n);return e.top=R(s.top,e.top),e.right=F(s.right,e.right),e.bottom=F(s.bottom,e.bottom),e.left=R(s.left,e.left),e},mt(t,o,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k(P)?P:P.contextElement||V(t.elements.popper),m,v,c),T=B(t.elements.reference),O=_t({reference:T,element:M,strategy:"absolute",placement:a}),D=gt(Object.assign({},M,O)),j=w===p?D:T,G={top:I.top-j.top+A.top,bottom:j.bottom-I.bottom+A.bottom,left:I.left-j.left+A.left,right:j.right-I.right+A.right},z=t.modifiersData.offset;if(w===p&&z){var W=z[a];Object.keys(G).forEach(function(t){var e=[o,r].indexOf(t)>=0?1:-1,i=[s,r].indexOf(t)>=0?"y":"x";G[t]+=W[i]*e})}return G}const yt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var u=i.mainAxis,d=void 0===u||u,f=i.altAxis,p=void 0===f||f,g=i.fallbackPlacements,v=i.padding,y=i.boundary,w=i.rootBoundary,b=i.altBoundary,x=i.flipVariations,S=void 0===x||x,E=i.allowedAutoPlacements,A=e.options.placement,C=O(A),M=g||(C!==A&&S?function(t){if(O(t)===h)return[];var e=at(t);return[lt(t),e,lt(e)]}(A):[at(A)]),L=[A].concat(M).reduce(function(t,i){return t.concat(O(i)===h?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,r=i.rootBoundary,o=i.padding,a=i.flipVariations,h=i.allowedAutoPlacements,c=void 0===h?_:h,u=tt(n),d=u?a?m:m.filter(function(t){return tt(t)===u}):l,f=d.filter(function(t){return c.indexOf(t)>=0});0===f.length&&(f=d);var p=f.reduce(function(e,i){return e[i]=vt(t,{placement:i,boundary:s,rootBoundary:r,padding:o})[O(i)],e},{});return Object.keys(p).sort(function(t,e){return p[t]-p[e]})}(e,{placement:i,boundary:y,rootBoundary:w,padding:v,flipVariations:S,allowedAutoPlacements:E}):i)},[]),P=e.rects.reference,k=e.rects.popper,N=new Map,I=!0,T=L[0],R=0;R<L.length;R++){var F=L[R],D=O(F),j=tt(F)===c,G=[s,r].indexOf(D)>=0,B=G?"width":"height",z=vt(e,{placement:F,boundary:y,rootBoundary:w,altBoundary:b,padding:v}),q=G?j?o:a:j?r:s;P[B]>k[B]&&(q=at(q));var U=at(q),W=[];if(d&&W.push(z[D]<=0),p&&W.push(z[q]<=0,z[U]<=0),W.every(function(t){return t})){T=F,I=!1;break}N.set(F,W)}if(I)for(var V=function(t){var e=L.find(function(e){var i=N.get(e);if(i)return i.slice(0,t).every(function(t){return t})});if(e)return T=e,"break"},H=S?3:1;H>0&&"break"!==V(H);H--);e.placement!==T&&(e.modifiersData[n]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function wt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function bt(t){return[s,o,r,a].some(function(e){return t[e]>=0})}const xt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=vt(e,{elementContext:"reference"}),a=vt(e,{altBoundary:!0}),h=wt(o,n),l=wt(a,s,r),c=bt(h),u=bt(l);e.modifiersData[i]={referenceClippingOffsets:h,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":u})}},St={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,r=i.offset,h=void 0===r?[0,0]:r,l=_.reduce(function(t,i){return t[i]=function(t,e,i){var n=O(t),r=[a,s].indexOf(n)>=0?-1:1,h="function"==typeof i?i(Object.assign({},e,{placement:t})):i,l=h[0],c=h[1];return l=l||0,c=(c||0)*r,[a,o].indexOf(n)>=0?{x:c,y:l}:{x:l,y:c}}(i,e.rects,h),t},{}),c=l[e.placement],u=c.x,d=c.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[n]=l}},Et={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=_t({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},At={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,h=i.mainAxis,l=void 0===h||h,u=i.altAxis,d=void 0!==u&&u,f=i.boundary,p=i.rootBoundary,g=i.altBoundary,m=i.padding,_=i.tether,v=void 0===_||_,y=i.tetherOffset,w=void 0===y?0:y,b=vt(e,{boundary:f,rootBoundary:p,padding:m,altBoundary:g}),x=O(e.placement),S=tt(e.placement),E=!S,A=X(x),C="x"===A?"y":"x",M=e.modifiersData.popperOffsets,L=e.rects.reference,P=e.rects.popper,k="function"==typeof w?w(Object.assign({},e.rects,{placement:e.placement})):w,N="number"==typeof k?{mainAxis:k,altAxis:k}:Object.assign({mainAxis:0,altAxis:0},k),I=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,T={x:0,y:0};if(M){if(l){var D,j="y"===A?s:a,G="y"===A?r:o,B="y"===A?"height":"width",q=M[A],U=q+b[j],W=q-b[G],V=v?-P[B]/2:0,H=S===c?L[B]:P[B],K=S===c?-P[B]:-L[B],Z=e.elements.arrow,J=v&&Z?z(Z):{width:0,height:0},Q=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=Q[j],it=Q[G],nt=Y(0,L[B],J[B]),st=E?L[B]/2-V-nt-et-N.mainAxis:H-nt-et-N.mainAxis,rt=E?-L[B]/2+V+nt+it+N.mainAxis:K+nt+it+N.mainAxis,ot=e.elements.arrow&&$(e.elements.arrow),at=ot?"y"===A?ot.clientTop||0:ot.clientLeft||0:0,ht=null!=(D=null==I?void 0:I[A])?D:0,lt=q+rt-ht,ct=Y(v?F(U,q+st-ht-at):U,q,v?R(W,lt):W);M[A]=ct,T[A]=ct-q}if(d){var ut,dt="x"===A?s:a,ft="x"===A?r:o,pt=M[C],gt="y"===C?"height":"width",mt=pt+b[dt],_t=pt-b[ft],yt=-1!==[s,a].indexOf(x),wt=null!=(ut=null==I?void 0:I[C])?ut:0,bt=yt?mt:pt-L[gt]-P[gt]-wt+N.altAxis,xt=yt?pt+L[gt]+P[gt]-wt-N.altAxis:_t,St=v&&yt?function(t,e,i){var n=Y(t,e,i);return n>i?i:n}(bt,pt,xt):Y(v?bt:mt,pt,v?xt:_t);M[C]=St,T[C]=St-pt}e.modifiersData[n]=T}},requiresIfExists:["offset"]};function Ct(t,e,i){void 0===i&&(i=!1);var n,s,r=N(e),o=N(e)&&function(t){var e=t.getBoundingClientRect(),i=D(e.width)/t.offsetWidth||1,n=D(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=V(e),h=B(t,o,i),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!i)&&(("body"!==L(e)||dt(a))&&(l=(n=e)!==P(n)&&N(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:ct(n)),N(e)?((c=B(e,!0)).x+=e.clientLeft,c.y+=e.clientTop):a&&(c.x=ut(a))),{x:h.left+l.scrollLeft-c.x,y:h.top+l.scrollTop-c.y,width:h.width,height:h.height}}function Mt(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}}),n.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){i.has(t.name)||s(t)}),n}var Lt={placement:"bottom",modifiers:[],strategy:"absolute"};function Pt(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some(function(t){return!(t&&"function"==typeof t.getBoundingClientRect)})}function kt(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,r=void 0===s?Lt:s;return function(t,e,i){void 0===i&&(i=r);var s,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},Lt,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},h=[],l=!1,c={state:a,setOptions:function(i){var s="function"==typeof i?i(a.options):i;u(),a.options=Object.assign({},r,a.options,s),a.scrollParents={reference:k(t)?pt(t):t.contextElement?pt(t.contextElement):[],popper:pt(e)};var o,l,d=function(t){var e=Mt(t);return M.reduce(function(t,i){return t.concat(e.filter(function(t){return t.phase===i}))},[])}((o=[].concat(n,a.options.modifiers),l=o.reduce(function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t},{}),Object.keys(l).map(function(t){return l[t]})));return a.orderedModifiers=d.filter(function(t){return t.enabled}),a.orderedModifiers.forEach(function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var r=s({state:a,name:e,instance:c,options:n});h.push(r||function(){})}}),c.update()},forceUpdate:function(){if(!l){var t=a.elements,e=t.reference,i=t.popper;if(Pt(e,i)){a.rects={reference:Ct(e,$(i),"fixed"===a.options.strategy),popper:z(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach(function(t){return a.modifiersData[t.name]=Object.assign({},t.data)});for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],r=s.fn,o=s.options,h=void 0===o?{}:o,u=s.name;"function"==typeof r&&(a=r({state:a,options:h,name:u,instance:c})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise(function(t){c.forceUpdate(),t(a)})},function(){return o||(o=new Promise(function(t){Promise.resolve().then(function(){o=void 0,t(s())})})),o}),destroy:function(){u(),l=!0}};if(!Pt(t,e))return c;function u(){h.forEach(function(t){return t()}),h=[]}return c.setOptions(i).then(function(t){!l&&i.onFirstUpdate&&i.onFirstUpdate(t)}),c}}var Nt=kt(),It=kt({defaultModifiers:[rt,Et,nt,T,St,yt,At,Q,xt]}),Tt=kt({defaultModifiers:[rt,Et,nt,T]});const Ot=new Map,Rt={set(t,e,i){Ot.has(t)||Ot.set(t,new Map);const n=Ot.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>Ot.has(t)&&Ot.get(t).get(e)||null,remove(t,e){if(!Ot.has(t))return;const i=Ot.get(t);i.delete(e),0===i.size&&Ot.delete(t)}},Ft="transitionend",Dt=t=>(t&&window.CSS&&window.CSS.escape&&(t=t.replace(/#([^\s"#']+)/g,(t,e)=>`#${CSS.escape(e)}`)),t),jt=t=>null==t?`${t}`:Object.prototype.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),Gt=t=>{t.dispatchEvent(new Event(Ft))},Bt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),zt=t=>Bt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(Dt(t)):null,qt=t=>{if(!Bt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},Ut=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),Wt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Wt(t.parentNode):null},Vt=()=>{},Ht=t=>{t.offsetHeight},Kt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,$t=[],Xt=()=>"rtl"===document.documentElement.dir,Yt=t=>{var e;e=()=>{const e=Kt();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?($t.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of $t)t()}),$t.push(e)):e()},Zt=(t,e=[],i=t)=>"function"==typeof t?t.call(...e):i,Jt=(t,e,i=!0)=>{if(!i)return void Zt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const r=({target:i})=>{i===e&&(s=!0,e.removeEventListener(Ft,r),Zt(t))};e.addEventListener(Ft,r),setTimeout(()=>{s||Gt(e)},n)},Qt=(t,e,i,n)=>{const s=t.length;let r=t.indexOf(e);return-1===r?!i&&n?t[s-1]:t[0]:(r+=i?1:-1,n&&(r=(r+s)%s),t[Math.max(0,Math.min(r,s-1))])},te=/[^.]*(?=\..*)\.|.*/,ee=/\..*/,ie=/::\d+$/,ne={};let se=1;const re={mouseenter:"mouseover",mouseleave:"mouseout"},oe=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function ae(t,e){return e&&`${e}::${se++}`||t.uidEvent||se++}function he(t){const e=ae(t);return t.uidEvent=e,ne[e]=ne[e]||{},ne[e]}function le(t,e,i=null){return Object.values(t).find(t=>t.callable===e&&t.delegationSelector===i)}function ce(t,e,i){const n="string"==typeof e,s=n?i:e||i;let r=pe(t);return oe.has(r)||(r=t),[n,s,r]}function ue(t,e,i,n,s){if("string"!=typeof e||!t)return;let[r,o,a]=ce(e,i,n);if(e in re){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};o=t(o)}const h=he(t),l=h[a]||(h[a]={}),c=le(l,o,r?i:null);if(c)return void(c.oneOff=c.oneOff&&s);const u=ae(o,e.replace(te,"")),d=r?function(t,e,i){return function n(s){const r=t.querySelectorAll(e);for(let{target:o}=s;o&&o!==this;o=o.parentNode)for(const a of r)if(a===o)return me(s,{delegateTarget:o}),n.oneOff&&ge.off(t,s.type,e,i),i.apply(o,[s])}}(t,i,o):function(t,e){return function i(n){return me(n,{delegateTarget:t}),i.oneOff&&ge.off(t,n.type,e),e.apply(t,[n])}}(t,o);d.delegationSelector=r?i:null,d.callable=o,d.oneOff=s,d.uidEvent=u,l[u]=d,t.addEventListener(a,d,r)}function de(t,e,i,n,s){const r=le(e[i],n,s);r&&(t.removeEventListener(i,r,Boolean(s)),delete e[i][r.uidEvent])}function fe(t,e,i,n){const s=e[i]||{};for(const[r,o]of Object.entries(s))r.includes(n)&&de(t,e,i,o.callable,o.delegationSelector)}function pe(t){return t=t.replace(ee,""),re[t]||t}const ge={on(t,e,i,n){ue(t,e,i,n,!1)},one(t,e,i,n){ue(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,r,o]=ce(e,i,n),a=o!==e,h=he(t),l=h[o]||{},c=e.startsWith(".");if(void 0===r){if(c)for(const i of Object.keys(h))fe(t,h,i,e.slice(1));for(const[i,n]of Object.entries(l)){const s=i.replace(ie,"");a&&!e.includes(s)||de(t,h,o,n.callable,n.delegationSelector)}}else{if(!Object.keys(l).length)return;de(t,h,o,r,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=Kt();let s=null,r=!0,o=!0,a=!1;e!==pe(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),r=!s.isPropagationStopped(),o=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());const h=me(new Event(e,{bubbles:r,cancelable:!0}),i);return a&&h.preventDefault(),o&&t.dispatchEvent(h),h.defaultPrevented&&s&&s.preventDefault(),h}};function me(t,e={}){for(const[i,n]of Object.entries(e))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}function _e(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function ve(t){return t.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const ye={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${ve(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ve(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter(t=>t.startsWith("bs")&&!t.startsWith("bsConfig"));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1),e[i]=_e(t.dataset[n])}return e},getDataAttribute:(t,e)=>_e(t.getAttribute(`data-bs-${ve(e)}`))};class we{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=Bt(e)?ye.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Bt(e)?ye.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const[i,n]of Object.entries(e)){const e=t[i],s=Bt(e)?"element":jt(e);if(!new RegExp(n).test(s))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${i}" provided type "${s}" but expected type "${n}".`)}}}class be extends we{constructor(t,e){super(),(t=zt(t))&&(this._element=t,this._config=this._getConfig(e),Rt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Rt.remove(this._element,this.constructor.DATA_KEY),ge.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){Jt(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Rt.get(zt(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.3.8"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const xe=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e?e.split(",").map(t=>Dt(t)).join(","):null},Se={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(t=>`${t}:not([tabindex^="-"])`).join(",");return this.find(e,t).filter(t=>!Ut(t)&&qt(t))},getSelectorFromElement(t){const e=xe(t);return e&&Se.findOne(e)?e:null},getElementFromSelector(t){const e=xe(t);return e?Se.findOne(e):null},getMultipleElementsFromSelector(t){const e=xe(t);return e?Se.find(e):[]}},Ee=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;ge.on(document,i,`[data-bs-dismiss="${n}"]`,function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Ut(this))return;const s=Se.getElementFromSelector(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()})},Ae=".bs.alert",Ce=`close${Ae}`,Me=`closed${Ae}`;class Le extends be{static get NAME(){return"alert"}close(){if(ge.trigger(this._element,Ce).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,t)}_destroyElement(){this._element.remove(),ge.trigger(this._element,Me),this.dispose()}static jQueryInterface(t){return this.each(function(){const e=Le.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
2amed "${t}"`);e[t](this)}})}}Ee(Le,"close"),Yt(Le);const Pe='[data-bs-toggle="button"]';class ke extends be{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each(function(){const e=ke.getOrCreateInstance(this);"toggle"===t&&e[t]()})}}ge.on(document,"click.bs.button.data-api",Pe,t=>{t.preventDefault();const e=t.target.closest(Pe);ke.getOrCreateInstance(e).toggle()}),Yt(ke);const Ne=".bs.swipe",Ie=`touchstart${Ne}`,Te=`touchmove${Ne}`,Oe=`touchend${Ne}`,Re=`pointerdown${Ne}`,Fe=`pointerup${Ne}`,De={endCallback:null,leftCallback:null,rightCallback:null},je={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Ge extends we{constructor(t,e){super(),this._element=t,t&&Ge.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return De}static get DefaultType(){return je}static get NAME(){return"swipe"}dispose(){ge.off(this._element,Ne)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Zt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Zt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(ge.on(this._element,Re,t=>this._start(t)),ge.on(this._element,Fe,t=>this._end(t)),this._element.classList.add("pointer-event")):(ge.on(this._element,Ie,t=>this._start(t)),ge.on(this._element,Te,t=>this._move(t)),ge.on(this._element,Oe,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const Be=".bs.carousel",ze=".data-api",qe="ArrowLeft",Ue="ArrowRight",We="next",Ve="prev",He="left",Ke="right",$e=`slide${Be}`,Xe=`slid${Be}`,Ye=`keydown${Be}`,Ze=`mouseenter${Be}`,Je=`mouseleave${Be}`,Qe=`dragstart${Be}`,ti=`load${Be}${ze}`,ei=`click${Be}${ze}`,ii="carousel",ni="active",si=".active",ri=".carousel-item",oi=si+ri,ai={[qe]:Ke,[Ue]:He},hi={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},li={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ci extends be{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Se.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===ii&&this.cycle()}static get Default(){return hi}static get DefaultType(){return li}static get NAME(){return"carousel"}next(){this._slide(We)}nextWhenVisible(){!document.hidden&&qt(this._element)&&this.next()}prev(){this._slide(Ve)}pause(){this._isSliding&&Gt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?ge.one(this._element,Xe,()=>this.cycle()):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void ge.one(this._element,Xe,()=>this.to(t));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?We:Ve;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&ge.on(this._element,Ye,t=>this._keydown(t)),"hover"===this._config.pause&&(ge.on(this._element,Ze,()=>this.pause()),ge.on(this._element,Je,()=>this._maybeEnableCycle())),this._config.touch&&Ge.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of Se.find(".carousel-item img",this._element))ge.on(t,Qe,t=>t.preventDefault());const t={leftCallback:()=>this._slide(this._directionToOrder(He)),rightCallback:()=>this._slide(this._directionToOrder(Ke)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new Ge(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ai[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=Se.findOne(si,this._indicatorsElement);e.classList.remove(ni),e.removeAttribute("aria-current");const i=Se.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(ni),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===We,s=e||Qt(this._getItems(),i,n,this._config.wrap);if(s===i)return;const r=this._getItemIndex(s),o=e=>ge.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:r});if(o($e).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(r),this._activeElement=s;const h=n?"carousel-item-start":"carousel-item-end",l=n?"carousel-item-next":"carousel-item-prev";s.classList.add(l),Ht(s),i.classList.add(h),s.classList.add(h),this._queueCallback(()=>{s.classList.remove(h,l),s.classList.add(ni),i.classList.remove(ni,l,h),this._isSliding=!1,o(Xe)},i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return Se.findOne(oi,this._element)}_getItems(){return Se.find(ri,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Xt()?t===He?Ve:We:t===He?We:Ve}_orderToDirection(t){return Xt()?t===Ve?He:Ke:t===Ve?Ke:He}static jQueryInterface(t){return this.each(function(){const e=ci.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
2amed "${t}"`);e[t]()}}else e.to(t)})}}ge.on(document,ei,"[data-bs-slide], [data-bs-slide-to]",function(t){const e=Se.getElementFromSelector(this);if(!e||!e.classList.contains(ii))return;t.preventDefault();const i=ci.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===ye.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())}),ge.on(window,ti,()=>{const t=Se.find('[data-bs-ride="carousel"]');for(const e of t)ci.getOrCreateInstance(e)}),Yt(ci);const ui=".bs.collapse",di=`show${ui}`,fi=`shown${ui}`,pi=`hide${ui}`,gi=`hidden${ui}`,mi=`click${ui}.data-api`,_i="show",vi="collapse",yi="collapsing",wi=`:scope .${vi} .${vi}`,bi='[data-bs-toggle="collapse"]',xi={parent:null,toggle:!0},Si={parent:"(null|element)",toggle:"boolean"};class Ei extends be{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=Se.find(bi);for(const t of i){const e=Se.getSelectorFromElement(t),i=Se.find(e).filter(t=>t===this._element);null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return xi}static get DefaultType(){return Si}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(t=>t!==this._element).map(t=>Ei.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning)return;if(ge.trigger(this._element,di).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(vi),this._element.classList.add(yi),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(yi),this._element.classList.add(vi,_i),this._element.style[e]="",ge.trigger(this._element,fi)},this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(ge.trigger(this._element,pi).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,Ht(this._element),this._element.classList.add(yi),this._element.classList.remove(vi,_i);for(const t of this._triggerArray){const e=Se.getElementFromSelector(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(yi),this._element.classList.add(vi),ge.trigger(this._element,gi)},this._element,!0)}_isShown(t=this._element){return t.classList.contains(_i)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=zt(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(bi);for(const e of t){const t=Se.getElementFromSelector(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=Se.find(wi,this._config.parent);return Se.find(t,this._config.parent).filter(t=>!e.includes(t))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each(function(){const i=Ei.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}})}}ge.on(document,mi,bi,function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();for(const t of Se.getMultipleElementsFromSelector(this))Ei.getOrCreateInstance(t,{toggle:!1}).toggle()}),Yt(Ei);const Ai="dropdown",Ci=".bs.dropdown",Mi=".data-api",Li="ArrowUp",Pi="ArrowDown",ki=`hide${Ci}`,Ni=`hidden${Ci}`,Ii=`show${Ci}`,Ti=`shown${Ci}`,Oi=`click${Ci}${Mi}`,Ri=`keydown${Ci}${Mi}`,Fi=`keyup${Ci}${Mi}`,Di="show",ji='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Gi=`${ji}.${Di}`,Bi=".dropdown-menu",zi=Xt()?"top-end":"top-start",qi=Xt()?"top-start":"top-end",Ui=Xt()?"bottom-end":"bottom-start",Wi=Xt()?"bottom-start":"bottom-end",Vi=Xt()?"left-start":"right-start",Hi=Xt()?"right-start":"left-start",Ki={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},$i={autoClose:"(boolean|string)",boundary:"(string|element)",display:"str
2ing",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Xi extends be{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=Se.next(this._element,Bi)[0]||Se.prev(this._element,Bi)[0]||Se.findOne(Bi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Ki}static get DefaultType(){return $i}static get NAME(){return Ai}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ut(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!ge.trigger(this._element,Ii,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))ge.on(t,"mouseover",Vt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Di),this._element.classList.add(Di),ge.trigger(this._element,Ti,t)}}hide(){if(Ut(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!ge.trigger(this._element,ki,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.off(t,"mouseover",Vt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Di),this._element.classList.remove(Di),this._element.setAttribute("aria-expanded","false"),ye.removeDataAttribute(this._menu,"popper"),ge.trigger(this._element,Ni,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Bt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${Ai.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){let t=this._element;"parent"===this._config.reference?t=this._parent:Bt(this._config.reference)?t=zt(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const e=this._getPopperConfig();this._popper=It(t,this._menu,e)}_isShown(){return this._menu.classList.contains(Di)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Vi;if(t.classList.contains("dropstart"))return Hi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?qi:zi:e?Wi:Ui}
vendor: 10,260 bytes, line 2
2_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(ye.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...Zt(this._config.popperConfig,[void 0,t])}}_selectMenuItem({key:t,target:e}){const i=Se.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(t=>qt(t));i.length&&Qt(i,e,t===Pi,!i.includes(e)).focus()}static jQueryInterface(t){return this.each(function(){const e=Xi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=Se.find(Gi);for(const i of e){const e=Xi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const r={relatedTarget:e._element};"click"===t.type&&(r.clickEvent=t),e._completeHide(r)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Li,Pi].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(ji)?this:Se.prev(this,ji)[0]||Se.next(this,ji)[0]||Se.findOne(ji,t.delegateTarget.parentNode),r=Xi.getOrCreateInstance(s);if(n)return t.stopPropagation(),r.show(),void r._selectMenuItem(t);r._isShown()&&(t.stopPropagation(),r.hide(),s.focus())}}ge.on(document,Ri,ji,Xi.dataApiKeydownHandler),ge.on(document,Ri,Bi,Xi.dataApiKeydownHandler),ge.on(document,Oi,Xi.clearMenus),ge.on(document,Fi,Xi.clearMenus),ge.on(document,Oi,ji,function(t){t.preventDefault(),Xi.getOrCreateInstance(this).toggle()}),Yt(Xi);const Yi="backdrop",Zi="show",Ji=`mousedown.bs.${Yi}`,Qi={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},tn={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class en extends we{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return Qi}static get DefaultType(){return tn}static get NAME(){return Yi}show(t){if(!this._config.isVisible)return void Zt(t);this._append();const e=this._getElement();this._config.isAnimated&&Ht(e),e.classList.add(Zi),this._emulateAnimation(()=>{Zt(t)})}hide(t){this._config.isVisible?(this._getElement().classList.remove(Zi),this._emulateAnimation(()=>{this.dispose(),Zt(t)})):Zt(t)}dispose(){this._isAppended&&(ge.off(this._element,Ji),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=zt(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),ge.on(t,Ji,()=>{Zt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){Jt(t,this._getElement(),this._config.isAnimated)}}const nn=".bs.focustrap",sn=`focusin${nn}`,rn=`keydown.tab${nn}`,on="backward",an={autofocus:!0,trapElement:null},hn={autofocus:"boolean",trapElement:"element"};class ln extends we{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return an}static get DefaultType(){return hn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),ge.off(document,nn),ge.on(document,sn,t=>this._handleFocusin(t)),ge.on(document,rn,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,ge.off(document,nn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=Se.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===on?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?on:"forward")}}const cn=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",un=".sticky-top",dn="padding-right",fn="margin-right";class pn{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,dn,e=>e+t),this._setElementAttributes(cn,dn,e=>e+t),this._setElementAttributes(un,fn,e=>e-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,dn),this._resetElementAttributes(cn,dn),this._resetElementAttributes(un,fn)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)})}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&ye.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,t=>{const i=ye.getDataAttribute(t,e);null!==i?(ye.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)})}_applyManipulationCallback(t,e){if(Bt(t))e(t);else for(const i of Se.find(t,this._element))e(i)}}const gn=".bs.modal",mn=`hide${gn}`,_n=`hidePrevented${gn}`,vn=`hidden${gn}`,yn=`show${gn}`,wn=`shown${gn}`,bn=`resize${gn}`,xn=`click.dismiss${gn}`,Sn=`mousedown.dismiss${gn}`,En=`keydown.dismiss${gn}`,An=`click${gn}.data-api`,Cn="modal-open",Mn="show",Ln="modal-static",Pn={backdrop:!0,focus:!0,keyboard:!0},kn={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Nn extends be{constructor(t,e){super(t,e),this._dialog=Se.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new pn,this._addEventListeners()}static get Default(){return Pn}static get DefaultType(){return kn}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||ge.trigger(this._element,yn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Cn),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){this._isShown&&!this._isTransitioning&&(ge.trigger(this._element,mn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Mn),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){ge.off(window,gn),ge.off(this._dialog,gn),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new en({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new ln({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=Se.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),Ht(this._element),this._element.classList.add(Mn),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,ge.trigger(this._element,wn,{relatedTarget:t})},this._dialog,this._isAnimated())}_addEventListeners(){ge.on(this._element,En,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),ge.on(window,bn,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),ge.on(this._element,Sn,t=>{ge.one(this._element,xn,e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Cn),this._resetAdjustments(),this._scrollBar.reset(),ge.trigger(this._element,vn)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(ge.trigger(this._element,_n).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Ln)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Ln),this._queueCallback(()=>{this._element.classList.remove(Ln),this._queueCallback(()=>{this._element.style.overflowY=e},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=Xt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=Xt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each(function(){const i=Nn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
2amed "${t}"`);i[t](e)}})}}ge.on(document,An,'[data-bs-toggle="modal"]',function(t){const e=Se.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),ge.one(e,yn,t=>{t.defaultPrevented||ge.one(e,vn,()=>{qt(this)&&this.focus()})});const i=Se.findOne(".modal.show");i&&Nn.getInstance(i).hide(),Nn.getOrCreateInstance(e).toggle(this)}),Ee(Nn),Yt(Nn);const In=".bs.offcanvas",Tn=".data-api",On=`load${In}${Tn}`,Rn="show",Fn="showing",Dn="hiding",jn=".offcanvas.show",Gn=`show${In}`,Bn=`shown${In}`,zn=`hide${In}`,qn=`hidePrevented${In}`,Un=`hidden${In}`,Wn=`resize${In}`,Vn=`click${In}${Tn}`,Hn=`keydown.dismiss${In}`,Kn={backdrop:!0,keyboard:!0,scroll:!1},$n={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Xn extends be{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Kn}static get DefaultType(){return $n}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||ge.trigger(this._element,Gn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new pn).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Fn),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Rn),this._element.classList.remove(Fn),ge.trigger(this._element,Bn,{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(ge.trigger(this._element,zn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Dn),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(Rn,Dn),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new pn).reset(),ge.trigger(this._element,Un)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new en({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():ge.trigger(this._element,qn)}:null})}_initializeFocusTrap(){return new ln({trapElement:this._element})}_addEventListeners(){ge.on(this._element,Hn,t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():ge.trigger(this._element,qn))})}static jQueryInterface(t){return this.each(function(){const e=Xn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}})}}ge.on(document,Vn,'[data-bs-toggle="offcanvas"]',function(t){const e=Se.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ut(this))return;ge.one(e,Un,()=>{qt(this)&&this.focus()});const i=Se.findOne(jn);i&&i!==e&&Xn.getInstance(i).hide(),Xn.getOrCreateInstance(e).toggle(this)}),ge.on(window,On,()=>{for(const t of Se.find(jn))Xn.getOrCreateInstance(t).show()}),ge.on(window,Wn,()=>{for(const t of Se.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Xn.getOrCreateInstance(t).hide()}),Ee(Xn),Yt(Xn);const Yn={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Zn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Jn=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Qn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Zn.has(i)||Boolean(Jn.test(t.nodeValue)):e.filter(t=>t instanceof RegExp).some(t=>t.test(i))},ts={allowList:Yn,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"<div></div>"},es={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},is={entry:"(string|element|function|null)",selector:"(string|element)"};class ns extends we{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return ts}static get DefaultType(){return es}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(t=>
vendor: 9,975 bytes, line 2
2this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},is)}_setContent(t,e,i){const n=Se.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?Bt(e)?this._putElementInTemplate(zt(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Qn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return Zt(t,[void 0,this])}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const ss=new Set(["sanitize","allowList","sanitizeFn"]),rs="fade",os="show",as=".tooltip-inner",hs=".modal",ls="hide.bs.modal",cs="hover",us="focus",ds="click",fs={AUTO:"auto",TOP:"top",RIGHT:Xt()?"left":"right",BOTTOM:"bottom",LEFT:Xt()?"right":"left"},ps={allowList:Yn,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',title:"",trigger:"hover focus"},gs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ms extends be{constructor(t,e){super(t,e),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return ps}static get DefaultType(){return gs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),ge.off(this._element.closest(hs),ls,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=ge.trigger(this._element,this.constructor.eventName("show")),e=(Wt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),ge.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(os),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.on(t,"mouseover",Vt);this._queueCallback(()=>{ge.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!ge.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(os),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))ge.off(t,"mouseover",Vt);this._activeTrigger[ds]=!1,this._activeTrigger[us]=!1,this._activeTrigger[cs]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),ge.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(rs,os),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(rs),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ns({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[as]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(rs)}_isShown(){return this.tip&&this.tip.classList.contains(os)}_createPopper(t){const e=Zt(this._config.placement,[this,t,this._element]),i=fs[e.toUpperCase()];return It(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return Zt(t,[this._element,this._element])}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,...Zt(this._config.popperConfig,[void 0,e])}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)ge.on(this._element,this.constructor.eventName("click"),this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger[ds]=!(e._isShown()&&e._activeTrigger[ds]),e.toggle()});else if("manual"!==e){const t=e===cs?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===cs?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");ge.on(this._element,t,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?us:cs]=!0,e._enter()}),ge.on(this._element,i,this._config.selector,t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?us:cs]=e._element.contains(t.relatedTarget),e._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},ge.on(this._element.closest(hs),ls,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=ye.getDataAttributes(this._element);for(const t of Object.keys(e))ss.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:zt(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[e,i]of Object.entries(this._config))this.constructor.Default[e]!==i&&(t[e]=i);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const e=ms.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
2amed "${t}"`);e[t]()}})}}Yt(ms);const _s=".popover-header",vs=".popover-body",ys={...ms.Default,content:"",offset:[0,8],placement:"right",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>',trigger:"click"},ws={...ms.DefaultType,content:"(null|string|element|function)"};class bs extends ms{static get Default(){return ys}static get DefaultType(){return ws}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[_s]:this._getTitle(),[vs]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const e=bs.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}})}}Yt(bs);const xs=".bs.scrollspy",Ss=`activate${xs}`,Es=`click${xs}`,As=`load${xs}.data-api`,Cs="active",Ms="[href]",Ls=".nav-link",Ps=`${Ls}, .nav-item > ${Ls}, .list-group-item`,ks={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Ns={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Is extends be{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return ks}static get DefaultType(){return Ns}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=zt(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map(t=>Number.parseFloat(t))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(ge.off(this._config.target,Es),ge.on(this._config.target,Es,Ms,t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(t=>this._observerCallback(t),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const r of t){if(!r.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(r));continue}const t=r.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(r),!n)return}else s||t||i(r)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Se.find(Ms,this._config.target);for(const e of t){if(!e.hash||Ut(e))continue;const t=Se.findOne(decodeURI(e.hash),this._element);qt(t)&&(this._targetLinks.set(decodeURI(e.hash),e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(Cs),this._activateParents(t),ge.trigger(this._element,Ss,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))Se.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(Cs);else for(const e of Se.parents(t,".nav, .list-group"))for(const t of Se.prev(e,Ps))t.classList.add(Cs)}_clearActiveClass(t){t.classList.remove(Cs);const e=Se.find(`${Ms}.${Cs}`,t);for(const t of e)t.classList.remove(Cs)}static jQueryInterface(t){return this.each(function(){const e=Is.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method n
2amed "${t}"`);e[t]()}})}}ge.on(window,As,()=>{for(const t of Se.find('[data-bs-spy="scroll"]'))Is.getOrCreateInstance(t)}),Yt(Is);const Ts=".bs.tab",Os=`hide${Ts}`,Rs=`hidden${Ts}`,Fs=`show${Ts}`,Ds=`shown${Ts}`,js=`click${Ts}`,Gs=`keydown${Ts}`,Bs=`load${Ts}`,zs="ArrowLeft",qs="ArrowRight",Us="ArrowUp",Ws="ArrowDown",Vs="Home",Hs="End",Ks="active",$s="fade",Xs="show",Ys=".dropdown-toggle",Zs=`:not(${Ys})`,Js='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',Qs=`.nav-link${Zs}, .list-group-item${Zs}, [role="tab"]${Zs}, ${Js}`,tr=`.${Ks}[data-bs-toggle="tab"], .${Ks}[data-bs-toggle="pill"], .${Ks}[data-bs-toggle="list"]`;class er extends be{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),ge.on(this._element,Gs,t=>this._keydown(t)))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?ge.trigger(e,Os,{relatedTarget:t}):null;ge.trigger(t,Fs,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Ks),this._activate(Se.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),ge.trigger(t,Ds,{relatedTarget:e})):t.classList.add(Xs)},t,t.classList.contains($s)))}_deactivate(t,e){t&&(t.classList.remove(Ks),t.blur(),this._deactivate(Se.getElementFromSelector(t)),this._queueCallback(()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),ge.trigger(t,Rs,{relatedTarget:e})):t.classList.remove(Xs)},t,t.classList.contains($s)))}_keydown(t){if(![zs,qs,Us,Ws,Vs,Hs].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=this._getChildren().filter(t=>!Ut(t));let i;if([Vs,Hs].includes(t.key))i=e[t.key===Vs?0:e.length-1];else{const n=[qs,Ws].includes(t.key);i=Qt(e,t.target,n,!0)}i&&(i.focus({preventScroll:!0}),er.getOrCreateInstance(i).show())}_getChildren(){return Se.find(Qs,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Se.getElementFromSelector(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=Se.findOne(t,i);s&&s.classList.toggle(n,e)};n(Ys,Ks),n(".dropdown-menu",Xs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Ks)}_getInnerElement(t){return t.matches(Qs)?t:Se.findOne(Qs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each(function(){const e=er.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}})}}ge.on(document,js,Js,function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ut(this)||er.getOrCreateInstance(this).show()}),ge.on(window,Bs,()=>{for(const t of Se.find(tr))er.getOrCreateInstance(t)}),Yt(er);const ir=".bs.toast",nr=`mouseover${ir}`,sr=`mouseout${ir}`,rr=`focusin${ir}`,or=`focusout${ir}`,ar=`hide${ir}`,hr=`hidden${ir}`,lr=`show${ir}`,cr=`shown${ir}`,ur="hide",dr="show",fr="showing",pr={animation:"boolean",autohide:"boolean",delay:"number"},gr={animation:!0,autohide:!0,delay:5e3};class mr extends be{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return gr}static get DefaultType(){return pr}static get NAME(){return"toast"}show(){ge.trigger(this._element,lr).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(ur),Ht(this._element),this._element.classList.add(dr,fr),this._queueCallback(()=>{this._element.classList.remove(fr),ge.trigger(this._element,cr),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(ge.trigger(this._element,ar).defaultPrevented||(this._element.classList.add(fr),this._queueCallback(()=>{this._element.classList.add(ur),this._element.classList.remove(fr,dr),ge.trigger(this._element,hr)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(dr),super.dispose()}isShown(){return this._element.classList.contains(dr)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){ge.on(this._element,nr,t=>this._onInteraction(t,!0)),ge.on(this._element,sr,t=>this._onInteraction(t,!1)),ge.on(this._element,rr,t=>this._onInteraction(t,!0)),ge.on(this._element,or,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const e=mr.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
2amed "${t}"`);e[t](this)}})}}Ee(mr),Yt(mr);const _r=2;let vr=1;function yr(...t){vr>_r||console.warn(...t)}function wr(t){const e=[1/0,1/0,-1/0,-1/0];for(let i=0,n=t.length;i<n;++i)Or(e,t[i]);return e}function br(t,e,i){return i?(i[0]=t[0]-e,i[1]=t[1]-e,i[2]=t[2]+e,i[3]=t[3]+e,i):[t[0]-e,t[1]-e,t[2]+e,t[3]+e]}function xr(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t.slice()}function Sr(t,e,i){let n,s;return n=e<t[0]?t[0]-e:t[2]<e?e-t[2]:0,s=i<t[1]?t[1]-i:t[3]<i?i-t[3]:0,n*n+s*s}function Er(t,e){return Cr(t,e[0],e[1])}function Ar(t,e){return t[0]<=e[0]&&e[2]<=t[2]&&t[1]<=e[1]&&e[3]<=t[3]}function Cr(t,e,i){return t[0]<=e&&e<=t[2]&&t[1]<=i&&i<=t[3]}function Mr(t,e){const i=t[0],n=t[1],s=t[2],r=t[3],o=e[0],a=e[1];let h=0;return o<i?h|=16:o>s&&(h|=4),a<n?h|=8:a>r&&(h|=2),0===h&&(h=1),h}function Lr(t,e,i,n,s){return s?(s[0]=t,s[1]=e,s[2]=i,s[3]=n,s):[t,e,i,n]}function Pr(t){return Lr(1/0,1/0,-1/0,-1/0,t)}function kr(t,e){const i=t[0],n=t[1];return Lr(i,n,i,n,e)}function Nr(t,e,i,n,s){return Rr(Pr(s),t,e,i,n)}function Ir(t,e){return t[0]==e[0]&&t[2]==e[2]&&t[1]==e[1]&&t[3]==e[3]}function Tr(t,e){return e[0]<t[0]&&(t[0]=e[0]),e[2]>t[2]&&(t[2]=e[2]),e[1]<t[1]&&(t[1]=e[1]),e[3]>t[3]&&(t[3]=e[3]),t}function Or(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function Rr(t,e,i,n,s){for(;i<n;i+=s)Fr(t,e[i],e[i+1]);return t}function Fr(t,e,i){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],i)}function Dr(t,e){let i;return i=e(Gr(t)),i||(i=e(Br(t)),i||(i=e(Xr(t)),i||(i=e($r(t)),i||!1)))}function jr(t){let e=0;return Jr(t)||(e=Yr(t)*Vr(t)),e}function Gr(t){return[t[0],t[1]]}function Br(t){return[t[2],t[1]]}function zr(t){return[(t[0]+t[2])/2,(t[1]+t[3])/2]}function qr(t,e){let i;if("bottom-left"===e)i=Gr(t);else if("bottom-right"===e)i=Br(t);else if("top-left"===e)i=$r(t);else{if("top-right"!==e)throw new Error("Invalid corner");i=Xr(t)}return i}function Ur(t,e,i,n,s){const[r,o,a,h,l,c,u,d]=Wr(t,e,i,n);return Lr(Math.min(r,a,l,u),Math.min(o,h,c,d),Math.max(r,a,l,u),Math.max(o,h,c,d),s)}function Wr(t,e,i,n){const s=e*n[0]/2,r=e*n[1]/2,o=Math.cos(i),a=Math.sin(i),h=s*o,l=s*a,c=r*o,u=r*a,d=t[0],f=t[1];return[d-h+u,f-l-c,d-h-u,f-l+c,d+h-u,f+l+c,d+h+u,f+l-c,d-h+u,f-l-c]}function Vr(t){return t[3]-t[1]}function Hr(t,e,i){const n=i||[1/0,1/0,-1/0,-1/0];return Zr(t,e)?(t[0]>e[0]?n[0]=t[0]:n[0]=e[0],t[1]>e[1]?n[1]=t[1]:n[1]=e[1],t[2]<e[2]?n[2]=t[2]:n[2]=e[2],t[3]<e[3]?n[3]=t[3]:n[3]=e[3]):Pr(n),n}function Kr(t,e){if(!Zr(t,e))return[t.slice()];if(Ar(e,t))return[];const[i,n,s,r]=t,o=Math.max(i,e[0]),a=Math.max(n,e[1]),h=Math.min(s,e[2]),l=Math.min(r,e[3]),c=[];return o>i&&c.push([i,n,o,r]),h<s&&c.push([h,n,s,r]),a>n&&c.push([o,n,h,a]),l<r&&c.push([o,l,h,r]),c}function $r(t){return[t[0],t[3]]}function Xr(t){return[t[2],t[3]]}function Yr(t){return t[2]-t[0]}function Zr(t,e){return t[0]<=e[2]&&t[2]>=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function Jr(t){return t[2]<t[0]||t[3]<t[1]}function Qr(t,e){const i=e.getExtent(),n=zr(t);if(e.canWrapX()&&(n[0]<i[0]||n[0]>=i[2])){const e=Yr(i),s=Math.floor((n[0]-i[0])/e)*e;t[0]-=s,t[2]-=s}return t}function to(t,e,i){if(e.canWrapX()){const n=e.getExtent();if(!isFinite(t[0])||!isFinite(t[2]))return[[n[0],t[1],n[2],t[3]]];Qr(t,e);const s=Yr(n);if(Yr(t)>s&&!i)return[[n[0],t[1],n[2],t[3]]];if(t[0]<n[0])return[[t[0]+s,t[1],n[2],t[3]],[n[0],t[1],t[2],t[3]]];if(t[2]>n[2])return[[t[0],t[1],n[2],t[3]],[n[0],t[1],t[2]-s,t[3]]]}return[t]}function eo(t,e){let i=[t];for(let t=0,n=e.length;t<n&&i.length>0;++t){const n=[];for(let s=0,r=i.length;s<r;++s)n.push(...Kr(i[s],e[t]));i=n}return i}function io(t,e,i){return Math.min(Math.max(t,e),i)}function no(t,e,i,n,s,r){const o=s-i,a=r-n;if(0!==o||0!==a){const h=((t-i)*o+(e-n)*a)/(o*o+a*a);h>1?(i=s,n=r):h>0&&(i+=o*h,n+=a*h)}return so(t,e,i,n)}function so(t,e,i,n){const s=i-t,r=n-e;return s*s+r*r}function ro(t){return 180*t/Math.PI}function oo(t){return t*Math.PI/180}function ao(t,e){const i=t%e;return i*e<0?i+e:i}function ho(t,e,i){return t+i*(e-t)}function lo(t,e){const i=Math.pow(10,e);return Math.round(t*i)/i}function co(t,e){return Math.floor(lo(t,e))}function uo(t,e){return Math.ceil(lo(t,e))}function fo(t,e,i){if(t>=e&&t<i)return t;const n=i-e;return((t-e)%n+n)%n+e}function po(t,e){let i=!0;for(let n=t.length-1;n>=0;--n)if(t[n]!=e[n]){i=!1;break}return i}function go(t,e){const i=Math.cos(e),n=Math.sin(e),s=t[0]*i-t[1]*n,r=t[1]*i+t[0]*n;return t[0]=s,t[1]=r,t}function mo(t,e){if(e.canWrapX()){const i=Yr(e.getExtent()),n=_o(t,e,i);n&&(t[0]-=n*i)}return t}
vendor: 6,005 bytes, line 2
2function _o(t,e,i){const n=e.getExtent();let s=0;return e.canWrapX()&&(t[0]<n[0]||t[0]>n[2])&&(i=i||Yr(n),s=Math.floor((t[0]-n[0])/i)),s}const vo={radians:6370997/(2*Math.PI),degrees:2*Math.PI*6370997/360,ft:.3048,m:1,"us-ft":1200/3937},yo=class{constructor(t){this.code_=t.code,this.units_=t.units,this.extent_=void 0!==t.extent?t.extent:null,this.worldExtent_=void 0!==t.worldExtent?t.worldExtent:null,this.axisOrientation_=void 0!==t.axisOrientation?t.axisOrientation:"enu",this.global_=void 0!==t.global&&t.global,this.canWrapX_=!(!this.global_||!this.extent_),this.getPointResolutionFunc_=t.getPointResolution,this.defaultTileGrid_=null,this.metersPerUnit_=t.metersPerUnit}canWrapX(){return this.canWrapX_}getCode(){return this.code_}getExtent(){return this.extent_}getUnits(){return this.units_}getMetersPerUnit(){return this.metersPerUnit_||vo[this.units_]}getWorldExtent(){return this.worldExtent_}getAxisOrientation(){return this.axisOrientation_}isGlobal(){return this.global_}setGlobal(t){this.global_=t,this.canWrapX_=!(!t||!this.extent_)}getDefaultTileGrid(){return this.defaultTileGrid_}setDefaultTileGrid(t){this.defaultTileGrid_=t}setExtent(t){this.extent_=t,this.canWrapX_=!(!this.global_||!t)}setWorldExtent(t){this.worldExtent_=t}setGetPointResolution(t){this.getPointResolutionFunc_=t}getPointResolutionFunc(){return this.getPointResolutionFunc_}},wo=6378137,bo=Math.PI*wo,xo=[-bo,-bo,bo,bo],So=[-180,-85,180,85],Eo=wo*Math.log(Math.tan(Math.PI/2));class Ao extends yo{constructor(t){super({code:t,units:"m",extent:xo,global:!0,worldExtent:So,getPointResolution:function(t,e){return t/Math.cosh(e[1]/wo)}})}}const Co=[new Ao("EPSG:3857"),new Ao("EPSG:102100"),new Ao("EPSG:102113"),new Ao("EPSG:900913"),new Ao("http://www.opengis.net/def/crs/EPSG/0/3857"),new Ao("http://www.opengis.net/gml/srs/epsg.xml#3857")];const Mo=[-180,-90,180,90],Lo=6378137*Math.PI/180;class Po extends yo{constructor(t,e){super({code:t,units:"degrees",extent:Mo,axisOrientation:e,global:!0,metersPerUnit:Lo,worldExtent:Mo})}}const ko=[new Po("CRS:84"),new Po("EPSG:4326","neu"),new Po("urn:ogc:def:crs:OGC:1.3:CRS84"),new Po("urn:ogc:def:crs:OGC:2:84"),new Po("http://www.opengis.net/def/crs/OGC/1.3/CRS84"),new Po("http://www.opengis.net/gml/srs/epsg.xml#4326","neu"),new Po("http://www.opengis.net/def/crs/EPSG/0/4326","neu")];let No={};function Io(t){return No[t]||No[t.replace(/urn:(x-)?ogc:def:crs:EPSG:(.*:)?(\w+)$/,"EPSG:$3")]||null}let To={};function Oo(t,e,i){const n=t.getCode(),s=e.getCode();n in To||(To[n]={}),To[n][s]=i}function Ro(t,e){return t in To&&e in To[t]?To[t][e]:null}const Fo=.9996,Do=.00669438,jo=Do*Do,Go=jo*Do,Bo=Do/(1-Do),zo=Math.sqrt(1-Do),qo=(1-zo)/(1+zo),Uo=qo*qo,Wo=Uo*qo,Vo=Wo*qo,Ho=Vo*qo,Ko=.9983242984503243,$o=15*jo/256+45*Go/1024,Xo=35*Go/3072,Yo=1.5*qo-27/32*Wo+269/512*Ho,Zo=21/16*Uo-55/32*Vo,Jo=151/96*Wo-417/128*Ho,Qo=1097/512*Vo,ta=6378137;function ea(t,e,i){const n=t-5e5,s=(i.north?e:e-1e7)/Fo/(ta*Ko),r=s+Yo*Math.sin(2*s)+Zo*Math.sin(4*s)+Jo*Math.sin(6*s)+Qo*Math.sin(8*s),o=Math.sin(r),a=o*o,h=Math.cos(r),l=o/h,c=l*l,u=c*c,d=1-Do*a,f=Math.sqrt(1-Do*a),p=Bo*h**2,g=p*p,m=n/(ta/f*Fo),_=m*m,v=_*m,y=v*m,w=y*m,b=r-l/((1-Do)/d)*(_/2-y/24*(5+3*c+10*p-4*g-9*Bo))+w*m/720*(61+90*c+298*p+45*u-252*Bo-3*g);let x=(m-v/6*(1+2*c+p)+w/120*(5-2*p+28*c-3*g+8*Bo+24*u))/h;return x=fo(x+oo(na(i.number)),-Math.PI,Math.PI),[ro(x),ro(b)]}function ia(t,e,i){t=fo(t,-180,180),e<-80?e=-80:e>84&&(e=84);const n=oo(e),s=Math.sin(n),r=Math.cos(n),o=s/r,a=o*o,h=a*a,l=oo(t),c=oo(na(i.number)),u=ta/Math.sqrt(1-Do*s**2),d=Bo*r**2,f=r*fo(l-c,-Math.PI,Math.PI),p=f*f,g=p*f,m=g*f,_=m*f,v=_*f,y=ta*(Ko*n-.002514607064228144*Math.sin(2*n)+$o*Math.sin(4*n)-Xo*Math.sin(6*n)),w=Fo*u*(f+g/6*(1-a+d)+_/120*(5-18*a+h+72*d-58*Bo))+5e5;let b=Fo*(y+u*o*(p/2+m/24*(5-a+9*d+4*d**2)+v/720*(61-58*a+h+600*d-330*Bo)));return i.north||(b+=1e7),[w,b]}function na(t){return 6*(t-1)-180+3}const sa=[/^EPSG:(\d+)$/,/^urn:ogc:def:crs:EPSG::(\d+)$/,/^http:\/\/www\.opengis\.net\/def\/crs\/EPSG\/0\/(\d+)$/];function ra(t){let e=0;for(const i of sa){const n=t.match(i);if(n){e=parseInt(n[1]);break}}if(!e)return null;let i=0,n=!1;return e>32700&&e<32761?i=e-32700:e>32600&&e<32661&&(n=!0,i=e-32600),i?{number:i,north:n}:null}function oa(t,e){return function(i,n,s,r){const o=i.length;s=s>1?s:2,r=r??s,n||(n=s>2?i.slice():new Array(o));for(let s=0;s<o;s+=r){const r=i[s],o=i[s+1],a=t(r,o,e);n[s]=a[0],n[s+1]=a[1]}return n}}function aa(t,e,i){i=i||6371008.8;const n=oo(t[1]),s=oo(e[1]),r=(s-n)/2,o=oo(e[0]-t[0])/2,a=Math.sin(r)*Math.sin(r)+Math.sin(o)*Math.sin(o)*Math.cos(n)*Math.cos(s);return 2*i*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}const ha=[function(t){const e=ra(t.getCode());return e?{forward:oa(ia,e),inverse:oa(ea,e)}:null}],la=[function(t){return ra(t)?new yo({code:t,units:"m"}):null}];let ca=!0;function ua(t,e){if(void 0!==e)for(let i=0,n=t.length;i<n;++i)e[i]=t[i];else e=t.slice();return e}function da(t){!function(t,e){No[t]=e}(t.getCode(),t),Oo(t,t,ua)}function fa(t){if("string"!=typeof t)return t;const e=Io(t);if(e)return e;for(const e of la){const i=e(t);if(i)return i}return null}function pa(t,e,i,n){let s;const r=(t=fa(t)).getPointResolutionFunc();if(r){if(s=r(e,i),n&&n!==t.getUnits()){const e=t.getMetersPerUnit();e&&(s=s*e/vo[n])}}else{const r=t.getUnits();if("degrees"==r&&!n||"degrees"==n)s=e;else{const o=wa(t,fa("EPSG:4326"));if(o||"degrees"===r){let t=[i[0]-e/2,i[1],i[0]+e/2,i[1],i[0],i[1]-e/2,i[0],i[1]+e/2];t=o(t,t,2),s=(aa(t.slice(0,2),t.slice(2,4))+aa(t.slice(4,6),t.slice(6,8)))/2}else s=e*t.getMetersPerUnit();const a=n?vo[n]:t.getMetersPerUnit();void 0!==a&&(s/=a)}}return s}function ga(t){!function(t){t.forEach(da)}(t),t.forEach(function(e){t.forEach(function(t){e!==t&&Oo(e,t,ua)})})}function ma(t,e){return t?"string"==typeof t?fa(t):t:fa(e)}function _a(t){return function(e,i,n,s){const r=e.length;n=void 0!==n?n:2,s=s??n,i=void 0!==i?i:new Array(r);for(let o=0;o<r;o+=s){const r=t(e.slice(o,o+n)),a=r.length;for(let t=0,n=s;t<n;++t)i[o+t]=t>=a?e[o+t]:r[t]}return i}}
2function va(t,e,i,n){const s=fa(t),r=fa(e);Oo(s,r,_a(i)),Oo(r,s,_a(n))}function ya(t,e){if(t===e)return!0;const i=t.getUnits()===e.getUnits();return(t.getCode()===e.getCode()||wa(t,e)===ua)&&i}function wa(t,e){const i=t.getCode(),n=e.getCode();let s=Ro(i,n);if(s)return s;let r=null,o=null;for(const i of ha)r||(r=i(t)),o||(o=i(e));if(!r&&!o)return null;const a="EPSG:4326";if(o)if(r)s=ba(r.inverse,o.forward);else{const t=Ro(i,a);t&&(s=ba(t,o.forward))}else{const t=Ro(a,n);t&&(s=ba(r.inverse,t))}return s&&(da(t),da(e),Oo(t,e,s)),s}function ba(t,e){return function(i,n,s,r){return n=t(i,n,s,r),e(n,n,s,r)}}function xa(t,e){return wa(fa(t),fa(e))}function Sa(t,e,i){const n=xa(e,i);if(!n){const t=fa(e).getCode(),n=fa(i).getCode();throw new Error(`No transform available between ${t} and ${n}`)}return n(t,void 0,t.length)}let Ea=null;function Aa(){return Ea}function Ca(t,e){return t}function Ma(t,e){return ca&&!po(t,[0,0])&&t[0]>=-180&&t[0]<=180&&t[1]>=-90&&t[1]<=90&&(ca=!1,yr("Call useGeographic() from ol/proj once to work with [longitude, latitude] coordinates.")),t}function La(t,e){return t}function Pa(t,e){return t}function ka(t,e){return t}function Na(t,e,i){return function(n){let s,r;if(t.canWrapX()){const e=t.getExtent(),o=Yr(e);r=_o(n=n.slice(0),t,o),r&&(n[0]=n[0]-r*o),n[0]=io(n[0],e[0],e[2]),n[1]=io(n[1],e[1],e[3]),s=i(n)}else s=i(n);return r&&e.canWrapX()&&(s[0]+=r*Yr(e.getExtent())),s}}var Ia,Ta,Oa;function Ra(t){t("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),t("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),t("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");for(var e=1;e<=60;++e)t("EPSG:"+(32600+e),"+proj=utm +zone="+e+" +datum=WGS84 +units=m"),t("EPSG:"+(32700+e),"+proj=utm +zone="+e+" +south +datum=WGS84 +units=m");t("EPSG:5041","+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),t("EPSG:5042","+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"),t.WGS84=t["EPSG:4326"],t["EPSG:3785"]=t["EPSG:3857"],t.GOOGLE=t["EPSG:3857"],t["EPSG:900913"]=t["EPSG:3857"],t["EPSG:102113"]=t["EPSG:3857"]}ga(Co),ga(ko),Ia=Co,Ta=function(t,e,i,n){const s=t.length;i=i>1?i:2,n=n??i,void 0===e&&(e=i>2?t.slice():new Array(s));for(let i=0;i<s;i+=n){e[i]=bo*t[i]/180;let n=wo*Math.log(Math.tan(Math.PI*(+t[i+1]+90)/360));n>Eo?n=Eo:n<-Eo&&(n=-Eo),e[i+1]=n}return e},Oa=function(t,e,i,n){const s=t.length;i=i>1?i:2,n=n??i,void 0===e&&(e=i>2?t.slice():new Array(s));for(let i=0;i<s;i+=n)e[i]=180*t[i]/bo,e[i+1]=360*Math.atan(Math.exp(t[i+1]/wo))/Math.PI-90;return e},ko.forEach(function(t){Ia.forEach(function(e){Oo(t,e,Ta),Oo(e,t,Oa)})}),i.dn(Ra);var Fa=6378137,Da=.0066943799901413165,ja=484813681109536e-20,Ga=Math.PI/2,Ba=1e-10,za=.017453292519943295,qa=57.29577951308232,Ua=Math.PI/4,Wa=2*Math.PI,Va=3.14159265359;const Ha={greenwich:0,lisbon:-9.131906111111,paris:2.337229166667,bogota:-74.080916666667,madrid:-3.687938888889,rome:12.452333333333,bern:7.439583333333,jakarta:106.807719444444,ferro:-17.666666666667,brussels:4.367975,stockholm:18.058277777778,athens:23.7163375,oslo:10.722916666667},Ka={mm:{to_meter:.001},cm:{to_meter:.01},ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937},fath:{to_meter:1.8288},kmi:{to_meter:1852},"us-ch":{to_meter:20.1168402336805},"us-mi":{to_meter:1609.34721869444},km:{to_meter:1e3},"ind-ft":{to_meter:.30479841},"ind-yd":{to_meter:.91439523},mi:{to_meter:1609.344},yd:{to_meter:.9144},ch:{to_meter:20.1168},link:{to_meter:.201168},dm:{to_meter:.1},in:{to_meter:.0254},"ind-ch":{to_meter:20.11669506},"us-in":{to_meter:.025400050800101},"us-yd":{to_meter:.914401828803658}};var $a=/[\s_\-\/\(\)]/g;function Xa(t,e){if(t[e])return t[e];for(var i,n=Object.keys(t),s=e.toLowerCase().replace($a,""),r=-1;++r<n.length;)if((i=n[r]).toLowerCase().replace($a,"")===s)return t[i]}function Ya(t){var e,i,n,s={},r=t.split("+").map(function(t){return t.trim()}).filter(function(t){return t}).reduce(function(t,e){var i=e.split("=");return i.push(!0),t[i[0].toLowerCase()]=i[1],t},{}),o={proj:function(t){s.projName=["lonlat","latlon","latlong"].includes(t)?"longlat":t}
2,datum:"datumCode",rf:function(t){s.rf=parseFloat(t)},lat_0:function(t){s.lat0=t*za},lat_1:function(t){s.lat1=t*za},lat_2:function(t){s.lat2=t*za},lat_ts:function(t){s.lat_ts=t*za},lon_0:function(t){s.long0=t*za},lon_wrap:function(t){s.long_wrap=parseFloat(t)*za},lon_1:function(t){s.long1=t*za},lon_2:function(t){s.long2=t*za},alpha:function(t){s.alpha=parseFloat(t)*za},gamma:function(t){s.rectified_grid_angle=parseFloat(t)*za},lonc:function(t){s.longc=t*za},x_0:function(t){s.x0=parseFloat(t)},y_0:function(t){s.y0=parseFloat(t)},k_0:function(t){s.k0=parseFloat(t)},k:function(t){s.k0=parseFloat(t)},a:function(t){s.a=parseFloat(t)},b:function(t){s.b=parseFloat(t)},r:function(t){s.a=s.b=parseFloat(t)},r_a:function(){s.R_A=!0},zone:function(t){s.zone=parseInt(t,10)},south:function(){s.utmSouth=!0},towgs84:function(t){s.datum_params=t.split(",").map(function(t){return parseFloat(t)})},to_meter:function(t){s.to_meter=parseFloat(t)},units:function(t){s.units=t;var e=Xa(Ka,t);e&&(s.to_meter=e.to_meter)},from_greenwich:function(t){s.from_greenwich=t*za},pm:function(t){var e=Xa(Ha,t);s.from_greenwich=(e||parseFloat(t))*za},nadgrids:function(t){"@null"===t?s.datumCode="none":s.nadgrids=t},axis:function(t){var e="ewnsud";3===t.length&&-1!==e.indexOf(t.substr(0,1))&&-1!==e.indexOf(t.substr(1,1))&&-1!==e.indexOf(t.substr(2,1))&&(s.axis=t)},approx:function(){s.approx=!0},over:function(){s.over=!0}};for(e in r)i=r[e],e in o?"function"==typeof(n=o[e])?n(i):s[n]=i:s[e]=i;return"string"==typeof s.datumCode&&"WGS84"!==s.datumCode&&(s.datumCode=s.datumCode.toLowerCase()),s.projStr=t,s}i.dn(Ya);const Za=class{static getId(t){const e=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return e&&e.length>=3?{authority:e[1],code:parseInt(e[2],10)}:null}static convertUnit(t,e="unit"){if(!t||t.length<3)return{type:e,name:"unknown",conversion_factor:null};const i=t[1],n=parseFloat(t[2])||null,s=t.find(t=>Array.isArray(t)&&"ID"===t[0]);return{type:e,name:i,conversion_factor:n,id:s?{authority:s[1],code:parseInt(s[2],10)}:null}}static convertAxis(t){const e=t[1]||"Unknown";let i;const n=e.match(/^\((.)\)$/);if(n){const e=n[1].toUpperCase();if("E"===e)i="east";else if("N"===e)i="north";else if("U"===e)i="up";else{if(!t[2])throw new Error(`Unknown axis abbreviation: ${e}`);i=t[2]}}else i=t[2]||"unknown";const s=t.find(t=>Array.isArray(t)&&"ORDER"===t[0]),r=s?parseInt(s[1],10):null,o=t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]));return{name:e,direction:i,unit:this.convertUnit(o),order:r}}static extractAxes(t){return t.filter(t=>Array.isArray(t)&&"AXIS"===t[0]).map(t=>this.convertAxis(t)).sort((t,e)=>(t.order||0)-(e.order||0))}static convert(t,e={}){switch(t[0]){case"PROJCRS":e.type="ProjectedCRS",e.name=t[1],e.base_crs=t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"BASEGEOGCRS"===t[0])):null,e.conversion=t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"CONVERSION"===t[0])):null;const i=t.find(t=>Array.isArray(t)&&"CS"===t[0]);i&&(e.coordinate_system={subtype:i[1],axis:this.extractAxes(t)});const n=t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]);if(n){const t=this.convertUnit(n);e.coordinate_system.unit=t}e.id=this.getId(t);break;case"BASEGEOGCRS":case"GEOGCRS":case"GEODCRS":e.type="GEODCRS"===t[0]?"GeodeticCRS":"GeographicCRS",e.name=t[1];const s=t.find(t=>Array.isArray(t)&&("DATUM"===t[0]||"ENSEMBLE"===t[0]));if(s){const i=this.convert(s);"ENSEMBLE"===s[0]?e.datum_ensemble=i:e.datum=i;const n=t.find(t=>Array.isArray(t)&&"PRIMEM"===t[0]);n&&"Greenwich"!==n[1]&&(i.prime_meridian={name:n[1],longitude:parseFloat(n[2])})}const r=t.find(t=>Array.isArray(t)&&"CS"===t[0]);e.coordinate_system={subtype:r?r[1]:"ellipsoidal",axis:this.extractAxes(t)},e.id=this.getId(t);break;case"DATUM":e.type="GeodeticReferenceFrame",e.name=t[1],e.ellipsoid=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0])):null;break;case"ENSEMBLE":e.type="DatumEnsemble",e.name=t[1],e.members=t.filter(t=>Array.isArray(t)&&"MEMBER"===t[0]).map(t=>({type:"DatumEnsembleMember",name:t[1],id:this.getId(t)}));const o=t.find(t=>Array.isArray(t)&&"ENSEMBLEACCURACY"===t[0]);o&&(e.accuracy=parseFloat(o[1]));const a=t.find(t=>Array.isArray(t)&&"ELLIPSOID"===t[0]);a&&(e.ellipsoid=this.convert(a)),e.id=this.getId(t);break;case"ELLIPSOID":e.type="Ellipsoid",e.name=t[1],e.semi_major_axis=parseFloat(t[2]),e.inverse_flattening=parseFloat(t[3]),t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0])&&this.convert(t.find(t=>Array.isArray(t)&&"LENGTHUNIT"===t[0]),e);break;case"CONVERSION":e.type="Conversion",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&"PARAMETER"===t[0]).map(t=>this.convert(t));break;case"METHOD":e.type="Method",e.name=t[1],e.id=this.getId(t);break;case"PARAMETER":e.type="Parameter",e.name=t[1],e.value=parseFloat(t[2]),e.unit=this.convertUnit(t.find(t=>Array.isArray(t)&&("LENGTHUNIT"===t[0]||"ANGLEUNIT"===t[0]||"SCALEUNIT"===t[0]))),e.id=this.getId(t);break;case"BOUNDCRS":e.type="BoundCRS";const h=t.find(t=>Array.isArray(t)&&"SOURCECRS"===t[0]);if(h){const t=h.find(t=>Array.isArray(t));e.source_crs=t?this.convert(t):null}const l=t.find(t=>Array.isArray(t)&&"TARGETCRS"===t[0]);if(l){const t=l.find(t=>Array.isArray(t));e.target_crs=t?this.convert(t):null}const c=t.find(t=>Array.isArray(t)&&"ABRIDGEDTRANSFORMATION"===t[0]);e.transformation=c?this.convert(c):null;break;case"ABRIDGEDTRANSFORMATION":if(e.type="Transformation",e.name=t[1],e.method=t.find(t=>Array.isArray(t)&&"METHOD"===t[0])?this.convert(t.find(t=>Array.isArray(t)&&"METHOD"===t[0])):null,e.parameters=t.filter(t=>Array.isArray(t)&&("PARAMETER"===t[0]||"PARAMETERFILE"===t[0])).map(t=>"PARAMETER"===t[0]?this.convert(t):"PARAMETERFILE"===t[0]?{name:t[1],value:t[2],id:{authority:"EPSG",code:8656}}:void 0),7===e.parameters.length){const t=e.parameters[6];"Scale difference"===t.name&&(t.value=Math.round(1e12*(t.value-1))/1e6)}e.id=this.getId(t);break;case"AXIS":e.coordinate_system||(e.coordinate_system={type:"unspecified",axis:[]}),e.coordinate_system.axis.push(this.convertAxis(t));break;case"LENGTHUNIT":const u=this.convertUnit(t,"LinearUnit");e.coordinate_system&&e.coordinate_system.axis&&e.coordinate_system.axis.forEach(t=>{t.unit||(t.unit=u)}),u.conversion_factor&&1!==u.conversion_factor&&e.semi_major_axis&&(e.semi_major_axis={value:e.semi_major_axis,unit:u});break;default:e.keyword=t[0]}return e}};var Ja=1,Qa=/\s/,th=/[A-Za-z]/,eh=/[A-Za-z84_]/,ih=/[,\]]/,nh=/[\d\.E\-\+]/;function sh(t){if("string"!=typeof t)throw new Error("not a string");this.text=t.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=Ja}function rh(t,e,i){Array.isArray(e)&&(i.unshift(e),e=null);var n=e?{}:t,s=i.reduce(function(t,e){return oh(e,t),t},n);e&&(t[e]=s)}function oh(t,e){if(Array.isArray(t)){var i=t.shift();if("PARAMETER"===i&&(i=t.shift()),1===t.length)return Array.isArray(t[0])?(e[i]={},void oh(t[0],e[i])):void(e[i]=t[0]);
2if(t.length)if("TOWGS84"!==i){if("AXIS"===i)return i in e||(e[i]=[]),void e[i].push(t);var n;switch(Array.isArray(i)||(e[i]={}),i){case"UNIT":case"PRIMEM":case"VERT_DATUM":return e[i]={name:t[0].toLowerCase(),convert:t[1]},void(3===t.length&&oh(t[2],e[i]));case"SPHEROID":case"ELLIPSOID":return e[i]={name:t[0],a:t[1],rf:t[2]},void(4===t.length&&oh(t[3],e[i]));case"EDATUM":case"ENGINEERINGDATUM":case"LOCAL_DATUM":case"DATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":return t[0]=["name",t[0]],void rh(e,i,t);case"COMPD_CS":case"COMPOUNDCRS":case"FITTED_CS":case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"ENGCRS":case"ENGINEERINGCRS":return t[0]=["name",t[0]],rh(e,i,t),void(e[i].type=i);default:for(n=-1;++n<t.length;)if(!Array.isArray(t[n]))return oh(t,e[i]);return rh(e,i,t)}}else e[i]=t;else e[i]=!0}else e[t]=!0}function ah(t){return.017453292519943295*t}function hh(t){const e=(t.projName||"").toLowerCase().replace(/_/g," ");void 0===t.long0&&void 0!==t.longc&&(t.long0=t.longc),t.lat_ts||!t.lat1||"stereographic south pole"!==e&&"polar stereographic (variant b)"!==e?t.lat_ts||!t.lat0||"polar stereographic"!==e&&"polar stereographic (variant a)"!==e||(t.lat_ts=t.lat0,t.lat0=ah(t.lat0>0?90:-90),delete t.lat1):(t.lat0=ah(t.lat1>0?90:-90),t.lat_ts=t.lat1,delete t.lat1)}function lh(t){let e={units:null,to_meter:void 0};return"string"==typeof t?(e.units=t.toLowerCase(),"metre"===e.units&&(e.units="meter"),"meter"===e.units&&(e.to_meter=1)):t&&t.name&&(e.units=t.name.toLowerCase(),"metre"===e.units&&(e.units="meter"),e.to_meter=t.conversion_factor),e}function ch(t){return"object"==typeof t?t.value*t.unit.conversion_factor:t}function uh(t,e){t.ellipsoid.radius?(e.a=t.ellipsoid.radius,e.rf=0):(e.a=ch(t.ellipsoid.semi_major_axis),void 0!==t.ellipsoid.inverse_flattening?e.rf=t.ellipsoid.inverse_flattening:void 0!==t.ellipsoid.semi_major_axis&&void 0!==t.ellipsoid.semi_minor_axis&&(e.rf=e.a/(e.a-ch(t.ellipsoid.semi_minor_axis))))}function dh(t,e={}){return t&&"object"==typeof t?"BoundCRS"===t.type?(dh(t.source_crs,e),t.transformation&&(t.transformation.method&&"NTv2"===t.transformation.method.name?e.nadgrids=t.transformation.parameters[0].value:e.datum_params=t.transformation.parameters.map(t=>t.value)),e):(Object.keys(t).forEach(i=>{const n=t[i];if(null!==n)switch(i){case"name":if(e.srsCode)break;e.name=n,e.srsCode=n;break;case"type":"GeographicCRS"===n?e.projName="longlat":"GeodeticCRS"===n?t.coordinate_system&&"Cartesian"===t.coordinate_system.subtype?e.projName="geocent":e.projName="longlat":"ProjectedCRS"===n&&t.conversion&&t.conversion.method&&(e.projName=t.conversion.method.name);break;case"datum":case"datum_ensemble":n.ellipsoid&&(e.ellps=n.ellipsoid.name,uh(n,e)),n.prime_meridian&&(e.from_greenwich=n.prime_meridian.longitude*Math.PI/180);break;case"ellipsoid":e.ellps=n.name,uh(n,e);break;case"prime_meridian":e.long0=(n.longitude||0)*Math.PI/180;break;case"coordinate_system":if(n.axis){const t={east:"e",north:"n",west:"w",south:"s",up:"u",down:"d",geocentricx:"e",geocentricy:"n",geocentricz:"u"},i=n.axis.map(e=>t[e.direction.toLowerCase()]);if(i.every(Boolean)&&(e.axis=i.join(""),2===e.axis.length&&(e.axis+="u")),n.unit){const{units:t,to_meter:i}=lh(n.unit);e.units=t,e.to_meter=i}else if(n.axis[0]&&n.axis[0].unit){const{units:t,to_meter:i}=lh(n.axis[0].unit);e.units=t,e.to_meter=i}}break;case"id":n.authority&&n.code&&(e.title=n.authority+":"+n.code);break;case"conversion":n.method&&n.method.name&&(e.projName=n.method.name),n.parameters&&n.parameters.forEach(t=>{const i=t.name.toLowerCase().replace(/\s+/g,"_"),n=t.value;t.unit&&t.unit.conversion_factor?e[i]=n*t.unit.conversion_factor:"degree"===t.unit?e[i]=n*Math.PI/180:e[i]=n});break;case"unit":n.name&&(e.units=n.name.toLowerCase(),"metre"===e.units&&(e.units="meter")),n.conversion_factor&&(e.to_meter=n.conversion_factor);break;case"base_crs":dh(n,e),e.datumCode=n.id?n.id.authority+"_"+n.id.code:n.name}}),void 0!==e.latitude_of_false_origin&&(e.lat0=e.latitude_of_false_origin),void 0!==e.longitude_of_false_origin&&(e.long0=e.longitude_of_false_origin),void 0!==e.latitude_of_standard_parallel&&(e.lat0=e.latitude_of_standard_parallel,e.lat1=e.latitude_of_standard_parallel),void 0!==e.latitude_of_1st_standard_parallel&&(e.lat1=e.latitude_of_1st_standard_parallel),void 0!==e.latitude_of_2nd_standard_parallel&&(e.lat2=e.latitude_of_2nd_standard_parallel),void 0!==e.latitude_of_projection_centre&&(e.lat0=e.latitude_of_projection_centre),void 0!==e.longitude_of_projection_centre&&(e.longc=e.longitude_of_projection_centre),void 0!==e.easting_at_false_origin&&(e.x0=e.easting_at_false_origin),void 0!==e.northing_at_false_origin&&(e.y0=e.northing_at_false_origin),void 0!==e.latitude_of_natural_origin&&(e.lat0=e.latitude_of_natural_origin),void 0!==e.longitude_of_natural_origin&&(e.long0=e.longitude_of_natural_origin),void 0!==e.longitude_of_origin&&(e.long0=e.longitude_of_origin),void 0!==e.false_easting&&(e.x0=e.false_easting),e.easting_at_projection_centre&&(e.x0=e.easting_at_projection_centre),void 0!==e.false_northing&&(e.y0=e.false_northing),e.northing_at_projection_centre&&(e.y0=e.northing_at_projection_centre),void 0!==e.standard_parallel_1&&(e.lat1=e.standard_parallel_1),void 0!==e.standard_parallel_2&&(e.lat2=e.standard_parallel_2),void 0!==e.scale_factor_at_natural_origin&&(e.k0=e.scale_factor_at_natural_origin),void 0!==e.scale_factor_at_projection_centre&&(e.k0=e.scale_factor_at_projection_centre),void 0!==e.scale_factor_on_pseudo_standard_parallel&&(e.k0=e.scale_factor_on_pseudo_standard_parallel),void 0!==e.azimuth&&(e.alpha=e.azimuth),void 0!==e.azimuth_at_projection_centre&&(e.alpha=e.azimuth_at_projection_centre),e.angle_from_rectified_to_skew_grid&&(e.rectified_grid_angle=e.angle_from_rectified_to_skew_grid),hh(e),e):t}sh.prototype.readCharicter=function(){var t=this.text[this.place++];if(4!==this.state)for(;Qa.test(t);){if(this.place>=this.text.length)return;t=this.text[this.place++]}switch(this.state){case Ja:return this.neutral(t);case 2:return this.keyword(t);case 4:return this.quoted(t);case 5:return this.afterquote(t);case 3:return this.number(t);case-1:return}},sh.prototype.afterquote=function(t){if('"'===t)return this.word+='"',void(this.state=4);if(ih.test(t))return this.word=this.word.trim(),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in afterquote yet, index '+this.place)},sh.prototype.afterItem=function(t){return","===t?(null!==this.word&&this.currentObject.push(this.word),this.word=null,void(this.state=Ja)):"]"===t?(this.level--,null!==this.word&&(this.currentObject.push(this.word),this.word=null),this.state=Ja,this.currentObject=this.stack.pop(),void(this.currentObject||(this.state=-1))):void 0},sh.prototype.number=function(t){if(!nh.test(t)){if(ih.test(t))return this.word=parseFloat(this.word),void this.afterItem(t);throw new Error("havn't handled \""+t+'" in number yet, index '+this.place)}this.word+=t},sh.prototype.quoted=function(t){'"'!==t?this.word+=t:this.state=5},sh.prototype.keyword=function(t){if(eh.test(t))this.word+=t;else{if("["===t){var e=[];return e.push(this.word),this.level++,null===this.root?this.root=e:this.currentObject.push(e),this.stack.push(this.currentObject),this.currentObject=e,void(this.state=Ja)}if(!ih.test(t))throw new Error("havn't handled \""+t+'" in keyword yet, index '+this.place);this.afterItem(t)}},sh.prototype.neutral=function(t){if(th.test(t))return this.word=t,void(this.state=2);if('"'===t)return this.word="",void(this.state=4);if(nh.test(t))return this.word=t,void(this.state=3);if(!ih.test(t))throw new Error("havn't handled \""+t+'" in neutral yet, index '+this.place);this.afterItem(t)},sh.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(-1===this.state)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)},i.dn(mh);
2var fh=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function ph(t){for(var e=Object.keys(t),i=0,n=e.length;i<n;++i){var s=e[i];-1!==fh.indexOf(s)&&gh(t[s]),"object"==typeof t[s]&&ph(t[s])}}function gh(t){if(t.AUTHORITY){var e=Object.keys(t.AUTHORITY)[0];e&&e in t.AUTHORITY&&(t.title=e+":"+t.AUTHORITY[e])}if("GEOGCS"===t.type?t.projName="longlat":"LOCAL_CS"===t.type?(t.projName="identity",t.local=!0):"object"==typeof t.PROJECTION?t.projName=Object.keys(t.PROJECTION)[0]:t.projName=t.PROJECTION,t.AXIS){for(var i="",n=0,s=t.AXIS.length;n<s;++n){var r=[t.AXIS[n][0].toLowerCase(),t.AXIS[n][1].toLowerCase()];-1!==r[0].indexOf("north")||("y"===r[0]||"lat"===r[0])&&"north"===r[1]?i+="n":-1!==r[0].indexOf("south")||("y"===r[0]||"lat"===r[0])&&"south"===r[1]?i+="s":-1!==r[0].indexOf("east")||("x"===r[0]||"lon"===r[0])&&"east"===r[1]?i+="e":-1===r[0].indexOf("west")&&("x"!==r[0]&&"lon"!==r[0]||"west"!==r[1])||(i+="w")}2===i.length&&(i+="u"),3===i.length&&(t.axis=i)}t.UNIT&&(t.units=t.UNIT.name.toLowerCase(),"metre"===t.units&&(t.units="meter"),t.UNIT.convert&&("GEOGCS"===t.type?t.DATUM&&t.DATUM.SPHEROID&&(t.to_meter=t.UNIT.convert*t.DATUM.SPHEROID.a):t.to_meter=t.UNIT.convert));var o=t.GEOGCS;function a(e){return e*(t.to_meter||1)}"GEOGCS"===t.type&&(o=t),o&&(o.PRIMEM&&o.PRIMEM.convert&&(t.from_greenwich=ah(o.PRIMEM.convert)),o.DATUM?t.datumCode=o.DATUM.name.toLowerCase():t.datumCode=o.name.toLowerCase(),"d_"===t.datumCode.slice(0,2)&&(t.datumCode=t.datumCode.slice(2)),"new_zealand_1949"===t.datumCode&&(t.datumCode="nzgd49"),"wgs_1984"!==t.datumCode&&"world_geodetic_system_1984"!==t.datumCode||("Mercator_Auxiliary_Sphere"===t.PROJECTION&&(t.sphere=!0),t.datumCode="wgs84"),"belge_1972"===t.datumCode&&(t.datumCode="rnb72"),o.DATUM&&o.DATUM.SPHEROID&&(t.ellps=o.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),"international"===t.ellps.toLowerCase().slice(0,13)&&(t.ellps="intl"),t.a=o.DATUM.SPHEROID.a,t.rf=parseFloat(o.DATUM.SPHEROID.rf)),o.DATUM&&o.DATUM.TOWGS84&&(t.datum_params=o.DATUM.TOWGS84),~t.datumCode.indexOf("osgb_1936")&&(t.datumCode="osgb36"),~t.datumCode.indexOf("osni_1952")&&(t.datumCode="osni52"),(~t.datumCode.indexOf("tm65")||~t.datumCode.indexOf("geodetic_datum_of_1965"))&&(t.datumCode="ire65"),"ch1903+"===t.datumCode&&(t.datumCode="ch1903"),~t.datumCode.indexOf("israel")&&(t.datumCode="isr93")),t.b&&!isFinite(t.b)&&(t.b=t.a),t.rectified_grid_angle&&(t.rectified_grid_angle=ah(t.rectified_grid_angle)),[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",ah],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",ah],["x0","false_easting",a],["y0","false_northing",a],["long0","central_meridian",ah],["lat0","latitude_of_origin",ah],["lat0","standard_parallel_1",ah],["lat1","standard_parallel_1",ah],["lat2","standard_parallel_2",ah],["azimuth","Azimuth"],["alpha","azimuth",ah],["srsCode","name"]].forEach(function(e){return function(t,e){var i=e[0],n=e[1];!(i in t)&&n in t&&(t[i]=t[n],3===e.length&&(t[i]=e[2](t[i])))}(t,e)}),hh(t)}function mh(t){if("object"==typeof t)return dh(t);const e=function(t){const e=t.toUpperCase();return e.includes("PROJCRS")||e.includes("GEOGCRS")||e.includes("BOUNDCRS")||e.includes("VERTCRS")||e.includes("LENGTHUNIT")||e.includes("ANGLEUNIT")||e.includes("SCALEUNIT")?"WKT2":(e.includes("PROJCS")||e.includes("GEOGCS")||e.includes("LOCAL_CS")||e.includes("VERT_CS")||e.includes("UNIT"),"WKT1")}(t);var i=new sh(t).output();if("WKT2"===e)return dh(Za.convert(i));var n=i[0],s={};return oh(i,s),ph(s),s[n]}function _h(t){var e=this;if(2===arguments.length){var i=arguments[1];"string"==typeof i?"+"===i.charAt(0)?_h[t]=Ya(arguments[1]):_h[t]=mh(arguments[1]):i&&"object"==typeof i&&!("projName"in i)?_h[t]=mh(arguments[1]):(_h[t]=i,i||delete _h[t])}else if(1===arguments.length){if(Array.isArray(t))return t.map(function(t){return Array.isArray(t)?_h.apply(e,t):_h(t)});if("string"==typeof t){if(t in _h)return _h[t]}else"EPSG"in t?_h["EPSG:"+t.EPSG]=t:"ESRI"in t?_h["ESRI:"+t.ESRI]=t:"IAU2000"in t?_h["IAU2000:"+t.IAU2000]=t:console.log(t);return}}Ra(_h);const vh=_h;var yh=["3857","900913","3785","102113"];function wh(t,e){var i,n;if(t=t||{},!e)return t;for(n in e)void 0!==(i=e[n])&&(t[n]=i);return t}
2function bh(t,e,i){var n=t*e;return i/Math.sqrt(1-n*n)}function xh(t){return t<0?-1:1}function Sh(t,e){return e||Math.abs(t)<=Va?t:t-xh(t)*Wa}function Eh(t,e,i){var n=t*i,s=.5*t;return n=Math.pow((1-n)/(1+n),s),Math.tan(.5*(Ga-e))/n}function Ah(t,e){for(var i,n,s=.5*t,r=Ga-2*Math.atan(e),o=0;o<=15;o++)if(i=t*Math.sin(r),r+=n=Ga-2*Math.atan(e*Math.pow((1-i)/(1+i),s))-r,Math.abs(n)<=1e-10)return r;return-9999}i.dn(wh),i.dn(bh),i.dn(xh),i.dn(Sh),i.dn(Eh),i.dn(Ah);const Ch={init:function(){var t=this.b/this.a;this.es=1-t*t,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.long0=this.long0||0,this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=bh(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)},forward:function(t){var e,i,n=t.x,s=t.y;if(s*qa>90&&s*qa<-90&&n*qa>180&&n*qa<-180)return null;if(Math.abs(Math.abs(s)-Ga)<=Ba)return null;if(this.sphere)e=this.x0+this.a*this.k0*Sh(n-this.long0,this.over),i=this.y0+this.a*this.k0*Math.log(Math.tan(Ua+.5*s));else{var r=Math.sin(s),o=Eh(this.e,s,r);e=this.x0+this.a*this.k0*Sh(n-this.long0,this.over),i=this.y0-this.a*this.k0*Math.log(o)}return t.x=e,t.y=i,t},inverse:function(t){var e,i,n=t.x-this.x0,s=t.y-this.y0;if(this.sphere)i=Ga-2*Math.atan(Math.exp(-s/(this.a*this.k0)));else{var r=Math.exp(-s/(this.a*this.k0));if(-9999===(i=Ah(this.e,r)))return null}return e=Sh(this.long0+n/(this.a*this.k0),this.over),t.x=e,t.y=i,t},names:["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","Mercator_Variant_A","merc"]};function Mh(t){return t}var Lh=["longlat","identity","lonlat","latlon","latlong"],Ph=[Ch,{init:function(){},forward:Mh,inverse:Mh,names:Lh}],kh={},Nh=[];function Ih(t,e){var i=Nh.length;return t.names?(Nh[i]=t,t.names.forEach(function(t){kh[t.toLowerCase()]=i}),this):(console.log(e),!0)}function Th(t){return t.replace(/[-\(\)\s]+/g," ").trim().replace(/ /g,"_")}const Oh={start:function(){Ph.forEach(Ih)},add:Ih,get:function(t){if(!t)return!1;var e=t.toLowerCase();return void 0!==kh[e]&&Nh[kh[e]]||(e=Th(e))in kh&&Nh[kh[e]]?Nh[kh[e]]:void 0}},Rh={MERIT:{a:6378137,rf:298.257,ellipseName:"MERIT 1983"},SGS85:{a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},GRS80:{a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},IAU76:{a:6378140,rf:298.257,ellipseName:"IAU 1976"},airy:{a:6377563.396,b:6356256.91,ellipseName:"Airy 1830"},APL4:{a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},NWL9D:{a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},mod_airy:{a:6377340.189,b:6356034.446,ellipseName:"Modified Airy"},andrae:{a:6377104.43,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},aust_SA:{a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},GRS67:{a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},bessel:{a:6377397.155,rf:299.1528128,ellipseName:"Bessel 1841"},bess_nam:{a:6377483.865,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},clrk66:{a:6378206.4,b:6356583.8,ellipseName:"Clarke 1866"},clrk80:{a:6378249.145,rf:293.4663,ellipseName:"Clarke 1880 mod."},clrk80ign:{a:6378249.2,b:6356515,rf:293.4660213,ellipseName:"Clarke 1880 (IGN)"},clrk58:{a:6378293.645208759,rf:294.2606763692654,ellipseName:"Clarke 1858"},CPM:{a:6375738.7,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},delmbr:{a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},engelis:{a:6378136.05,rf:298.2566,ellipseName:"Engelis 1985"},evrst30:{a:6377276.345,rf:300.8017,ellipseName:"Everest 1830"},evrst48:{a:6377304.063,rf:300.8017,ellipseName:"Everest 1948"},evrst56:{a:6377301.243,rf:300.8017,ellipseName:"Everest 1956"},evrst69:{a:6377295.664,rf:300.8017,ellipseName:"Everest 1969"},evrstSS:{a:6377298.556,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},fschr60:{a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},fschr60m:{a:6378155,rf:298.3,ellipseName:"Fischer 1960"},fschr68:{a:6378150,rf:298.3,ellipseName:"Fischer 1968"},helmert:{a:6378200,rf:298.3,ellipseName:"Helmert 1906"},hough:{a:6378270,rf:297,ellipseName:"Hough"},intl:{a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},kaula:{a:6378163,rf:298.24,ellipseName:"Kaula 1961"},lerch:{a:6378139,rf:298.257,ellipseName:"Lerch 1979"},mprts:{a:6397300,rf:191,ellipseName:"Maupertius 1738"},new_intl:{a:6378157.5,b:6356772.2,ellipseName:"New International 1967"},plessis:{a:6376523,b:6355863,ellipseName:"Plessis 1817 (France)"},krass:{a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},SEasia:{a:6378155,b:6356773.3205,ellipseName:"Southeast Asia"},walbeck:{a:6376896,b:6355834.8467,ellipseName:"Walbeck"},WGS60:{a:6378165,rf:298.3,ellipseName:"WGS 60"},WGS66:{a:6378145,rf:298.25,ellipseName:"WGS 66"},WGS7:{a:6378135,rf:298.26,ellipseName:"WGS 72"},WGS84:{a:6378137,rf:298.257223563,ellipseName:"WGS 84"},sphere:{a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"}},Fh=Rh.WGS84;var Dh={wgs84:{towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},ch1903:{towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},ggrs87:{towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},nad83:{towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},nad27:{nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},potsdam:{towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},carthage:{towgs84:"-263.0,6.0,431.0",ellipse:"clrk80ign",datumName:"Carthage 1934 Tunisia"},hermannskogel:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mgi:{towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Militar-Geographische Institut"},osni52:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},ire65:{towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},rassadiran:{towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},nzgd49:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},osgb36:{towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Ordnance Survey of Great Britain 1936"},s_jtsk:{towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},beduaram:{towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},gunung_segara:{towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},rnb72:{towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"},EPSG_5451:{towgs84:"6.41,-49.05,-11.28,1.5657,0.5242,6.9718,-5.7649"},IGNF_LURESG:{towgs84:"-192.986,13.673,-39.309,-0.4099,-2.9332,2.6881,0.43"},EPSG_4614:{towgs84:"-119.4248,-303.65872,-11.00061,1.164298,0.174458,1.096259,3.657065"},EPSG_4615:{towgs84:"-494.088,-312.129,279.877,-1.423,-1.013,1.59,-0.748"},ESRI_37241:{towgs84:"-76.822,257.457,-12.817,2.136,-0.033,-2.392,-0.031"},ESRI_37249:{towgs84:"-440.296,58.548,296.265,1.128,10.202,4.559,-0.438"},ESRI_37245:{towgs84:"-511.151,-181.269,139.609,1.05,2.703,1.798,3.071"},EPSG_4178:{towgs84:"24.9,-126.4,-93.2,-0.063,-0.247,-0.041,1.01"},EPSG_4622:{towgs84:"-472.29,-5.63,-304.12,0.4362,-0.8374,0.2563,1.8984"},EPSG_4625:{towgs84:"126.93,547.94,130.41,-2.7867,5.1612,-0.8584,13.8227"},EPSG_5252:{towgs84:"0.023,0.036,-0.068,0.00176,0.00912,-0.01136,0.00439"},EPSG_4314:{towgs84:"597.1,71.4,412.1,0.894,0.068,-1.563,7.58"},EPSG_4282:{towgs84:"-178.3,-316.7,-131.5,5.278,6.077,10.979,19.166"}
2,EPSG_4231:{towgs84:"-83.11,-97.38,-117.22,0.005693,-0.044698,0.044285,0.1218"},EPSG_4274:{towgs84:"-230.994,102.591,25.199,0.633,-0.239,0.9,1.95"},EPSG_4134:{towgs84:"-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.71006"},EPSG_4254:{towgs84:"18.38,192.45,96.82,0.056,-0.142,-0.2,-0.0013"},EPSG_4159:{towgs84:"-194.513,-63.978,-25.759,-3.4027,3.756,-3.352,-0.9175"},EPSG_4687:{towgs84:"0.072,-0.507,-0.245,0.0183,-0.0003,0.007,-0.0093"},EPSG_4227:{towgs84:"-83.58,-397.54,458.78,-17.595,-2.847,4.256,3.225"},EPSG_4746:{towgs84:"599.4,72.4,419.2,-0.062,-0.022,-2.723,6.46"},EPSG_4745:{towgs84:"612.4,77,440.2,-0.054,0.057,-2.797,2.55"},EPSG_6311:{towgs84:"8.846,-4.394,-1.122,-0.00237,-0.146528,0.130428,0.783926"},EPSG_4289:{towgs84:"565.7381,50.4018,465.2904,-0.395026,0.330772,-1.876073,4.07244"},EPSG_4230:{towgs84:"-68.863,-134.888,-111.49,-0.53,-0.14,0.57,-3.4"},EPSG_4154:{towgs84:"-123.02,-158.95,-168.47"},EPSG_4156:{towgs84:"570.8,85.7,462.8,4.998,1.587,5.261,3.56"},EPSG_4299:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4179:{towgs84:"33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84"},EPSG_4313:{towgs84:"-106.8686,52.2978,-103.7239,0.3366,-0.457,1.8422,-1.2747"},EPSG_4194:{towgs84:"163.511,127.533,-159.789"},EPSG_4195:{towgs84:"105,326,-102.5"},EPSG_4196:{towgs84:"-45,417,-3.5"},EPSG_4611:{towgs84:"-162.619,-276.959,-161.764,0.067753,-2.243648,-1.158828,-1.094246"},EPSG_4633:{towgs84:"137.092,131.66,91.475,-1.9436,-11.5993,-4.3321,-7.4824"},EPSG_4641:{towgs84:"-408.809,366.856,-412.987,1.8842,-0.5308,2.1655,-121.0993"},EPSG_4643:{towgs84:"-480.26,-438.32,-643.429,16.3119,20.1721,-4.0349,-111.7002"},EPSG_4300:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4188:{towgs84:"482.5,-130.6,564.6,-1.042,-0.214,-0.631,8.15"},EPSG_4660:{towgs84:"982.6087,552.753,-540.873,6.681627,-31.611492,-19.848161,16.805"},EPSG_4662:{towgs84:"97.295,-263.247,310.882,-1.5999,0.8386,3.1409,13.3259"},EPSG_3906:{towgs84:"577.88891,165.22205,391.18289,4.9145,-0.94729,-13.05098,7.78664"},EPSG_4307:{towgs84:"-209.3622,-87.8162,404.6198,0.0046,3.4784,0.5805,-1.4547"},EPSG_6892:{towgs84:"-76.269,-16.683,68.562,-6.275,10.536,-4.286,-13.686"},EPSG_4690:{towgs84:"221.597,152.441,176.523,2.403,1.3893,0.884,11.4648"},EPSG_4691:{towgs84:"218.769,150.75,176.75,3.5231,2.0037,1.288,10.9817"},EPSG_4629:{towgs84:"72.51,345.411,79.241,-1.5862,-0.8826,-0.5495,1.3653"},EPSG_4630:{towgs84:"165.804,216.213,180.26,-0.6251,-0.4515,-0.0721,7.4111"},EPSG_4692:{towgs84:"217.109,86.452,23.711,0.0183,-0.0003,0.007,-0.0093"},EPSG_9333:{towgs84:"0,0,0,-0.008393,0.000749,-0.010276,0"},EPSG_9059:{towgs84:"0,0,0"},EPSG_4312:{towgs84:"601.705,84.263,485.227,4.7354,1.3145,5.393,-2.3887"},EPSG_4123:{towgs84:"-96.062,-82.428,-121.753,4.801,0.345,-1.376,1.496"},EPSG_4309:{towgs84:"-124.45,183.74,44.64,-0.4384,0.5446,-0.9706,-2.1365"},ESRI_104106:{towgs84:"-283.088,-70.693,117.445,-1.157,0.059,-0.652,-4.058"}
2,EPSG_4281:{towgs84:"-219.247,-73.802,269.529"},EPSG_4322:{towgs84:"0,0,4.5"},EPSG_4324:{towgs84:"0,0,1.9"},EPSG_4284:{towgs84:"43.822,-108.842,-119.585,1.455,-0.761,0.737,0.549"},EPSG_4277:{towgs84:"446.448,-125.157,542.06,0.15,0.247,0.842,-20.489"},EPSG_4207:{towgs84:"-282.1,-72.2,120,-1.529,0.145,-0.89,-4.46"},EPSG_4688:{towgs84:"347.175,1077.618,2623.677,33.9058,-70.6776,9.4013,186.0647"},EPSG_4689:{towgs84:"410.793,54.542,80.501,-2.5596,-2.3517,-0.6594,17.3218"},EPSG_4720:{towgs84:"0,0,4.5"},EPSG_4273:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},EPSG_4240:{towgs84:"204.64,834.74,293.8"},EPSG_4817:{towgs84:"278.3,93,474.5,7.889,0.05,-6.61,6.21"},ESRI_104131:{towgs84:"426.62,142.62,460.09,4.98,4.49,-12.42,-17.1"},EPSG_4265:{towgs84:"-104.1,-49.1,-9.9,0.971,-2.917,0.714,-11.68"},EPSG_4263:{towgs84:"-111.92,-87.85,114.5,1.875,0.202,0.219,0.032"},EPSG_4298:{towgs84:"-689.5937,623.84046,-65.93566,-0.02331,1.17094,-0.80054,5.88536"},EPSG_4270:{towgs84:"-253.4392,-148.452,386.5267,0.15605,0.43,-0.1013,-0.0424"},EPSG_4229:{towgs84:"-121.8,98.1,-10.7"},EPSG_4220:{towgs84:"-55.5,-348,-229.2"},EPSG_4214:{towgs84:"12.646,-155.176,-80.863"},EPSG_4232:{towgs84:"-345,3,223"},EPSG_4238:{towgs84:"-1.977,-13.06,-9.993,0.364,0.254,0.689,-1.037"},EPSG_4168:{towgs84:"-170,33,326"},EPSG_4131:{towgs84:"199,931,318.9"},EPSG_4152:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_5228:{towgs84:"572.213,85.334,461.94,4.9732,1.529,5.2484,3.5378"},EPSG_8351:{towgs84:"485.021,169.465,483.839,7.786342,4.397554,4.102655,0"},EPSG_4683:{towgs84:"-127.62,-67.24,-47.04,-3.068,4.903,1.578,-1.06"},EPSG_4133:{towgs84:"0,0,0"},EPSG_7373:{towgs84:"0.819,-0.5762,-1.6446,-0.00378,-0.03317,0.00318,0.0693"},EPSG_9075:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9072:{towgs84:"-0.9102,2.0141,0.5602,0.029039,0.010065,0.010101,0"},EPSG_9294:{towgs84:"1.16835,-1.42001,-2.24431,-0.00822,-0.05508,0.01818,0.23388"},EPSG_4212:{towgs84:"-267.434,173.496,181.814,-13.4704,8.7154,7.3926,14.7492"},EPSG_4191:{towgs84:"-44.183,-0.58,-38.489,2.3867,2.7072,-3.5196,-8.2703"},EPSG_4237:{towgs84:"52.684,-71.194,-13.975,-0.312,-0.1063,-0.3729,1.0191"},EPSG_4740:{towgs84:"-1.08,-0.27,-0.9"},EPSG_4124:{towgs84:"419.3836,99.3335,591.3451,0.850389,1.817277,-7.862238,-0.99496"},EPSG_5681:{towgs84:"584.9636,107.7175,413.8067,1.1155,0.2824,-3.1384,7.9922"},EPSG_4141:{towgs84:"23.772,17.49,17.859,-0.3132,-1.85274,1.67299,-5.4262"},EPSG_4204:{towgs84:"-85.645,-273.077,-79.708,2.289,-1.421,2.532,3.194"},EPSG_4319:{towgs84:"226.702,-193.337,-35.371,-2.229,-4.391,9.238,0.9798"},EPSG_4200:{towgs84:"24.82,-131.21,-82.66"},EPSG_4130:{towgs84:"0,0,0"},EPSG_4127:{towgs84:"-82.875,-57.097,-156.768,-2.158,1.524,-0.982,-0.359"},EPSG_4149:{towgs84:"674.374,15.056,405.346"},EPSG_4617:{towgs84:"-0.991,1.9072,0.5129,0.02579,0.00965,0.01166,0"},EPSG_4663:{towgs84:"-210.502,-66.902,-48.476,2.094,-15.067,-5.817,0.485"},EPSG_4664:{towgs84:"-211.939,137.626,58.3,-0.089,0.251,0.079,0.384"},EPSG_4665:{towgs84:"-105.854,165.589,-38.312,-0.003,-0.026,0.024,-0.048"},EPSG_4666:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},EPSG_4756:{towgs84:"-192.873,-39.382,-111.202,-0.00205,-0.0005,0.00335,0.0188"},EPSG_4723:{towgs84:"-179.483,-69.379,-27.584,-7.862,8.163,6.042,-13.925"},EPSG_4726:{towgs84:"8.853,-52.644,180.304,-0.393,-2.323,2.96,-24.081"},EPSG_4267:{towgs84:"-8.0,160.0,176.0"},EPSG_5365:{towgs84:"-0.16959,0.35312,0.51846,0.03385,-0.16325,0.03446,0.03693"},EPSG_4218:{towgs84:"304.5,306.5,-318.1"},EPSG_4242:{towgs84:"-33.722,153.789,94.959,-8.581,-4.478,4.54,8.95"},EPSG_4216:{towgs84:"-292.295,248.758,429.447,4.9971,2.99,6.6906,1.0289"},ESRI_104105:{towgs84:"631.392,-66.551,481.442,1.09,-4.445,-4.487,-4.43"},ESRI_104129:{towgs84:"0,0,0"},EPSG_4673:{towgs84:"174.05,-25.49,112.57"},EPSG_4202:{towgs84:"-124,-60,154"},EPSG_4203:{towgs84:"-117.763,-51.51,139.061,0.292,0.443,0.277,-0.191"},EPSG_3819:{towgs84:"595.48,121.69,515.35,4.115,-2.9383,0.853,-3.408"},EPSG_8694:{towgs84:"-93.799,-132.737,-219.073,-1.844,0.648,-6.37,-0.169"},EPSG_4145:{towgs84:"275.57,676.78,229.6"},EPSG_4283:{towgs84:"0.06155,-0.01087,-0.04019,0.039492,0.032722,0.032898,-0.009994"},EPSG_4317:{towgs84:"2.3287,-147.0425,-92.0802,-0.309248,0.324822,0.497299,5.689063"},EPSG_4272:{towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993"},EPSG_4248:{towgs84:"-307.7,265.3,-363.5"},EPSG_5561:{towgs84:"24,-121,-76"},EPSG_5233:{towgs84:"-0.293,766.95,87.713,0.195704,1.695068,3.473016,-0.039338"},ESRI_104130:{towgs84:"-86,-98,-119"}
2,ESRI_104102:{towgs84:"682,-203,480"},ESRI_37207:{towgs84:"7,-10,-26"},EPSG_4675:{towgs84:"59.935,118.4,-10.871"},ESRI_104109:{towgs84:"-89.121,-348.182,260.871"},ESRI_104112:{towgs84:"-185.583,-230.096,281.361"},ESRI_104113:{towgs84:"25.1,-275.6,222.6"},IGNF_WGS72G:{towgs84:"0,12,6"},IGNF_NTFG:{towgs84:"-168,-60,320"},IGNF_EFATE57G:{towgs84:"-127,-769,472"},IGNF_PGP50G:{towgs84:"324.8,153.6,172.1"},IGNF_REUN47G:{towgs84:"94,-948,-1262"},IGNF_CSG67G:{towgs84:"-186,230,110"},IGNF_GUAD48G:{towgs84:"-467,-16,-300"},IGNF_TAHI51G:{towgs84:"162,117,154"},IGNF_TAHAAG:{towgs84:"65,342,77"},IGNF_NUKU72G:{towgs84:"84,274,65"},IGNF_PETRELS72G:{towgs84:"365,194,166"},IGNF_WALL78G:{towgs84:"253,-133,-127"},IGNF_MAYO50G:{towgs84:"-382,-59,-262"},IGNF_TANNAG:{towgs84:"-139,-967,436"},IGNF_IGN72G:{towgs84:"-13,-348,292"},IGNF_ATIGG:{towgs84:"1118,23,66"},IGNF_FANGA84G:{towgs84:"150.57,158.33,118.32"},IGNF_RUSAT84G:{towgs84:"202.13,174.6,-15.74"},IGNF_KAUE70G:{towgs84:"126.74,300.1,-75.49"},IGNF_MOP90G:{towgs84:"-10.8,-1.8,12.77"},IGNF_MHPF67G:{towgs84:"338.08,212.58,-296.17"},IGNF_TAHI79G:{towgs84:"160.61,116.05,153.69"},IGNF_ANAA92G:{towgs84:"1.5,3.84,4.81"},IGNF_MARQUI72G:{towgs84:"330.91,-13.92,58.56"},IGNF_APAT86G:{towgs84:"143.6,197.82,74.05"},IGNF_TUBU69G:{towgs84:"237.17,171.61,-77.84"},IGNF_STPM50G:{towgs84:"11.363,424.148,373.13"},EPSG_4150:{towgs84:"674.374,15.056,405.346"},EPSG_4754:{towgs84:"-208.4058,-109.8777,-2.5764"},ESRI_104101:{towgs84:"372.87,149.23,585.29"},EPSG_4693:{towgs84:"0,-0.15,0.68"},EPSG_6207:{towgs84:"293.17,726.18,245.36"},EPSG_4153:{towgs84:"-133.63,-157.5,-158.62"},EPSG_4132:{towgs84:"-241.54,-163.64,396.06"},EPSG_4221:{towgs84:"-154.5,150.7,100.4"},EPSG_4266:{towgs84:"-80.7,-132.5,41.1"},EPSG_4193:{towgs84:"-70.9,-151.8,-41.4"},EPSG_5340:{towgs84:"-0.41,0.46,-0.35"},EPSG_4246:{towgs84:"-294.7,-200.1,525.5"},EPSG_4318:{towgs84:"-3.2,-5.7,2.8"},EPSG_4121:{towgs84:"-199.87,74.79,246.62"},EPSG_4223:{towgs84:"-260.1,5.5,432.2"},EPSG_4158:{towgs84:"-0.465,372.095,171.736"},EPSG_4285:{towgs84:"-128.16,-282.42,21.93"},EPSG_4613:{towgs84:"-404.78,685.68,45.47"},EPSG_4607:{towgs84:"195.671,332.517,274.607"},EPSG_4475:{towgs84:"-381.788,-57.501,-256.673"},EPSG_4208:{towgs84:"-157.84,308.54,-146.6"},EPSG_4743:{towgs84:"70.995,-335.916,262.898"},EPSG_4710:{towgs84:"-323.65,551.39,-491.22"},EPSG_7881:{towgs84:"-0.077,0.079,0.086"},EPSG_4682:{towgs84:"283.729,735.942,261.143"},EPSG_4739:{towgs84:"-156,-271,-189"},EPSG_4679:{towgs84:"-80.01,253.26,291.19"},EPSG_4750:{towgs84:"-56.263,16.136,-22.856"},EPSG_4644:{towgs84:"-10.18,-350.43,291.37"},EPSG_4695:{towgs84:"-103.746,-9.614,-255.95"},EPSG_4292:{towgs84:"-355,21,72"},EPSG_4302:{towgs84:"-61.702,284.488,472.052"},EPSG_4143:{towgs84:"-124.76,53,466.79"},EPSG_4606:{towgs84:"-153,153,307"},EPSG_4699:{towgs84:"-770.1,158.4,-498.2"},EPSG_4247:{towgs84:"-273.5,110.6,-357.9"},EPSG_4160:{towgs84:"8.88,184.86,106.69"},EPSG_4161:{towgs84:"-233.43,6.65,173.64"},EPSG_9251:{towgs84:"-9.5,122.9,138.2"},EPSG_9253:{towgs84:"-78.1,101.6,133.3"},EPSG_4297:{towgs84:"-198.383,-240.517,-107.909"},EPSG_4269:{towgs84:"0,0,0"},EPSG_4301:{towgs84:"-147,506,687"},EPSG_4618:{towgs84:"-59,-11,-52"},EPSG_4612:{towgs84:"0,0,0"},EPSG_4678:{towgs84:"44.585,-131.212,-39.544"},EPSG_4250:{towgs84:"-130,29,364"},EPSG_4144:{towgs84:"214,804,268"},EPSG_4147:{towgs84:"-17.51,-108.32,-62.39"},EPSG_4259:{towgs84:"-254.1,-5.36,-100.29"},EPSG_4164:{towgs84:"-76,-138,67"},EPSG_4211:{towgs84:"-378.873,676.002,-46.255"},EPSG_4182:{towgs84:"-422.651,-172.995,84.02"},EPSG_4224:{towgs84:"-143.87,243.37,-33.52"},EPSG_4225:{towgs84:"-205.57,168.77,-4.12"},EPSG_5527:{towgs84:"-67.35,3.88,-38.22"},EPSG_4752:{towgs84:"98,390,-22"},EPSG_4310:{towgs84:"-30,190,89"},EPSG_9248:{towgs84:"-192.26,65.72,132.08"},EPSG_4680:{towgs84:"124.5,-63.5,-281"},EPSG_4701:{towgs84:"-79.9,-158,-168.9"},EPSG_4706:{towgs84:"-146.21,112.63,4.05"},EPSG_4805:{towgs84:"682,-203,480"},EPSG_4201:{towgs84:"-165,-11,206"},EPSG_4210:{towgs84:"-157,-2,-299"},EPSG_4183:{towgs84:"-104,167,-38"},EPSG_4139:{towgs84:"11,72,-101"},EPSG_4668:{towgs84:"-86,-98,-119"},EPSG_4717:{towgs84:"-2,151,181"},EPSG_4732:{towgs84:"102,52,-38"},EPSG_4280:{towgs84:"-377,681,-50"},EPSG_4209:{towgs84:"-138,-105,-289"},EPSG_4261:{towgs84:"31,146,47"},EPSG_4658:{towgs84:"-73,46,-86"},EPSG_4721:{towgs84:"265.025,384.929,-194.046"},EPSG_4222:{towgs84:"-136,-108,-292"},EPSG_4601:{towgs84:"-255,-15,71"},EPSG_4602:{towgs84:"725,685,536"},EPSG_4603:{towgs84:"72,213.7,93"},EPSG_4605:{towgs84:"9,183,236"},EPSG_4621:{towgs84:"137,248,-430"},EPSG_4657:{towgs84:"-28,199,5"},EPSG_4316:{towgs84:"103.25,-100.4,-307.19"}
2,EPSG_4642:{towgs84:"-13,-348,292"},EPSG_4698:{towgs84:"145,-187,103"},EPSG_4192:{towgs84:"-206.1,-174.7,-87.7"},EPSG_4311:{towgs84:"-265,120,-358"},EPSG_4135:{towgs84:"58,-283,-182"},ESRI_104138:{towgs84:"198,-226,-347"},EPSG_4245:{towgs84:"-11,851,5"},EPSG_4142:{towgs84:"-125,53,467"},EPSG_4213:{towgs84:"-106,-87,188"},EPSG_4253:{towgs84:"-133,-77,-51"},EPSG_4129:{towgs84:"-132,-110,-335"},EPSG_4713:{towgs84:"-77,-128,142"},EPSG_4239:{towgs84:"217,823,299"},EPSG_4146:{towgs84:"295,736,257"},EPSG_4155:{towgs84:"-83,37,124"},EPSG_4165:{towgs84:"-173,253,27"},EPSG_4672:{towgs84:"175,-38,113"},EPSG_4236:{towgs84:"-637,-549,-203"},EPSG_4251:{towgs84:"-90,40,88"},EPSG_4271:{towgs84:"-2,374,172"},EPSG_4175:{towgs84:"-88,4,101"},EPSG_4716:{towgs84:"298,-304,-375"},EPSG_4315:{towgs84:"-23,259,-9"},EPSG_4744:{towgs84:"-242.2,-144.9,370.3"},EPSG_4244:{towgs84:"-97,787,86"},EPSG_4293:{towgs84:"616,97,-251"},EPSG_4714:{towgs84:"-127,-769,472"},EPSG_4736:{towgs84:"260,12,-147"},EPSG_6883:{towgs84:"-235,-110,393"},EPSG_6894:{towgs84:"-63,176,185"},EPSG_4205:{towgs84:"-43,-163,45"},EPSG_4256:{towgs84:"41,-220,-134"},EPSG_4262:{towgs84:"639,405,60"},EPSG_4604:{towgs84:"174,359,365"},EPSG_4169:{towgs84:"-115,118,426"},EPSG_4620:{towgs84:"-106,-129,165"},EPSG_4184:{towgs84:"-203,141,53"},EPSG_4616:{towgs84:"-289,-124,60"},EPSG_9403:{towgs84:"-307,-92,127"},EPSG_4684:{towgs84:"-133,-321,50"},EPSG_4708:{towgs84:"-491,-22,435"},EPSG_4707:{towgs84:"114,-116,-333"},EPSG_4709:{towgs84:"145,75,-272"},EPSG_4712:{towgs84:"-205,107,53"},EPSG_4711:{towgs84:"124,-234,-25"},EPSG_4718:{towgs84:"230,-199,-752"},EPSG_4719:{towgs84:"211,147,111"},EPSG_4724:{towgs84:"208,-435,-229"},EPSG_4725:{towgs84:"189,-79,-202"},EPSG_4735:{towgs84:"647,1777,-1124"},EPSG_4722:{towgs84:"-794,119,-298"},EPSG_4728:{towgs84:"-307,-92,127"},EPSG_4734:{towgs84:"-632,438,-609"},EPSG_4727:{towgs84:"912,-58,1227"},EPSG_4729:{towgs84:"185,165,42"},EPSG_4730:{towgs84:"170,42,84"},EPSG_4733:{towgs84:"276,-57,149"},ESRI_37218:{towgs84:"230,-199,-752"},ESRI_37240:{towgs84:"-7,215,225"},ESRI_37221:{towgs84:"252,-209,-751"},ESRI_4305:{towgs84:"-123,-206,219"},ESRI_104139:{towgs84:"-73,-247,227"},EPSG_4748:{towgs84:"51,391,-36"},EPSG_4219:{towgs84:"-384,664,-48"},EPSG_4255:{towgs84:"-333,-222,114"},EPSG_4257:{towgs84:"-587.8,519.75,145.76"},EPSG_4646:{towgs84:"-963,510,-359"},EPSG_6881:{towgs84:"-24,-203,268"},EPSG_6882:{towgs84:"-183,-15,273"},EPSG_4715:{towgs84:"-104,-129,239"},IGNF_RGF93GDD:{towgs84:"0,0,0"},IGNF_RGM04GDD:{towgs84:"0,0,0"},IGNF_RGSPM06GDD:{towgs84:"0,0,0"},IGNF_RGTAAF07GDD:{towgs84:"0,0,0"},IGNF_RGFG95GDD:{towgs84:"0,0,0"},IGNF_RGNCG:{towgs84:"0,0,0"},IGNF_RGPFGDD:{towgs84:"0,0,0"},IGNF_ETRS89G:{towgs84:"0,0,0"},IGNF_RGR92GDD:{towgs84:"0,0,0"},EPSG_4173:{towgs84:"0,0,0"},EPSG_4180:{towgs84:"0,0,0"},EPSG_4619:{towgs84:"0,0,0"},EPSG_4667:{towgs84:"0,0,0"},EPSG_4075:{towgs84:"0,0,0"},EPSG_6706:{towgs84:"0,0,0"},EPSG_7798:{towgs84:"0,0,0"},EPSG_4661:{towgs84:"0,0,0"},EPSG_4669:{towgs84:"0,0,0"},EPSG_8685:{towgs84:"0,0,0"},EPSG_4151:{towgs84:"0,0,0"},EPSG_9702:{towgs84:"0,0,0"},EPSG_4758:{towgs84:"0,0,0"},EPSG_4761:{towgs84:"0,0,0"},EPSG_4765:{towgs84:"0,0,0"},EPSG_8997:{towgs84:"0,0,0"},EPSG_4023:{towgs84:"0,0,0"},EPSG_4670:{towgs84:"0,0,0"},EPSG_4694:{towgs84:"0,0,0"},EPSG_4148:{towgs84:"0,0,0"},EPSG_4163:{towgs84:"0,0,0"},EPSG_4167:{towgs84:"0,0,0"},EPSG_4189:{towgs84:"0,0,0"},EPSG_4190:{towgs84:"0,0,0"},EPSG_4176:{towgs84:"0,0,0"},EPSG_4659:{towgs84:"0,0,0"},EPSG_3824:{towgs84:"0,0,0"},EPSG_3889:{towgs84:"0,0,0"},EPSG_4046:{towgs84:"0,0,0"},EPSG_4081:{towgs84:"0,0,0"},EPSG_4558:{towgs84:"0,0,0"},EPSG_4483:{towgs84:"0,0,0"},EPSG_5013:{towgs84:"0,0,0"},EPSG_5264:{towgs84:"0,0,0"},EPSG_5324:{towgs84:"0,0,0"},EPSG_5354:{towgs84:"0,0,0"},EPSG_5371:{towgs84:"0,0,0"},EPSG_5373:{towgs84:"0,0,0"},EPSG_5381:{towgs84:"0,0,0"},EPSG_5393:{towgs84:"0,0,0"},EPSG_5489:{towgs84:"0,0,0"},EPSG_5593:{towgs84:"0,0,0"},EPSG_6135:{towgs84:"0,0,0"},EPSG_6365:{towgs84:"0,0,0"},EPSG_5246:{towgs84:"0,0,0"},EPSG_7886:{towgs84:"0,0,0"},EPSG_8431:{towgs84:"0,0,0"},EPSG_8427:{towgs84:"0,0,0"},EPSG_8699:{towgs84:"0,0,0"},EPSG_8818:{towgs84:"0,0,0"},EPSG_4757:{towgs84:"0,0,0"},EPSG_9140:{towgs84:"0,0,0"},EPSG_8086:{towgs84:"0,0,0"},EPSG_4686:{towgs84:"0,0,0"},EPSG_4737:{towgs84:"0,0,0"},EPSG_4702:{towgs84:"0,0,0"},EPSG_4747:{towgs84:"0,0,0"},EPSG_4749:{towgs84:"0,0,0"},EPSG_4674:{towgs84:"0,0,0"},EPSG_4755:{towgs84:"0,0,0"},EPSG_4759:{towgs84:"0,0,0"},EPSG_4762:{towgs84:"0,0,0"},EPSG_4763:{towgs84:"0,0,0"},EPSG_4764:{towgs84:"0,0,0"},EPSG_4166:{towgs84:"0,0,0"},EPSG_4170:{towgs84:"0,0,0"},EPSG_5546:{towgs84:"0,0,0"},EPSG_7844:{towgs84:"0,0,0"},EPSG_4818:{towgs84:"589,76,480"},EPSG_10328:{towgs84:"0,0,0"},EPSG_9782:{towgs84:"0,0,0"},EPSG_9777:{towgs84:"0,0,0"},EPSG_10690:{towgs84:"0,0,0"},EPSG_10639:{towgs84:"0,0,0"},EPSG_10739:{towgs84:"0,0,0"},EPSG_7686:{towgs84:"0,0,0"},EPSG_8900:{towgs84:"0,0,0"},EPSG_5886:{towgs84:"0,0,0"},EPSG_7683:{towgs84:"0,0,0"},EPSG_6668:{towgs84:"0,0,0"},EPSG_20046:{towgs84:"0,0,0"},EPSG_10299:{towgs84:"0,0,0"},EPSG_10310:{towgs84:"0,0,0"},EPSG_10475:{towgs84:"0,0,0"},EPSG_4742:{towgs84:"0,0,0"},EPSG_10671:{towgs84:"0,0,0"},EPSG_10762:{towgs84:"0,0,0"},EPSG_10725:{towgs84:"0,0,0"},EPSG_10791:{towgs84:"0,0,0"},EPSG_10800:{towgs84:"0,0,0"},EPSG_10305:{towgs84:"0,0,0"},EPSG_10941:{towgs84:"0,0,0"},EPSG_10968:{towgs84:"0,0,0"},EPSG_10875:{towgs84:"0,0,0"},EPSG_6318:{towgs84:"0,0,0"},EPSG_10910:{towgs84:"0,0,0"}};for(var jh in Dh){var Gh=Dh[jh];Gh.datumName&&(Dh[Gh.datumName]=Gh)}const Bh=Dh;var zh={};async function qh(t,e){for(var i=[],n=await e.getImageCount(),s=n-1;s>=0;
2s--){var r=await e.getImage(s),o=await r.readRasters(),a=[r.getWidth(),r.getHeight()],h=r.getBoundingBox().map(Wh),l="function"==typeof r.fileDirectory.getValue?r.fileDirectory.getValue("ModelPixelScale"):r.fileDirectory.ModelPixelScale,c=[l[0],l[1]].map(Wh),u=h[0]+(a[0]-1)*c[0],d=h[3]-(a[1]-1)*c[1],f=o[0],p=o[1],g=[];for(let t=a[1]-1;t>=0;t--)for(let e=a[0]-1;e>=0;e--){var m=t*a[0]+e;g.push([-Vh(p[m]),Vh(f[m])])}i.push({del:c,lim:a,ll:[-u,d],cvs:g})}var _={header:{nSubgrids:n},subgrids:i};return zh[t]=_,_}function Uh(t){if(0===t.length)return null;var e="@"===t[0];return e&&(t=t.slice(1)),"null"===t?{name:"null",mandatory:!e,grid:null,isNull:!0}:{name:t,mandatory:!e,grid:zh[t]||null,isNull:!1}}function Wh(t){return t*Math.PI/180}function Vh(t){return t/3600*Math.PI/180}function Hh(t,e,i){return String.fromCharCode.apply(null,new Uint8Array(t.buffer.slice(e,i)))}function Kh(t){return t.map(function(t){return[Vh(t.longitudeShift),Vh(t.latitudeShift)]})}function $h(t,e,i){return{name:Hh(t,e+8,e+16).trim(),parent:Hh(t,e+24,e+24+8).trim(),lowerLatitude:t.getFloat64(e+72,i),upperLatitude:t.getFloat64(e+88,i),lowerLongitude:t.getFloat64(e+104,i),upperLongitude:t.getFloat64(e+120,i),latitudeInterval:t.getFloat64(e+136,i),longitudeInterval:t.getFloat64(e+152,i),gridNodeCount:t.getInt32(e+168,i)}}function Xh(t,e,i,n,s){var r=e+176,o=16;!1===s&&(o=8);for(var a=[],h=0;h<i.gridNodeCount;h++){var l={latitudeShift:t.getFloat32(r+h*o,n),longitudeShift:t.getFloat32(r+h*o+4,n)};!1!==s&&(l.latitudeAccuracy=t.getFloat32(r+h*o+8,n),l.longitudeAccuracy=t.getFloat32(r+h*o+12,n)),a.push(l)}return a}function Yh(t,e){if(!(this instanceof Yh))return new Yh(t);this.forward=null,this.inverse=null,this.init=null,this.name,this.axis,this.names=null,this.title,e=e||function(t){if(t)throw t};var i=function(t){let e;if(function(t){return"string"==typeof t}(t))if(function(t){return t in vh}(t))e=vh[t];else if(function(t){return 0!==t.indexOf("+")&&-1!==t.indexOf("[")||"object"==typeof t&&!("srsCode"in t)}(t)){e=mh(t);var i=function(t){var e=Xa(t,"extension");if(e)return Xa(e,"proj4")}(e);i&&(e=Ya(i))}else(function(t){return"+"===t[0]})(t)&&(e=Ya(t));else e="projName"in t?t:mh(t);return e&&function(t){if(t.title)return 0===t.title.toLowerCase().indexOf("epsg:")&&yh.indexOf(t.title.substr(5))>-1;var e=Xa(t,"authority");if(e){var i=Xa(e,"epsg");return i&&yh.indexOf(i)>-1}}(e)?vh["EPSG:3857"]:e}(t);if("object"==typeof i){var n=Yh.projections.get(i.projName);if(n){if(i.datumCode&&"none"!==i.datumCode){var s=Xa(Bh,i.datumCode);s&&(i.datum_params=i.datum_params||(s.towgs84?s.towgs84.split(","):null),i.ellps=s.ellipse,i.datumName=s.datumName?s.datumName:i.datumCode)}i.axis=i.axis||"enu",i.ellps=i.ellps||"wgs84",i.lat1=i.lat1||i.lat0;var r=function(t,e,i,n,s){if(!t){var r=Xa(Rh,n);r||(r=Fh),t=r.a,e=r.b,i=r.rf}return i&&!e&&(e=(1-1/i)*t),(0===i||Math.abs(t-e)<Ba)&&(s=!0,e=t),{a:t,b:e,rf:i,sphere:s}}(i.a,i.b,i.rf,i.ellps,i.sphere),o=function(t,e,i,n){var s=t*t,r=e*e,o=(s-r)/s,a=0;return n?(s=(t*=1-o*(.16666666666666666+o*(.04722222222222222+.022156084656084655*o)))*t,o=0):a=Math.sqrt(o),{es:o,e:a,ep2:(s-r)/r}}(r.a,r.b,r.rf,i.R_A),a=function(t){return void 0===t?null:t.split(",").map(Uh)}(i.nadgrids),h=i.datum||function(t,e,i,n,s,r,o){var a={datum_type:5};return e&&(a.datum_type=4,a.datum_params=e.map(parseFloat),0===a.datum_params[0]&&0===a.datum_params[1]&&0===a.datum_params[2]||(a.datum_type=1),a.datum_params.length>3&&(0===a.datum_params[3]&&0===a.datum_params[4]&&0===a.datum_params[5]&&0===a.datum_params[6]||(a.datum_type=2,a.datum_params[3]*=ja,a.datum_params[4]*=ja,a.datum_params[5]*=ja,a.datum_params[6]=a.datum_params[6]/1e6+1))),o&&(a.datum_type=3,a.grids=o),a.a=i,a.b=n,a.es=s,a.ep2=r,a}(i.datumCode,i.datum_params,r.a,r.b,o.es,o.ep2,a);wh(this,i),wh(this,n),this.a=r.a,this.b=r.b,this.rf=r.rf,this.sphere=r.sphere,this.es=o.es,this.e=o.e,this.ep2=o.ep2,this.datum=h,"init"in this&&"function"==typeof this.init&&this.init(),this.k0||(this.k0=1),e(null,this)}else e("Could not get projection name from: "+t)}else e("Could not parse to valid json: "+t)}Yh.projections=Oh,Yh.projections.start();
2const Zh=Yh;function Jh(t,e,i){var n,s,r,o,a=t.x,h=t.y,l=t.z?t.z:0;if(h<-Ga&&h>-1.001*Ga)h=-Ga;else if(h>Ga&&h<1.001*Ga)h=Ga;else{if(h<-Ga)return{x:-1/0,y:-1/0,z:t.z};if(h>Ga)return{x:1/0,y:1/0,z:t.z}}return a>Math.PI&&(a-=2*Math.PI),s=Math.sin(h),o=Math.cos(h),r=s*s,{x:((n=i/Math.sqrt(1-e*r))+l)*o*Math.cos(a),y:(n+l)*o*Math.sin(a),z:(n*(1-e)+l)*s}}function Qh(t,e,i,n){var s,r,o,a,h,l,c,u,d,f,p,g,m,_,v,y=t.x,w=t.y,b=t.z?t.z:0;if(s=Math.sqrt(y*y+w*w),r=Math.sqrt(y*y+w*w+b*b),s/i<1e-12){if(_=0,r/i<1e-12)return v=-n,{x:t.x,y:t.y,z:t.z}}else _=Math.atan2(w,y);o=b/r,u=(a=s/r)*(1-e)*(h=1/Math.sqrt(1-e*(2-e)*a*a)),d=o*h,m=0;do{m++,l=e*(c=i/Math.sqrt(1-e*d*d))/(c+(v=s*u+b*d-c*(1-e*d*d))),g=(p=o*(h=1/Math.sqrt(1-l*(2-l)*a*a)))*u-(f=a*(1-l)*h)*d,u=f,d=p}while(g*g>1e-24&&m<30);return{x:_,y:Math.atan(p/Math.abs(f)),z:v}}function tl(t){return 1===t||2===t}function el(t,e,i){if(function(t,e){return t.datum_type===e.datum_type&&!(t.a!==e.a||Math.abs(t.es-e.es)>5e-11)&&(1===t.datum_type?t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]:2!==t.datum_type||t.datum_params[0]===e.datum_params[0]&&t.datum_params[1]===e.datum_params[1]&&t.datum_params[2]===e.datum_params[2]&&t.datum_params[3]===e.datum_params[3]&&t.datum_params[4]===e.datum_params[4]&&t.datum_params[5]===e.datum_params[5]&&t.datum_params[6]===e.datum_params[6])}(t,e))return i;if(5===t.datum_type||5===e.datum_type)return i;var n=t.a,s=t.es;if(3===t.datum_type){if(0!==il(t,!1,i))return;n=Fa,s=Da}var r=e.a,o=e.b,a=e.es;return 3===e.datum_type&&(r=Fa,o=6356752.314,a=Da),s!==a||n!==r||tl(t.datum_type)||tl(e.datum_type)?(i=Jh(i,s,n),tl(t.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x+i[0],y:t.y+i[1],z:t.z+i[2]};if(2===e){var n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5],l=i[6];return{x:l*(t.x-h*t.y+a*t.z)+n,y:l*(h*t.x+t.y-o*t.z)+s,z:l*(-a*t.x+o*t.y+t.z)+r}}}(i,t.datum_type,t.datum_params)),tl(e.datum_type)&&(i=function(t,e,i){if(1===e)return{x:t.x-i[0],y:t.y-i[1],z:t.z-i[2]};if(2===e){var n=i[0],s=i[1],r=i[2],o=i[3],a=i[4],h=i[5],l=i[6],c=(t.x-n)/l,u=(t.y-s)/l,d=(t.z-r)/l;return{x:c+h*u-a*d,y:-h*c+u+o*d,z:a*c-o*u+d}}}(i,e.datum_type,e.datum_params)),i=Qh(i,a,r,o),3!==e.datum_type||0===il(e,!0,i)?i:void 0):i}function il(t,e,i){if(null===t.grids||0===t.grids.length)return console.log("Grid shift grids not found"),-1;var n={x:-i.x,y:i.y},s={x:Number.NaN,y:Number.NaN},r=[];t:for(var o=0;o<t.grids.length;o++){var a=t.grids[o];if(r.push(a.name),a.isNull){s=n;break}if(null!==a.grid)for(var h=a.grid.subgrids,l=0,c=h.length;l<c;l++){var u=h[l],d=(Math.abs(u.del[1])+Math.abs(u.del[0]))/1e4,f=u.ll[0]-d,p=u.ll[1]-d,g=u.ll[0]+(u.lim[0]-1)*u.del[0]+d,m=u.ll[1]+(u.lim[1]-1)*u.del[1]+d;if(!(p>n.y||f>n.x||m<n.y||g<n.x||(s=nl(n,e,u),isNaN(s.x))))break t}else if(a.mandatory)return console.log("Unable to find mandatory grid '"+a.name+"'"),-1}return isNaN(s.x)?(console.log("Failed to find a grid shift table for location '"+-n.x*qa+" "+n.y*qa+" tried: '"+r+"'"),-1):(i.x=-s.x,i.y=s.y,0)}function nl(t,e,i){var n={x:Number.NaN,y:Number.NaN};if(isNaN(t.x))return n;var s={x:t.x,y:t.y};s.x-=i.ll[0],s.y-=i.ll[1],s.x=Sh(s.x-Math.PI)+Math.PI;var r=sl(s,i);if(e){if(isNaN(r.x))return n;r.x=s.x-r.x,r.y=s.y-r.y;var o,a,h=9;do{if(a=sl(r,i),isNaN(a.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge.  Using first approximation.");break}o={x:s.x-(a.x+r.x),y:s.y-(a.y+r.y)},r.x+=o.x,r.y+=o.y}while(h--&&Math.abs(o.x)>1e-12&&Math.abs(o.y)>1e-12);if(h<0)return console.log("Inverse grid shift iterator failed to converge."),n;n.x=Sh(r.x+i.ll[0]),n.y=r.y+i.ll[1]}else isNaN(r.x)||(n.x=t.x+r.x,n.y=t.y+r.y);return n}function sl(t,e){var i,n={x:t.x/e.del[0],y:t.y/e.del[1]},s=Math.floor(n.x),r=Math.floor(n.y),o=n.x-1*s,a=n.y-1*r,h={x:Number.NaN,y:Number.NaN};if(s<0||s>=e.lim[0])return h;if(r<0||r>=e.lim[1])return h;i=r*e.lim[0]+s;var l=e.cvs[i][0],c=e.cvs[i][1];i++;var u=e.cvs[i][0],d=e.cvs[i][1];i+=e.lim[0];var f=e.cvs[i][0],p=e.cvs[i][1];i--;var g=e.cvs[i][0],m=e.cvs[i][1],_=o*a,v=o*(1-a),y=(1-o)*(1-a),w=(1-o)*a;return h.x=y*l+v*u+w*g+_*f,h.y=y*c+v*d+w*m+_*p,h}i.dn(el);var rl=["x","y","z"];function ol(t){var e={x:t[0],y:t[1]};return t.length>2&&(e.z=t[2]),t.length>3&&(e.m=t[3]),e}function al(t){hl(t.x),hl(t.y)}function hl(t){if("function"==typeof Number.isFinite){if(Number.isFinite(t))return;throw new TypeError("coordinates must be finite numbers")}if("number"!=typeof t||t!=t||!isFinite(t))throw new TypeError("coordinates must be finite numbers")}function ll(t,e,i,n){var s,r=void 0!==i.z;if(al(i),t.datum&&e.datum&&function(t,e){return(1===t.datum.datum_type||2===t.datum.datum_type||3===t.datum.datum_type)&&"WGS84"!==e.datumCode||(1===e.datum.datum_type||2===e.datum.datum_type||3===e.datum.datum_type)&&"WGS84"!==t.datumCode}(t,e)&&(i=ll(t,s=new Zh("WGS84"),i,n),t=s),n&&"enu"!==t.axis&&(i=function(t,e){const i={};for(let n=0,s=t.axis.length;n<s;n++){if(2===n&&void 0===e.z)continue;let s=e[rl[n]];switch(t.axis[n]){case"e":i.x=s;break;case"w":i.x=-s;break;case"n":i.y=s;break;case"s":i.y=-s;break;case"u":i.z=s;break;case"d":i.z=-s;break;default:return null}}return i}(t,i)),"longlat"===t.projName)i={x:i.x*za,y:i.y*za,z:i.z||0};else if(t.to_meter&&(i={x:i.x*t.to_meter,y:i.y*t.to_meter,z:i.z||0}),!(i=t.inverse(i)))return;if(t.from_greenwich&&(i.x+=t.from_greenwich),i=el(t.datum,e.datum,i))return e.from_greenwich&&(i={x:i.x-e.from_greenwich,y:i.y,z:i.z||0}),"longlat"===e.projName?(void 0!==e.long_wrap&&(i.x=e.long_wrap+Sh(i.x-e.long_wrap)),i={x:i.x*qa,y:i.y*qa,z:i.z||0}):(i=e.forward(i),e.to_meter&&(i={x:i.x/e.to_meter,y:i.y/e.to_meter,z:i.z||0})),n&&"enu"!==e.axis?function(t,e){const i={};for(let n=0,s=t.axis.length;n<s;n++)if(2!==n||void 0!==e.z)switch(t.axis[n]){case"e":i[rl[n]]=e.x;break;case"w":i[rl[n]]=-e.x;break;case"n":i[rl[n]]=e.y;break;case"s":i[rl[n]]=-e.y;break;case"u":i[rl[n]]=e.z;break;case"d":i[rl[n]]=-e.z;break;default:return null}return i}(e,i):(i&&!r&&"geocent"!==e.projName&&delete i.z,i)}i.dn(ol),i.dn(al);var cl=Zh("WGS84");function ul(t,e,i,n){var s,r,o;return Array.isArray(i)?(s=ll(t,e,ol(i),n)||{x:NaN,y:NaN},i.length>2?(r=void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name)?"number"==typeof s.z?[s.x,s.y,s.z].concat(i.slice(3)):[s.x,s.y,i[2]].concat(i.slice(3)):n&&"number"==typeof s.z?[s.x,s.y,s.z].concat(i.slice(3)):[s.x,s.y].concat(i.slice(2)):[s.x,s.y]):(s=ll(t,e,{x:i.x,y:i.y,z:i.z,m:i.m},n)||{x:NaN,y:NaN},2===(o=Object.keys(i)).length||(r=void 0!==t.name&&"geocent"===t.name||void 0!==e.name&&"geocent"===e.name,o.forEach(function(t){"x"!==t&&"y"!==t&&("z"===t&&(r||n)||(s[t]=i[t]))})),s)}function dl(t){return t instanceof Zh?t:"object"==typeof t&&"oProj"in t?t.oProj:Zh(t)}var fl="AJSAJS",pl="AFAFAF",gl=65,ml=73,_l=79;const vl={forward:yl,inverse:function(t){var e=Sl(Al(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat,e.lon,e.lat]:[e.left,e.bottom,e.right,e.top]},toPoint:wl};function yl(t,e){return e=e||5,function(t,e){var i,n,s,r,o,a,h,l,c,u,d,f="00000"+t.easting,p="00000"+t.northing;return t.zoneNumber+t.zoneLetter+(c=t.easting,u=t.northing,d=El(t.zoneNumber),i=Math.floor(c/1e5),n=Math.floor(u/1e5)%20,r=fl.charCodeAt(s=d-1),o=pl.charCodeAt(s),l=!1,(a=r+i-1)>90&&(a=a-90+gl-1,l=!0),(a===ml||r<ml&&a>ml||(a>ml||r<ml)&&l)&&a++,(a===_l||r<_l&&a>_l||(a>_l||r<_l)&&l)&&++a===ml&&a++,a>90&&(a=a-90+gl-1),(h=o+n)>86?(h=h-86+gl-1,l=!0):l=!1,(h===ml||o<ml&&h>ml||(h>ml||o<ml)&&l)&&h++,(h===_l||o<_l&&h>_l||(h>_l||o<_l)&&l)&&++h===ml&&h++,h>86&&(h=h-86+gl-1),String.fromCharCode(a)+String.fromCharCode(h))+f.substr(f.length-5,e)+p.substr(p.length-5,e)}(function(t){var e,i,n,s,r,o,a,h=t.lat,l=t.lon,c=6378137,u=.00669438,d=.9996,f=bl(h),p=bl(l);a=Math.floor((l+180)/6)+1,180===l&&(a=60),h>=56&&h<64&&l>=3&&l<12&&(a=32),h>=72&&h<84&&(l>=0&&l<9?a=31:l>=9&&l<21?a=33:l>=21&&l<33?a=35:l>=33&&l<42&&(a=37)),o=bl(6*(a-1)-180+3),e=.006739496752268451,i=c/Math.sqrt(1-u*Math.sin(f)*
2Math.sin(f)),n=Math.tan(f)*Math.tan(f),s=e*Math.cos(f)*Math.cos(f);var g,m,_=d*i*((r=Math.cos(f)*(p-o))+(1-n+s)*r*r*r/6+(5-18*n+n*n+72*s-58*e)*r*r*r*r*r/120)+5e5,v=d*(c*(.9983242984503243*f-.002514607064228144*Math.sin(2*f)+2639046602129982e-21*Math.sin(4*f)-3.418046101696858e-9*Math.sin(6*f))+i*Math.tan(f)*(r*r/2+(5-n+9*s+4*s*s)*r*r*r*r/24+(61-58*n+n*n+600*s-2.2240339282485886)*r*r*r*r*r*r/720));return h<0&&(v+=1e7),{northing:Math.round(v),easting:Math.round(_),zoneNumber:a,zoneLetter:(g=h,m="Z",84>=g&&g>=72?m="X":72>g&&g>=64?m="W":64>g&&g>=56?m="V":56>g&&g>=48?m="U":48>g&&g>=40?m="T":40>g&&g>=32?m="S":32>g&&g>=24?m="R":24>g&&g>=16?m="Q":16>g&&g>=8?m="P":8>g&&g>=0?m="N":0>g&&g>=-8?m="M":-8>g&&g>=-16?m="L":-16>g&&g>=-24?m="K":-24>g&&g>=-32?m="J":-32>g&&g>=-40?m="H":-40>g&&g>=-48?m="G":-48>g&&g>=-56?m="F":-56>g&&g>=-64?m="E":-64>g&&g>=-72?m="D":-72>g&&g>=-80&&(m="C"),m)}}({lat:t[1],lon:t[0]}),e)}function wl(t){var e=Sl(Al(t.toUpperCase()));return e.lat&&e.lon?[e.lon,e.lat]:[(e.left+e.right)/2,(e.top+e.bottom)/2]}function bl(t){return t*(Math.PI/180)}function xl(t){return t/Math.PI*180}function Sl(t){var e=t.northing,i=t.easting,n=t.zoneLetter,s=t.zoneNumber;if(s<0||s>60)return null;var r,o,a,h,l,c,u,d,f,p=.9996,g=6378137,m=.00669438,_=(1-Math.sqrt(.99330562))/(1+Math.sqrt(.99330562)),v=i-5e5,y=e;n<"N"&&(y-=1e7),u=6*(s-1)-180+3,r=.006739496752268451,f=(d=y/p/6367449.145945056)+(3*_/2-27*_*_*_/32)*Math.sin(2*d)+(21*_*_/16-55*_*_*_*_/32)*Math.sin(4*d)+151*_*_*_/96*Math.sin(6*d),o=g/Math.sqrt(1-m*Math.sin(f)*Math.sin(f)),a=Math.tan(f)*Math.tan(f),h=r*Math.cos(f)*Math.cos(f),l=.99330562*g/Math.pow(1-m*Math.sin(f)*Math.sin(f),1.5),c=v/(o*p);var w=f-o*Math.tan(f)/l*(c*c/2-(5+3*a+10*h-4*h*h-9*r)*c*c*c*c/24+(61+90*a+298*h+45*a*a-1.6983531815716497-3*h*h)*c*c*c*c*c*c/720);w=xl(w);var b,x=(c-(1+2*a+h)*c*c*c/6+(5-2*h+28*a-3*h*h+8*r+24*a*a)*c*c*c*c*c/120)/Math.cos(f);if(x=u+xl(x),t.accuracy){var S=Sl({northing:t.northing+t.accuracy,easting:t.easting+t.accuracy,zoneLetter:t.zoneLetter,zoneNumber:t.zoneNumber});b={top:S.lat,right:S.lon,bottom:w,left:x}}else b={lat:w,lon:x};return b}function El(t){var e=t%6;return 0===e&&(e=6),e}function Al(t){if(t&&0===t.length)throw"MGRSPoint coverting from nothing";for(var e,i=t.length,n=null,s="",r=0;!/[A-Z]/.test(e=t.charAt(r));){if(r>=2)throw"MGRSPoint bad conversion from: "+t;s+=e,r++}var o=parseInt(s,10);if(0===r||r+3>i)throw"MGRSPoint bad conversion from: "+t;var a=t.charAt(r++);if(a<="A"||"B"===a||"Y"===a||a>="Z"||"I"===a||"O"===a)throw"MGRSPoint zone letter "+a+" not handled: "+t;n=t.substring(r,r+=2);for(var h=El(o),l=function(t,e){for(var i=fl.charCodeAt(e-1),n=1e5,s=!1;i!==t.charCodeAt(0);){if(++i===ml&&i++,i===_l&&i++,i>90){if(s)throw"Bad character: "+t;i=gl,s=!0}n+=1e5}return n}(n.charAt(0),h),c=function(t,e){if(t>"V")throw"MGRSPoint given invalid Northing "+t;for(var i=pl.charCodeAt(e-1),n=0,s=!1;i!==t.charCodeAt(0);){if(++i===ml&&i++,i===_l&&i++,i>86){if(s)throw"Bad character: "+t;i=gl,s=!0}n+=1e5}return n}(n.charAt(1),h);c<Cl(a);)c+=2e6;var u=i-r;if(u%2!=0)throw"MGRSPoint has to have an even number \nof digits after the zone letter and two 100km letters - front \nhalf for easting meters, second half for \nnorthing meters"+t;var d,f,p,g=u/2,m=0,_=0;return g>0&&(d=1e5/Math.pow(10,g),f=t.substring(r,r+g),m=parseFloat(f)*d,p=t.substring(r+g),_=parseFloat(p)*d),{easting:m+l,northing:_+c,zoneLetter:a,zoneNumber:o,accuracy:d}}function Cl(t){var e;switch(t){case"C":e=11e5;break;case"D":e=2e6;break;case"E":e=28e5;break;case"F":e=37e5;break;case"G":e=46e5;break;case"H":e=55e5;break;case"J":e=64e5;break;case"K":e=73e5;break;case"L":e=82e5;break;case"M":e=91e5;break;case"N":e=0;break;case"P":e=8e5;break;case"Q":e=17e5;break;case"R":e=26e5;break;case"S":e=35e5;break;case"T":e=44e5;break;case"U":e=53e5;break;case"V":e=62e5;break;case"W":e=7e6;break;case"X":e=79e5;break;default:e=-1}if(e>=0)return e;throw"Invalid zone letter: "+t}function Ml(t,e,i){if(!(this instanceof Ml))return new Ml(t,e,i);if(Array.isArray(t))this.x=t[0],this.y=t[1],this.z=t[2]||0;else if("object"==typeof t)this.x=t.x,this.y=t.y,this.z=t.z||0;else if("string"==typeof t&&void 0===e){var n=t.split(",");this.x=parseFloat(n[0]),this.y=parseFloat(n[1]),this.z=parseFloat(n[2])||0}else this.x=t,this.y=e,this.z=i||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Ml.fromMGRS=function(t){return new Ml(wl(t))},Ml.prototype.toMGRS=function(t){return yl([this.x,this.y],t)};const Ll=Ml;i.dn(zl);var Pl=1,kl=.25,Nl=.046875,Il=.01953125,Tl=.01068115234375,Ol=.75,Rl=.46875,Fl=.013020833333333334,Dl=.007120768229166667,jl=.3645833333333333,Gl=.005696614583333333,Bl=.3076171875;function zl(t){var e=[];e[0]=Pl-t*(kl+t*(Nl+t*(Il+t*Tl))),e[1]=t*(Ol-t*(Nl+t*(Il+t*Tl)));var i=t*t;return e[2]=i*(Rl-t*(Fl+t*Dl)),i*=t,e[3]=i*(jl-t*Gl),e[4]=i*t*Bl,e}function ql(t,e,i,n){return i*=e,e*=e,n[0]*t-i*(n[1]+e*(n[2]+e*(n[3]+e*n[4])))}i.dn(ql),i.dn(Wl);var Ul=20;function Wl(t,e,i){for(var n=1/(1-e),s=t,r=Ul;r;--r){var o=Math.sin(s),a=1-e*o*o;if(s-=a=(ql(s,o,Math.cos(s),i)-t)*(a*Math.sqrt(a))*n,Math.abs(a)<Ba)return s}return s}const Vl={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.es&&(this.en=zl(this.es),this.ml0=ql(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))},forward:function(t){var e,i,n,s=t.x,r=t.y,o=Sh(s-this.long0,this.over),a=Math.sin(r),h=Math.cos(r);if(this.es){var l=h*o,c=Math.pow(l,2),u=this.ep2*Math.pow(h,2),d=Math.pow(u,2),f=Math.abs(h)>Ba?Math.tan(r):0,p=Math.pow(f,2),g=Math.pow(p,2);e=1-this.es*Math.pow(a,2),l/=Math.sqrt(e);var m=ql(r,a,h,this.en);i=this.a*(this.k0*l*(1+c/6*(1-p+u+c/20*(5-18*p+g+14*u-58*p*u+c/42*(61+179*g-g*p-479*
2p)))))+this.x0,n=this.a*(this.k0*(m-this.ml0+a*o*l/2*(1+c/12*(5-p+9*u+4*d+c/30*(61+g-58*p+270*u-330*p*u+c/56*(1385+543*g-g*p-3111*p))))))+this.y0}else{var _=h*Math.sin(o);if(Math.abs(Math.abs(_)-1)<Ba)return 93;if(i=.5*this.a*this.k0*Math.log((1+_)/(1-_))+this.x0,n=h*Math.cos(o)/Math.sqrt(1-Math.pow(_,2)),(_=Math.abs(n))>=1){if(_-1>Ba)return 93;n=0}else n=Math.acos(n);r<0&&(n=-n),n=this.a*this.k0*(n-this.lat0)+this.y0}return t.x=i,t.y=n,t},inverse:function(t){var e,i,n,s,r=(t.x-this.x0)*(1/this.a),o=(t.y-this.y0)*(1/this.a);if(this.es)if(i=Wl(e=this.ml0+o/this.k0,this.es,this.en),Math.abs(i)<Ga){var a=Math.sin(i),h=Math.cos(i),l=Math.abs(h)>Ba?Math.tan(i):0,c=this.ep2*Math.pow(h,2),u=Math.pow(c,2),d=Math.pow(l,2),f=Math.pow(d,2);e=1-this.es*Math.pow(a,2);var p=r*Math.sqrt(e)/this.k0,g=Math.pow(p,2);n=i-(e*=l)*g/(1-this.es)*.5*(1-g/12*(5+3*d-9*c*d+c-4*u-g/30*(61+90*d-252*c*d+45*f+46*c-g/56*(1385+3633*d+4095*f+1574*f*d)))),s=Sh(this.long0+p*(1-g/6*(1+2*d+c-g/20*(5+28*d+24*f+8*c*d+6*c-g/42*(61+662*d+1320*f+720*f*d))))/h,this.over)}else n=Ga*xh(o),s=0;else{var m=Math.exp(r/this.k0),_=.5*(m-1/m),v=this.lat0+o/this.k0,y=Math.cos(v);e=Math.sqrt((1-Math.pow(y,2))/(1+Math.pow(_,2))),n=Math.asin(e),o<0&&(n=-n),s=0===_&&0===y?0:Sh(Math.atan2(_,y)+this.long0,this.over)}return t.x=s,t.y=n,t},names:["Fast_Transverse_Mercator","Fast Transverse Mercator"]};function Hl(t){var e=Math.exp(t);return(e-1/e)/2}function Kl(t,e){t=Math.abs(t),e=Math.abs(e);var i=Math.max(t,e),n=Math.min(t,e)/(i||1);return i*Math.sqrt(1+Math.pow(n,2))}function $l(t){var e=1+t,i=e-1;return 0===i?t:t*Math.log(e)/i}function Xl(t){var e=Math.abs(t);return e=$l(e*(1+e/(Kl(1,e)+1))),t<0?-e:e}function Yl(t,e){for(var i,n=2*Math.cos(2*e),s=t.length-1,r=t[s],o=0;--s>=0;)i=n*r-o+t[s],o=r,r=i;return e+i*Math.sin(2*e)}function Zl(t,e){for(var i,n=2*Math.cos(e),s=t.length-1,r=t[s],o=0;--s>=0;)i=n*r-o+t[s],o=r,r=i;return Math.sin(e)*i}function Jl(t){var e=Math.exp(t);return(e+1/e)/2}function Ql(t,e,i){for(var n,s,r=Math.sin(e),o=Math.cos(e),a=Hl(i),h=Jl(i),l=2*o*h,c=-2*r*a,u=t.length-1,d=t[u],f=0,p=0,g=0;--u>=0;)n=p,s=f,d=l*(p=d)-n-c*(f=g)+t[u],g=c*p-s+l*f;return[(l=r*h)*d-(c=o*a)*g,l*g+c*d]}i.dn(Hl),i.dn(Kl),i.dn($l),i.dn(Xl),i.dn(Yl),i.dn(Zl),i.dn(Jl),i.dn(Ql);const tc={init:function(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(Vl.init.apply(this),this.forward=Vl.forward,this.inverse=Vl.inverse),this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0,this.lat0=void 0!==this.lat0?this.lat0:0,this.k0=void 0!==this.k0?this.k0:1,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var t=this.es/(1+Math.sqrt(1-this.es)),e=t/(2-t),i=e;this.cgb[0]=e*(2+e*(-2/3+e*(e*(116/45+e*(26/45+e*(-2854/675)))-2))),this.cbg[0]=e*(e*(2/3+e*(4/3+e*(-82/45+e*(32/45+e*(4642/4725)))))-2),i*=e,this.cgb[1]=i*(7/3+e*(e*(-227/45+e*(2704/315+e*(2323/945)))-1.6)),this.cbg[1]=i*(5/3+e*(-16/15+e*(-13/9+e*(904/315+e*(-1522/945))))),i*=e,this.cgb[2]=i*(56/15+e*(-136/35+e*(-1262/105+e*(73814/2835)))),this.cbg[2]=i*(-26/15+e*(34/21+e*(1.6+e*(-12686/2835)))),i*=e,this.cgb[3]=i*(4279/630+e*(-332/35+e*(-399572/14175))),this.cbg[3]=i*(1237/630+e*(e*(-24832/14175)-2.4)),i*=e,this.cgb[4]=i*(4174/315+e*(-144838/6237)),this.cbg[4]=i*(-734/315+e*(109598/31185)),i*=e,this.cgb[5]=i*(601676/22275),this.cbg[5]=i*(444337/155925),i=Math.pow(e,2),this.Qn=this.k0/(1+e)*(1+i*(1/4+i*(1/64+i/256))),this.utg[0]=e*(e*(2/3+e*(-37/96+e*(1/360+e*(81/512+e*(-96199/604800)))))-.5),this.gtu[0]=e*(.5+e*(-2/3+e*(5/16+e*(41/180+e*(-127/288+e*(7891/37800)))))),this.utg[1]=i*(-1/48+e*(-1/15+e*(437/1440+e*(-46/105+e*(1118711/3870720))))),this.gtu[1]=i*(13/48+e*(e*(557/1440+e*(281/630+e*(-1983433/1935360)))-.6)),i*=e,this.utg[2]=i*(-17/480+e*(37/840+e*(209/4480+e*(-5569/90720)))),this.gtu[2]=i*(61/240+e*(-103/140+e*(15061/26880+e*(167603/181440)))),i*=e,this.utg[3]=i*(-4397/161280+e*(11/504+e*(830251/7257600))),this.gtu[3]=i*(49561/161280+e*(-179/168+e*(6601661/7257600))),i*=e,this.utg[4]=i*(-4583/161280+e*(108847/3991680)),this.gtu[4]=i*(34729/80640+e*(-3418889/1995840)),i*=e,this.utg[5]=i*(-20648693/638668800),this.gtu[5]=.6650675310896665*i;var n=Yl(this.cbg,this.lat0);this.Zb=-this.Qn*(n+Zl(this.gtu,2*n))},forward:function(t){var e=Sh(t.x-this.long0,this.over),i=t.y;i=Yl(this.cbg,i);var n=Math.sin(i),s=Math.cos(i),r=Math.sin(e),o=Math.cos(e);i=Math.atan2(n,o*s),e=Math.atan2(r*s,Kl(n,s*o)),e=Xl(Math.tan(e));var a,h,l=Ql(this.gtu,2*i,2*e);return i+=l[0],e+=l[1],Math.abs(e)<=2.623395162778?(a=this.a*(this.Qn*e)+this.x0,h=this.a*(this.Qn*i+this.Zb)+this.y0):(a=1/0,h=1/0),t.x=a,t.y=h,t},inverse:function(t){var e,i,n=(t.x-this.x0)*(1/this.a),s=(t.y-this.y0)*(1/this.a);if(s=(s-this.Zb)/this.Qn,n/=this.Qn,Math.abs(n)<=2.623395162778){var r=Ql(this.utg,2*s,2*n);s+=r[0],n+=r[1],n=Math.atan(Hl(n));var o=Math.sin(s),a=Math.cos(s),h=Math.sin(n),l=Math.cos(n);s=Math.atan2(o*l,Kl(h,l*a)),e=Sh((n=Math.atan2(h,l*a))+this.long0,this.over),i=Yl(this.cgb,s)}else e=1/0,i=1/0;return t.x=e,t.y=i,t},names:["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","Gauss Kruger","Gauss_Kruger","tmerc"]};function ec(t,e){if(void 0===t){if((t=Math.floor(30*(Sh(e)+Math.PI)/Math.PI)+1)<0)return 0;if(t>60)return 60}return t}i.dn(ec);const ic={init:function(){var t=ec(this.zone,this.long0);if(void 0===t)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(t)-183)*za,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,tc.init.apply(this),this.forward=tc.forward,this.inverse=tc.inverse},names:["Universal Transverse Mercator System","utm"],dependsOn:"etmerc"};function nc(t,e){return Math.pow((1-t)/(1+t),e)}i.dn(nc);const sc={init:function(){var t=Math.sin(this.lat0),e=Math.cos(this.lat0);e*=e,this.rc=Math.sqrt(1-this.es)/(1-this.es*t*t),this.C=Math.sqrt(1+this.es*e*e/(1-this.es)),this.phic0=Math.asin(t/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+Ua)/(Math.pow(Math.tan(.5*this.lat0+Ua),this.C)*nc(this.e*t,this.ratexp))},forward:function(t){var e=t.x,i=t.y;return t.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*i+Ua),this.C)*nc(this.e*Math.sin(i),this.ratexp))-Ga,t.x=this.C*e,t},inverse:function(t){for(var e=t.x/this.C,i=t.y,n=Math.pow(Math.tan(.5*i+Ua)/this.K,1/this.C),s=20;s>0&&(i=2*Math.atan(n*nc(this.e*Math.sin(t.y),-.5*this.e))-Ga,!(Math.abs(i-t.y)<1e-14));--s)t.y=i;return s?(t.x=e,t.y=i,t):null},names:["gauss"]},rc={init:function(){sc.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))},forward:function(t){var e,i,n,s;return t.x=Sh(t.x-this.long0,this.over),sc.forward.apply(this,[t]),e=Math.sin(t.y),i=Math.cos(t.y),n=Math.cos(t.x),s=this.k0*this.R2/(1+this.sinc0*e+this.cosc0*i*n),t.x=s*i*Math.sin(t.x),t.y=s*(this.cosc0*e-this.sinc0*i*n),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){var e,i,n,s,r;if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,r=Kl(t.x,t.y)){var o=2*Math.atan2(r,this.R2);e=Math.sin(o),i=Math.cos(o),s=Math.asin(i*this.sinc0+t.y*e*this.cosc0/r),n=Math.atan2(t.x*e,r*this.cosc0*i-t.y*this.sinc0*e)}else s=this.phic0,n=0;return t.x=n,t.y=s,sc.inverse.apply(this,[t]),t.x=Sh(t.x+this.long0,this.over),t}
2,names:["Stereographic_North_Pole","Oblique_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"]};function oc(t,e,i){return e*=i,Math.tan(.5*(Ga+t))*Math.pow((1-e)/(1+e),.5*i)}const ac={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Ba&&(this.k0=.5*(1+xh(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=Ba&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=Ba&&Math.abs(Math.cos(this.lat_ts))>Ba&&(this.k0=.5*this.cons*bh(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Eh(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=bh(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(oc(this.lat0,this.sinlat0,this.e))-Ga,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))},forward:function(t){var e,i,n,s,r,o,a=t.x,h=t.y,l=Math.sin(h),c=Math.cos(h),u=Sh(a-this.long0,this.over);return Math.abs(Math.abs(a-this.long0)-Math.PI)<=Ba&&Math.abs(h+this.lat0)<=Ba?(t.x=NaN,t.y=NaN,t):this.sphere?(e=2*this.k0/(1+this.sinlat0*l+this.coslat0*c*Math.cos(u)),t.x=this.a*e*c*Math.sin(u)+this.x0,t.y=this.a*e*(this.coslat0*l-this.sinlat0*c*Math.cos(u))+this.y0,t):(i=2*Math.atan(oc(h,l,this.e))-Ga,s=Math.cos(i),n=Math.sin(i),Math.abs(this.coslat0)<=Ba?(r=Eh(this.e,h*this.con,this.con*l),o=2*this.a*this.k0*r/this.cons,t.x=this.x0+o*Math.sin(a-this.long0),t.y=this.y0-this.con*o*Math.cos(a-this.long0),t):(Math.abs(this.sinlat0)<Ba?(e=2*this.a*this.k0/(1+s*Math.cos(u)),t.y=e*n):(e=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*n+this.cosX0*s*Math.cos(u))),t.y=e*(this.cosX0*n-this.sinX0*s*Math.cos(u))+this.y0),t.x=e*s*Math.sin(u)+this.x0,t))},inverse:function(t){var e,i,n,s,r;t.x-=this.x0,t.y-=this.y0;var o=Math.sqrt(t.x*t.x+t.y*t.y);if(this.sphere){var a=2*Math.atan(o/(2*this.a*this.k0));return e=this.long0,i=this.lat0,o<=Ba?(t.x=e,t.y=i,t):(i=Math.asin(Math.cos(a)*this.sinlat0+t.y*Math.sin(a)*this.coslat0/o),e=Math.abs(this.coslat0)<Ba?this.lat0>0?Sh(this.long0+Math.atan2(t.x,-1*t.y),this.over):Sh(this.long0+Math.atan2(t.x,t.y),this.over):Sh(this.long0+Math.atan2(t.x*Math.sin(a),o*this.coslat0*Math.cos(a)-t.y*this.sinlat0*Math.sin(a)),this.over),t.x=e,t.y=i,t)}if(Math.abs(this.coslat0)<=Ba){if(o<=Ba)return i=this.lat0,e=this.long0,t.x=e,t.y=i,t;t.x*=this.con,t.y*=this.con,n=o*this.cons/(2*this.a*this.k0),i=this.con*Ah(this.e,n),e=this.con*Sh(this.con*this.long0+Math.atan2(t.x,-1*t.y),this.over)}else s=2*Math.atan(o*this.cosX0/(2*this.a*this.k0*this.ms1)),e=this.long0,o<=Ba?r=this.X0:(r=Math.asin(Math.cos(s)*this.sinX0+t.y*Math.sin(s)*this.cosX0/o),e=Sh(this.long0+Math.atan2(t.x*Math.sin(s),o*this.cosX0*Math.cos(s)-t.y*this.sinX0*Math.sin(s)),this.over)),i=-1*Ah(this.e,Math.tan(.5*(Ga+r)));return t.x=e,t.y=i,t},names:["stere","Stereographic_South_Pole","Polar_Stereographic_variant_A","Polar_Stereographic_variant_B","Polar_Stereographic"],ssfn_:oc},hc={init:function(){this.k0||(this.k0=1);var t=this.lat0;this.lambda0=this.long0;var e=Math.sin(t),i=this.a,n=1/this.rf,s=2*n-Math.pow(n,2),r=this.e=Math.sqrt(s);this.R=this.k0*i*Math.sqrt(1-s)/(1-s*Math.pow(e,2)),this.alpha=Math.sqrt(1+s/(1-s)*Math.pow(Math.cos(t),4)),this.b0=Math.asin(e/this.alpha);var o=Math.log(Math.tan(Math.PI/4+this.b0/2)),a=Math.log(Math.tan(Math.PI/4+t/2)),h=Math.log((1+r*e)/(1-r*e));this.K=o-this.alpha*a+this.alpha*r/2*h},forward:function(t){var e=Math.log(Math.tan(Math.PI/4-t.y/2)),i=this.e/2*Math.log((1+this.e*Math.sin(t.y))/(1-this.e*Math.sin(t.y))),n=-this.alpha*(e+i)+this.K,s=2*(Math.atan(Math.exp(n))-Math.PI/4),r=this.alpha*(t.x-this.lambda0),o=Math.atan(Math.sin(r)/(Math.sin(this.b0)*Math.tan(s)+Math.cos(this.b0)*Math.cos(r))),a=Math.asin(Math.cos(this.b0)*Math.sin(s)-Math.sin(this.b0)*Math.cos(s)*Math.cos(r));return t.y=this.R/2*Math.log((1+Math.sin(a))/(1-Math.sin(a)))+this.y0,t.x=this.R*o+this.x0,t},inverse:function(t){for(var e=t.x-this.x0,i=t.y-this.y0,n=e/this.R,s=2*(Math.atan(Math.exp(i/this.R))-Math.PI/4),r=Math.asin(Math.cos(this.b0)*Math.sin(s)+Math.sin(this.b0)*Math.cos(s)*Math.cos(n)),o=Math.atan(Math.sin(n)/(Math.cos(this.b0)*Math.cos(n)-Math.sin(this.b0)*Math.tan(s))),a=this.lambda0+o/this.alpha,h=0,l=r,c=-1e3,u=0;Math.abs(l-c)>1e-7;){if(++u>20)return;h=1/this.alpha*(Math.log(Math.tan(Math.PI/4+r/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(l))/2)),c=l,l=2*Math.atan(Math.exp(h))-Math.PI/2}return t.x=a,t.y=l,t},names:["somerc"]};var lc=1e-7;const cc={init:function(){var t,e,i,n,s,r,o,a,h,l,c,u=0,d=0,f=0,p=0,g=0,m=0,_=0;this.k0||(this.k0=1),this.no_off=function(t){var e=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],i="object"==typeof t.projName?Object.keys(t.projName)[0]:t.projName;
2return"no_uoff"in t||"no_off"in t||-1!==e.indexOf(i)||-1!==e.indexOf(Th(i))}(this),this.no_rot="no_rot"in this;var v=!1;"alpha"in this&&(v=!0);var y=!1;if("rectified_grid_angle"in this&&(y=!0),v&&(_=this.alpha),y&&(u=this.rectified_grid_angle,v||(_=0,v=!0)),v||y)d=this.longc;else if(f=this.long1,g=this.lat1,p=this.long2,m=this.lat2,Math.abs(g-m)<=lc||(t=Math.abs(g))<=lc||Math.abs(t-Ga)<=lc||Math.abs(Math.abs(this.lat0)-Ga)<=lc||Math.abs(Math.abs(m)-Ga)<=lc)throw new Error;var w=1-this.es;e=Math.sqrt(w),Math.abs(this.lat0)>Ba?(a=Math.sin(this.lat0),i=Math.cos(this.lat0),t=1-this.es*a*a,this.B=i*i,this.B=Math.sqrt(1+this.es*this.B*this.B/w),this.A=this.B*this.k0*e/t,(s=(n=this.B*e/(i*Math.sqrt(t)))*n-1)<=0?s=0:(s=Math.sqrt(s),this.lat0<0&&(s=-s)),this.E=s+=n,this.E*=Math.pow(Eh(this.e,this.lat0,a),this.B)):(this.B=1/e,this.A=this.k0,this.E=n=s=1),v||y?(v?(c=Math.asin(Math.sin(_)/n),y||(u=_)):(c=u,_=Math.asin(n*Math.sin(c))),this.lam0=d-Math.asin(.5*(s-1/s)*Math.tan(c))/this.B):(r=Math.pow(Eh(this.e,g,Math.sin(g)),this.B),o=Math.pow(Eh(this.e,m,Math.sin(m)),this.B),s=this.E/r,h=(o-r)/(o+r),l=((l=this.E*this.E)-o*r)/(l+o*r),(t=f-p)<-Math.PI?p-=Wa:t>Math.PI&&(p+=Wa),this.lam0=Sh(.5*(f+p)-Math.atan(l*Math.tan(.5*this.B*(f-p))/h)/this.B,this.over),c=Math.atan(2*Math.sin(this.B*Sh(f-this.lam0,this.over))/(s-1/s)),u=_=Math.asin(n*Math.sin(c))),this.singam=Math.sin(c),this.cosgam=Math.cos(c),this.sinrot=Math.sin(u),this.cosrot=Math.cos(u),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(n*n-1)/Math.cos(_))),this.lat0<0&&(this.u_0=-this.u_0)),s=.5*c,this.v_pole_n=this.ArB*Math.log(Math.tan(Ua-s)),this.v_pole_s=this.ArB*Math.log(Math.tan(Ua+s))},forward:function(t){var e,i,n,s,r,o,a,h,l={};if(t.x=t.x-this.lam0,Math.abs(Math.abs(t.y)-Ga)>Ba){if(e=.5*((r=this.E/Math.pow(Eh(this.e,t.y,Math.sin(t.y)),this.B))-(o=1/r)),i=.5*(r+o),s=Math.sin(this.B*t.x),n=(e*this.singam-s*this.cosgam)/i,Math.abs(Math.abs(n)-1)<Ba)throw new Error;h=.5*this.ArB*Math.log((1-n)/(1+n)),o=Math.cos(this.B*t.x),a=Math.abs(o)<lc?this.A*t.x:this.ArB*Math.atan2(e*this.cosgam+s*this.singam,o)}else h=t.y>0?this.v_pole_n:this.v_pole_s,a=this.ArB*t.y;return this.no_rot?(l.x=a,l.y=h):(a-=this.u_0,l.x=h*this.cosrot+a*this.sinrot,l.y=a*this.cosrot-h*this.sinrot),l.x=this.a*l.x+this.x0,l.y=this.a*l.y+this.y0,void 0!==t.z&&(l.z=t.z),void 0!==t.m&&(l.m=t.m),l},inverse:function(t){var e,i,n,s,r,o,a,h={};if(t.x=(t.x-this.x0)*(1/this.a),t.y=(t.y-this.y0)*(1/this.a),this.no_rot?(i=t.y,e=t.x):(i=t.x*this.cosrot-t.y*this.sinrot,e=t.y*this.cosrot+t.x*this.sinrot+this.u_0),s=.5*((n=Math.exp(-this.BrA*i))-1/n),r=.5*(n+1/n),a=((o=Math.sin(this.BrA*e))*this.cosgam+s*this.singam)/r,Math.abs(Math.abs(a)-1)<Ba)h.x=0,h.y=a<0?-Ga:Ga;else{if(h.y=this.E/Math.sqrt((1+a)/(1-a)),h.y=Ah(this.e,Math.pow(h.y,1/this.B)),h.y===1/0)throw new Error;h.x=-this.rB*Math.atan2(s*this.cosgam-o*this.singam,Math.cos(this.BrA*e))}return h.x+=this.lam0,void 0!==t.z&&(h.z=t.z),void 0!==t.m&&(h.m=t.m),h},names:["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_variant_A","Hotine_Oblique_Mercator_Variant_B","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"]},uc={init:function(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,!(Math.abs(this.lat1+this.lat2)<Ba)){var t=this.b/this.a;this.e=Math.sqrt(1-t*t);var e=Math.sin(this.lat1),i=Math.cos(this.lat1),n=bh(this.e,e,i),s=Eh(this.e,this.lat1,e),r=Math.sin(this.lat2),o=Math.cos(this.lat2),a=bh(this.e,r,o),h=Eh(this.e,this.lat2,r),l=Eh(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>Ba?this.ns=Math.log(n/a)/Math.log(s/h):this.ns=e,isNaN(this.ns)&&(this.ns=e),this.f0=n/(this.ns*Math.pow(s,this.ns)),this.rh=Math.abs(Math.abs(this.lat0)-Ga)<Ba?0:this.a*this.f0*Math.pow(l,this.ns),this.title||(this.title="Lambert Conformal Conic")}},forward:function(t){var e=t.x,i=t.y;Math.abs(2*Math.abs(i)-Math.PI)<=Ba&&(i=xh(i)*(Ga-2e-10));var n,s,r=Math.abs(Math.abs(i)-Ga);if(r>Ba)n=Eh(this.e,i,Math.sin(i)),s=this.a*this.f0*Math.pow(n,this.ns);else{if((r=i*this.ns)<=0)return null;s=0}var o=this.ns*Sh(e-this.long0,this.over);return t.x=this.k0*(s*Math.sin(o))+this.x0,t.y=this.k0*(this.rh-s*Math.cos(o))+this.y0,t},inverse:function(t){var e,i,n,s,r,o=(t.x-this.x0)/this.k0,a=this.rh-(t.y-this.y0)/this.k0;this.ns>0?(e=Math.sqrt(o*o+a*a),i=1):(e=-Math.sqrt(o*o+a*a),i=-1);var h=0;if(0!==e&&(h=Math.atan2(i*o,i*a)),0!==e||this.ns>
20){if(i=1/this.ns,n=Math.pow(e/(this.a*this.f0),i),-9999===(s=Ah(this.e,n)))return null}else s=-Ga;return r=Sh(h/this.ns+this.long0,this.over),t.x=r,t.y=s,t},names:["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"]},dc={init:function(){this.a=6377397.155,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.4334234309119251),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq},forward:function(t){var e,i,n,s,r,o,a,h=t.x,l=t.y,c=Sh(h-this.long0,this.over);return e=Math.pow((1+this.e*Math.sin(l))/(1-this.e*Math.sin(l)),this.alfa*this.e/2),i=2*(Math.atan(this.k*Math.pow(Math.tan(l/2+this.s45),this.alfa)/e)-this.s45),n=-c*this.alfa,s=Math.asin(Math.cos(this.ad)*Math.sin(i)+Math.sin(this.ad)*Math.cos(i)*Math.cos(n)),r=Math.asin(Math.cos(i)*Math.sin(n)/Math.cos(s)),o=this.n*r,a=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(s/2+this.s45),this.n),t.y=a*Math.cos(o)/1,t.x=a*Math.sin(o)/1,this.czech||(t.y*=-1,t.x*=-1),t},inverse:function(t){var e,i,n,s,r,o,a,h=t.x;t.x=t.y,t.y=h,this.czech||(t.y*=-1,t.x*=-1),r=Math.sqrt(t.x*t.x+t.y*t.y),s=Math.atan2(t.y,t.x)/Math.sin(this.s0),n=2*(Math.atan(Math.pow(this.ro0/r,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),e=Math.asin(Math.cos(this.ad)*Math.sin(n)-Math.sin(this.ad)*Math.cos(n)*Math.cos(s)),i=Math.asin(Math.cos(n)*Math.sin(s)/Math.cos(e)),t.x=this.long0-i/this.alfa,o=e,a=0;var l=0;do{t.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(e/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(o))/(1-this.e*Math.sin(o)),this.e/2))-this.s45),Math.abs(o-t.y)<1e-10&&(a=1),o=t.y,l+=1}while(0===a&&l<15);return l>=15?null:t},names:["Krovak","Krovak Modified","Krovak (North Orientated)","Krovak Modified (North Orientated)","krovak"]};function fc(t,e,i,n,s){return t*s-e*Math.sin(2*s)+i*Math.sin(4*s)-n*Math.sin(6*s)}function pc(t){return 1-.25*t*(1+t/16*(3+1.25*t))}function gc(t){return.375*t*(1+.25*t*(1+.46875*t))}function mc(t){return.05859375*t*t*(1+.75*t)}function _c(t){return t*t*t*(35/3072)}function vc(t,e,i){var n=e*i;return t/Math.sqrt(1-n*n)}function yc(t){return Math.abs(t)<Ga?t:t-xh(t)*Math.PI}function wc(t,e,i,n,s){var r,o;r=t/e;for(var a=0;a<15;a++)if(r+=o=(t-(e*r-i*Math.sin(2*r)+n*Math.sin(4*r)-s*Math.sin(6*r)))/(e-2*i*Math.cos(2*r)+4*n*Math.cos(4*r)-6*s*Math.cos(6*r)),Math.abs(o)<=1e-10)return r;return NaN}i.dn(fc),i.dn(pc),i.dn(gc),i.dn(mc),i.dn(_c),i.dn(vc),i.dn(yc),i.dn(wc);const bc={init:function(){this.sphere||(this.e0=pc(this.es),this.e1=gc(this.es),this.e2=mc(this.es),this.e3=_c(this.es),this.ml0=this.a*fc(this.e0,this.e1,this.e2,this.e3,this.lat0))},forward:function(t){var e,i,n=t.x,s=t.y;if(n=Sh(n-this.long0,this.over),this.sphere)e=this.a*Math.asin(Math.cos(s)*Math.sin(n)),i=this.a*(Math.atan2(Math.tan(s),Math.cos(n))-this.lat0);else{var r=Math.sin(s),o=Math.cos(s),a=vc(this.a,this.e,r),h=Math.tan(s)*Math.tan(s),l=n*Math.cos(s),c=l*l,u=this.es*o*o/(1-this.es);e=a*l*(1-c*h*(1/6-(8-h+8*u)*c/120)),i=this.a*fc(this.e0,this.e1,this.e2,this.e3,s)-this.ml0+a*r/o*c*(.5+(5-h+6*u)*c/24)}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n=t.x/this.a,s=t.y/this.a;if(this.sphere){var r=s+this.lat0;e=Math.asin(Math.sin(r)*Math.cos(n)),i=Math.atan2(Math.tan(n),Math.cos(r))}else{var o=wc(this.ml0/this.a+s,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(o)-Ga)<=Ba)return t.x=this.long0,t.y=Ga,s<0&&(t.y*=-1),t;var a=vc(this.a,this.e,Math.sin(o)),h=a*a*a/this.a/this.a*(1-this.es),l=Math.pow(Math.tan(o),2),c=n*this.a/a,u=c*c;e=o-a*Math.tan(o)/h*c*c*(.5-(1+3*l)*c*c/24),i=c*(1-u*(l/3+(1+3*l)*l*u/15))/Math.cos(o)}return t.x=Sh(i+this.long0,this.over),t.y=yc(e),t},names:["Cassini","Cassini_Soldner","cass"]};function xc(t,e){var i;return t>1e-7?(1-t*t)*(e/(1-(i=t*e)*i)-.5/t*Math.log((1-i)/(1+i))):2*e}function Sc(t){var e,i=[];return i[0]=.3333333333333333*t,e=t*t,i[0]+=.17222222222222222*e,i[1]=.06388888888888888*e,e*=t,i[0]+=.10257936507936508*e,i[1]+=.0664021164021164*e,i[2]=.016415012942191543*e,i}function Ec(t,e){var i=t+t;return t+e[0]*Math.sin(i)+e[1]*Math.sin(i+i)+e[2]*Math.sin(i+i+i)}i.dn(xc);const Ac={init:function(){var t,e=Math.abs(this.lat0);if(Math.abs(e-Ga)<Ba?this.mode=this.lat0<0?1:2:Math.abs(e)<Ba?this.mode=3:this.mode=4,this.es>0)switch(this.qp=xc(this.e,1),this.mmf=.5/(1-this.es),this.apa=Sc(this.es),this.mode){case 2:case 1:this.dd=1;break;
2case 3:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case 4:this.rq=Math.sqrt(.5*this.qp),t=Math.sin(this.lat0),this.sinb1=xc(this.e,t)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*t*t)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd}else 4===this.mode&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))},forward:function(t){var e,i,n,s,r,o,a,h,l,c,u=t.x,d=t.y;if(u=Sh(u-this.long0,this.over),this.sphere){if(r=Math.sin(d),c=Math.cos(d),n=Math.cos(u),this.mode===this.OBLIQ||this.mode===this.EQUIT){if((i=this.mode===this.EQUIT?1+c*n:1+this.sinph0*r+this.cosph0*c*n)<=Ba)return null;e=(i=Math.sqrt(2/i))*c*Math.sin(u),i*=this.mode===this.EQUIT?r:this.cosph0*r-this.sinph0*c*n}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(n=-n),Math.abs(d+this.lat0)<Ba)return null;i=Ua-.5*d,e=(i=2*(this.mode===this.S_POLE?Math.cos(i):Math.sin(i)))*Math.sin(u),i*=n}}else{switch(a=0,h=0,l=0,n=Math.cos(u),s=Math.sin(u),r=Math.sin(d),o=xc(this.e,r),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(a=o/this.qp,h=Math.sqrt(1-a*a)),this.mode){case this.OBLIQ:l=1+this.sinb1*a+this.cosb1*h*n;break;case this.EQUIT:l=1+h*n;break;case this.N_POLE:l=Ga+d,o=this.qp-o;break;case this.S_POLE:l=d-Ga,o=this.qp+o}if(Math.abs(l)<Ba)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:l=Math.sqrt(2/l),i=this.mode===this.OBLIQ?this.ymf*l*(this.cosb1*a-this.sinb1*h*n):(l=Math.sqrt(2/(1+h*n)))*a*this.ymf,e=this.xmf*l*h*s;break;case this.N_POLE:case this.S_POLE:o>=0?(e=(l=Math.sqrt(o))*s,i=n*(this.mode===this.S_POLE?l:-l)):e=i=0}}return t.x=this.a*e+this.x0,t.y=this.a*i+this.y0,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e,i,n,s,r,o,a,h=t.x/this.a,l=t.y/this.a;if(this.sphere){var c,u=0,d=0;if((i=.5*(c=Math.sqrt(h*h+l*l)))>1)return null;switch(i=2*Math.asin(i),this.mode!==this.OBLIQ&&this.mode!==this.EQUIT||(d=Math.sin(i),u=Math.cos(i)),this.mode){case this.EQUIT:i=Math.abs(c)<=Ba?0:Math.asin(l*d/c),h*=d,l=u*c;break;case this.OBLIQ:i=Math.abs(c)<=Ba?this.lat0:Math.asin(u*this.sinph0+l*d*this.cosph0/c),h*=d*this.cosph0,l=(u-Math.sin(i)*this.sinph0)*c;break;case this.N_POLE:l=-l,i=Ga-i;break;case this.S_POLE:i-=Ga}e=0!==l||this.mode!==this.EQUIT&&this.mode!==this.OBLIQ?Math.atan2(h,l):0}else{if(a=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(h/=this.dd,l*=this.dd,(o=Math.sqrt(h*h+l*l))<Ba)return t.x=this.long0,t.y=this.lat0,t;s=2*Math.asin(.5*o/this.rq),n=Math.cos(s),h*=s=Math.sin(s),this.mode===this.OBLIQ?(a=n*this.sinb1+l*s*this.cosb1/o,r=this.qp*a,l=o*this.cosb1*n-l*this.sinb1*s):(a=l*s/o,r=this.qp*a,l=o*n)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(l=-l),!(r=h*h+l*l))return t.x=this.long0,t.y=this.lat0,t;a=1-r/this.qp,this.mode===this.S_POLE&&(a=-a)}e=Math.atan2(h,l),i=Ec(Math.asin(a),this.apa)}return t.x=Sh(this.long0+e,this.over),t.y=i,t},names:["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],S_POLE:1,N_POLE:2,EQUIT:3,OBLIQ:4};function Cc(t){return Math.abs(t)>1&&(t=t>1?1:-1),Math.asin(t)}i.dn(Cc);const Mc={init:function(){Math.abs(this.lat1+this.lat2)<Ba||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=bh(this.e3,this.sin_po,this.cos_po),this.qs1=xc(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=bh(this.e3,this.sin_po,this.cos_po),this.qs2=xc(this.e3,this.sin_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=xc(this.e3,this.sin_po),Math.abs(this.lat1-this.lat2)>Ba?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)},forward:function(t){var e=t.x,i=t.y;this.sin_phi=Math.sin(i),this.cos_phi=Math.cos(i);var n=xc(this.e3,this.sin_phi),s=this.a*Math.sqrt(this.c-this.ns0*n)/this.ns0,r=this.ns0*Sh(e-this.long0,this.over),o=s*Math.sin(r)+this.x0,a=this.rh-s*Math.cos(r)+this.y0;return t.x=o,t.y=a,t},inverse:function(t){var e,i,n,s,r,o;return t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns0>=0?(e=Math.sqrt(t.x*t.x+t.y*t.y),n=1):(e=-Math.sqrt(t.x*t.x+t.y*t.y),n=-1),s=0,0!==e&&(s=Math.atan2(n*t.x,n*t.y
2)),n=e*this.ns0/this.a,this.sphere?o=Math.asin((this.c-n*n)/(2*this.ns0)):(i=(this.c-n*n)/this.ns0,o=this.phi1z(this.e3,i)),r=Sh(s/this.ns0+this.long0,this.over),t.x=r,t.y=o,t},names:["Albers_Conic_Equal_Area","Albers_Equal_Area","Albers","aea"],phi1z:function(t,e){var i,n,s,r,o=Cc(.5*e);if(t<Ba)return o;for(var a=t*t,h=1;h<=25;h++)if(o+=r=.5*(s=1-(n=t*(i=Math.sin(o)))*n)*s/Math.cos(o)*(e/(1-a)-i/s+.5/t*Math.log((1-n)/(1+n))),Math.abs(r)<=1e-7)return o;return null}},Lc={init:function(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1},forward:function(t){var e,i,n,s,r,o,a,h=t.x,l=t.y;return n=Sh(h-this.long0,this.over),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),(r=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(r)<=Ba?(o=this.x0+1*this.a*i*Math.sin(n)/r,a=this.y0+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)/r):(o=this.x0+this.infinity_dist*i*Math.sin(n),a=this.y0+this.infinity_dist*(this.cos_p14*e-this.sin_p14*i*s)),t.x=o,t.y=a,t},inverse:function(t){var e,i,n,s,r,o;return t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,t.x/=this.k0,t.y/=this.k0,(e=Math.sqrt(t.x*t.x+t.y*t.y))?(s=Math.atan2(e,this.rc),i=Math.sin(s),o=Cc((n=Math.cos(s))*this.sin_p14+t.y*i*this.cos_p14/e),r=Math.atan2(t.x*i,e*this.cos_p14*n-t.y*this.sin_p14*i),r=Sh(this.long0+r,this.over)):(o=this.phic0,r=0),t.x=r,t.y=o,t},names:["gnom"]};function Pc(t,e){var i=1-(1-t*t)/(2*t)*Math.log((1-t)/(1+t));if(Math.abs(Math.abs(e)-i)<1e-6)return e<0?-1*Ga:Ga;for(var n,s,r,o,a=Math.asin(.5*e),h=0;h<30;h++)if(s=Math.sin(a),r=Math.cos(a),o=t*s,a+=n=Math.pow(1-o*o,2)/(2*r)*(e/(1-t*t)-s/(1-o*o)+.5/t*Math.log((1-o)/(1+o))),Math.abs(n)<=1e-10)return a;return NaN}i.dn(Pc);const kc={init:function(){this.sphere||(this.k0=bh(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))},forward:function(t){var e,i,n=t.x,s=t.y,r=Sh(n-this.long0,this.over);if(this.sphere)e=this.x0+this.a*r*Math.cos(this.lat_ts),i=this.y0+this.a*Math.sin(s)/Math.cos(this.lat_ts);else{var o=xc(this.e,Math.sin(s));e=this.x0+this.a*this.k0*r,i=this.y0+this.a*o*.5/this.k0}return t.x=e,t.y=i,t},inverse:function(t){var e,i;return t.x-=this.x0,t.y-=this.y0,this.sphere?(e=Sh(this.long0+t.x/this.a/Math.cos(this.lat_ts),this.over),i=Math.asin(t.y/this.a*Math.cos(this.lat_ts))):(i=Pc(this.e,2*t.y*this.k0/this.a),e=Sh(this.long0+t.x/(this.a*this.k0),this.over)),t.x=e,t.y=i,t},names:["cea"]},Nc={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)},forward:function(t){var e=t.x,i=t.y,n=Sh(e-this.long0,this.over),s=yc(i-this.lat0);return t.x=this.x0+this.a*n*this.rc,t.y=this.y0+this.a*s,t},inverse:function(t){var e=t.x,i=t.y;return t.x=Sh(this.long0+(e-this.x0)/(this.a*this.rc),this.over),t.y=yc(this.lat0+(i-this.y0)/this.a),t},names:["Equirectangular","Equidistant_Cylindrical","Equidistant_Cylindrical_Spherical","eqc"]},Ic={init:function(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=pc(this.es),this.e1=gc(this.es),this.e2=mc(this.es),this.e3=_c(this.es),this.ml0=this.a*fc(this.e0,this.e1,this.e2,this.e3,this.lat0)},forward:function(t){var e,i,n,s=t.x,r=t.y,o=Sh(s-this.long0,this.over);if(n=o*Math.sin(r),this.sphere)Math.abs(r)<=Ba?(e=this.a*o,i=-1*this.a*this.lat0):(e=this.a*Math.sin(n)/Math.tan(r),i=this.a*(yc(r-this.lat0)+(1-Math.cos(n))/Math.tan(r)));else if(Math.abs(r)<=Ba)e=this.a*o,i=-1*this.ml0;else{var a=vc(this.a,this.e,Math.sin(r))/Math.tan(r);e=a*Math.sin(n),i=this.a*fc(this.e0,this.e1,this.e2,this.e3,r)-this.ml0+a*(1-Math.cos(n))}return t.x=e+this.x0,t.y=i+this.y0,t},inverse:function(t){var e,i,n,s,r,o,a,h,l;if(n=t.x-this.x0,s=t.y-this.y0,this.sphere)if(Math.abs(s+this.a*this.lat0)<=Ba)e=Sh(n/this.a+this.long0,this.over),i=0;else{var c;for(o=this.lat0+s/this.a,a=n*n/this.a/this.a+o*o,h=o,r=20;r;--r)if(h+=l=-1*(o*(h*(c=Math.tan(h))+1)-h-.5*(h*h+a)*c)/((h-o)/c-1),Math.abs(l)<=Ba){i=h;break}e=Sh(this.long0+Math.asin(n*Math.tan(h)/this.a)/Math.sin(i),this.over)}else if(Math.abs(s+this.ml0)<=Ba)i=0,e=Sh(this.long0+n/this.a,this.over);else{var u,d,f,p,g;for(o=(this.ml0+s)/this.a,a=n*n/this.a/this.a+o*o,h=o,r=20;r;--r)if(g=this.e*Math.sin(h),u=Math.sqrt(1-g*g)*Math.tan(h),d=this.a*fc(this.e0,this.e1,this.e2,this.e3,h),f=this.e0-2*this.e1*Math.cos(2*h
2)+4*this.e2*Math.cos(4*h)-6*this.e3*Math.cos(6*h),h-=l=(o*(u*(p=d/this.a)+1)-p-.5*u*(p*p+a))/(this.es*Math.sin(2*h)*(p*p+a-2*o*p)/(4*u)+(o-p)*(u*f-2/Math.sin(2*h))-f),Math.abs(l)<=Ba){i=h;break}u=Math.sqrt(1-this.es*Math.pow(Math.sin(i),2))*Math.tan(i),e=Sh(this.long0+Math.asin(n*u/this.a)/Math.sin(i),this.over)}return t.x=e,t.y=i,t},names:["Polyconic","American_Polyconic","poly"]},Tc={init:function(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013},forward:function(t){var e,i=t.x,n=t.y-this.lat0,s=i-this.long0,r=n/ja*1e-5,o=s,a=1,h=0;for(e=1;e<=10;e++)a*=r,h+=this.A[e]*a;var l,c=h,u=o,d=1,f=0,p=0,g=0;for(e=1;e<=6;e++)l=f*c+d*u,d=d*c-f*u,f=l,p=p+this.B_re[e]*d-this.B_im[e]*f,g=g+this.B_im[e]*d+this.B_re[e]*f;return t.x=g*this.a+this.x0,t.y=p*this.a+this.y0,t},inverse:function(t){var e,i,n=t.x,s=t.y,r=n-this.x0,o=(s-this.y0)/this.a,a=r/this.a,h=1,l=0,c=0,u=0;for(e=1;e<=6;e++)i=l*o+h*a,h=h*o-l*a,l=i,c=c+this.C_re[e]*h-this.C_im[e]*l,u=u+this.C_im[e]*h+this.C_re[e]*l;for(var d=0;d<this.iterations;d++){var f,p=c,g=u,m=o,_=a;for(e=2;e<=6;e++)f=g*c+p*u,p=p*c-g*u,g=f,m+=(e-1)*(this.B_re[e]*p-this.B_im[e]*g),_+=(e-1)*(this.B_im[e]*p+this.B_re[e]*g);p=1,g=0;var v=this.B_re[1],y=this.B_im[1];for(e=2;e<=6;e++)f=g*c+p*u,p=p*c-g*u,g=f,v+=e*(this.B_re[e]*p-this.B_im[e]*g),y+=e*(this.B_im[e]*p+this.B_re[e]*g);var w=v*v+y*y;c=(m*v+_*y)/w,u=(_*v-m*y)/w}var b=c,x=u,S=1,E=0;for(e=1;e<=9;e++)S*=b,E+=this.D[e]*S;var A=this.lat0+E*ja*1e5,C=this.long0+x;return t.x=C,t.y=A,t},names:["New_Zealand_Map_Grid","nzmg"],iterations:1},Oc={init:function(){},forward:function(t){var e=t.x,i=t.y,n=Sh(e-this.long0,this.over),s=this.x0+this.a*n,r=this.y0+this.a*Math.log(Math.tan(Math.PI/4+i/2.5))*1.25;return t.x=s,t.y=r,t},inverse:function(t){t.x-=this.x0,t.y-=this.y0;var e=Sh(this.long0+t.x/this.a,this.over),i=2.5*(Math.atan(Math.exp(.8*t.y/this.a))-Math.PI/4);return t.x=e,t.y=i,t},names:["Miller_Cylindrical","mill"]};function Rc(t){var e,i,n=t.x,s=t.y;if(n=Sh(n-this.long0,this.over),this.sphere){if(this.m)for(var r=this.n*Math.sin(s),o=20;o;--o){var a=(this.m*s+Math.sin(s)-r)/(this.m+Math.cos(s));if(s-=a,Math.abs(a)<Ba)break}else s=1!==this.n?Math.asin(this.n*Math.sin(s)):s;e=this.a*this.C_x*n*(this.m+Math.cos(s)),i=this.a*this.C_y*s}else{var h=Math.sin(s),l=Math.cos(s);i=this.a*ql(s,h,l,this.en),e=this.a*n*l/Math.sqrt(1-this.es*h*h)}return t.x=e,t.y=i,t}function Fc(t){var e,i,n;return t.x-=this.x0,i=t.x/this.a,t.y-=this.y0,e=t.y/this.a,this.sphere?(e/=this.C_y,i/=this.C_x*(this.m+Math.cos(e)),this.m?e=Cc((this.m*e+Math.sin(e))/this.n):1!==this.n&&(e=Cc(Math.sin(e)/this.n)),i=Sh(i+this.long0,this.over),e=yc(e)):(e=Wl(t.y/this.a,this.es,this.en),(n=Math.abs(e))<Ga?(n=Math.sin(e),i=Sh(this.long0+t.x*Math.sqrt(1-this.es*n*n)/(this.a*Math.cos(e)),this.over)):n-Ba<Ga&&(i=this.long0)),t.x=i,t.y=e,t}const Dc={init:function(){this.long0=this.long0||0,this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=zl(this.es)},forward:Rc,inverse:Fc,names:["Sinusoidal","sinu"]},jc={init:function(){this.sphere=!0,this.b=this.a,this.m=1,this.n=2.5707963267948966,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)},forward:Rc,inverse:Fc,names:["Eckert_VI","eck6"]},Gc={init:function(){this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,this.long0=void 0!==this.long0?this.long0:0},forward:function(t){for(var e=t.x,i=t.y,n=Sh(e-this.long0,this.over),s=i,r=Math.PI*Math.sin(i);;){var o=-(s+Math.sin(s)-r)/(1+Math.cos(s));if(s+=o,Math.abs(o)<Ba)break}s/=2,Math.PI/2-Math.abs(i)<Ba&&(n=0);var a=.900316316158*this.a*n*Math.cos(s)+this.x0,h=1.4142135623731*this.a*Math.sin(s)+this.y0;return t.x=a,t.y=h,t},inverse:function(t){var e,i;t.x-=this.x0,t.y-=this.y0,i=t.y/(1.4142135623731*this.a),Math.abs(i)>.999999999999&&(i=.999999999999),e=Math.asin(i);var n=Sh(this.long0+t.x/(.900316316158*this.a*Math.cos(e)),this.over);n<-Math.PI&&(n=-Math.PI),n>Math.PI&&(n=Math.PI),i=(2*e+Math.sin(2*e))/Math.PI,Math.abs(i)>1&&(i=1);var s=Math.asin(i);return t.x=n,t.y=s,t},names:["Mollweide","moll"]},Bc={init:function(){Math.abs(this.lat1+this.lat2)<Ba||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=pc(this.es),this.e1=gc(this.es),this.e2=mc(this.es),this.e3=_c(this.es),this.sin_phi=Math.sin(this.lat1),this.cos_phi=Math.cos(this.lat1),this.ms1=bh(this.e,this.sin_phi,this.cos_phi),this.ml1=fc(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<Ba?this.ns=this.sin_phi:(this.sin_phi=Math.sin(this.lat2),this.cos_phi=Math.cos(this.lat2),this.ms2=bh(this.e,this.sin_phi,this.cos_phi),this.ml2=fc(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=fc(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))},forward:function(t){var e,i=t.x,n=t.y;if(this.sphere)e=this.a*(this.g-n);else{var s=fc(this.e0,this.e1,this.e2,this.e3,n);e=this.a*(this.g-s)}
2var r=this.ns*Sh(i-this.long0,this.over),o=this.x0+e*Math.sin(r),a=this.y0+this.rh-e*Math.cos(r);return t.x=o,t.y=a,t},inverse:function(t){var e,i,n,s;t.x-=this.x0,t.y=this.rh-t.y+this.y0,this.ns>=0?(i=Math.sqrt(t.x*t.x+t.y*t.y),e=1):(i=-Math.sqrt(t.x*t.x+t.y*t.y),e=-1);var r=0;return 0!==i&&(r=Math.atan2(e*t.x,e*t.y)),this.sphere?(s=Sh(this.long0+r/this.ns,this.over),n=yc(this.g-i/this.a),t.x=s,t.y=n,t):(n=wc(this.g-i/this.a,this.e0,this.e1,this.e2,this.e3),s=Sh(this.long0+r/this.ns,this.over),t.x=s,t.y=n,t)},names:["Equidistant_Conic","eqdc"]},zc={init:function(){this.R=this.a},forward:function(t){var e,i,n=t.x,s=t.y,r=Sh(n-this.long0,this.over);if(Math.abs(s)<=Ba)return e=this.x0+this.R*r,i=this.y0,t.x=e,t.y=i,t;var o=Cc(2*Math.abs(s/Math.PI));if(Math.abs(r)<=Ba||Math.abs(Math.abs(s)-Ga)<=Ba)return e=this.x0,i=s>=0?this.y0+Math.PI*this.R*Math.tan(.5*o):this.y0+Math.PI*this.R*-Math.tan(.5*o),t.x=e,t.y=i,t;var a=.5*Math.abs(Math.PI/r-r/Math.PI),h=a*a,l=Math.sin(o),c=Math.cos(o),u=c/(l+c-1),d=u*u,f=u*(2/l-1),p=f*f,g=Math.PI*this.R*(a*(u-p)+Math.sqrt(h*(u-p)*(u-p)-(p+h)*(d-p)))/(p+h);r<0&&(g=-g),e=this.x0+g;var m=h+u;return g=Math.PI*this.R*(f*m-a*Math.sqrt((p+h)*(h+1)-m*m))/(p+h),i=s>=0?this.y0+g:this.y0-g,t.x=e,t.y=i,t},inverse:function(t){var e,i,n,s,r,o,a,h,l,c,u,d;return t.x-=this.x0,t.y-=this.y0,u=Math.PI*this.R,r=(n=t.x/u)*n+(s=t.y/u)*s,u=3*(s*s/(h=-2*(o=-Math.abs(s)*(1+r))+1+2*s*s+r*r)+(2*(a=o-2*s*s+n*n)*a*a/h/h/h-9*o*a/h/h)/27)/(l=(o-a*a/3/h)/h)/(c=2*Math.sqrt(-l/3)),Math.abs(u)>1&&(u=u>=0?1:-1),d=Math.acos(u)/3,i=t.y>=0?(-c*Math.cos(d+Math.PI/3)-a/3/h)*Math.PI:-(-c*Math.cos(d+Math.PI/3)-a/3/h)*Math.PI,e=Math.abs(n)<Ba?this.long0:Sh(this.long0+Math.PI*(r-1+Math.sqrt(1+2*(n*n-s*s)+r*r))/2/n,this.over),t.x=e,t.y=i,t},names:["Van_der_Grinten_I","VanDerGrinten","Van_der_Grinten","vandg"]},qc={init:function(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0),this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.f=this.es/(1+Math.sqrt(1-this.es))},forward:function(t){var e,i,n,s,r,o,a,h,l,c,u,d=t.x,f=t.y,p=Math.sin(t.y),g=Math.cos(t.y),m=Sh(d-this.long0,this.over);return this.sphere?Math.abs(this.sin_p12-1)<=Ba?(t.x=this.x0+this.a*(Ga-f)*Math.sin(m),t.y=this.y0-this.a*(Ga-f)*Math.cos(m),t):Math.abs(this.sin_p12+1)<=Ba?(t.x=this.x0+this.a*(Ga+f)*Math.sin(m),t.y=this.y0+this.a*(Ga+f)*Math.cos(m),t):(l=this.sin_p12*p+this.cos_p12*g*Math.cos(m),h=(a=Math.acos(l))?a/Math.sin(a):1,t.x=this.x0+this.a*h*g*Math.sin(m),t.y=this.y0+this.a*h*(this.cos_p12*p-this.sin_p12*g*Math.cos(m)),t):(e=pc(this.es),i=gc(this.es),n=mc(this.es),s=_c(this.es),Math.abs(this.sin_p12-1)<=Ba?(r=this.a*fc(e,i,n,s,Ga),o=this.a*fc(e,i,n,s,f),t.x=this.x0+(r-o)*Math.sin(m),t.y=this.y0-(r-o)*Math.cos(m),t):Math.abs(this.sin_p12+1)<=Ba?(r=this.a*fc(e,i,n,s,Ga),o=this.a*fc(e,i,n,s,f),t.x=this.x0+(r+o)*Math.sin(m),t.y=this.y0+(r+o)*Math.cos(m),t):Math.abs(d)<Ba&&Math.abs(f-this.lat0)<Ba?(t.x=this.x0,t.y=this.y0,t):(c=function(t,e,i,n,s,r){const o=n-e,a=Math.atan((1-r)*Math.tan(t)),h=Math.atan((1-r)*Math.tan(i)),l=Math.sin(a),c=Math.cos(a),u=Math.sin(h),d=Math.cos(h);let f,p,g,m,_,v,y,w,b,x,S,E,A,C,M,L=o,P=100;do{if(p=Math.sin(L),g=Math.cos(L),m=Math.sqrt(d*p*(d*p)+(c*u-l*d*g)*(c*u-l*d*g)),0===m)return{azi1:0,s12:0};_=l*u+c*d*g,v=Math.atan2(m,_),y=c*d*p/m,w=1-y*y,b=0!==w?_-2*l*u/w:0,x=r/16*w*(4+r*(4-3*w)),f=L,L=o+(1-x)*r*y*(v+x*m*(b+x*_*(2*b*b-1)))}while(Math.abs(L-f)>1e-12&&--P>0);return 0===P?{azi1:NaN,s12:NaN}:(S=w*(s*s-s*(1-r)*(s*(1-r)))/(s*(1-r)*(s*(1-r))),E=1+S/16384*(4096+S*(S*(320-175*S)-768)),A=S/1024*(256+S*(S*(74-47*S)-128)),C=A*m*(b+A/4*(_*(2*b*b-1)-A/6*b*(4*m*m-3)*(4*b*b-3))),M=s*(1-r)*E*(v-C),{azi1:Math.atan2(d*p,c*u-l*d*g),s12:M})}(this.lat0,this.long0,f,d,this.a,this.f),u=c.azi1,t.x=this.x0+c.s12*Math.sin(u),t.y=this.y0+c.s12*Math.cos(u),t))},inverse:function(t){var e,i,n,s,r,o,a,h,l,c,u,d,f,p,g;if(t.x-=this.x0,t.y-=this.y0,this.sphere){if((e=Math.sqrt(t.x*t.x+t.y*t.y))>2*Ga*this.a)return;return i=e/this.a,n=Math.sin(i),s=Math.cos(i),r=this.long0,Math.abs(e)<=Ba?o=this.lat0:(o=Cc(s*this.sin_p12+t.y*n*this.cos_p12/e),a=Math.abs(this.lat0)-Ga,r=Math.abs(a)<=Ba?this.lat0>=0?Sh(this.long0+Math.atan2(t.x,-t.y),this.over):Sh(this.long0-Math.atan2(-t.x,t.y),this.over):Sh(this.long0+Math.atan2(t.x*n,e*this.cos_p12*s-t.y*this.sin_p12*n),this.over)),t.x=r,t.y=o,t}return h=pc(this.es),l=gc(this.es),c=mc(this.es),u=_c(this.es),Math.abs(this.sin_p12-1)<=Ba?(o=wc(((d=this.a*fc(h,l,c,u,Ga))-(e=Math.sqrt(t.x*t.x+t.y*t.y)))/this.a,h,l,c,u),r=Sh(this.long0+Math.atan2(t.x,-1*t.y),this.over),t.x=r,t.y=o,t):Math.abs(this.sin_p12+1)<=Ba?(d=this.a*fc(h,l,c,u,Ga),o=wc(((e=Math.sqrt(t.x*t.x+t.y*t.y))-d)/this.a,h,l,c,u),r=Sh(this.long0+Math.atan2(t.x,t.y),this.over),t.x=r,t.y=o,t):(f=Math.atan2(t.x,t.y),p=Math.sqrt(t.x*t.x+t.y*t.y),g=function(t,e,
2i,n,s,r){const o=Math.atan((1-r)*Math.tan(t)),a=Math.sin(o),h=Math.cos(o),l=Math.sin(i),c=Math.cos(i),u=Math.atan2(a,h*c),d=h*l,f=1-d*d,p=f*(s*s-s*(1-r)*(s*(1-r)))/(s*(1-r)*(s*(1-r))),g=1+p/16384*(4096+p*(p*(320-175*p)-768)),m=p/1024*(256+p*(p*(74-47*p)-128));let _,v,y,w,b,x=n/(s*(1-r)*g),S=100;do{v=Math.cos(2*u+x),y=Math.sin(x),w=Math.cos(x),b=m*y*(v+m/4*(w*(2*v*v-1)-m/6*v*(4*y*y-3)*(4*v*v-3))),_=x,x=n/(s*(1-r)*g)+b}while(Math.abs(x-_)>1e-12&&--S>0);if(0===S)return{lat2:NaN,lon2:NaN};const E=a*y-h*w*c,A=r/16*f*(4+r*(4-3*f));return{lat2:Math.atan2(a*w+h*y*c,(1-r)*Math.sqrt(d*d+E*E)),lon2:e+(Math.atan2(y*l,h*w-a*y*c)-(1-A)*r*d*(x+A*y*(v+A*w*(2*v*v-1))))}}(this.lat0,this.long0,f,p,this.a,this.f),t.x=g.lon2,t.y=g.lat2,t)},names:["Azimuthal_Equidistant","aeqd"]},Uc={init:function(){this.sin_p14=Math.sin(this.lat0||0),this.cos_p14=Math.cos(this.lat0||0)},forward:function(t){var e,i,n,s,r,o,a,h=t.x,l=t.y;return n=Sh(h-(this.long0||0),this.over),e=Math.sin(l),i=Math.cos(l),s=Math.cos(n),((r=this.sin_p14*e+this.cos_p14*i*s)>0||Math.abs(r)<=Ba)&&(o=(this.x0||0)+1*this.a*i*Math.sin(n),a=(this.y0||0)+1*this.a*(this.cos_p14*e-this.sin_p14*i*s)),t.x=o,t.y=a,t},inverse:function(t){var e,i,n,s,r,o,a,h,l;return t.x-=this.x0||0,t.y-=this.y0||0,i=Cc((e=Math.sqrt(t.x*t.x+t.y*t.y))/this.a),n=Math.sin(i),s=Math.cos(i),h=this.long0||0,l=this.lat0||0,o=h,Math.abs(e)<=Ba?(a=l,t.x=o,t.y=a,t):(a=Cc(s*this.sin_p14+t.y*n*this.cos_p14/e),r=Math.abs(l)-Ga,Math.abs(r)<=Ba?(o=Sh(l>=0?h+Math.atan2(t.x,-t.y):h-Math.atan2(-t.x,t.y),this.over),t.x=o,t.y=a,t):(o=Sh(h+Math.atan2(t.x*n,e*this.cos_p14*s-t.y*this.sin_p14*n),this.over),t.x=o,t.y=a,t))},names:["ortho"]};function Wc(t,e,i,n){var s;return t<Ba?(n.value=1,s=0):(s=Math.atan2(e,i),Math.abs(s)<=Ua?n.value=1:s>Ua&&s<=Ga+Ua?(n.value=2,s-=Ga):s>Ga+Ua||s<=-(Ga+Ua)?(n.value=3,s=s>=0?s-Va:s+Va):(n.value=4,s+=Ga)),s}function Vc(t,e){var i=t+e;return i<-Va?i+=Wa:i>+Va&&(i-=Wa),i}const Hc={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=Ga-Ua/2?this.face=5:this.lat0<=-(Ga-Ua/2)?this.face=6:Math.abs(this.long0)<=Ua?this.face=1:Math.abs(this.long0)<=Ga+Ua?this.face=this.long0>0?2:4:this.face=3,0!==this.es&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)},forward:function(t){var e,i,n,s,r,o,a={x:0,y:0},h={value:0};if(t.x-=this.long0,e=0!==this.es?Math.atan(this.one_minus_f_squared*Math.tan(t.y)):t.y,i=t.x,5===this.face)s=Ga-e,i>=Ua&&i<=Ga+Ua?(h.value=1,n=i-Ga):i>Ga+Ua||i<=-(Ga+Ua)?(h.value=2,n=i>0?i-Va:i+Va):i>-(Ga+Ua)&&i<=-Ua?(h.value=3,n=i+Ga):(h.value=4,n=i);else if(6===this.face)s=Ga+e,i>=Ua&&i<=Ga+Ua?(h.value=1,n=-i+Ga):i<Ua&&i>=-Ua?(h.value=2,n=-i):i<-Ua&&i>=-(Ga+Ua)?(h.value=3,n=-i-Ga):(h.value=4,n=i>0?-i+Va:-i-Va);else{var l,c,u,d,f,p;2===this.face?i=Vc(i,+Ga):3===this.face?i=Vc(i,+Va):4===this.face&&(i=Vc(i,-Ga)),d=Math.sin(e),f=Math.cos(e),p=Math.sin(i),l=f*Math.cos(i),c=f*p,u=d,1===this.face?n=Wc(s=Math.acos(l),u,c,h):2===this.face?n=Wc(s=Math.acos(c),u,-l,h):3===this.face?n=Wc(s=Math.acos(-l),u,-c,h):4===this.face?n=Wc(s=Math.acos(-c),u,l,h):(s=n=0,h.value=1)}return o=Math.atan(12/Va*(n+Math.acos(Math.sin(n)*Math.cos(Ua))-Ga)),r=Math.sqrt((1-Math.cos(s))/(Math.cos(o)*Math.cos(o))/(1-Math.cos(Math.atan(1/Math.cos(n))))),2===h.value?o+=Ga:3===h.value?o+=Va:4===h.value&&(o+=1.5*Va),a.x=r*Math.cos(o),a.y=r*Math.sin(o),a.x=a.x*this.a+this.x0,a.y=a.y*this.a+this.y0,t.x=a.x,t.y=a.y,t},inverse:function(t){var e,i,n,s,r,o,a,h,l,c,u,d,f={lam:0,phi:0},p={value:0};if(t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,i=Math.atan(Math.sqrt(t.x*t.x+t.y*t.y)),e=Math.atan2(t.y,t.x),t.x>=0&&t.x>=Math.abs(t.y)?p.value=1:t.y>=0&&t.y>=Math.abs(t.x)?(p.value=2,e-=Ga):t.x<0&&-t.x>=Math.abs(t.y)?(p.value=3,e=e<0?e+Va:e-Va):(p.value=4,e+=Ga),l=Va/12*Math.tan(e),r=Math.sin(l)/(Math.cos(l)-1/Math.sqrt(2)),o=Math.atan(r),(a=1-(n=Math.cos(e))*n*(s=Math.tan(i))*s*(1-Math.cos(Math.atan(1/Math.cos(o)))))<-1?a=-1:a>1&&(a=1),5===this.face)h=Math.acos(a),f.phi=Ga-h,1===p.value?f.lam=o+Ga:2===p.value?f.lam=o<0?o+Va:o-Va:3===p.value?f.lam=o-Ga:f.lam=o;else if(6===this.face)h=Math.acos(a),f.phi=h-Ga,1===p.value?f.lam=-o+Ga:2===p.value?f.lam=-o:3===p.value?f.lam=-o-Ga:f.lam=o<0?-o-Va:-o+Va;else{var g,m,_;l=(g=a)*g,m=(l+=(_=l>=1?0:Math.sqrt(1-l)*Math.sin(o))*_)>=1?0:Math.sqrt(1-l),2===p.value?(l=m,m=-_,_=l):3===p.value?(m=-m,_=-_):4===p.value&&(l=m,m=_,_=-l),2===this.face?(l=g,g=-m,m=l):3===this.face?(g=-g,m=-m):4===this.face&&(l=g,g=m,m=-l),f.phi=Math.acos(-_)-Ga,f.lam=Math.atan2(m,g),2===this.face?f.lam=Vc(f.lam,-Ga):3===this.face?f.lam=Vc(f.lam,-Va):4===this.face&&(f.lam=Vc(f.lam,+Ga))}return 0!==this.es&&(c=f.phi<0?1:0,u=Math.tan(f.phi),d=this.b/Math.sqrt(u*u+this.one_minus_f_squared),f.phi=Math.atan(Math.sqrt(this.a*this.a-d*d)/(this.one_minus_f*d)),c&&(f.phi=-f.phi)),f.lam+=this.long0,t.x=f.lam,t.y=f.phi,t},names:["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"]};var Kc=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-9.86701e-7],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,1.8736e-8],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,9.34959e-7],[.7986,-.00755338,-500009e-10,9.35324e-7],[.7597,-.00
2798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],$c=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-1.26793e-9,4.22642e-10],[.124,.0124,5.07171e-9,-1.60604e-9],[.186,.0123999,-1.90189e-8,6.00152e-9],[.248,.0124002,7.10039e-8,-2.24e-8],[.31,.0123992,-2.64997e-7,8.35986e-8],[.372,.0124029,9.88983e-7,-3.11994e-7],[.434,.0123893,-369093e-11,-4.35621e-7],[.4958,.0123198,-102252e-10,-3.45523e-7],[.5571,.0121916,-154081e-10,-5.82288e-7],[.6176,.0119938,-241424e-10,-5.25327e-7],[.6769,.011713,-320223e-10,-5.16405e-7],[.7346,.0113541,-397684e-10,-6.09052e-7],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-1.40374e-9],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],Xc=.8487,Yc=1.3523,Zc=qa/5,Jc=1/Zc,Qc=function(t,e){return t[0]+e*(t[1]+e*(t[2]+e*t[3]))};const tu={init:function(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"},forward:function(t){var e=Sh(t.x-this.long0,this.over),i=Math.abs(t.y),n=Math.floor(i*Zc);n<0?n=0:n>=18&&(n=17);var s={x:Qc(Kc[n],i=qa*(i-Jc*n))*e,y:Qc($c[n],i)};return t.y<0&&(s.y=-s.y),s.x=s.x*this.a*Xc+this.x0,s.y=s.y*this.a*Yc+this.y0,void 0!==t.z&&(s.z=t.z),void 0!==t.m&&(s.m=t.m),s},inverse:function(t){var e={x:(t.x-this.x0)/(this.a*Xc),y:Math.abs(t.y-this.y0)/(this.a*Yc)};if(e.y>=1)e.x/=Kc[18][0],e.y=t.y<0?-Ga:Ga;else{var i=Math.floor(18*e.y);for(i<0?i=0:i>=18&&(i=17);;)if($c[i][0]>e.y)--i;else{if(!($c[i+1][0]<=e.y))break;++i}var n=$c[i],s=5*(e.y-n[0])/($c[i+1][0]-n[0]);s=function(t,e,i,n){for(var s=e;n;--n){var r=t(s);if(s-=r,Math.abs(r)<1e-10)break}return s}(function(t){return(Qc(n,t)-e.y)/function(t,e){return t[1]+e*(2*t[2]+3*e*t[3])}(n,t)},s,0,100),e.x/=Qc(Kc[i],s),e.y=(5*i+s)*za,t.y<0&&(e.y=-e.y)}return e.x=Sh(e.x+this.long0,this.over),void 0!==t.z&&(e.z=t.z),void 0!==t.m&&(e.m=t.m),e},names:["Robinson","robin"]},eu={init:function(){this.name="geocent"},forward:function(t){return Jh(t,this.es,this.a)},inverse:function(t){return Qh(t,this.es,this.a,this.b)},names:["Geocentric","geocentric","geocent","Geocent"]};var iu={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};const nu={init:function(){if(Object.keys(iu).forEach(function(t){if(void 0===this[t])this[t]=iu[t].def;else{if(iu[t].num&&isNaN(this[t]))throw new Error("Invalid parameter value, must be numeric "+t+" = "+this[t]);iu[t].num&&(this[t]=parseFloat(this[t]))}iu[t].degrees&&(this[t]=this[t]*za)}.bind(this)),Math.abs(Math.abs(this.lat0)-Ga)<Ba?this.mode=this.lat0<0?1:0:Math.abs(this.lat0)<Ba?this.mode=2:(this.mode=3,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var t=this.tilt,e=this.azi;this.cg=Math.cos(e),this.sg=Math.sin(e),this.cw=Math.cos(t),this.sw=Math.sin(t)},forward:function(t){t.x-=this.long0;var e,i,n,s,r=Math.sin(t.y),o=Math.cos(t.y),a=Math.cos(t.x);switch(this.mode){case 3:i=this.sinph0*r+this.cosph0*o*a;break;case 2:i=o*a;break;case 1:i=-r;break;case 0:i=r}switch(e=(i=this.pn1/(this.p-i))*o*Math.sin(t.x),this.mode){case 3:i*=this.cosph0*r-this.sinph0*o*a;break;case 2:i*=r;break;case 0:i*=-o*a;break;case 1:i*=o*a}return s=1/((n=i*this.cg+e*this.sg)*this.sw*this.h1+this.cw),e=(e*this.cg-i*this.sg)*this.cw*s,i=n*s,t.x=e*this.a,t.y=i*this.a,t},inverse:function(t){t.x/=this.a,t.y/=this.a;var e,i,n,s={x:t.x,y:t.y};n=1/(this.pn1-t.y*this.sw),e=this.pn1*t.x*n,i=this.pn1*t.y*this.cw*n,t.x=e*this.cg+i*this.sg,t.y=i*this.cg-e*this.sg;var r=Kl(t.x,t.y);if(Math.abs(r)<Ba)s.x=0,s.y=t.y;else{var o,a;switch(a=1-r*r*this.pfact,a=(this.p-Math.sqrt(a))/(this.pn1/r+r/this.pn1),o=Math.sqrt(1-a*a),this.mode){case 3:s.y=Math.asin(o*this.sinph0+t.y*a*this.cosph0/r),t.y=(o-this.sinph0*Math.sin(s.y))*r,t.x*=a*this.cosph0;break;
2case 2:s.y=Math.asin(t.y*a/r),t.y=o*r,t.x*=a;break;case 0:s.y=Math.asin(o),t.y=-t.y;break;case 1:s.y=-Math.asin(o)}s.x=Math.atan2(t.x,t.y)}return t.x=s.x+this.long0,t.y=s.y,t},names:["Tilted_Perspective","tpers"]},su={init:function(){if(this.flip_axis="x"===this.sweep?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,0!==this.es){var t=1-this.es,e=1/t;this.radius_p=Math.sqrt(t),this.radius_p2=t,this.radius_p_inv2=e,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")},forward:function(t){var e,i,n,s,r=t.x,o=t.y;if(r-=this.long0,"ellipse"===this.shape){o=Math.atan(this.radius_p2*Math.tan(o));var a=this.radius_p/Kl(this.radius_p*Math.cos(o),Math.sin(o));if(i=a*Math.cos(r)*Math.cos(o),n=a*Math.sin(r)*Math.cos(o),s=a*Math.sin(o),(this.radius_g-i)*i-n*n-s*s*this.radius_p_inv2<0)return t.x=Number.NaN,t.y=Number.NaN,t;e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/Kl(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/Kl(n,e)))}else"sphere"===this.shape&&(e=Math.cos(o),i=Math.cos(r)*e,n=Math.sin(r)*e,s=Math.sin(o),e=this.radius_g-i,this.flip_axis?(t.x=this.radius_g_1*Math.atan(n/Kl(s,e)),t.y=this.radius_g_1*Math.atan(s/e)):(t.x=this.radius_g_1*Math.atan(n/e),t.y=this.radius_g_1*Math.atan(s/Kl(n,e))));return t.x=t.x*this.a,t.y=t.y*this.a,t},inverse:function(t){var e,i,n,s,r=-1,o=0,a=0;if(t.x=t.x/this.a,t.y=t.y/this.a,"ellipse"===this.shape){this.flip_axis?(a=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Kl(1,a)):(o=Math.tan(t.x/this.radius_g_1),a=Math.tan(t.y/this.radius_g_1)*Kl(1,o));var h=a/this.radius_p;if(e=o*o+h*h+r*r,(n=(i=2*this.radius_g*r)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),r=this.radius_g+s*r,o*=s,a*=s,t.x=Math.atan2(o,r),t.y=Math.atan(a*Math.cos(t.x)/r),t.y=Math.atan(this.radius_p_inv2*Math.tan(t.y))}else if("sphere"===this.shape){if(this.flip_axis?(a=Math.tan(t.y/this.radius_g_1),o=Math.tan(t.x/this.radius_g_1)*Math.sqrt(1+a*a)):(o=Math.tan(t.x/this.radius_g_1),a=Math.tan(t.y/this.radius_g_1)*Math.sqrt(1+o*o)),e=o*o+a*a+r*r,(n=(i=2*this.radius_g*r)*i-4*e*this.C)<0)return t.x=Number.NaN,t.y=Number.NaN,t;s=(-i-Math.sqrt(n))/(2*e),r=this.radius_g+s*r,o*=s,a*=s,t.x=Math.atan2(o,r),t.y=Math.atan(a*Math.cos(t.x)/r)}return t.x=t.x+this.long0,t},names:["Geostationary Satellite View","Geostationary_Satellite","geos"]};
2var ru=1.340264,ou=-.081106,au=893e-6,hu=.003796,lu=Math.sqrt(3)/2;const cu={init:function(){this.long0=void 0!==this.long0?this.long0:0,this.x0=void 0!==this.x0?this.x0:0,this.y0=void 0!==this.y0?this.y0:0,0!==this.es&&(this.apa=Sc(this.es),this.qp=xc(this.e,1),this.rqda=Math.sqrt(.5*this.qp))},forward:function(t){var e=Sh(t.x-this.long0,this.over),i=t.y,n=Math.sin(i);0!==this.es&&(n=xc(this.e,n)/this.qp);var s=Math.asin(lu*n),r=s*s,o=r*r*r;return t.x=e*Math.cos(s)/(lu*(ru+3*ou*r+o*(7*au+9*hu*r))),t.y=s*(ru+ou*r+o*(au+hu*r)),0!==this.es&&(t.x*=this.rqda,t.y*=this.rqda),t.x=this.a*t.x+this.x0,t.y=this.a*t.y+this.y0,t},inverse:function(t){t.x=(t.x-this.x0)/this.a,t.y=(t.y-this.y0)/this.a,0!==this.es&&(t.x/=this.rqda,t.y/=this.rqda);var e,i,n,s,r=t.y;for(s=0;s<12&&(r-=n=(r*(ru+ou*(e=r*r)+(i=e*e*e)*(au+hu*e))-t.y)/(ru+3*ou*e+i*(7*au+9*hu*e)),!(Math.abs(n)<1e-9));++s);return i=(e=r*r)*e*e,t.x=lu*t.x*(ru+3*ou*e+i*(7*au+9*hu*e))/Math.cos(r),t.y=Math.asin(Math.sin(r)/lu),0!==this.es&&(t.y=Ec(t.y,this.apa)),t.x=Sh(t.x+this.long0,this.over),t},names:["eqearth","Equal Earth","Equal_Earth"]};var uu=1e-10;function du(t){var e,i,n,s=Sh(t.x-(this.long0||0),this.over),r=t.y;return e=this.am1+this.m1-ql(r,i=Math.sin(r),n=Math.cos(r),this.en),i=n*s/(e*Math.sqrt(1-this.es*i*i)),t.x=e*Math.sin(i),t.y=this.am1-e*Math.cos(i),t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function fu(t){var e,i,n,s;if(t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a,i=Kl(t.x,t.y=this.am1-t.y),s=Wl(this.am1+this.m1-i,this.es,this.en),(e=Math.abs(s))<Ga)e=Math.sin(s),n=i*Math.atan2(t.x,t.y)*Math.sqrt(1-this.es*e*e)/Math.cos(s);else{if(!(Math.abs(e-Ga)<=uu))throw new Error;n=0}return t.x=Sh(n+(this.long0||0),this.over),t.y=yc(s),t}function pu(t){var e,i,n=Sh(t.x-(this.long0||0),this.over),s=t.y;return i=this.cphi1+this.phi1-s,Math.abs(i)>uu?(t.x=i*Math.sin(e=n*Math.cos(s)/i),t.y=this.cphi1-i*Math.cos(e)):t.x=t.y=0,t.x=this.a*t.x+(this.x0||0),t.y=this.a*t.y+(this.y0||0),t}function gu(t){var e,i;t.x=(t.x-(this.x0||0))/this.a,t.y=(t.y-(this.y0||0))/this.a;var n=Kl(t.x,t.y=this.cphi1-t.y);if(i=this.cphi1+this.phi1-n,Math.abs(i)>Ga)throw new Error;return e=Math.abs(Math.abs(i)-Ga)<=uu?0:n*Math.atan2(t.x,t.y)/Math.cos(i),t.x=Sh(e+(this.long0||0),this.over),t.y=yc(i),t}const mu={init:function(){var t;if(this.phi1=this.lat1,Math.abs(this.phi1)<uu)throw new Error;this.es?(this.en=zl(this.es),this.m1=ql(this.phi1,this.am1=Math.sin(this.phi1),t=Math.cos(this.phi1),this.en),this.am1=t/(Math.sqrt(1-this.es*this.am1*this.am1)*this.am1),this.inverse=fu,this.forward=du):(Math.abs(this.phi1)+uu>=Ga?this.cphi1=0:this.cphi1=1/Math.tan(this.phi1),this.inverse=gu,this.forward=pu)},names:["bonne","Bonne (Werner lat_1=90)"]},_u={OBLIQUE:{forward:function(t,e){let{x:i,y:n}=e;i=Sh(i-t.long0,t.over);const s=Math.cos(i),r=Math.sin(n),o=Math.cos(n);e.x=Sh(Math.atan2(o*Math.sin(i),t.sphip*o*s+t.cphip*r)+t.lamp),e.y=Math.asin(t.sphip*r-t.cphip*o*s);const a=t.obliqueProjection.forward(e);return t.isIdentity&&(a.x*=qa,a.y*=qa),a},inverse:function(t,e){t.isIdentity&&(e.x*=za,e.y*=za);const i=t.obliqueProjection.inverse(e);let{x:n,y:s}=i;if(n<Number.MAX_VALUE){n-=t.lamp;const i=Math.cos(n),r=Math.sin(s),o=Math.cos(s);e.x=Math.atan2(o*Math.sin(n),t.sphip*o*i-t.cphip*r),e.y=Math.asin(t.sphip*r+t.cphip*o*i)}return e.x=Sh(e.x+t.long0),e}},TRANSVERSE:{forward:function(t,e){let{x:i,y:n}=e;i=Sh(i-t.long0,t.over);const s=Math.cos(n),r=Math.cos(i);e.x=Sh(Math.atan2(s*Math.sin(i),Math.sin(n))+t.lamp),e.y=Math.asin(-1*s*r);const o=t.obliqueProjection.forward(e);return t.isIdentity&&(o.x*=qa,o.y*=qa),o},inverse:function(t,e){t.isIdentity&&(e.x*=za,e.y*=za);const i=t.obliqueProjection.inverse(e);let{x:n,y:s}=i;if(n<Number.MAX_VALUE){const i=Math.cos(s);n-=t.lamp,e.x=Math.atan2(i*Math.sin(n),-1*Math.sin(s)),e.y=Math.asin(i*Math.cos(n))}return e.x=Sh(e.x+t.long0),e}}},vu={ROTATE:{o_alpha:"oAlpha",o_lon_c:"oLongC",o_lat_c:"oLatC"},NEW_POLE:{o_lat_p:"oLatP",o_lon_p:"oLongP"},NEW_EQUATOR:{o_lon_1:"oLong1",o_lat_1:"oLat1",o_lon_2:"oLong2",o_lat_2:"oLat2"}},yu={init:function(){if(this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.title=this.title||"General Oblique Transformation",this.isIdentity=Lh.includes(this.o_proj),!this.o_proj)throw new Error("Missing parameter: o_proj");if("ob_tran"===this.o_proj)throw new Error("Invalid value for o_proj: "+this.o_proj);const t=this.projStr.replace("+proj=ob_tran","").replace("+o_proj=","+proj=").trim(),e=Zh(t);if(!e)throw new Error("Invalid parameter: o_proj. Unknown projection "+this.o_proj);let i;e.long0=0,this.obliqueProjection=e;const n=Object.keys(vu),s=t=>{if(void 0===this[t])return;const e=parseFloat(this[t])*za;if(isNaN(e))throw new Error("Invalid value for "+t+": "+this[t]);return e};for(let t=0;t<n.length;t++){const e=n[t],r=vu[e],o=Object.entries(r),a=o.some(([t])=>void 0!==this[t]);if(a){i=r;for(let t=0;t<o.length;t++){const[e,i]=o[t],n=s(e);if(void 0===n)throw new Error("Missing parameter: "+e+".");this[i]=n}break}}if(!i)throw new Error("No valid parameters provided for ob_tran projection.");const{lamp:r,phip:o}=function(t,e){let i,n;if(e===vu.ROTATE){let e=t.oLongC,s=t.oLatC,r=t.oAlpha;if(Math.abs(Math.abs(s)-Ga)<=Ba)throw new Error("Invalid value for o_lat_c: "+t.o_lat_c+" should be < 90°");n=e+Math.atan2(-1*Math.cos(r),-1*Math.sin(r)*Math.sin(s)),i=Math.asin(Math.cos(s)*Math.sin(r))}else if(e===vu.NEW_POLE)n=t.oLongP,i=t.oLatP;else{let e=t.oLong1,s=t.oLat1,r=t.oLong2,o=t.oLat2,a=Math.abs(s);
2if(Math.abs(s)>Ga-Ba)throw new Error("Invalid value for o_lat_1: "+t.o_lat_1+" should be < 90°");if(Math.abs(o)>Ga-Ba)throw new Error("Invalid value for o_lat_2: "+t.o_lat_2+" should be < 90°");if(Math.abs(s-o)<Ba)throw new Error("Invalid value for o_lat_1 and o_lat_2: o_lat_1 should be different from o_lat_2");if(a<Ba)throw new Error("Invalid value for o_lat_1: o_lat_1 should be different from zero");n=Math.atan2(Math.cos(s)*Math.sin(o)*Math.cos(e)-Math.sin(s)*Math.cos(o)*Math.cos(r),Math.sin(s)*Math.cos(o)*Math.sin(r)-Math.cos(s)*Math.sin(o)*Math.sin(e)),i=Math.atan(-1*Math.cos(n-e)/Math.tan(s))}return{lamp:n,phip:i}}(this,i);this.lamp=r,Math.abs(o)>Ba?(this.cphip=Math.cos(o),this.sphip=Math.sin(o),this.projectionType=_u.OBLIQUE):this.projectionType=_u.TRANSVERSE},forward:function(t){return this.projectionType.forward(this,t)},inverse:function(t){return this.projectionType.inverse(this,t)},names:["General Oblique Transformation","General_Oblique_Transformation","ob_tran"]};function wu(t){t.Proj.projections.add(Vl),t.Proj.projections.add(tc),t.Proj.projections.add(ic),t.Proj.projections.add(rc),t.Proj.projections.add(ac),t.Proj.projections.add(hc),t.Proj.projections.add(cc),t.Proj.projections.add(uc),t.Proj.projections.add(dc),t.Proj.projections.add(bc),t.Proj.projections.add(Ac),t.Proj.projections.add(Mc),t.Proj.projections.add(Lc),t.Proj.projections.add(kc),t.Proj.projections.add(Nc),t.Proj.projections.add(Ic),t.Proj.projections.add(Tc),t.Proj.projections.add(Oc),t.Proj.projections.add(Dc),t.Proj.projections.add(jc),t.Proj.projections.add(Gc),t.Proj.projections.add(Bc),t.Proj.projections.add(zc),t.Proj.projections.add(qc),t.Proj.projections.add(Uc),t.Proj.projections.add(Hc),t.Proj.projections.add(tu),t.Proj.projections.add(eu),t.Proj.projections.add(nu),t.Proj.projections.add(su),t.Proj.projections.add(cu),t.Proj.projections.add(mu),t.Proj.projections.add(yu)}i.dn(wu);const bu=Object.assign(function(t,e,i){var n,s,r,o=!1;return void 0===e?(s=dl(t),n=cl,o=!0):(void 0!==e.x||Array.isArray(e))&&(i=e,s=dl(t),n=cl,o=!0),n||(n=dl(t)),s||(s=dl(e)),i?ul(n,s,i):(r={forward:function(t,e){return ul(n,s,t,e)},inverse:function(t,e){return ul(s,n,t,e)}},o&&(r.oProj=s),r)},{defaultDatum:"WGS84",Proj:Zh,WGS84:new Zh("WGS84"),Point:Ll,toPoint:ol,defs:vh,nadgrid:function(t,e,i){return e instanceof ArrayBuffer?function(t,e,i){var n=!0;void 0!==i&&!1===i.includeErrorFields&&(n=!1);var s=new DataView(e),r=function(t){var e=t.getInt32(8,!1);return 11!==e&&(11!==(e=t.getInt32(8,!0))&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}(s),o=function(t,e){return{nFields:t.getInt32(8,e),nSubgridFields:t.getInt32(24,e),nSubgrids:t.getInt32(40,e),shiftType:Hh(t,56,64).trim(),fromSemiMajorAxis:t.getFloat64(120,e),fromSemiMinorAxis:t.getFloat64(136,e),toSemiMajorAxis:t.getFloat64(152,e),toSemiMinorAxis:t.getFloat64(168,e)}}(s,r),a=function(t,e,i,n){for(var s=176,r=[],o=0;o<e.nSubgrids;o++){var a=$h(t,s,i),h=Xh(t,s,a,i,n),l=Math.round(1+(a.upperLongitude-a.lowerLongitude)/a.longitudeInterval),c=Math.round(1+(a.upperLatitude-a.lowerLatitude)/a.latitudeInterval);r.push({ll:[Vh(a.lowerLongitude),Vh(a.lowerLatitude)],del:[Vh(a.longitudeInterval),Vh(a.latitudeInterval)],lim:[l,c],count:a.gridNodeCount,cvs:Kh(h)});var u=16;!1===n&&(u=8),s+=176+a.gridNodeCount*u}return r}(s,o,r,n),h={header:o,subgrids:a};return zh[t]=h,h}(t,e,i):{ready:qh(t,e)}},transform:function(t,e,i,n){return ll(t,e,Array.isArray(i)?ol(i):{x:i.x,y:i.y,z:i.z,m:i.m},n)},mgrs:vl,version:"__VERSION__"});wu(bu);const xu=bu;let Su=null;const Eu=new Proxy({},{get:(t,e)=>window.config?.[e]}),Au=(Eu.obsApiUrl,[500750,78e3,815250,302e3]),Cu=[4e3,3750,3500,3250,3e3,2750,2500,2250,2e3,1750,1500,1250,1e3,750,650,500,250,100,50,20,10,5,2.5,2,1.5,1,.5,.25];xu.defs("EPSG:21781","+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=600000 +y_0=200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"),xu.defs("EPSG:2056","+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"),function(t){Su=t;const e=Object.keys(t.defs),i=e.length;let n,s;for(n=0;n<i;++n){const i=e[n];if(!Io(i)){const e=t.defs(i);let n=e.units;n||"longlat"!==e.projName||(n="degrees"),da(new yo({code:i,axisOrientation:e.axis,metersPerUnit:e.to_meter,units:n}))}}for(n=0;n<i;++n){const r=e[n],o=Io(r);for(s=0;s<i;++s){const i=e[s],n=Io(i);if(!Ro(r,i))if(t.defs[r]===t.defs[i])ga([o,n]);else{const e=t(r,i);va(o,n,Na(o,n,e.forward),Na(n,o,e.inverse))}}}}(xu);const Mu=fa("EPSG:21781");Mu.setExtent(Au),fa("EPSG:2056");const Lu='&copy;
2 <a href="https://www.geo.admin.ch/internet/geoportal/en/home.html">Pixel maps / geo.admin.ch</a>',Pu=t=>{const e=new Date(t),i=e.getFullYear(),n=("0"+(e.getMonth()+1)).slice(-2);return`${("0"+e.getDate()).slice(-2)}.${n}.${i} - ${("0"+e.getHours()).slice(-2)}:${("0"+e.getMinutes()).slice(-2)}`},ku="undefined"!=typeof navigator&&void 0!==navigator.userAgent?navigator.userAgent.toLowerCase():"",Nu=(ku.includes("safari")&&!ku.includes("chrom")&&(ku.includes("version/15.4")||/cpu (os|iphone os) 15_4 like mac os x/.test(ku)),ku.includes("webkit")&&!ku.includes("edge")),Iu=ku.includes("macintosh"),Tu="undefined"!=typeof devicePixelRatio?devicePixelRatio:1,Ou="undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof OffscreenCanvas&&self instanceof WorkerGlobalScope,Ru="undefined"!=typeof Image&&Image.prototype.decode,Fu=function(){let t=!1;try{const e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("_",null,e),window.removeEventListener("_",null,e)}catch{}return t}();function Du(t,e,i,n){let s;return s=i&&i.length?i.shift():Ou?new class extends OffscreenCanvas{style={}}(t??300,e??150):document.createElement("canvas"),t&&(s.width=t),e&&(s.height=e),s.getContext("2d",n)}let ju;function Gu(){return ju||(ju=Du(1,1)),ju}function Bu(t){const e=t.canvas;e.width=1,e.height=1,t.clearRect(0,0,1,1)}function zu(t,e){const i=e.parentNode;i&&i.replaceChild(t,e)}function qu(){return new Proxy({childNodes:[],appendChild:function(t){return this.childNodes.push(t),t},remove:function(){},removeChild:function(t){const e=this.childNodes.indexOf(t);if(-1===e)throw new Error("Node to remove was not found");return this.childNodes.splice(e,1),t},insertBefore:function(t,e){const i=this.childNodes.indexOf(e);if(-1===i)throw new Error("Reference node not found");return this.childNodes.splice(i,0,t),t},style:{}},{get:(t,e,i)=>"firstElementChild"===e?t.childNodes.length>0?t.childNodes[0]:null:Reflect.get(t,e,i)})}function Uu(t){return"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas}const Wu=[NaN,NaN,NaN,0];let Vu;const Hu=/^rgba?\(\s*(\d+%?)\s+(\d+%?)\s+(\d+%?)(?:\s*\/\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Ku=/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,$u=/^rgba?\(\s*(\d+%)\s*,\s*(\d+%)\s*,\s*(\d+%)(?:\s*,\s*(\d+%|\d*\.\d+|[01]))?\s*\)$/i,Xu=/^#([\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$/i;function Yu(t,e){return t.endsWith("%")?Number(t.substring(0,t.length-1))/e:Number(t)}function Zu(t){throw new Error('failed to parse "'+t+'" as color')}function Ju(t){if(t.toLowerCase().startsWith("rgb")){const e=t.match(Ku)||t.match(Hu)||t.match($u);if(e){const t=e[4],i=100/255;return[io(Yu(e[1],i)+.5|0,0,255),io(Yu(e[2],i)+.5|0,0,255),io(Yu(e[3],i)+.5|0,0,255),void 0!==t?io(Yu(t,100),0,1):1]}Zu(t)}if(t.startsWith("#")){if(Xu.test(t)){const e=t.substring(1),i=e.length<=4?1:2,n=[0,0,0,255];for(let t=0,s=e.length;t<s;t+=i){let s=parseInt(e.substring(t,t+i),16);1===i&&(s+=s<<4),n[t/i]=s}return n[3]=n[3]/255,n}Zu(t)}const e=(Vu||(Vu=Du(1,1,void 0,{willReadFrequently:!0,desynchronized:!0})),Vu);e.fillStyle="#abcdef";let i=e.fillStyle;e.fillStyle=t,e.fillStyle===i&&(e.fillStyle="#fedcba",i=e.fillStyle,e.fillStyle=t,e.fillStyle===i&&Zu(t));const n=e.fillStyle;if(n.startsWith("#")||n.startsWith("rgba"))return Ju(n);e.clearRect(0,0,1,1),e.fillRect(0,0,1,1);const s=Array.from(e.getImageData(0,0,1,1).data);return s[3]=lo(s[3]/255,3),s}const Qu={};let td=0;function ed(t){if(4===t.length)return t;const e=t.slice();return e[3]=1,e}function id(t){return t>.0031308?269.025*Math.pow(t,1/2.4)-14.025:3294.6*t}function nd(t){return t>.2068965?Math.pow(t,3):108/841*(t-4/29)}function sd(t){return t>10.314724?Math.pow((t+14.025)/269.025,2.4):t/3294.6}function rd(t){return t>.0088564?Math.pow(t,1/3):t/(108/841)+4/29}function od(t){const e=sd(t[0]),i=sd(t[1]),n=sd(t[2]),s=rd(.222488403*e+.716873169*i+.06060791*n),r=500*(rd(.452247074*e+.399439023*i+.148375274*n)-s),o=200*(s-rd(.016863605*e+.117638439*i+.865350722*n)),a=Math.atan2(o,r)*(180/Math.PI);return[116*s-16,Math.sqrt(r*r+o*o),a<0?a+360:a,t[3]]}function ad(t){if("none"===t)return Wu;if(Qu.hasOwnProperty(t))return Qu[t];if(td>=1024){let t=0;for(const e in Qu)3&t++||(delete Qu[e],--td)}const e=Ju(t);4!==e.length&&Zu(t);for(const i of e)isNaN(i)&&Zu(t);return Qu[t]=e,++td,e}function hd(t){return Array.isArray(t)?t:ad(t)}function ld(t){let e=t[0];e!=(0|e)&&(e=e+.5|0);let i=t[1];i!=(0|i)&&(i=i+.5|0);let n=t[2];return n!=(0|n)&&(n=n+.5|0),"rgba("+e+","+i+","+n+","+(void 0===t[3]?1:Math.round(1e3*t[3])/1e3)+")"}function cd(){throw new Error("Unimplemented abstract method.")}let ud=0;function dd(t){return t.ol_uid||(t.ol_uid=String(++ud))}function fd(t){for(const e in t)delete t[e]}function pd(t){let e;for(e in t)return!1;return!e}function gd(t,e,i,n,s){if(s){const s=i;i=function(r){return t.removeEventListener(e,i),s.call(n??this,r)}}else n&&n!==t&&(i=i.bind(n));const r={target:t,type:e,listener:i};return t.addEventListener(e,i),r}
vendor: 2,842 bytes, line 2
2function md(t,e,i,n){return gd(t,e,i,n,!0)}function _d(t){t&&t.target&&(t.target.removeEventListener(t.type,t.listener),fd(t))}const vd="change",yd="contextmenu",wd="click",bd="keydown",xd="keypress",Sd="touchmove",Ed="wheel",Ad=class{constructor(){this.disposed=!1}dispose(){this.disposed||(this.disposed=!0,this.disposeInternal())}disposeInternal(){}};function Cd(t,e){return t>e?1:t<e?-1:0}function Md(t,e){return t<e?1:t>e?-1:0}function Ld(t,e,i){if(t[0]<=e)return 0;const n=t.length;if(e<=t[n-1])return n-1;if("function"==typeof i){for(let s=1;s<n;++s){const n=t[s];if(n===e)return s;if(n<e)return i(e,t[s-1],n)>0?s-1:s}return n-1}if(i>0){for(let i=1;i<n;++i)if(t[i]<e)return i-1;return n-1}if(i<0){for(let i=1;i<n;++i)if(t[i]<=e)return i;return n-1}for(let i=1;i<n;++i){if(t[i]==e)return i;if(t[i]<e)return t[i-1]-e<e-t[i]?i-1:i}return n-1}function Pd(t,e,i){for(;e<i;){const n=t[e];t[e]=t[i],t[i]=n,++e,--i}}function kd(t,e){const i=Array.isArray(e)?e:[e],n=i.length;for(let e=0;e<n;e++)t[t.length]=i[e]}function Nd(t,e){const i=t.length;if(i!==e.length)return!1;for(let n=0;n<i;n++)if(t[n]!==e[n])return!1;return!0}function Id(){return!0}function Td(){return!1}function Od(){}function Rd(t){let e,i,n;return function(){const s=Array.prototype.slice.call(arguments);return i&&this===n&&Nd(s,i)||(n=this,i=s,e=t.apply(this,arguments)),e}}const Fd=class{constructor(t){this.propagationStopped,this.defaultPrevented,this.type=t,this.target=null}preventDefault(){this.defaultPrevented=!0}stopPropagation(){this.propagationStopped=!0}},Dd=class extends Ad{constructor(t){super(),this.eventTarget_=t,this.pendingRemovals_=null,this.dispatching_=null,this.listeners_=null}addEventListener(t,e){if(!t||!e)return;const i=this.listeners_||(this.listeners_={}),n=i[t]||(i[t]=[]);n.includes(e)||n.push(e)}dispatchEvent(t){const e="string"==typeof t,i=e?t:t.type,n=this.listeners_&&this.listeners_[i];if(!n)return;const s=e?new Fd(t):t;s.target||(s.target=this.eventTarget_||this);const r=this.dispatching_||(this.dispatching_={}),o=this.pendingRemovals_||(this.pendingRemovals_={});let a;i in r||(r[i]=0,o[i]=0),++r[i];for(let t=0,e=n.length;t<e;++t)if(a="handleEvent"in n[t]?n[t].handleEvent(s):n[t].call(this,s),!1===a||s.propagationStopped){a=!1;break}if(0===--r[i]){let t=o[i];for(delete o[i];t--;)this.removeEventListener(i,Od);delete r[i]}return a}disposeInternal(){this.listeners_&&fd(this.listeners_)}getListeners(t){return this.listeners_&&this.listeners_[t]||void 0}hasListener(t){return!!this.listeners_&&(t?t in this.listeners_:Object.keys(this.listeners_).length>0)}removeEventListener(t,e){if(!this.listeners_)return;const i=this.listeners_[t];if(!i)return;const n=i.indexOf(e);-1!==n&&(this.pendingRemovals_&&t in this.pendingRemovals_?(i[n]=Od,++this.pendingRemovals_[t]):(i.splice(n,1),0===i.length&&delete this.listeners_[t]))}};
2function jd(t,e){return t+":"+(e?hd(e):"null")}const Gd=new class{constructor(){this.cache_={},this.patternCache_={},this.cacheSize_=0,this.maxCacheSize_=1024}clear(){this.cache_={},this.patternCache_={},this.cacheSize_=0}canExpireCache(){return this.cacheSize_>this.maxCacheSize_}expire(){if(this.canExpireCache()){let t=0;for(const e in this.cache_){const i=this.cache_[e];3&t++||i.hasListener()||(delete this.cache_[e],delete this.patternCache_[e],--this.cacheSize_)}}}get(t,e){const i=jd(t,e);return i in this.cache_?this.cache_[i]:null}getPattern(t,e){const i=jd(t,e);return i in this.patternCache_?this.patternCache_[i]:null}set(t,e,i,n){const s=jd(t,e),r=s in this.cache_;this.cache_[s]=i,n&&(0===i.getImageState()&&i.load(),1===i.getImageState()?i.ready().then(()=>{this.patternCache_[s]=Gu().createPattern(i.getImage(1),"repeat")}):this.patternCache_[s]=Gu().createPattern(i.getImage(1),"repeat")),r||++this.cacheSize_}setSize(t){this.maxCacheSize_=t,this.expire()}};let Bd=null;class zd extends Dd{constructor(t,e,i,n,s){super(),this.hitDetectionImage_=null,this.image_=t,this.crossOrigin_=i?.crossOrigin,this.referrerPolicy_=i?.referrerPolicy,this.canvas_={},this.color_=s,this.imageState_=void 0===n?0:n,this.size_=t&&t.width&&t.height?[t.width,t.height]:null,this.src_=e,this.tainted_,this.ready_=null}initializeImage_(){this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)}isTainted_(){if(void 0===this.tainted_&&2===this.imageState_){Bd||(Bd=Du(1,1,void 0,{willReadFrequently:!0})),Bd.drawImage(this.image_,0,0);try{Bd.getImageData(0,0,1,1),this.tainted_=!1}catch{Bd=null,this.tainted_=!0}}return!0===this.tainted_}dispatchChangeEvent_(){this.dispatchEvent(vd)}handleImageError_(){this.imageState_=3,this.dispatchChangeEvent_()}handleImageLoad_(){this.imageState_=2,this.size_=[this.image_.width,this.image_.height],this.dispatchChangeEvent_()}getImage(t){return this.image_||this.initializeImage_(),this.replaceColor_(t),this.canvas_[t]?this.canvas_[t]:this.image_}setImage(t){this.image_=t}getPixelRatio(t){return this.replaceColor_(t),this.canvas_[t]?t:1}getImageState(){return this.imageState_}getHitDetectionImage(){if(this.image_||this.initializeImage_(),!this.hitDetectionImage_)if(this.isTainted_()){const t=this.size_[0],e=this.size_[1],i=Du(t,e);i.fillRect(0,0,t,e),this.hitDetectionImage_=i.canvas}else this.hitDetectionImage_=this.image_;return this.hitDetectionImage_}getSize(){return this.size_}getSrc(){return this.src_}load(){if(0===this.imageState_){this.image_||this.initializeImage_(),this.imageState_=1;try{void 0!==this.src_&&(this.image_.src=this.src_)}catch{this.handleImageError_()}this.image_ instanceof HTMLImageElement&&(t=this.image_,e=this.src_,e&&(t.src=e),t.src&&Ru?new Promise((e,i)=>t.decode().then(()=>e(t)).catch(n=>t.complete&&t.width?e(t):i(n))):function(t){return new Promise((e,i)=>{function n(){r(),e(t)}function s(){r(),i(new Error("Image load error"))}function r(){t.removeEventListener("load",n),t.removeEventListener("error",s)}t.addEventListener("load",n),t.addEventListener("error",s)})}(t)).then(t=>{this.image_=t,this.handleImageLoad_()}).catch(this.handleImageError_.bind(this))}var t,e}replaceColor_(t){if(!this.color_||this.canvas_[t]||2!==this.imageState_)return;const e=this.image_,i=Du(Math.ceil(e.width*t),Math.ceil(e.height*t)),n=i.canvas;var s;i.scale(t,t),i.drawImage(e,0,0),i.globalCompositeOperation="multiply",i.fillStyle="string"==typeof(s=this.color_)?s:ld(s),i.fillRect(0,0,n.width/t,n.height/t),i.globalCompositeOperation="destination-in",i.drawImage(e,0,0),this.canvas_[t]=n}ready(){return this.ready_||(this.ready_=new Promise(t=>{if(2===this.imageState_||3===this.imageState_)t();else{const e=()=>{2!==this.imageState_&&3!==this.imageState_||(this.removeEventListener(vd,e),t())};this.addEventListener(vd,e)}})),this.ready_}}function qd(t,e,i,n,s,r){let o=void 0===e?void 0:Gd.get(e,s);return o||(o=new zd(t,t&&"src"in t?t.src||void 0:e,i,n,s),Gd.set(e,s,o,r)),r&&o&&!Gd.getPattern(e,s)&&Gd.set(e,s,o,r),o}const Ud=zd;class Wd{constructor(t){t=t||{},this.patternImage_=null,this.color_=null,void 0!==t.color&&this.setColor(t.color)}clone(){const t=this.getColor();return new Wd({color:Array.isArray(t)?t.slice():t||void 0})}getColor(){return this.color_}setColor(t){if(null!==t&&"object"==typeof t&&"src"in t){const e=qd(null,t.src,{crossOrigin:"anonymous"},void 0,t.offset?null:t.color?t.color:null,!(t.offset&&t.size));e.ready().then(()=>{this.patternImage_=null}),0===e.getImageState()&&e.load(),1===e.getImageState()&&(this.patternImage_=e)}this.color_=t}getKey(){const t=this.getColor();return t?t instanceof CanvasPattern||t instanceof CanvasGradient?dd(t):"object"==typeof t&&"src"in t?t.src+":"+t.offset:hd(t).toString():""}loading(){return!!this.patternImage_}ready(){return this.patternImage_?this.patternImage_.ready():Promise.resolve()}}const Vd=Wd,Hd="propertychange";class Kd extends Dd{constructor(){super(),this.on=this.onInternal,this.once=this.onceInternal,this.un=this.unInternal,this.revision_=0}changed(){++this.revision_,this.dispatchEvent(vd)}getRevision(){return this.revision_}onInternal(t,e){if(Array.isArray(t)){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=gd(this,t[s],e);return n}return gd(this,t,e)}onceInternal(t,e){let i;if(Array.isArray(t)){const n=t.length;i=new Array(n);for(let s=0;s<n;++s)i[s]=md(this,t[s],e)}else i=md(this,t,e);return e.ol_key=i,i}unInternal(t,e){const i=e.ol_key;if(i)!function(t){if(Array.isArray(t))for(let e=0,i=t.length;e<i;++e)_d(t[e]);else _d(t)}(i);else if(Array.isArray(t))for(let i=0,n=t.length;i<n;++i)this.removeEventListener(t[i],e);else this.removeEventListener(t,e)}}Kd.prototype.on,Kd.prototype.once,Kd.prototype.un;const $d=Kd;class Xd extends Fd{constructor(t,e,i){super(t),this.key=e,this.oldValue=i}}const Yd=class extends $d{constructor(t){super(),this.on,this.once,this.un,dd(this),this.values_=null,void 0!==t&&this.setProperties(t)}get(t){let e;return this.values_&&this.values_.hasOwnProperty(t)&&(e=this.values_[t]),e}getKeys(){return this.values_&&Object.keys(this.values_)||[]}getProperties(){return this.values_&&Object.assign({},this.values_)||{}}getPropertiesInternal(){return this.values_}
vendor: 37,691 bytes, line 2
2hasProperties(){return!!this.values_}notify(t,e){let i;i=`change:${t}`,this.hasListener(i)&&this.dispatchEvent(new Xd(i,t,e)),i=Hd,this.hasListener(i)&&this.dispatchEvent(new Xd(i,t,e))}addChangeListener(t,e){this.addEventListener(`change:${t}`,e)}removeChangeListener(t,e){this.removeEventListener(`change:${t}`,e)}set(t,e,i){const n=this.values_||(this.values_={});if(i)n[t]=e;else{const i=n[t];n[t]=e,i!==e&&this.notify(t,i)}}setProperties(t,e){for(const i in t)this.set(i,t[i],e)}applyProperties(t){t.values_&&Object.assign(this.values_||(this.values_={}),t.values_)}unset(t,e){if(this.values_&&t in this.values_){const i=this.values_[t];delete this.values_[t],pd(this.values_)&&(this.values_=null),e||this.notify(t,i)}}};function Zd(t,e){if(!t)throw new Error(e)}const Jd=[1,0,0,1,0,0];function Qd(){return Jd.slice(0)}function tf(t,e){const i=e[0],n=e[1];return e[0]=t[0]*i+t[2]*n+t[4],e[1]=t[1]*i+t[3]*n+t[5],e}function ef(t,e,i,n,s,r,o,a){const h=Math.sin(r),l=Math.cos(r);return t[0]=n*l,t[1]=s*h,t[2]=-n*h,t[3]=s*l,t[4]=o*n*l-a*n*h+e,t[5]=o*s*h+a*s*l+i,t}function nf(t,e){const i=(n=e)[0]*n[3]-n[1]*n[2];var n;Zd(0!==i,"Transformation matrix cannot be inverted");const s=e[0],r=e[1],o=e[2],a=e[3],h=e[4],l=e[5];return t[0]=a/i,t[1]=-r/i,t[2]=-o/i,t[3]=s/i,t[4]=(o*l-a*h)/i,t[5]=-(s*l-r*h)/i,t}new Array(6);const sf=[1e5,1e5,1e5,1e5,2,2];function rf(t){return t.substring(7,t.length-1).split(",").map(parseFloat)}function of(t,e,i,n,s,r,o){r=r||[],o=o||2;let a=0;for(let h=e;h<i;h+=n){const e=t[h],i=t[h+1];r[a++]=s[0]*e+s[2]*i+s[4],r[a++]=s[1]*e+s[3]*i+s[5];for(let e=2;e<o;e++)r[a++]=t[h+e]}return r&&r.length!=a&&(r.length=a),r}function af(t,e,i,n,s,r,o){o=o||[];const a=Math.cos(s),h=Math.sin(s),l=r[0],c=r[1];let u=0;for(let s=e;s<i;s+=n){const e=t[s]-l,i=t[s+1]-c;o[u++]=l+e*a-i*h,o[u++]=c+e*h+i*a;for(let e=s+2;e<s+n;++e)o[u++]=t[e]}return o&&o.length!=u&&(o.length=u),o}const hf=Qd(),lf=[NaN,NaN],cf=class extends Yd{constructor(){super(),this.extent_=[1/0,1/0,-1/0,-1/0],this.extentRevision_=-1,this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=0,this.simplifyTransformedInternal=Rd((t,e,i)=>{if(!i)return this.getSimplifiedGeometry(e);const n=this.clone();return n.applyTransform(i),n.getSimplifiedGeometry(e)})}simplifyTransformed(t,e){return this.simplifyTransformedInternal(this.getRevision(),t,e)}clone(){return cd()}closestPointXY(t,e,i,n){return cd()}containsXY(t,e){return 0===this.closestPointXY(t,e,lf,Number.MIN_VALUE)}getClosestPoint(t,e){return e=e||[NaN,NaN],this.closestPointXY(t[0],t[1],e,1/0),e}intersectsCoordinate(t){return this.containsXY(t[0],t[1])}computeExtent(t){return cd()}getExtent(t){if(this.extentRevision_!=this.getRevision()){const t=this.computeExtent(this.extent_);(isNaN(t[0])||isNaN(t[1]))&&Pr(t),this.extentRevision_=this.getRevision()}return function(t,e){return e?(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e):t}(this.extent_,t)}rotate(t,e){cd()}scale(t,e,i){cd()}simplify(t){return this.getSimplifiedGeometry(t*t)}getSimplifiedGeometry(t){return cd()}getType(){return cd()}applyTransform(t){cd()}intersectsExtent(t){return cd()}translate(t,e){cd()}transform(t,e){const i=fa(t),n="tile-pixels"==i.getUnits()?function(t,n,s){const r=i.getExtent(),o=i.getWorldExtent(),a=Vr(o)/Vr(r);ef(hf,o[0],o[3],a,-a,0,0,0);const h=of(t,0,t.length,s,hf,n),l=xa(i,e);return l?l(h,h,s):h}:xa(i,e);return this.applyTransform(n),this}};function uf(t){let e;return 2==t?e="XY":3==t?e="XYZ":4==t&&(e="XYZM"),e}function df(t){let e;return"XY"==t?e=2:"XYZ"==t||"XYM"==t?e=3:"XYZM"==t&&(e=4),e}const ff=class extends cf{constructor(){super(),this.layout="XY",this.stride=2,this.flatCoordinates}computeExtent(t){return Nr(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinates(){return cd()}getFirstCoordinate(){return this.flatCoordinates.slice(0,this.stride)}getFlatCoordinates(){return this.flatCoordinates}getLastCoordinate(){return this.flatCoordinates.slice(this.flatCoordinates.length-this.stride)}getLayout(){return this.layout}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<=this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=this.getSimplifiedGeometryInternal(t);return e.getFlatCoordinates().length<this.flatCoordinates.length?e:(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getSimplifiedGeometryInternal(t){return this}getStride(){return this.stride}setFlatCoordinates(t,e){this.stride=df(t),this.layout=t,this.flatCoordinates=e}setCoordinates(t,e){cd()}setLayout(t,e,i){let n;if(t)n=df(t);else{for(let t=0;t<i;++t){if(0===e.length)return this.layout="XY",void(this.stride=2);e=e[0]}n=e.length,t=uf(n)}this.layout=t,this.stride=n}applyTransform(t){this.flatCoordinates&&(t(this.flatCoordinates,this.flatCoordinates,this.layout.startsWith("XYZ")?3:2,this.stride),this.changed())}rotate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();af(i,0,i.length,n,t,e,i),this.changed()}}scale(t,e,i){void 0===e&&(e=t),i||(i=zr(this.getExtent()));const n=this.getFlatCoordinates();if(n){const s=this.getStride();!function(t,e,i,n,s,r,o,a){a=a||[];const h=o[0],l=o[1];let c=0;for(let e=0;e<i;e+=n){const i=t[e]-h,o=t[e+1]-l;a[c++]=h+s*i,a[c++]=l+r*o;for(let i=e+2;i<e+n;++i)a[c++]=t[i]}a&&a.length!=c&&(a.length=c)}(n,0,n.length,s,t,e,i,n),this.changed()}}translate(t,e){const i=this.getFlatCoordinates();if(i){const n=this.getStride();!function(t,e,i,n,s,r,o){o=o||[];let a=0;for(let e=0;e<i;e+=n){o[a++]=t[e]+s,o[a++]=t[e+1]+r;for(let i=e+2;i<e+n;++i)o[a++]=t[i]}o&&o.length!=a&&(o.length=a)}(i,0,i.length,n,t,e,i),this.changed()}}};function pf(t,e,i,n){for(let s=0,r=i.length;s<r;++s){const r=i[s];for(let i=0;i<n;++i)t[e++]=r[i]}return e}function gf(t,e,i,n,s){s=s||[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=pf(t,e,i[o],n);s[r++]=a,e=a}return s.length=r,s}function mf(t,e,i,n,s){s=s||[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=gf(t,e,i[o],n,s[r]);0===a.length&&(a[0]=e),s[r++]=a,e=a[a.length-1]}return s.length=r,s}function _f(t,e,i,n){const s=[];let r=[1/0,1/0,-1/0,-1/0];for(let o=0,a=i.length;o<a;++o){const a=i[o];r=Nr(t,e,a[0],n),s.push((r[0]+r[2])/2,(r[1]+r[3])/2),e=a[a.length-1]}return s}function vf(t,e,i,n,s){return!Dr(s,function(s){return!yf(t,e,i,n,s[0],s[1])})}function yf(t,e,i,n,s,r){let o=0,a=t[i-n],h=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];h<=r?n>r&&(i-a)*(r-h)-(s-a)*(n-h)>0&&o++:n<=r&&(i-a)*(r-h)-(s-a)*(n-h)<0&&o--,a=i,h=n}return 0!==o}function wf(t,e,i,n,s,r){if(0===i.length)return!1;if(!yf(t,e,i[0],n,s,r))return!1;for(let e=1,o=i.length;e<o;++e)if(yf(t,i[e-1],i[e],n,s,r))return!1;return!0}function bf(t,e,i,n,s,r,o){let a,h,l,c,u,d,f;const p=s[r+1],g=[];for(let s=0,r=i.length;s<r;++s){const r=i[s];for(c=t[r-n],d=t[r-n+1],a=e;a<r;a+=n)u=t[a],f=t[a+1],(p<=d&&f<=p||d<=p&&p<=f)&&(l=(p-d)/(f-d)*(u-c)+c,g.push(l)),c=u,d=f}let m=NaN,_=-1/0;for(g.sort(Cd),c=g[0],a=1,h=g.length;a<h;++a){u=g[a];const s=Math.abs(u-c);s>_&&(l=(c+u)/2,wf(t,e,i,n,l,p)&&(m=l,_=s)),c=u}return isNaN(m)&&(m=s[r]),o?(o.push(m,p,_),o):[m,p,_]}function xf(t,e,i,n,s){let r=[];for(let o=0,a=i.length;o<a;++o){const a=i[o];r=bf(t,e,a,n,s,2*o,r),e=a[a.length-1]}return r}function Sf(t,e,i,n,s,r,o){let a,h;const l=(i-e)/n;if(1===l)a=e;else if(2===l)a=e,h=s;else if(0!==l){let r=t[e],o=t[e+1],l=0;const c=[0];for(let s=e+n;s<i;s+=n){const e=t[s],i=t[s+1];l+=Math.sqrt((e-r)*(e-r)+(i-o)*(i-o)),c.push(l),r=e,o=i}const u=s*l,d=function(t,e,i){let n,s;i=i||Cd;let r=0,o=t.length,a=!1;for(;r<o;)n=r+(o-r>>1),s=+i(t[n],e),s<0?r=n+1:(o=n,a=!s);return a?r:~r}(c,u);d<0?(h=(u-c[-d-2])/(c[-d-1]-c[-d-2]),a=e+(-d-2)*n):a=e+d*n}o=o>1?o:2,r=r||new Array(o);for(let e=0;e<o;++e)r[e]=void 0===a?NaN:void 0===h?t[a+e]:ho(t[a+e],t[a+n+e],h);return r}function Ef(t,e,i,n,s,r){if(i==e)return null;let o;if(s<t[e+n-1])return r?(o=t.slice(e,e+n),o[n-1]=s,o):null;if(t[i-1]<s)return r?(o=t.slice(i-n,i),o[n-1]=s,o):null;if(s==t[e+n-1])return t.slice(e,e+n);let a=e/n,h=i/n;for(;a<h;){const e=a+h>>1;s<t[(e+1)*n-1]?h=e:a=e+1}const l=t[a*n-1];if(s==l)return t.slice((a-1)*n,(a-1)*n+n);const c=(s-l)/(t[(a+1)*n-1]-l);o=[];for(let e=0;e<n-1;++e)o.push(ho(t[(a-1)*n+e],t[a*n+e],c));return o.push(s),o}function Af(t,e,i,n){for(;e<i-n;){for(let s=0;s<n;++s){const r=t[e+s];t[e+s]=t[i-n+s],t[i-n+s]=r}e+=n,i-=n}}function Cf(t,e,i,n){let s=0,r=t[i-n],o=t[i-n+1];for(;e<i;e+=n){const i=t[e],n=t[e+1];s+=(i-r)*(n+o),r=i,o=n}return 0===s?void 0:s>0}function Mf(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=Cf(t,e,o,n);if(0===r){if(s&&a||!s&&!a)return!1}else if(s&&!a||!s&&a)return!1;e=o}return!0}function Lf(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];if(!Mf(t,e,o,n,s))return!1;o.length&&(e=o[o.length-1])}return!0}function Pf(t,e,i,n,s){s=void 0!==s&&s;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=Cf(t,e,o,n);(0===r?s&&a||!s&&!a:s&&!a||!s&&a)&&Af(t,e,o,n),e=o}return e}function kf(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r)e=Pf(t,e,i[r],n,s);return e}function Nf(t,e,i,n,s,r,o){const a=(i-e)/n;if(a<3){for(;e<i;e+=n)r[o++]=t[e],r[o++]=t[e+1];return o}const h=new Array(a);h[0]=1,h[a-1]=1;const l=[e,i-n];let c=0;for(;l.length>0;){const i=l.pop(),r=l.pop();let o=0;const a=t[r],u=t[r+1],d=t[i],f=t[i+1];for(let e=r+n;e<i;e+=n){const i=no(t[e],t[e+1],a,u,d,f);i>o&&(c=e,o=i)}o>s&&(h[(c-e)/n]=1,r+n<c&&l.push(r,c),c+n<i&&l.push(c,i))}for(let i=0;i<a;++i)h[i]&&(r[o++]=t[e+i*n],r[o++]=t[e+i*n+1]);return o}function If(t,e,i,n,s,r,o,a){for(let h=0,l=i.length;h<l;++h){const l=i[h];o=Nf(t,e,l,n,s,r,o),a.push(o),e=l}return o}function Tf(t,e){return e*Math.round(t/e)}function Of(t,e,i,n,s,r,o){if(e==i)return o;let a,h,l=Tf(t[e],s),c=Tf(t[e+1],s);e+=n,r[o++]=l,r[o++]=c;do{if(a=Tf(t[e],s),h=Tf(t[e+1],s),(e+=n)==i)return r[o++]=a,r[o++]=h,o}while(a==l&&h==c);for(;e<i;){const i=Tf(t[e],s),u=Tf(t[e+1],s);if(e+=n,i==a&&u==h)continue;const d=a-l,f=h-c,p=i-l,g=u-c;d*g==f*p&&(d<0&&p<d||d==p||d>0&&p>d)&&(f<0&&g<f||f==g||f>0&&g>f)?(a=i,h=u):(r[o++]=a,r[o++]=h,l=a,c=h,a=i,h=u)}return r[o++]=a,r[o++]=h,o}function Rf(t,e,i,n,s,r,o,a){for(let h=0,l=i.length;h<l;++h){const l=i[h];o=Of(t,e,l,n,s,r,o),a.push(o),e=l}return o}const Ff=Qd();class Df{constructor(t,e,i,n,s,r){this.styleFunction,this.extent_,this.id_=r,this.type_=t,this.flatCoordinates_=e,this.flatInteriorPoints_=null,this.flatMidpoints_=null,this.ends_=i||null,this.properties_=s,this.squaredTolerance_,this.stride_=n,this.simplifiedGeometry_}get(t){return this.properties_[t]}getExtent(){return this.extent_||(this.extent_="Point"===this.type_?kr(this.flatCoordinates_):Nr(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_)),this.extent_}getFlatInteriorPoint(){if(!this.flatInteriorPoints_){const t=zr(this.getExtent());this.flatInteriorPoints_=bf(this.flatCoordinates_,0,this.ends_,this.stride_,t,0)}return this.flatInteriorPoints_}getFlatInteriorPoints(){if(!this.flatInteriorPoints_){const t=function(t,e){const i=[];let n,s=0,r=0;for(let o=0,a=e.length;o<a;++o){const a=e[o],h=Cf(t,s,a,2);if(void 0===n&&(n=h),h===n)i.push(e.slice(r,o+1));else{if(0===i.length)continue;i[i.length-1].push(e[r])}r=o+1,s=a}return i}(this.flatCoordinates_,this.ends_),e=_f(this.flatCoordinates_,0,t,this.stride_);this.flatInteriorPoints_=xf(this.flatCoordinates_,0,t,this.stride_,e)}return this.flatInteriorPoints_}getFlatMidpoint(){return this.flatMidpoints_||(this.flatMidpoints_=Sf(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_,.5)),this.flatMidpoints_}getFlatMidpoints(){if(!this.flatMidpoints_){this.flatMidpoints_=[];const t=this.flatCoordinates_;let e=0;const i=this.ends_;for(let n=0,s=i.length;n<s;++n){const s=i[n],r=Sf(t,e,s,this.stride_,.5);kd(this.flatMidpoints_,r),e=s}}return this.flatMidpoints_}getId(){return this.id_}getOrientedFlatCoordinates(){return this.flatCoordinates_}getGeometry(){return this}getSimplifiedGeometry(t){return this}simplifyTransformed(t,e){return this}getProperties(){return this.properties_}getPropertiesInternal(){return this.properties_}getStride(){return this.stride_}getStyleFunction(){return this.styleFunction}getType(){return this.type_}transform(t){const e=(t=fa(t)).getExtent(),i=t.getWorldExtent();if(e&&i){const t=Vr(i)/Vr(e);ef(Ff,i[0],i[3],t,-t,0,0,0),of(this.flatCoordinates_,0,this.flatCoordinates_.length,this.stride_,Ff,this.flatCoordinates_)}}applyTransform(t){t(this.flatCoordinates_,this.flatCoordinates_,this.stride_)}clone(){return new Df(this.type_,this.flatCoordinates_.slice(),this.ends_?.slice(),this.stride_,Object.assign({},this.properties_),this.id_)}getEnds(){return this.ends_}enableSimplifyTransformed(){return this.simplifyTransformed=Rd((t,e)=>{if(t===this.squaredTolerance_)return this.simplifiedGeometry_;this.simplifiedGeometry_=this.clone(),e&&this.simplifiedGeometry_.applyTransform(e);const i=this.simplifiedGeometry_.getFlatCoordinates();let n;switch(this.type_){case"LineString":i.length=Nf(i,0,this.simplifiedGeometry_.flatCoordinates_.length,this.simplifiedGeometry_.stride_,t,i,0),n=[i.length];break;case"MultiLineString":n=[],i.length=If(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,t,i,0,n);break;case"Polygon":n=[],i.length=Rf(i,0,this.simplifiedGeometry_.ends_,this.simplifiedGeometry_.stride_,Math.sqrt(t),i,0,n)}return n&&(this.simplifiedGeometry_=new Df(this.type_,i,n,this.stride_,this.properties_,this.id_)),this.squaredTolerance_=t,this.simplifiedGeometry_}),this}}Df.prototype.getFlatCoordinates=Df.prototype.getOrientedFlatCoordinates;const jf=Df;class Gf extends Yd{constructor(t){if(super(),this.on,this.once,this.un,this.id_=void 0,this.geometryName_="geometry",this.style_=null,this.styleFunction_=void 0,this.geometryChangeKey_=null,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),t)if("function"==typeof t.getSimplifiedGeometry){const e=t;this.setGeometry(e)}else{const e=t;this.setProperties(e)}}clone(){const t=new Gf,e=this.geometryName_;t.setGeometryName(e);const i=this.getPropertiesInternal();if(i){const n=this.getGeometry();for(const s in i)s===e&&n?t.set(s,n.clone()):t.set(s,i[s],!0)}const n=this.getStyle();return n&&t.setStyle(n),t}getGeometry(){return this.get(this.geometryName_)}getId(){return this.id_}getGeometryName(){return this.geometryName_}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}handleGeometryChange_(){this.changed()}handleGeometryChanged_(){this.geometryChangeKey_&&(_d(this.geometryChangeKey_),this.geometryChangeKey_=null);const t=this.getGeometry();t&&(this.geometryChangeKey_=gd(t,vd,this.handleGeometryChange_,this)),this.changed()}setGeometry(t){this.set(this.geometryName_,t)}setStyle(t){this.style_=t,this.styleFunction_=t?function(t){if("function"==typeof t)return t;let e;return Array.isArray(t)?e=t:(Zd("function"==typeof t.getZIndex,"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"),e=[t]),function(){return e}}(t):void 0,this.changed()}setId(t){this.id_=t,this.changed()}setGeometryName(t){t!==this.geometryName_&&(this.removeChangeListener(this.geometryName_,this.handleGeometryChanged_),this.geometryName_=t,this.addChangeListener(this.geometryName_,this.handleGeometryChanged_),this.handleGeometryChanged_())}}const Bf=Gf;class zf extends cf{constructor(t){super(),this.geometries_=t,this.changeEventsKeys_=[],this.listenGeometriesChange_()}unlistenGeometriesChange_(){this.changeEventsKeys_.forEach(_d),this.changeEventsKeys_.length=0}listenGeometriesChange_(){const t=this.geometries_;for(let e=0,i=t.length;e<i;++e)this.changeEventsKeys_.push(gd(t[e],vd,this.changed,this))}clone(){const t=new zf(qf(this.geometries_));return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<Sr(this.getExtent(),t,e))return n;const s=this.geometries_;for(let r=0,o=s.length;r<o;++r)n=s[r].closestPointXY(t,e,i,n);return n}containsXY(t,e){const i=this.geometries_;for(let n=0,s=i.length;n<s;++n)if(i[n].containsXY(t,e))return!0;return!1}computeExtent(t){Pr(t);const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)Tr(t,e[i].getExtent());return t}getGeometries(){return qf(this.geometries_)}getGeometriesArray(){return this.geometries_}getGeometriesArrayRecursive(){let t=[];const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].getType()===this.getType()?t=t.concat(e[i].getGeometriesArrayRecursive()):t.push(e[i]);return t}getSimplifiedGeometry(t){if(this.simplifiedGeometryRevision!==this.getRevision()&&(this.simplifiedGeometryMaxMinSquaredTolerance=0,this.simplifiedGeometryRevision=this.getRevision()),t<0||0!==this.simplifiedGeometryMaxMinSquaredTolerance&&t<this.simplifiedGeometryMaxMinSquaredTolerance)return this;const e=[],i=this.geometries_;let n=!1;for(let s=0,r=i.length;s<r;++s){const r=i[s],o=r.getSimplifiedGeometry(t);e.push(o),o!==r&&(n=!0)}return n?new zf(e):(this.simplifiedGeometryMaxMinSquaredTolerance=t,this)}getType(){return"GeometryCollection"}intersectsExtent(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)if(e[i].intersectsExtent(t))return!0;return!1}isEmpty(){return 0===this.geometries_.length}rotate(t,e){const i=this.geometries_;for(let n=0,s=i.length;n<s;++n)i[n].rotate(t,e);this.changed()}scale(t,e,i){i||(i=zr(this.getExtent()));const n=this.geometries_;for(let s=0,r=n.length;s<r;++s)n[s].scale(t,e,i);this.changed()}setGeometries(t){this.setGeometriesArray(qf(t))}setGeometriesArray(t){this.unlistenGeometriesChange_(),this.geometries_=t,this.listenGeometriesChange_(),this.changed()}applyTransform(t){const e=this.geometries_;for(let i=0,n=e.length;i<n;++i)e[i].applyTransform(t);this.changed()}translate(t,e){const i=this.geometries_;for(let n=0,s=i.length;n<s;++n)i[n].translate(t,e);this.changed()}disposeInternal(){this.unlistenGeometriesChange_(),super.disposeInternal()}}function qf(t){return t.map(t=>t.clone())}const Uf=zf;function Wf(t,e,i,n,s,r,o){const a=t[e],h=t[e+1],l=t[i]-a,c=t[i+1]-h;let u;if(0===l&&0===c)u=e;else{const d=((s-a)*l+(r-h)*c)/(l*l+c*c);if(d>1)u=i;else{if(d>0){for(let s=0;s<n;++s)o[s]=ho(t[e+s],t[i+s],d);return void(o.length=n)}u=e}}for(let e=0;e<n;++e)o[e]=t[u+e];o.length=n}function Vf(t,e,i,n,s){let r=t[e],o=t[e+1];for(e+=n;e<i;e+=n){const i=t[e],n=t[e+1],a=so(r,o,i,n);a>s&&(s=a),r=i,o=n}return s}function Hf(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];s=Vf(t,e,o,n,s),e=o}return s}function Kf(t,e,i,n,s,r,o,a,h,l,c){if(e==i)return l;let u,d;if(0===s){if(d=so(o,a,t[e],t[e+1]),d<l){for(u=0;u<n;++u)h[u]=t[e+u];return h.length=n,d}return l}c=c||[NaN,NaN];let f=e+n;for(;f<i;)if(Wf(t,f-n,f,n,o,a,c),d=so(o,a,c[0],c[1]),d<l){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n,f+=n}else f+=n*Math.max((Math.sqrt(d)-Math.sqrt(l))/s|0,1);if(r&&(Wf(t,i-n,e,n,o,a,c),d=so(o,a,c[0],c[1]),d<l)){for(l=d,u=0;u<n;++u)h[u]=c[u];h.length=n}return l}function $f(t,e,i,n,s,r,o,a,h,l,c){c=c||[NaN,NaN];for(let u=0,d=i.length;u<d;++u){const d=i[u];l=Kf(t,e,d,n,s,r,o,a,h,l,c),e=d}return l}function Xf(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=e;o<i;o+=n)s[r++]=t.slice(o,o+n);return s.length=r,s}function Yf(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=Xf(t,e,a,n,s[r]),e=a}return s.length=r,s}function Zf(t,e,i,n,s){s=void 0!==s?s:[];let r=0;for(let o=0,a=i.length;o<a;++o){const a=i[o];s[r++]=1===a.length&&a[0]===e?[]:Yf(t,e,a,n,s[r]),e=a[a.length-1]}return s.length=r,s}function Jf(t,e,i,n,s){let r;for(e+=n;e<i;e+=n)if(r=s(t.slice(e-n,e),t.slice(e,e+n)),r)return r;return!1}function Qf(t,e,i,n,s,r){return r=r??Rr([1/0,1/0,-1/0,-1/0],t,e,i,n),!!Zr(s,r)&&(r[0]>=s[0]&&r[2]<=s[2]||r[1]>=s[1]&&r[3]<=s[3]||Jf(t,e,i,n,function(t,e){return function(t,e,i){let n=!1;const s=Mr(t,e),r=Mr(t,i);if(1===s||1===r)n=!0;else{const o=t[0],a=t[1],h=t[2],l=t[3],c=e[0],u=e[1],d=i[0],f=i[1],p=(f-u)/(d-c);let g,m;2&r&&!(2&s)&&(g=d-(f-l)/p,n=g>=o&&g<=h),n||!(4&r)||4&s||(m=f-(d-h)*p,n=m>=a&&m<=l),n||!(8&r)||8&s||(g=d-(f-a)/p,n=g>=o&&g<=h),n||!(16&r)||16&s||(m=f-(d-o)*p,n=m>=a&&m<=l)}return n}(s,t,e)}))}function tp(t,e,i,n,s){return!!(Qf(t,e,i,n,s)||yf(t,e,i,n,s[0],s[1])||yf(t,e,i,n,s[0],s[3])||yf(t,e,i,n,s[2],s[1])||yf(t,e,i,n,s[2],s[3]))}function ep(t,e,i,n,s){if(!tp(t,e,i[0],n,s))return!1;if(1===i.length)return!0;for(let e=1,r=i.length;e<r;++e)if(vf(t,i[e-1],i[e],n,s)&&!Qf(t,i[e-1],i[e],n,s))return!1;return!0}function ip(t,e,i,n){let s=t[e],r=t[e+1],o=0;for(let a=e+n;a<i;a+=n){const e=t[a],i=t[a+1];o+=Math.sqrt((e-s)*(e-s)+(i-r)*(i-r)),s=e,r=i}return o}class np extends ff{constructor(t,e){super(),this.flatMidpoint_=null,this.flatMidpointRevision_=-1,this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}appendCoordinate(t){kd(this.flatCoordinates,t),this.changed()}clone(){const t=new np(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Sr(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Vf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Kf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!1,t,e,i,n))}forEachSegment(t){return Jf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}getCoordinateAtM(t,e){return"XYM"!=this.layout&&"XYZM"!=this.layout?null:(e=void 0!==e&&e,Ef(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e))}getCoordinates(){return Xf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinateAt(t,e){return Sf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,this.stride)}getLength(){return ip(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getFlatMidpoint(){return this.flatMidpointRevision_!=this.getRevision()&&(this.flatMidpoint_=this.getCoordinateAt(.5,this.flatMidpoint_??void 0),this.flatMidpointRevision_=this.getRevision()),this.flatMidpoint_}getSimplifiedGeometryInternal(t){const e=[];return e.length=Nf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new np(e,"XY")}getType(){return"LineString"}intersectsExtent(t){return Qf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,this.getExtent())}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=pf(this.flatCoordinates,0,t,this.stride),this.changed()}}const sp=np;class rp extends ff{constructor(t,e,i){if(super(),this.ends_=[],this.maxDelta_=-1,this.maxDeltaRevision_=-1,Array.isArray(t[0]))this.setCoordinates(t,e);else if(void 0!==e&&i)this.setFlatCoordinates(e,t),this.ends_=i;else{const e=t,i=[],n=[];for(let t=0,s=e.length;t<s;++t)kd(i,e[t].getFlatCoordinates()),n.push(i.length);const s=0===e.length?this.getLayout():e[0].getLayout();this.setFlatCoordinates(s,i),this.ends_=n}}appendLineString(t){kd(this.flatCoordinates,t.getFlatCoordinates().slice()),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new rp(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Sr(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Hf(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$f(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!1,t,e,i,n))}getCoordinateAtM(t,e,i){return"XYM"!=this.layout&&"XYZM"!=this.layout||0===this.flatCoordinates.length?null:(e=void 0!==e&&e,i=void 0!==i&&i,function(t,e,i,n,s,r,o){if(o)return Ef(t,e,i[i.length-1],n,s,r);let a;if(s<t[n-1])return r?(a=t.slice(0,n),a[n-1]=s,a):null;if(t[t.length-1]<s)return r?(a=t.slice(t.length-n),a[n-1]=s,a):null;for(let r=0,o=i.length;r<o;++r){const o=i[r];if(e!=o){if(s<t[e+n-1])return null;if(s<=t[o-1])return Ef(t,e,o,n,s,!1);e=o}}return null}(this.flatCoordinates,0,this.ends_,this.stride,t,e,i))}getCoordinates(){return Yf(this.flatCoordinates,0,this.ends_,this.stride)}getEnds(){return this.ends_}getLineString(t){return t<0||this.ends_.length<=t?null:new sp(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLineStrings(){const t=this.flatCoordinates,e=this.ends_,i=this.layout,n=[];let s=0;for(let r=0,o=e.length;r<o;++r){const o=e[r],a=new sp(t.slice(s,o),i);n.push(a),s=o}return n}getLength(){const t=this.ends_;let e=0,i=0;for(let n=0,s=t.length;n<s;++n)i+=ip(this.flatCoordinates,e,t[n],this.stride),e=t[n];return i}getFlatMidpoints(){const t=[],e=this.flatCoordinates;let i=0;const n=this.ends_,s=this.stride;for(let r=0,o=n.length;r<o;++r){const o=n[r];kd(t,Sf(e,i,o,s,.5)),i=o}return t}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=If(this.flatCoordinates,0,this.ends_,this.stride,t,e,0,i),new rp(e,"XY",i)}getType(){return"MultiLineString"}intersectsExtent(t){return function(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){if(Qf(t,e,i[r],n,s))return!0;e=i[r]}return!1}(this.flatCoordinates,0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=gf(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const op=rp;class ap extends ff{constructor(t,e){super(),this.setCoordinates(t,e)}clone(){const t=new ap(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){const s=this.flatCoordinates,r=so(t,e,s[0],s[1]);if(r<n){const t=this.stride;for(let e=0;e<t;++e)i[e]=s[e];return i.length=t,r}return n}getCoordinates(){return this.flatCoordinates.slice()}computeExtent(t){return kr(this.flatCoordinates,t)}getType(){return"Point"}intersectsExtent(t){return Cr(t,this.flatCoordinates[0],this.flatCoordinates[1])}setCoordinates(t,e){this.setLayout(e,t,0),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=function(t,e,i){for(let n=0,s=i.length;n<s;++n)t[e++]=i[n];return e}(this.flatCoordinates,0,t,this.stride),this.changed()}}const hp=ap;class lp extends ff{constructor(t,e){super(),e&&!Array.isArray(t[0])?this.setFlatCoordinates(e,t):this.setCoordinates(t,e)}appendPoint(t){kd(this.flatCoordinates,t.getFlatCoordinates()),this.changed()}clone(){const t=new lp(this.flatCoordinates.slice(),this.layout);return t.applyProperties(this),t}closestPointXY(t,e,i,n){if(n<Sr(this.getExtent(),t,e))return n;const s=this.flatCoordinates,r=this.stride;for(let o=0,a=s.length;o<a;o+=r){const a=so(t,e,s[o],s[o+1]);if(a<n){n=a;for(let t=0;t<r;++t)i[t]=s[o+t];i.length=r}}return n}getCoordinates(){return Xf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getPoint(t){const e=this.flatCoordinates.length/this.stride;return t<0||e<=t?null:new hp(this.flatCoordinates.slice(t*this.stride,(t+1)*this.stride),this.layout)}getPoints(){const t=this.flatCoordinates,e=this.layout,i=this.stride,n=[];for(let s=0,r=t.length;s<r;s+=i){const r=new hp(t.slice(s,s+i),e);n.push(r)}return n}getType(){return"MultiPoint"}intersectsExtent(t){const e=this.flatCoordinates,i=this.stride;for(let n=0,s=e.length;n<s;n+=i)if(Cr(t,e[n],e[n+1]))return!0;return!1}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=pf(this.flatCoordinates,0,t,this.stride),this.changed()}}const cp=lp;function up(t,e,i,n){let s=0;const r=t[i-n],o=t[i-n+1];let a=0,h=0;for(;e<i;e+=n){const i=t[e]-r,n=t[e+1]-o;s+=h*i-a*n,a=i,h=n}return s/2}function dp(t,e,i,n){let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r];s+=up(t,e,o,n),e=o}return s}class fp extends ff{constructor(t,e){super(),this.maxDelta_=-1,this.maxDeltaRevision_=-1,void 0===e||Array.isArray(t[0])?this.setCoordinates(t,e):this.setFlatCoordinates(e,t)}clone(){return new fp(this.flatCoordinates.slice(),this.layout)}closestPointXY(t,e,i,n){return n<Sr(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Vf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),Kf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,this.maxDelta_,!0,t,e,i,n))}getArea(){return up(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getCoordinates(){return Xf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride)}getSimplifiedGeometryInternal(t){const e=[];return e.length=Nf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t,e,0),new fp(e,"XY")}getType(){return"LinearRing"}intersectsExtent(t){return Qf(this.flatCoordinates,0,this.flatCoordinates.length,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,1),this.flatCoordinates||(this.flatCoordinates=[]),this.flatCoordinates.length=pf(this.flatCoordinates,0,t,this.stride),this.changed()}}const pp=fp;class gp extends ff{constructor(t,e,i){super(),this.ends_=[],this.flatInteriorPointRevision_=-1,this.flatInteriorPoint_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,void 0!==e&&i?(this.setFlatCoordinates(e,t),this.ends_=i):this.setCoordinates(t,e)}appendLinearRing(t){this.flatCoordinates?kd(this.flatCoordinates,t.getFlatCoordinates()):this.flatCoordinates=t.getFlatCoordinates().slice(),this.ends_.push(this.flatCoordinates.length),this.changed()}clone(){const t=new gp(this.flatCoordinates.slice(),this.layout,this.ends_.slice());return t.applyProperties(this),t}closestPointXY(t,e,i,n){return n<Sr(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(Hf(this.flatCoordinates,0,this.ends_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),$f(this.flatCoordinates,0,this.ends_,this.stride,this.maxDelta_,!0,t,e,i,n))}containsXY(t,e){return wf(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,e)}getArea(){return dp(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),Pf(e,0,this.ends_,this.stride,t)):e=this.flatCoordinates,Yf(e,0,this.ends_,this.stride)}getEnds(){return this.ends_}getFlatInteriorPoint(){if(this.flatInteriorPointRevision_!=this.getRevision()){const t=zr(this.getExtent());this.flatInteriorPoint_=bf(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t,0),this.flatInteriorPointRevision_=this.getRevision()}return this.flatInteriorPoint_}getInteriorPoint(){return new hp(this.getFlatInteriorPoint(),"XYM")}getLinearRingCount(){return this.ends_.length}getLinearRing(t){return t<0||this.ends_.length<=t?null:new pp(this.flatCoordinates.slice(0===t?0:this.ends_[t-1],this.ends_[t]),this.layout)}getLinearRings(){const t=this.layout,e=this.flatCoordinates,i=this.ends_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r],a=new pp(e.slice(s,o),t);n.push(a),s=o}return n}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Mf(t,0,this.ends_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=Pf(this.orientedFlatCoordinates_,0,this.ends_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=Rf(this.flatCoordinates,0,this.ends_,this.stride,Math.sqrt(t),e,0,i),new gp(e,"XY",i)}getType(){return"Polygon"}intersectsExtent(t){return ep(this.getOrientedFlatCoordinates(),0,this.ends_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,2),this.flatCoordinates||(this.flatCoordinates=[]);const i=gf(this.flatCoordinates,0,t,this.stride,this.ends_);this.flatCoordinates.length=0===i.length?0:i[i.length-1],this.changed()}}const mp=gp;function _p(t){if(Jr(t))throw new Error("Cannot create polygon from empty extent");const e=t[0],i=t[1],n=t[2],s=t[3],r=[e,i,e,s,n,s,n,i,e,i];return new gp(r,"XY",[r.length])}class vp extends ff{constructor(t,e,i){if(super(),this.endss_=[],this.flatInteriorPointsRevision_=-1,this.flatInteriorPoints_=null,this.maxDelta_=-1,this.maxDeltaRevision_=-1,this.orientedRevision_=-1,this.orientedFlatCoordinates_=null,!i&&!Array.isArray(t[0])){const n=t,s=[],r=[];for(let t=0,e=n.length;t<e;++t){const e=n[t],i=s.length,o=e.getEnds();for(let t=0,e=o.length;t<e;++t)o[t]+=i;kd(s,e.getFlatCoordinates()),r.push(o)}e=0===n.length?this.getLayout():n[0].getLayout(),t=s,i=r}void 0!==e&&i?(this.setFlatCoordinates(e,t),this.endss_=i):this.setCoordinates(t,e)}appendPolygon(t){let e;if(this.flatCoordinates){const i=this.flatCoordinates.length;kd(this.flatCoordinates,t.getFlatCoordinates()),e=t.getEnds().slice();for(let t=0,n=e.length;t<n;++t)e[t]+=i}else this.flatCoordinates=t.getFlatCoordinates().slice(),e=t.getEnds().slice(),this.endss_.push();this.endss_.push(e),this.changed()}clone(){const t=this.endss_.length,e=new Array(t);for(let i=0;i<t;++i)e[i]=this.endss_[i].slice();const i=new vp(this.flatCoordinates.slice(),this.layout,e);return i.applyProperties(this),i}closestPointXY(t,e,i,n){return n<Sr(this.getExtent(),t,e)?n:(this.maxDeltaRevision_!=this.getRevision()&&(this.maxDelta_=Math.sqrt(function(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];s=Hf(t,e,o,n,s),e=o[o.length-1]}return s}(this.flatCoordinates,0,this.endss_,this.stride,0)),this.maxDeltaRevision_=this.getRevision()),function(t,e,i,n,s,r,o,a,h,l,c){c=c||[NaN,NaN];for(let r=0,u=i.length;r<u;++r){const u=i[r];l=$f(t,e,u,n,s,true,o,a,h,l,c),e=u[u.length-1]}return l}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,this.maxDelta_,0,t,e,i,n))}containsXY(t,e){return function(t,e,i,n,s,r){if(0===i.length)return!1;for(let o=0,a=i.length;o<a;++o){const a=i[o];if(wf(t,e,a,n,s,r))return!0;e=a[a.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t,e)}getArea(){return function(t,e,i,n){let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r];s+=dp(t,e,o,n),e=o[o.length-1]}return s}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride)}getCoordinates(t){let e;return void 0!==t?(e=this.getOrientedFlatCoordinates().slice(),kf(e,0,this.endss_,this.stride,t)):e=this.flatCoordinates,Zf(e,0,this.endss_,this.stride)}getEndss(){return this.endss_}getFlatInteriorPoints(){if(this.flatInteriorPointsRevision_!=this.getRevision()){const t=_f(this.flatCoordinates,0,this.endss_,this.stride);this.flatInteriorPoints_=xf(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t),this.flatInteriorPointsRevision_=this.getRevision()}return this.flatInteriorPoints_}getInteriorPoints(){return new cp(this.getFlatInteriorPoints().slice(),"XYM")}getOrientedFlatCoordinates(){if(this.orientedRevision_!=this.getRevision()){const t=this.flatCoordinates;Lf(t,0,this.endss_,this.stride)?this.orientedFlatCoordinates_=t:(this.orientedFlatCoordinates_=t.slice(),this.orientedFlatCoordinates_.length=kf(this.orientedFlatCoordinates_,0,this.endss_,this.stride)),this.orientedRevision_=this.getRevision()}return this.orientedFlatCoordinates_}getSimplifiedGeometryInternal(t){const e=[],i=[];return e.length=function(t,e,i,n,s,r,o,a){for(let h=0,l=i.length;h<l;++h){const l=i[h],c=[];o=Rf(t,e,l,n,s,r,o,c),a.push(c),e=l[l.length-1]}return o}(this.flatCoordinates,0,this.endss_,this.stride,Math.sqrt(t),e,0,i),new vp(e,"XY",i)}getPolygon(t){if(t<0||this.endss_.length<=t)return null;let e;if(0===t)e=0;else{const i=this.endss_[t-1];e=i[i.length-1]}const i=this.endss_[t].slice(),n=i[i.length-1];if(0!==e)for(let t=0,n=i.length;t<n;++t)i[t]-=e;return new mp(this.flatCoordinates.slice(e,n),this.layout,i)}getPolygons(){const t=this.layout,e=this.flatCoordinates,i=this.endss_,n=[];let s=0;for(let r=0,o=i.length;r<o;++r){const o=i[r].slice(),a=o[o.length-1];if(0!==s)for(let t=0,e=o.length;t<e;++t)o[t]-=s;const h=new mp(e.slice(s,a),t,o);n.push(h),s=a}return n}getType(){return"MultiPolygon"}intersectsExtent(t){return function(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r];if(ep(t,e,o,n,s))return!0;e=o[o.length-1]}return!1}(this.getOrientedFlatCoordinates(),0,this.endss_,this.stride,t)}setCoordinates(t,e){this.setLayout(e,t,3),this.flatCoordinates||(this.flatCoordinates=[]);const i=mf(this.flatCoordinates,0,t,this.stride,this.endss_);if(0===i.length)this.flatCoordinates.length=0;else{const t=i[i.length-1];this.flatCoordinates.length=0===t.length?0:t[t.length-1]}this.changed()}}const yp=vp,wp=class{constructor(){this.dataProjection=void 0,this.defaultFeatureProjection=void 0,this.featureClass=Bf,this.supportedMediaTypes=null}getReadOptions(t,e){if(e){let i=e.dataProjection?fa(e.dataProjection):this.readProjection(t);e.extent&&i&&"tile-pixels"===i.getUnits()&&(i=fa(i),i.setWorldExtent(e.extent)),e={dataProjection:i,featureProjection:e.featureProjection}}return this.adaptOptions(e)}adaptOptions(t){return Object.assign({dataProjection:this.dataProjection,featureProjection:this.defaultFeatureProjection,featureClass:this.featureClass},t)}getType(){return cd()}readFeature(t,e){return cd()}readFeatures(t,e){return cd()}readGeometry(t,e){return cd()}readProjection(t){return cd()}writeFeature(t,e){return cd()}writeFeatures(t,e){return cd()}writeGeometry(t,e){return cd()}};function bp(t,e,i){const n=i?fa(i.featureProjection):null,s=i?fa(i.dataProjection):null;let r=t;if(n&&s&&!ya(n,s)){e&&(r=t.clone());const i=e?n:s,o=e?s:n;"tile-pixels"===i.getUnits()?r.transform(i,o):r.applyTransform(xa(i,o))}if(e&&i&&void 0!==i.decimals){const e=Math.pow(10,i.decimals),n=function(t){for(let i=0,n=t.length;i<n;++i)t[i]=Math.round(t[i]*e)/e;return t};r===t&&(r=t.clone()),r.applyTransform(n)}return r}const xp={Point:hp,LineString:sp,Polygon:mp,MultiPoint:cp,MultiLineString:op,MultiPolygon:yp};function Sp(t,e){const i=t.geometry;if(!i)return[];if(Array.isArray(i))return i.map(e=>Sp({...t,geometry:e})).flat();
2const n="MultiPolygon"===i.type?"Polygon":i.type;if("GeometryCollection"===n||"Circle"===n)throw new Error("Unsupported geometry type: "+n);const s=i.layout.length;return bp(new jf(n,"Polygon"===n?function(t,e,i){return Array.isArray(e[0])?(Lf(t,0,e,i)||kf(t=t.slice(),0,e,i),t):(Mf(t,0,e,i)||Pf(t=t.slice(),0,e,i),t)}(i.flatCoordinates,i.ends,s):i.flatCoordinates,i.ends?.flat(),s,t.properties||{},t.id).enableSimplifyTransformed(),!1,e)}function Ep(t,e){if(!t)return null;if(Array.isArray(t)){const i=t.map(t=>Ep(t,e));return new Uf(i)}return bp(new(0,xp[t.type])(t.flatCoordinates,t.layout||"XY",t.ends),!1,e)}function Ap(t){if("string"==typeof t){return JSON.parse(t)||null}return null!==t?t:null}const Cp=class extends wp{constructor(){super()}getType(){return"json"}readFeature(t,e){return this.readFeatureFromObject(Ap(t),this.getReadOptions(t,e))}readFeatures(t,e){return this.readFeaturesFromObject(Ap(t),this.getReadOptions(t,e))}readFeatureFromObject(t,e){return cd()}readFeaturesFromObject(t,e){return cd()}readGeometry(t,e){return this.readGeometryFromObject(Ap(t),this.getReadOptions(t,e))}readGeometryFromObject(t,e){return cd()}readProjection(t){return this.readProjectionFromObject(Ap(t))}readProjectionFromObject(t){return cd()}writeFeature(t,e){return JSON.stringify(this.writeFeatureObject(t,e))}writeFeatureObject(t,e){return cd()}writeFeatures(t,e){return JSON.stringify(this.writeFeaturesObject(t,e))}writeFeaturesObject(t,e){return cd()}writeGeometry(t,e){return JSON.stringify(this.writeGeometryObject(t,e))}writeGeometryObject(t,e){return cd()}};function Mp(t,e){if(!t)return null;let i;switch(t.type){case"Point":i=function(t){const e=t.coordinates;return{type:"Point",flatCoordinates:e,layout:uf(e.length)}}(t);break;case"LineString":i=function(t){const e=t.coordinates,i=e.flat();return{type:"LineString",flatCoordinates:i,ends:[i.length],layout:uf(e[0]?.length||2)}}(t);break;case"Polygon":i=function(t){const e=t.coordinates,i=[],n=e[0]?.[0]?.length;return{type:"Polygon",flatCoordinates:i,ends:gf(i,0,e,n),layout:uf(n)}}(t);break;case"MultiPoint":i=function(t){const e=t.coordinates;return{type:"MultiPoint",flatCoordinates:e.flat(),layout:uf(e[0]?.length||2)}}(t);break;case"MultiLineString":i=function(t){const e=t.coordinates,i=e[0]?.[0]?.length||2,n=[];return{type:"MultiLineString",flatCoordinates:n,ends:gf(n,0,e,i),layout:uf(i)}}(t);break;case"MultiPolygon":i=function(t){const e=t.coordinates,i=[],n=e[0]?.[0]?.[0].length||2;return{type:"MultiPolygon",flatCoordinates:i,ends:mf(i,0,e,n),layout:uf(n)}}(t);break;case"GeometryCollection":i=function(t){const e=t.geometries.map(function(t){return Mp(t)});return e}(t);break;default:throw new Error("Unsupported GeoJSON type: "+t.type)}return i}function Lp(t,e){const i=(t=bp(t,!0,e)).getType();let n;switch(i){case"Point":n=function(t){return{type:"Point",coordinates:t.getCoordinates()}}(t);break;case"LineString":n=function(t){return{type:"LineString",coordinates:t.getCoordinates()}}(t);break;case"Polygon":n=function(t,e){let i;return e&&(i=e.rightHanded),{type:"Polygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"MultiPoint":n=function(t){return{type:"MultiPoint",coordinates:t.getCoordinates()}}(t);break;case"MultiLineString":n=function(t){return{type:"MultiLineString",coordinates:t.getCoordinates()}}(t);break;case"MultiPolygon":n=function(t,e){let i;return e&&(i=e.rightHanded),{type:"MultiPolygon",coordinates:t.getCoordinates(i)}}(t,e);break;case"GeometryCollection":n=function(t,e){delete(e=Object.assign({},e)).featureProjection;return{type:"GeometryCollection",geometries:t.getGeometriesArray().map(function(t){return Lp(t,e)})}}(t,e);break;case"Circle":n={type:"GeometryCollection",geometries:[]};break;default:throw new Error("Unsupported geometry type: "+i)}return n}const Pp=class extends Cp{constructor(t){t=t||{},super(),this.dataProjection=fa(t.dataProjection?t.dataProjection:"EPSG:4326"),t.featureProjection&&(this.defaultFeatureProjection=fa(t.featureProjection)),t.featureClass&&(this.featureClass=t.featureClass),this.geometryName_=t.geometryName,this.extractGeometryName_=t.extractGeometryName,this.supportedMediaTypes=["application/geo+json","application/vnd.geo+json"]}readFeatureFromObject(t,e){let i=null;i="Feature"===t.type?t:{type:"Feature",geometry:t,properties:null};const n=Mp(i.geometry);if(this.featureClass===jf)return Sp({geometry:n,id:i.id,properties:i.properties},e);const s=new(0,this.featureClass);return this.geometryName_?s.setGeometryName(this.geometryName_):this.extractGeometryName_&&i.geometry_name&&s.setGeometryName(i.geometry_name),s.setGeometry(Ep(n,e)),"id"in i&&s.setId(i.id
vendor: 18,799 bytes, line 2
2),i.properties&&s.setProperties(i.properties,!0),s}readFeaturesFromObject(t,e){let i=null;if("FeatureCollection"===t.type){i=[];const n=t.features;for(let t=0,s=n.length;t<s;++t){const s=this.readFeatureFromObject(n[t],e);s&&i.push(s)}}else i=[this.readFeatureFromObject(t,e)];return i.flat()}readGeometryFromObject(t,e){return function(t,e){return Ep(Mp(t),e)}(t,e)}readProjectionFromObject(t){const e=t.crs;let i;if(e)if("name"==e.type)i=fa(e.properties.name);else{if("EPSG"!==e.type)throw new Error("Unknown SRS type");i=fa("EPSG:"+e.properties.code)}else i=this.dataProjection;return i}writeFeatureObject(t,e){e=this.adaptOptions(e);const i={type:"Feature",geometry:null,properties:null},n=t.getId();if(void 0!==n&&(i.id=n),!t.hasProperties())return i;const s=t.getProperties(),r=t.getGeometry();return r&&(i.geometry=Lp(r,e),delete s[t.getGeometryName()]),pd(s)||(i.properties=s),i}writeFeaturesObject(t,e){e=this.adaptOptions(e);const i=[];for(let n=0,s=t.length;n<s;++n)i.push(this.writeFeatureObject(t[n],e));return{type:"FeatureCollection",features:i}}writeGeometryObject(t,e){return Lp(t,this.adaptOptions(e))}},kp="add",Np="remove",Ip="length";class Tp extends Fd{constructor(t,e,i){super(t),this.element=e,this.index=i}}const Op=class extends Yd{constructor(t,e){if(super(),this.on,this.once,this.un,e=e||{},this.unique_=!!e.unique,this.array_=t??[],this.unique_)for(let t=1,e=this.array_.length;t<e;++t)this.assertUnique_(this.array_[t],t);this.updateLength_()}clear(){for(;this.getLength()>0;)this.pop()}extend(t){for(let e=0,i=t.length;e<i;++e)this.push(t[e]);return this}forEach(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)t(e[i],i,e)}getArray(){return this.array_}item(t){return this.array_[t]}getLength(){return this.get(Ip)}insertAt(t,e){if(t<0||t>this.getLength())throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e),this.array_.splice(t,0,e),this.updateLength_(),this.dispatchEvent(new Tp(kp,e,t))}pop(){return this.removeAt(this.getLength()-1)}push(t){const e=this.getLength();return this.insertAt(e,t),this.getLength()}remove(t){const e=this.array_;for(let i=0,n=e.length;i<n;++i)if(e[i]===t)return this.removeAt(i)}removeAt(t){if(t<0||t>=this.getLength())return;const e=this.array_[t];return this.array_.splice(t,1),this.updateLength_(),this.dispatchEvent(new Tp(Np,e,t)),e}setAt(t,e){if(t>=this.getLength())return void this.insertAt(t,e);if(t<0)throw new Error("Index out of bounds: "+t);this.unique_&&this.assertUnique_(e,t);const i=this.array_[t];this.array_[t]=e,this.dispatchEvent(new Tp(Np,i,t)),this.dispatchEvent(new Tp(kp,e,t))}updateLength_(){this.set(Ip,this.array_.length)}assertUnique_(t,e){const i=this.array_;for(let n=0,s=i.length;n<s;++n)if(i[n]===t&&n!==e)throw new Error("Duplicate item added to a unique collection")}},Rp="opacity",Fp="visible",Dp="extent",jp="zIndex",Gp="maxResolution",Bp="minResolution",zp="maxZoom",qp="minZoom",Up="source",Wp=class extends Yd{constructor(t){super(),this.on,this.once,this.un,this.background_=t.background;const e=Object.assign({},t);"object"==typeof t.properties&&(delete e.properties,Object.assign(e,t.properties)),e[Rp]=void 0!==t.opacity?t.opacity:1,Zd("number"==typeof e[Rp],"Layer opacity must be a number"),e[Fp]=void 0===t.visible||t.visible,e[jp]=t.zIndex,e[Gp]=void 0!==t.maxResolution?t.maxResolution:1/0,e[Bp]=void 0!==t.minResolution?t.minResolution:0,e[qp]=void 0!==t.minZoom?t.minZoom:-1/0,e[zp]=void 0!==t.maxZoom?t.maxZoom:1/0,this.className_=void 0!==e.className?e.className:"ol-layer",delete e.className,this.setProperties(e),this.state_=null}getBackground(){return this.background_}getClassName(){return this.className_}getLayerState(t){const e=this.state_||{layer:this,managed:void 0===t||t},i=this.getZIndex();return e.opacity=io(Math.round(100*this.getOpacity())/100,0,1),e.visible=this.getVisible(),e.extent=this.getExtent(),e.zIndex=void 0!==i||e.managed?i:1/0,e.maxResolution=this.getMaxResolution(),e.minResolution=Math.max(this.getMinResolution(),0),e.minZoom=this.getMinZoom(),e.maxZoom=this.getMaxZoom(),this.state_=e,e}getLayersArray(t){return cd()}getLayerStatesArray(t){return cd()}getExtent(){return this.get(Dp)}getMaxResolution(){return this.get(Gp)}getMinResolution(){return this.get(Bp)}getMinZoom(){return this.get(qp)}getMaxZoom(){return this.get(zp)}getOpacity(){return this.get(Rp)}getSourceState(){return cd()}getVisible(){return this.get(Fp)}getZIndex(){return this.get(jp)}setBackground(t){this.background_=t,this.changed()}setExtent(t){this.set(Dp,t)}setMaxResolution(t){this.set(Gp,t)}setMinResolution(t){this.set(Bp,t)}setMaxZoom(t){this.set(zp,t)}setMinZoom(t){this.set(qp,t)}setOpacity(t){Zd("number"==typeof t,"Layer opacity must be a number"),this.set(Rp,t)}setVisible(t){this.set(Fp,t)}setZIndex(t){this.set(jp,t)}disposeInternal(){this.state_&&(this.state_.layer=null,this.state_=null),super.disposeInternal()}},Vp="addlayer",Hp="removelayer";class Kp extends Fd{constructor(t,e){super(t),this.layer=e}}const $p="layers";class Xp extends Wp{constructor(t){t=t||{};const e=Object.assign({},t);delete e.layers;let i=t.layers;super(e),this.on,this.once,this.un,this.layersListenerKeys_=[],this.listenerKeys_={},this.addChangeListener($p,this.handleLayersChanged_),i?Array.isArray(i)?i=new Op(i.slice(),{unique:!0}):Zd("function"==typeof i.getArray,"Expected `layers` to be an array or a `Collection`"):i=new Op(void 0,{unique:!0}),this.setLayers(i)}handleLayerChange_(){this.changed()}handleLayersChanged_(){this.layersListenerKeys_.forEach(_d),this.layersListenerKeys_.length=0;const t=this.getLayers();this.layersListenerKeys_.push(gd(t,kp,this.handleLayersAdd_,this),gd(t,Np,this.handleLayersRemove_,this));for(const t in this.listenerKeys_)this.listenerKeys_[t].forEach(_d);fd(this.listenerKeys_);const e=t.getArray();for(let t=0,i=e.length;t<i;t++){const i=e[t];this.registerLayerListeners_(i),this.dispatchEvent(new Kp(Vp,i))}this.changed()}registerLayerListeners_(t){const e=[gd(t,Hd,this.handleLayerChange_,this),gd(t,vd,this.handleLayerChange_,this)];t instanceof Xp&&e.push(gd(t,Vp,this.handleLayerGroupAdd_,this),gd(t,Hp,this.handleLayerGroupRemove_,this)),this.listenerKeys_[dd(t)]=e}handleLayerGroupAdd_(t){this.dispatchEvent(new Kp(Vp,t.layer))}handleLayerGroupRemove_(t){this.dispatchEvent(new Kp(Hp,t.layer))}handleLayersAdd_(t){const e=t.element;this.registerLayerListeners_(e),this.dispatchEvent(new Kp(Vp,e)),this.changed()}handleLayersRemove_(t){const e=t.element,i=dd(e);this.listenerKeys_[i].forEach(_d),delete this.listenerKeys_[i],this.dispatchEvent(new Kp(Hp,e)),this.changed()}getLayers(){return this.get($p)}setLayers(t){const e=this.getLayers();if(e){const t=e.getArray();for(let e=0,i=t.length;e<i;++e)this.dispatchEvent(new Kp(Hp,t[e]))}this.set($p,t)}getLayersArray(t){return t=void 0!==t?t:[],this.getLayers().forEach(function(e){e.getLayersArray(t)}),t}getLayerStatesArray(t){const e=void 0!==t?t:[],i=e.length;this.getLayers().forEach(function(t){t.getLayerStatesArray(e)});const n=this.getLayerState();let s=n.zIndex;t||void 0!==n.zIndex||(s=0);for(let t=i,r=e.length;t<r;t++){const i=e[t];i.opacity*=n.opacity,i.visible=i.visible&&n.visible,i.maxResolution=Math.min(i.maxResolution,n.maxResolution),i.minResolution=Math.max(i.minResolution,n.minResolution),i.minZoom=Math.max(i.minZoom,n.minZoom),i.maxZoom=Math.min(i.maxZoom,n.maxZoom),void 0!==n.extent&&(void 0!==i.extent?i.extent=Hr(i.extent,n.extent):i.extent=n.extent),void 0===i.zIndex&&(i.zIndex=s)}return e}getSourceState(){return"ready"}}const Yp=Xp;class Zp{constructor(t){t=t||{},this.color_=void 0!==t.color?t.color:null,this.lineCap_=t.lineCap,this.lineDash_=void 0!==t.lineDash?t.lineDash:null,this.lineDashOffset_=t.lineDashOffset,this.lineJoin_=t.lineJoin,this.miterLimit_=t.miterLimit,this.offset_=t.offset,this.width_=t.width}clone(){const t=this.getColor();return new Zp({color:Array.isArray(t)?t.slice():t||void 0,lineCap:this.getLineCap(),lineDash:this.getLineDash()?this.getLineDash().slice():void 0,lineDashOffset:this.getLineDashOffset(),lineJoin:this.getLineJoin(),miterLimit:this.getMiterLimit(),offset:this.getOffset(),width:this.getWidth()})}getColor(){return this.color_}getLineCap(){return this.lineCap_}getLineDash(){return this.lineDash_}getLineDashOffset(){return this.lineDashOffset_}getLineJoin(){return this.lineJoin_}getMiterLimit(){return this.miterLimit_}getOffset(){return this.offset_}getWidth(){return this.width_}setColor(t){this.color_=t}setLineCap(t){this.lineCap_=t}setLineDash(t){this.lineDash_=t}setLineDashOffset(t){this.lineDashOffset_=t}setLineJoin(t){this.lineJoin_=t}setMiterLimit(t){this.miterLimit_=t}setOffset(t){this.offset_=t}setWidth(t){this.width_=t}}const Jp=Zp;function Qp(t){return t?Array.isArray(t)?ld(t):"object"==typeof t&&"src"in t?function(t){if(!t.offset||!t.size)return Gd.getPattern(t.src,t.color);const e=t.src+":"+t.offset,i=Gd.getPattern(e,t.color);if(i)return i;const n=Gd.get(t.src,null);if(2!==n.getImageState())return null;const s=Du(t.size[0],t.size[1]);return s.drawImage(n.getImage(1),t.offset[0],t.offset[1],t.size[0],t.size[1],0,0,t.size[0],t.size[1]),qd(s.canvas,e,void 0,2,t.color,!0),Gd.getPattern(e,t.color)}(t):t:null}function tg(t){return t[0]>0&&t[1]>0}function eg(t,e){return Array.isArray(t)?t:(void 0===e?e=[t,t]:(e[0]=t,e[1]=t),e)}class ig{constructor(t){this.opacity_=t.opacity,this.rotateWithView_=t.rotateWithView,this.rotation_=t.rotation,this.scale_=t.scale,this.scaleArray_=eg(t.scale),this.displacement_=t.displacement,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new ig({opacity:this.getOpacity(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getOpacity(){return this.opacity_}getRotateWithView(){return this.rotateWithView_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getDisplacement(){return this.displacement_}getDeclutterMode(){return this.declutterMode_}getAnchor(){return cd()}getImage(t){return cd()}getHitDetectionImage(){return cd()}getPixelRatio(t){return 1}getImageState(){return cd()}getImageSize(){return cd()}getOrigin(){return cd()}getSize(){return cd()}setDisplacement(t){this.displacement_=t}setOpacity(t){this.opacity_=t}setRotateWithView(t){this.rotateWithView_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=eg(t)}listenImageChange(t){cd()}load(){cd()}unlistenImageChange(t){cd()}ready(){return Promise.resolve()}}const ng=ig;class sg extends ng{constructor(t){super({opacity:1,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,rotation:void 0!==t.rotation?t.rotation:0,scale:void 0!==t.scale?t.scale:1,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode}),this.hitDetectionCanvas_=null,this.fill_=void 0!==t.fill?t.fill:null,this.origin_=[0,0],this.points_=t.points,this.radius=t.radius,this.radius2_=t.radius2,this.angle_=void 0!==t.angle?t.angle:0,this.stroke_=void 0!==t.stroke?t.stroke:null,this.size_,this.renderOptions_,this.imageState_=this.fill_&&this.fill_.loading()?1:2,1===this.imageState_&&this.ready().then(()=>this.imageState_=2),this.render()}clone(){const t=this.getScale(),e=new sg({fill:this.getFill()?this.getFill().clone():void 0,points:this.getPoints(),radius:this.getRadius(),radius2:this.getRadius2(),angle:this.getAngle(),stroke:this.getStroke()?this.getStroke().clone():void 0,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),scale:Array.isArray(t)?t.slice():t,displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}getAnchor(){const t=this.size_,e=this.getDisplacement(),i=this.getScaleArray();return[t[0]/2-e[0]/i[0],t[1]/2+e[1]/i[1]]}getAngle(){return this.angle_}getFill(){return this.fill_}setFill(t){this.fill_=t,this.render()}getHitDetectionImage(){return this.hitDetectionCanvas_||(this.hitDetectionCanvas_=this.createHitDetectionCanvas_(this.renderOptions_)),this.hitDetectionCanvas_}getImage(t){const e=this.fill_?.getKey(),i=`${t},${this.angle_},${this.radius},${this.radius2_},${this.points_},${e}`+Object.values(this.renderOptions_).join(",");let n=Gd.get(i,null)?.getImage(1);if(!n){const e=this.renderOptions_,s=Math.ceil(e.size*t),r=Du(s,s);this.draw_(e,r,t),n=r.canvas;const o=new Ud(n,void 0,null,2,null);Gd.set(i,null,o),createImageBitmap(n).then(t=>{o.setImage(t)})}return n}getPixelRatio(t){return t}getImageSize(){return this.size_}getImageState(){return this.imageState_}getOrigin(){return this.origin_}getPoints(){return this.points_}getRadius(){return this.radius}setRadius(t){this.radius!==t&&(this.radius=t,this.render())}getRadius2(){return this.radius2_}setRadius2(t){this.radius2_!==t&&(this.radius2_=t,this.render())}getSize(){return this.size_}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t,this.render()}listenImageChange(t){}load(){}unlistenImageChange(t){}calculateLineJoinSize_(t,e,i){if(0===e||this.points_===1/0||"bevel"!==t&&"miter"!==t)return e;let n=this.radius,s=void 0===this.radius2_?n:this.radius2_;if(n<s){const t=n;n=s,s=t}const r=void 0===this.radius2_?this.points_:2*this.points_,o=2*Math.PI/r,a=s*Math.sin(o),h=n-Math.sqrt(s*s-a*a),l=Math.sqrt(a*a+h*h),c=l/a;if("miter"===t&&c<=i)return c*e;const u=e/2/c,d=e/2*(h/l),f=Math.sqrt((n+u)*(n+u)+d*d)-n;if(void 0===this.radius2_||"bevel"===t)return 2*f;const p=n*Math.sin(o),g=s-Math.sqrt(n*n-p*p),m=Math.sqrt(p*p+g*g)/p;if(m<=i){const t=m*e/2-s-n;return 2*Math.max(f,t)}return 2*f}createRenderOptions(){let t,e="round",i="round",n=0,s=null,r=0,o=0;this.stroke_&&(t=Qp(this.stroke_.getColor()??"#000"),o=this.stroke_.getWidth()??1,s=this.stroke_.getLineDash(),r=this.stroke_.getLineDashOffset()??0,i=this.stroke_.getLineJoin()??"round",e=this.stroke_.getLineCap()??"round",n=this.stroke_.getMiterLimit()??10);const a=this.calculateLineJoinSize_(i,o,n),h=Math.max(this.radius,this.radius2_||0);return{strokeStyle:t,strokeWidth:o,size:Math.ceil(2*h+a),lineCap:e,lineDash:s,lineDashOffset:r,lineJoin:i,miterLimit:n}}render(){this.renderOptions_=this.createRenderOptions();const t=this.renderOptions_.size;this.hitDetectionCanvas_=null,this.size_=[t,t]}draw_(t,e,i){if(e.scale(i,i),e.translate(t.size/2,t.size/2),this.createPath_(e),this.fill_){let t=this.fill_.getColor();null===t&&(t="#000"),e.fillStyle=Qp(t),e.fill()}t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}createHitDetectionCanvas_(t){let e;if(this.fill_){let i=this.fill_.getColor(),n=0;"string"==typeof i&&(i=hd(i)),null===i?n=1:Array.isArray(i)&&(n=4===i.length?i[3]:1),0===n&&(e=Du(t.size,t.size),this.drawHitDetectionCanvas_(t,e))}return e?e.canvas:this.getImage(1)}createPath_(t){let e=this.points_;const i=this.radius;if(e===1/0)t.arc(0,0,i,0,2*Math.PI);else{const n=void 0===this.radius2_?i:this.radius2_;void 0!==this.radius2_&&(e*=2);const s=this.angle_-Math.PI/2,r=2*Math.PI/e;for(let o=0;o<e;o++){const e=s+o*r,a=o%2==0?i:n;t.lineTo(a*Math.cos(e),a*Math.sin(e))}t.closePath()}}drawHitDetectionCanvas_(t,e){e.translate(t.size/2,t.size/2),this.createPath_(e),e.fillStyle="#000",e.fill(),t.strokeStyle&&(e.strokeStyle=t.strokeStyle,e.lineWidth=t.strokeWidth,t.lineDash&&(e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset),e.lineJoin=t.lineJoin,e.miterLimit=t.miterLimit,e.stroke())}ready(){return this.fill_?this.fill_.ready():Promise.resolve()}}const rg=sg;class og extends rg{constructor(t){super({points:1/0,fill:(t=t||{radius:5}).fill,radius:t.radius,stroke:t.stroke,scale:void 0!==t.scale?t.scale:1,rotation:void 0!==t.rotation?t.rotation:0,rotateWithView:void 0!==t.rotateWithView&&t.rotateWithView,displacement:void 0!==t.displacement?t.displacement:[0,0],declutterMode:t.declutterMode})}clone(){const t=this.getScale(),e=new og({fill:this.getFill()?this.getFill().clone():void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,radius:this.getRadius(),scale:Array.isArray(t)?t.slice():t,rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()});return e.setOpacity(this.getOpacity()),e}}const ag=og;class hg{constructor(t){t=t||{},this.geometry_=null,this.geometryFunction_=ug,void 0!==t.geometry&&this.setGeometry(t.geometry),this.fill_=void 0!==t.fill?t.fill:null,this.image_=void 0!==t.image?t.image:null,this.renderer_=void 0!==t.renderer?t.renderer:null,this.hitDetectionRenderer_=void 0!==t.hitDetectionRenderer?t.hitDetectionRenderer:null,this.stroke_=void 0!==t.stroke?t.stroke:null,this.text_=void 0!==t.text?t.text:null,this.zIndex_=t.zIndex}clone(){let t=this.getGeometry();return t&&"object"==typeof t&&(t=t.clone()),new hg({geometry:t??void 0,fill:this.getFill()?this.getFill().clone():void 0,image:this.getImage()?this.getImage().clone():void 0,renderer:this.getRenderer()??void 0,stroke:this.getStroke()?this.getStroke().clone():void 0,text:this.getText()?this.getText().clone():void 0,zIndex:this.getZIndex()})}getRenderer(){return this.renderer_}setRenderer(t){this.renderer_=t}setHitDetectionRenderer(t){this.hitDetectionRenderer_=t}getHitDetectionRenderer(){return this.hitDetectionRenderer_}getGeometry(){return this.geometry_}getGeometryFunction(){return this.geometryFunction_}getFill(){return this.fill_}setFill(t){this.fill_=t}getImage(){return this.image_}setImage(t){this.image_=t}getStroke(){return this.stroke_}setStroke(t){this.stroke_=t}getText(){return this.text_}setText(t){this.text_=t}getZIndex(){return this.zIndex_}setGeometry(t){"function"==typeof t?this.geometryFunction_=t:"string"==typeof t?this.geometryFunction_=function(e){return e.get(t)}:t?void 0!==t&&(this.geometryFunction_=function(){return t}):this.geometryFunction_=ug,this.geometry_=t}setZIndex(t){this.zIndex_=t}}let lg=null;function cg(t,e){if(!lg){const t=new Vd({color:"rgba(255,255,255,0.4)"}),e=new Jp({color:"#3399CC",width:1.25});lg=[new hg({image:new ag({fill:t,stroke:e,radius:5}),fill:t,stroke:e})]}return lg}function ug(t){return t.getGeometry()}const dg=hg;class fg{constructor(t,e,i,n){this.minX=t,this.maxX=e,this.minY=i,this.maxY=n}contains(t){return this.containsXY(t[1],t[2])}containsTileRange(t){return this.minX<=t.minX&&t.maxX<=this.maxX&&this.minY<=t.minY&&t.maxY<=this.maxY}containsXY(t,e){return this.minX<=t&&t<=this.maxX&&this.minY<=e&&e<=this.maxY}equals(t){return this.minX==t.minX&&this.minY==t.minY&&this.maxX==t.maxX&&this.maxY==t.maxY}extend(t){t.minX<this.minX&&(this.minX=t.minX),t.maxX>this.maxX&&(this.maxX=t.maxX),t.minY<this.minY&&(this.minY=t.minY),t.maxY>this.maxY&&(this.maxY=t.maxY)}
2getHeight(){return this.maxY-this.minY+1}getSize(){return[this.getWidth(),this.getHeight()]}getWidth(){return this.maxX-this.minX+1}intersects(t){return this.minX<=t.maxX&&this.maxX>=t.minX&&this.minY<=t.maxY&&this.maxY>=t.minY}}function pg(t,e,i,n,s){return void 0!==s?(s.minX=t,s.maxX=e,s.minY=i,s.maxY=n,s):new fg(t,e,i,n)}const gg=fg;function mg(t,e,i,n){return void 0!==n?(n[0]=t,n[1]=e,n[2]=i,n):[t,e,i]}function _g(t,e,i,n,s){return`${dd(t)},${e},${function(t,e,i){return t+"/"+e+"/"+i}(i,n,s)}`}const vg=[0,0,0],yg=class{constructor(t){let e=t.minZoom;const i=t.resolutions;let n;if(void 0===e&&i&&(e=i.findIndex(t=>void 0!==t)),this.minZoom=void 0!==e?e:0,this.resolutions_=i,Zd(function(t){const e=((t,e)=>e-t)||Cd;return t.every(function(i,n){if(0===n)return!0;const s=e(t[n-1],i);return!(s>0||0===s)})}(this.resolutions_),"`resolutions` must be sorted in descending order"),!t.origins)for(let t=0,e=this.resolutions_.length-1;t<e;++t)if(n){if(this.resolutions_[t]/this.resolutions_[t+1]!==n){n=void 0;break}}else n=this.resolutions_[t]/this.resolutions_[t+1];this.zoomFactor_=n,this.maxZoom=this.resolutions_.length-1,this.origin_=void 0!==t.origin?t.origin:null,this.origins_=null,void 0!==t.origins&&(this.origins_=t.origins,Zd(this.origins_.length==this.resolutions_.length,"Number of `origins` and `resolutions` must be equal"));const s=t.extent;void 0===s||this.origin_||this.origins_||(this.origin_=$r(s)),Zd(!this.origin_&&this.origins_||this.origin_&&!this.origins_,"Either `origin` or `origins` must be configured, never both"),this.tileSizes_=null,void 0!==t.tileSizes&&(this.tileSizes_=t.tileSizes,Zd(this.tileSizes_.length==this.resolutions_.length,"Number of `tileSizes` and `resolutions` must be equal")),this.tileSize_=void 0!==t.tileSize?t.tileSize:this.tileSizes_?null:256,Zd(!this.tileSize_&&this.tileSizes_||this.tileSize_&&!this.tileSizes_,"Either `tileSize` or `tileSizes` must be configured, never both"),this.extent_=void 0!==s?s:null,this.fullTileRanges_=null,this.tmpSize_=[0,0],this.tmpExtent_=[0,0,0,0],void 0!==t.tileRanges?this.fullTileRanges_=t.tileRanges:void 0!==t.sizes?this.fullTileRanges_=t.sizes.map((t,e)=>{const i=new gg(Math.min(0,t[0]),Math.max(t[0]-1,-1),Math.min(0,t[1]),Math.max(t[1]-1,-1));if(s){const t=this.getTileRangeForExtentAndZ(s,e);i.minX=Math.max(t.minX,i.minX),i.maxX=Math.min(t.maxX,i.maxX),i.minY=Math.max(t.minY,i.minY),i.maxY=Math.min(t.maxY,i.maxY)}return i}):s&&this.calculateTileRanges_(s)}forEachTileCoord(t,e,i){const n=this.getTileRangeForExtentAndZ(t,e);for(let t=n.minX,s=n.maxX;t<=s;++t)for(let s=n.minY,r=n.maxY;s<=r;++s)i([e,t,s])}forEachTileCoordParentTileRange(t,e,i,n){let s,r,o,a=null,h=t[0]-1;for(2===this.zoomFactor_?(r=t[1],o=t[2]):a=this.getTileCoordExtent(t,n);h>=this.minZoom;){if(void 0!==r&&void 0!==o?(r=Math.floor(r/2),o=Math.floor(o/2),s=pg(r,r,o,o,i)):s=this.getTileRangeForExtentAndZ(a,h,i),e(h,s))return!0;--h}return!1}getExtent(){return this.extent_}getMaxZoom(){return this.maxZoom}getMinZoom(){return this.minZoom}getOrigin(t){return this.origin_?this.origin_:this.origins_[t]}getOrigins(){return this.origins_}getResolution(t){return this.resolutions_[t]}getResolutions(){return this.resolutions_}getTileCoordChildTileRange(t,e,i){if(t[0]<this.maxZoom){if(2===this.zoomFactor_){const i=2*t[1],n=2*t[2];return pg(i,i+1,n,n+1,e)}const n=this.getTileCoordExtent(t,i||this.tmpExtent_);return this.getTileRangeForExtentAndZ(n,t[0]+1,e)}return null}getTileRangeForTileCoordAndZ(t,e,i){if(e>this.maxZoom||e<this.minZoom)return null;const n=t[0],s=t[1],r=t[2];if(e===n)return pg(s,r,s,r,i);if(this.zoomFactor_){const t=Math.pow(this.zoomFactor_,e-n),o=Math.floor(s*t),a=Math.floor(r*t);return e<n?pg(o,o,a,a,i):pg(o,Math.floor(t*(s+1))-1,a,Math.floor(t*(r+1))-1,i)}const o=this.getTileCoordExtent(t,this.tmpExtent_);return this.getTileRangeForExtentAndZ(o,e,i)}getTileRangeForExtentAndZ(t,e,i){this.getTileCoordForXYAndZ_(t[0],t[3],e,!1,vg);const n=vg[1],s=vg[2];return this.getTileCoordForXYAndZ_(t[2],t[1],e,!0,vg),pg(n,vg[1],s,vg[2],i)}getTileCoordCenter(t){const e=this.getOrigin(t[0]),i=this.getResolution(t[0]),n=eg(this.getTileSize(t[0]),this.tmpSize_);return[e[0]+(t[1]+.5)*n[0]*i,e[1]-(t[2]+.5)*n[1]*i]}getTileCoordExtent(t,e){const i=this.getOrigin(t[0]),n=this.getResolution(t[0]),s=eg(this.getTileSize(t[0]),this.tmpSize_),r=i[0]+t[1]*s[0]*n,o=i[1]-(t[2]+1)*s[1]*n;return Lr(r,o,r+s[0]*n,o+s[1]*n,e)}
2getTileCoordForCoordAndResolution(t,e,i){return this.getTileCoordForXYAndResolution_(t[0],t[1],e,!1,i)}getTileCoordForXYAndResolution_(t,e,i,n,s){const r=this.getZForResolution(i),o=i/this.getResolution(r),a=this.getOrigin(r),h=eg(this.getTileSize(r),this.tmpSize_);let l=o*(t-a[0])/i/h[0],c=o*(a[1]-e)/i/h[1];return n?(l=uo(l,5)-1,c=uo(c,5)-1):(l=co(l,5),c=co(c,5)),mg(r,l,c,s)}getTileCoordForXYAndZ_(t,e,i,n,s){const r=this.getOrigin(i),o=this.getResolution(i),a=eg(this.getTileSize(i),this.tmpSize_);let h=(t-r[0])/o/a[0],l=(r[1]-e)/o/a[1];return n?(h=uo(h,5)-1,l=uo(l,5)-1):(h=co(h,5),l=co(l,5)),mg(i,h,l,s)}getTileCoordForCoordAndZ(t,e,i){return this.getTileCoordForXYAndZ_(t[0],t[1],e,!1,i)}getTileCoordResolution(t){return this.resolutions_[t[0]]}getTileSize(t){return this.tileSize_?this.tileSize_:this.tileSizes_[t]}getFullTileRange(t){return this.fullTileRanges_?this.fullTileRanges_[t]:this.extent_?this.getTileRangeForExtentAndZ(this.extent_,t):null}getZForResolution(t,e){return io(Ld(this.resolutions_,t,e||0),this.minZoom,this.maxZoom)}tileCoordIntersectsViewport(t,e){return tp(e,0,e.length,2,this.getTileCoordExtent(t))}calculateTileRanges_(t){const e=this.resolutions_.length,i=new Array(e);for(let n=this.minZoom;n<e;++n)i[n]=this.getTileRangeForExtentAndZ(t,n);this.fullTileRanges_=i}};const wg=class extends yg{constructor(t){super({extent:t.extent,origin:t.origin,origins:t.origins,resolutions:t.resolutions,tileSize:t.tileSize,tileSizes:t.tileSizes,sizes:t.sizes,tileRanges:t.tileRanges,minZoom:t.minZoom}),this.matrixIds_=t.matrixIds}getMatrixId(t){return this.matrixIds_[t]}getMatrixIds(){return this.matrixIds_}};function bg(t){return Math.pow(t,3)}function xg(t){return 1-bg(1-t)}function Sg(t){return 3*t*t-2*t*t*t}function Eg(t){return t}const Ag=class extends Dd{constructor(t,e,i){super(),i=i||{},this.tileCoord=t,this.state=e,this.key="",this.transition_=void 0===i.transition?250:i.transition,this.transitionStarts_={},this.interpolate=!!i.interpolate}changed(){this.dispatchEvent(vd)}release(){this.setState(4)}getKey(){return this.key+"/"+this.tileCoord}getTileCoord(){return this.tileCoord}getState(){return this.state}setState(t){if(4!==this.state){if(3!==this.state&&this.state>t)throw new Error("Tile load sequence violation");this.state=t,this.changed()}}load(){cd()}getAlpha(t,e){if(!this.transition_)return 1;let i=this.transitionStarts_[t];if(i){if(-1===i)return 1}else i=e,this.transitionStarts_[t]=i;const n=e-i+1e3/60;return n>=this.transition_?1:bg(n/this.transition_)}inTransition(t){return!!this.transition_&&-1!==this.transitionStarts_[t]}endTransition(t){this.transition_&&(this.transitionStarts_[t]=-1)}disposeInternal(){this.release(),super.disposeInternal()}};function Cg(t){return t instanceof Image||t instanceof HTMLCanvasElement||t instanceof HTMLVideoElement||t instanceof ImageBitmap?t:null}const Mg=new Error("disposed"),Lg=[256,256],Pg=class extends Ag{constructor(t){super(t.tileCoord,0,{transition:t.transition,interpolate:t.interpolate}),this.loader_=t.loader,this.data_=null,this.error_=null,this.size_=t.size||null,this.controller_=t.controller||null}getSize(){if(this.size_)return this.size_;const t=Cg(this.data_);return t?[t.width,t.height]:Lg}getData(){return this.data_}getError(){return this.error_}load(){if(0!==this.state&&3!==this.state)return;this.state=1,this.changed();const t=this;this.loader_().then(function(e){t.data_=e,t.state=2,t.changed()}).catch(function(e){t.error_=e,t.state=3,t.changed()})}disposeInternal(){this.controller_&&(this.controller_.abort(Mg),this.controller_=null),super.disposeInternal()}},kg=class extends Ag{constructor(t,e,i,n,s,r){super(t,e,r),this.crossOrigin_=n?.crossOrigin,this.referrerPolicy_=n?.referrerPolicy,this.src_=i,this.key=i,this.image_,Ou?this.image_=new OffscreenCanvas(1,1):(this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)),this.unlisten_=null,this.tileLoadFunction_=s}getImage(){return this.image_}setImage(t){this.image_=t,this.state=2,this.unlistenImage_(),this.changed()}getCrossOrigin(){return this.crossOrigin_}getReferrerPolicy(){return this.referrerPolicy_}handleImageError_(){this.state=3,this.unlistenImage_(),this.image_=function(){const t=Du(1,1);return t.fillStyle="rgba(0,0,0,0)",t.fillRect(0,0,1,1),t.canvas}(),this.changed()}handleImageLoad_(){if(Ou)this.state=2;else{const t=this.image_;
2t.naturalWidth&&t.naturalHeight?this.state=2:this.state=4}this.unlistenImage_(),this.changed()}load(){3==this.state&&(this.state=0,this.image_=new Image,null!==this.crossOrigin_&&(this.image_.crossOrigin=this.crossOrigin_),void 0!==this.referrerPolicy_&&(this.image_.referrerPolicy=this.referrerPolicy_)),0==this.state&&(this.state=1,this.changed(),this.tileLoadFunction_(this,this.src_),this.unlisten_=function(t,e,i){const n=t;let s=!0,r=!1,o=!1;const a=[md(n,"load",function(){o=!0,r||e()})];return n.src&&Ru?(r=!0,n.decode().then(function(){s&&e()}).catch(function(t){s&&(o?e():i())})):a.push(md(n,"error",i)),function(){s=!1,a.forEach(_d)}}(this.image_,this.handleImageLoad_.bind(this),this.handleImageError_.bind(this)))}unlistenImage_(){this.unlisten_&&(this.unlisten_(),this.unlisten_=null)}disposeInternal(){this.unlistenImage_(),this.image_=null,super.disposeInternal()}};let Ng;const Ig=[];function Tg(t,e,i,n,s){t.beginPath(),t.moveTo(0,0),t.lineTo(e,i),t.lineTo(n,s),t.closePath(),t.save(),t.clip(),t.fillRect(0,0,Math.max(e,n)+1,Math.max(i,s)),t.restore()}function Og(t,e){return Math.abs(t[4*e]-210)>2||Math.abs(t[4*e+3]-191.25)>2}function Rg(t,e,i,n){const s=Sa(i,e,t);let r=pa(e,n,i);const o=e.getMetersPerUnit();void 0!==o&&(r*=o);const a=t.getMetersPerUnit();void 0!==a&&(r/=a);const h=t.getExtent();if(!h||Er(h,s)){const e=pa(t,r,s)/r;isFinite(e)&&e>0&&(r/=e)}return r}const Fg=class{constructor(t,e,i,n,s,r,o){this.sourceProj_=t,this.targetProj_=e;let a={};const h=o?_a(t=>tf(o,Sa(t,this.targetProj_,this.sourceProj_))):xa(this.targetProj_,this.sourceProj_);this.transformInv_=function(t){const e=t[0]+"/"+t[1];return a[e]||(a[e]=h(t)),a[e]},this.maxSourceExtent_=n,this.errorThresholdSquared_=s*s,this.triangles_=[],this.wrapsXInSource_=!1,this.canWrapXInSource_=this.sourceProj_.canWrapX()&&!!n&&!!this.sourceProj_.getExtent()&&Yr(n)>=Yr(this.sourceProj_.getExtent()),this.sourceWorldWidth_=this.sourceProj_.getExtent()?Yr(this.sourceProj_.getExtent()):null,this.targetWorldWidth_=this.targetProj_.getExtent()?Yr(this.targetProj_.getExtent()):null;const l=$r(i),c=Xr(i),u=Br(i),d=Gr(i),f=this.transformInv_(l),p=this.transformInv_(c),g=this.transformInv_(u),m=this.transformInv_(d),_=10+(r?Math.max(0,Math.ceil(Math.log2(jr(i)/(r*r*256*256)))):0);if(this.addQuad_(l,c,u,d,f,p,g,m,_),this.wrapsXInSource_){let t=1/0;this.triangles_.forEach(function(e,i,n){t=Math.min(t,e.source[0][0],e.source[1][0],e.source[2][0])}),this.triangles_.forEach(e=>{if(Math.max(e.source[0][0],e.source[1][0],e.source[2][0])-t>this.sourceWorldWidth_/2){const i=[[e.source[0][0],e.source[0][1]],[e.source[1][0],e.source[1][1]],[e.source[2][0],e.source[2][1]]];i[0][0]-t>this.sourceWorldWidth_/2&&(i[0][0]-=this.sourceWorldWidth_),i[1][0]-t>this.sourceWorldWidth_/2&&(i[1][0]-=this.sourceWorldWidth_),i[2][0]-t>this.sourceWorldWidth_/2&&(i[2][0]-=this.sourceWorldWidth_);const n=Math.min(i[0][0],i[1][0],i[2][0]);Math.max(i[0][0],i[1][0],i[2][0])-n<this.sourceWorldWidth_/2&&(e.source=i)}})}a={}}addTriangle_(t,e,i,n,s,r){this.triangles_.push({source:[n,s,r],target:[t,e,i]})}addQuad_(t,e,i,n,s,r,o,a,h){const l=wr([s,r,o,a]),c=this.sourceWorldWidth_?Yr(l)/this.sourceWorldWidth_:null,u=this.sourceWorldWidth_,d=this.sourceProj_.canWrapX()&&c>.5&&c<1;let f=!1;if(h>0&&(this.targetProj_.isGlobal()&&this.targetWorldWidth_&&(f=Yr(wr([t,e,i,n]))/this.targetWorldWidth_>.25||f),!d&&this.sourceProj_.isGlobal()&&c&&(f=c>.25||f)),!f&&this.maxSourceExtent_&&isFinite(l[0])&&isFinite(l[1])&&isFinite(l[2])&&isFinite(l[3])&&!Zr(l,this.maxSourceExtent_))return;let p=0;if(!(f||isFinite(s[0])&&isFinite(s[1])&&isFinite(r[0])&&isFinite(r[1])&&isFinite(o[0])&&isFinite(o[1])&&isFinite(a[0])&&isFinite(a[1])))if(h>0)f=!0;else if(p=(isFinite(s[0])&&isFinite(s[1])?0:8)+(isFinite(r[0])&&isFinite(r[1])?0:4)+(isFinite(o[0])&&isFinite(o[1])?0:2)+(isFinite(a[0])&&isFinite(a[1])?0:1),1!=p&&2!=p&&4!=p&&8!=p
2)return;if(h>0){if(!f){const e=[(t[0]+i[0])/2,(t[1]+i[1])/2],n=this.transformInv_(e);let r;r=d?(ao(s[0],u)+ao(o[0],u))/2-ao(n[0],u):(s[0]+o[0])/2-n[0];const a=(s[1]+o[1])/2-n[1];f=r*r+a*a>this.errorThresholdSquared_}if(f){if(Math.abs(t[0]-i[0])<=Math.abs(t[1]-i[1])){const l=[(e[0]+i[0])/2,(e[1]+i[1])/2],c=this.transformInv_(l),u=[(n[0]+t[0])/2,(n[1]+t[1])/2],d=this.transformInv_(u);this.addQuad_(t,e,l,u,s,r,c,d,h-1),this.addQuad_(u,l,i,n,d,c,o,a,h-1)}else{const l=[(t[0]+e[0])/2,(t[1]+e[1])/2],c=this.transformInv_(l),u=[(i[0]+n[0])/2,(i[1]+n[1])/2],d=this.transformInv_(u);this.addQuad_(t,l,u,n,s,c,d,a,h-1),this.addQuad_(l,e,i,u,c,r,o,d,h-1)}return}}if(d){if(!this.canWrapXInSource_)return;this.wrapsXInSource_=!0}11&p||this.addTriangle_(t,i,n,s,o,a),14&p||this.addTriangle_(t,i,e,s,o,r),p&&(13&p||this.addTriangle_(e,n,t,r,a,s),7&p||this.addTriangle_(e,n,i,r,a,o))}calculateSourceExtent(){const t=[1/0,1/0,-1/0,-1/0];return this.triangles_.forEach(function(e,i,n){const s=e.source;Or(t,s[0]),Or(t,s[1]),Or(t,s[2])}),t}getTriangles(){return this.triangles_}},Dg=class extends Ag{constructor(t,e,i,n,s,r,o,a,h,l,c,u){super(s,0,u),this.renderEdges_=void 0!==c&&c,this.pixelRatio_=o,this.gutter_=a,this.canvas_=null,this.sourceTileGrid_=e,this.targetTileGrid_=n,this.wrappedTileCoord_=r||s,this.sourceTiles_=[],this.sourcesListenerKeys_=null,this.sourceZ_=0,this.clipExtent_=t.canWrapX()?t.getExtent():void 0;const d=n.getTileCoordExtent(this.wrappedTileCoord_),f=this.targetTileGrid_.getExtent();let p=this.sourceTileGrid_.getExtent();const g=f?Hr(d,f):d;if(0===jr(g))return void(this.state=4);const m=t.getExtent();m&&(p=p?Hr(p,m):m);const _=n.getResolution(this.wrappedTileCoord_[0]),v=function(t,e,i,n){const s=zr(i);let r=Rg(t,e,s,n);return(!isFinite(r)||r<=0)&&Dr(i,function(i){return r=Rg(t,e,i,n),isFinite(r)&&r>0}),r}(t,i,g,_);if(!isFinite(v)||v<=0)return void(this.state=4);const y=void 0!==l?l:.5;if(this.triangulation_=new Fg(t,i,g,p,v*y,_),0===this.triangulation_.getTriangles().length)return void(this.state=4);this.sourceZ_=e.getZForResolution(v);let w=this.triangulation_.calculateSourceExtent();if(p&&(t.canWrapX()?(w[1]=io(w[1],p[1],p[3]),w[3]=io(w[3],p[1],p[3])):w=Hr(w,p)),jr(w)){let i=0,n=0;t.canWrapX()&&(i=Yr(m),n=Math.floor((w[0]-m[0])/i)),to(w.slice(),t,!0).forEac
vendor: 3,805 bytes, line 2
2h(t=>{const s=e.getTileRangeForExtentAndZ(t,this.sourceZ_);for(let t=s.minX;t<=s.maxX;t++)for(let e=s.minY;e<=s.maxY;e++){const s=n*i;this.sourceTiles_.push({getTile:()=>h(this.sourceZ_,t,e,o),offset:s})}++n}),0===this.sourceTiles_.length&&(this.state=4)}else this.state=4}getImage(){return this.canvas_}reproject_(){const t=[];if(this.sourceTiles_.forEach(e=>{const i=e.tile;if(i&&2==i.getState()){const n=this.sourceTileGrid_.getTileCoordExtent(i.tileCoord);n[0]+=e.offset,n[2]+=e.offset;const s=this.clipExtent_?.slice();s&&(s[0]+=e.offset,s[2]+=e.offset),t.push({extent:n,clipExtent:s,image:i.getImage()})}}),this.sourceTiles_.length=0,0===t.length)this.state=3;else{const e=this.wrappedTileCoord_[0],i=this.targetTileGrid_.getTileSize(e),n="number"==typeof i?i:i[0],s="number"==typeof i?i:i[1],r=this.targetTileGrid_.getResolution(e),o=this.sourceTileGrid_.getResolution(this.sourceZ_),a=this.targetTileGrid_.getTileCoordExtent(this.wrappedTileCoord_);this.canvas_=function(t,e,i,n,s,r,o,a,h,l,c,u,d,f){const p=Du(Math.round(i*t),Math.round(i*e),Ig);if(u||(p.imageSmoothingEnabled=!1),0===h.length)return p.canvas;function g(t){return Math.round(t*i)/i}p.scale(i,i),p.globalCompositeOperation="lighter";const m=[1/0,1/0,-1/0,-1/0];let _;h.forEach(function(t,e,i){Tr(m,t.extent)});const v=i/n,y=(u?1:1+Math.pow(2,-24))/v;if(!d||1!==h.length||0!==l){if(_=Du(Math.round(Yr(m)*v),Math.round(Vr(m)*v),Ig),u||(_.imageSmoothingEnabled=!1),s&&f){const t=(s[0]-m[0])*v,e=-(s[3]-m[3])*v,i=Yr(s)*v,n=Vr(s)*v;_.rect(t,e,i,n),_.clip()}h.forEach(function(t,e,i){if(t.image.width>0&&t.image.height>0){if(t.clipExtent){_.save();const e=(t.clipExtent[0]-m[0])*v,i=-(t.clipExtent[3]-m[3])*v,n=Yr(t.clipExtent)*v,s=Vr(t.clipExtent)*v;_.rect(u?e:Math.round(e),u?i:Math.round(i),u?n:Math.round(e+n)-Math.round(e),u?s:Math.round(i+s)-Math.round(i)),_.clip()}const e=(t.extent[0]-m[0])*v,i=-(t.extent[3]-m[3])*v,n=Yr(t.extent)*v,s=Vr(t.extent)*v;_.drawImage(t.image,l,l,t.image.width-2*l,t.image.height-2*l,u?e:Math.round(e),u?i:Math.round(i),u?n:Math.round(e+n)-Math.round(e),u?s:Math.round(i+s)-Math.round(i)),t.clipExtent&&_.restore()}})}const w=$r(o);return a.getTriangles().forEach(function(t,e,i){const n=t.source,s=t.target;let o=n[0][0],a=n[0][1],l=n[1][0],c=n[1][1],d=n[2][0],f=n[2][1];const v=g((s[0][0]-w[0])/r),b=g(-(s[0][1]-w[1])/r),x=g((s[1][0]-w[0])/r),S=g(-(s[1][1]-w[1])/r),E=g((s[2][0]-w[0])/r),A=g(-(s[2][1]-w[1])/r),C=o,M=a;o=0,a=0,l-=C,c-=M,d-=C,f-=M;const L=function(t){const e=t.length;for(let i=0;i<e;i++){let n=i,s=Math.abs(t[i][i]);for(let r=i+1;r<e;r++){const e=Math.abs(t[r][i]);e>s&&(s=e,n=r)}if(0===s)return null;const r=t[n];t[n]=t[i],t[i]=r;for(let n=i+1;n<e;n++){const s=-t[n][i]/t[i][i];for(let r=i;r<e+1;r++)i==r?t[n][r]=0:t[n][r]+=s*t[i][r]}}const i=new Array(e);for(let n=e-1;n>=0;n--){i[n]=t[n][e]/t[n][n];for(let s=n-1;s>=0;s--)t[s][e]-=t[s][n]*i[n]}return i}([[l,c,0,0,x-v],[d,f,0,0,E-v],[0,0,l,c,S-b],[0,0,d,f,A-b]]);if(!L)return;if(p.save(),p.beginPath(),function(){if(void 0===Ng){const t=Du(6,6,Ig);t.globalCompositeOperation="lighter",t.fillStyle="rgba(210, 0, 0, 0.75)",Tg(t,4,5,4,0),Tg(t,4,5,0,5);const e=t.getImageData(0,0,3,3).data;Ng=Og(e,0)||Og(e,4)||Og(e,8),Bu(t),Ig.push(t.canvas)}return Ng}()||!u){p.moveTo(x,S);const t=4,e=v-x,i=b-S;for(let n=0;n<t;n++)p.lineTo(x+g((n+1)*e/t),S+g(n*i/(t-1))),n!=t-1&&p.lineTo(x+g((n+1)*e/t),S+g((n+1)*i/(t-1)));p.lineTo(E,A)}else p.moveTo(x,S),p.lineTo(v,b),p.lineTo(E,A);let P;if(p.clip(),p.transform(L[0],L[2],L[1],L[3],v,b),p.translate(m[0]-C,m[3]-M),_)P=_.canvas,p.scale(y,-y);else{const t=h[0],e=t.extent;P=t.image,p.scale(Yr(e)/P.width,-Vr(e)/P.height)}p.drawImage(P,0,0),p.restore()}),_&&(Bu(_),Ig.push(_.canvas)),c&&(p.save(),p.globalCompositeOperation="source-over",p.strokeStyle="black",p.lineWidth=1,a.getTriangles().forEac
2h(function(t,e,i){const n=t.target,s=(n[0][0]-w[0])/r,o=-(n[0][1]-w[1])/r,a=(n[1][0]-w[0])/r,h=-(n[1][1]-w[1])/r,l=(n[2][0]-w[0])/r,c=-(n[2][1]-w[1])/r;p.beginPath(),p.moveTo(a,h),p.lineTo(s,o),p.lineTo(l,c),p.closePath(),p.stroke()}),p.restore()),p.canvas}(n,s,this.pixelRatio_,o,this.sourceTileGrid_.getExtent(),r,a,this.triangulation_,t,this.gutter_,this.renderEdges_,this.interpolate),this.state=2}this.changed()}load(){for(const t of this.sourceTiles_)t.tile=t.getTile();if(0==this.state){this.state=1,this.changed();let t=0;this.sourcesListenerKeys_=[],this.sourceTiles_.forEach(({tile:e})=>{const i=e.getState();if(0==i||1==i){t++;const i=gd(e,vd,n=>{const s=e.getState();2!=s&&3!=s&&4!=s||(_d(i),t--,0===t&&(this.unlistenSources_(),this.reproject_()))});this.sourcesListenerKeys_.push(i)}}),0===t?setTimeout(this.reproject_.bind(this),0):this.sourceTiles_.forEach(function({tile:t},e,i){0==t.getState()&&t.load()})}}unlistenSources_(){this.sourcesListenerKeys_.forEach(_d),this.sourcesListenerKeys_=null}release(){this.canvas_&&(Bu(this.canvas_.getContext("2d")),Ig.push(this.canvas_),this.canvas_=null),this.sourceTiles_.length=0,super.release()}},jg=class{constructor(t){this.highWaterMark=void 0!==t?t:2048,this.count_=0,this.entries_={},this.oldest_=null,this.newest_=null}deleteOldest(){const t=this.pop();t instanceof Ad&&t.dispose()}canExpireCache(){return this.highWaterMark>0&&this.getCount()>this.highWaterMark}expireCache(t){for(;this.canExpireCache();)this.deleteOldest()}clear(){for(;this.oldest_;)this.deleteOldest()}containsKey(t){return this.entries_.hasOwnProperty(t)}forEach(t){let e=this.oldest_;for(;e;)t(e.value_,e.key_,this),e=e.newer}get(t,e){const i=this.entries_[t];return Zd(void 0!==i,"Tried to get a value for a key that does not exist in the cache"),i===this.newest_||(i===this.oldest_?(this.oldest_=this.oldest_.newer,this.oldest_.older=null):(i.newer.older=i.older,i.older.newer=i.newer),i.newer=null,i.older=this.newest_,this.newest_.newer=i,this.newest_=i),i.value_}remove(t){const e=this.entries_[t];return Zd(void 0!==e,"Tried to get a value for a key that does not exist in the cache"),e===this.newest_?(this.newest_=e.older,this.newest_&&(this.newest_.newer=null)):e===this.oldest_?(this.oldest_=e.newer,this.oldest_&&(this.oldest_.older=null)):(e.newer.older=e.older,e.older.newer=e.newer),delete this.entries_[t],--this.count_,e.value_}getCount(){return this.count_}getKeys(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.key_;return t}getValues(){const t=new Array(this.count_);let e,i=0;for(e=this.newest_;e;e=e.older)t[i++]=e.value_;return t}peekLast(){return this.oldest_.value_}peekLastKey(){return this.oldest_.key_}peekFirstKey(){return this.newest_.key_}peek(t){return this.entries_[t]?.value_}pop(){const t=this.oldest_;return delete this.entries_[t.key_],t.newer&&(t.newer.older=null),this.oldest_=t.newer,this.oldest_||(this.newest_=null),--this.count_,t.value_}replace(t,e){this.get(t),this.entries_[t].value_=e}set(t,e){Zd(!(t in this.entries_),"Tried to set a value for a key that is used already");const i={key_:t,newer:null,older:this.newest_,value_:e};this.newest_?this.newest_.newer=i:this.oldest_=i,this.newest_=i,this.entries_[t]=i,++this.count_}setSize(t){this.highWaterMark=t}},Gg=class extends Fd{constructor(t,e,i,n){super(t),this.inversePixelTransform=e,this.frameState=i,this.context=n}},Bg="prerender",zg="postrender",qg="precompose",Ug="rendercomplete",Wg=class{constructor(){this.instructions_=[],this.zIndex=0,this.offset_=0,this.pendingMethod_,this.context_=new Proxy(Gu(),{get:(t,e)=>{if("function"==typeof t[e])return this.pendingMethod_=e,this.pushMethodArgs_},set:(t,e,i)=>(this.push_(e,i),!0)})}push_(...t){const e=this.instructions_,i=this.zIndex+this.offset_;e[i]||(e[i]=[]),e[i].push(...t)}pushMethodArgs_=(...t)=>{this.push_(this.pendingMethod_,t)};pushFunction(t){this.push_(t)}getContext(){return this.context_}draw(t){this.instructions_.forEach(e=>{for(let i=0,n=e.length;i<n;++i){const n=e[i];if("function"==typeof n){n(t);continue}const s=e[++i];"function"==typeof t[n]?t[n](...s):t[n]="function"==typeof s?s(t):s}})}clear(){this.instructions_.length=0,this.zIndex=0,this.offset_=0}offset(){this.offset_=this.instructions_.length,this.zIndex=0}},Vg=class extends $d{constructor(t){super(),this.ready=!0,this.boundHandleImageChange_=this.handleImageChange_.bind(this),this.layer_=t,this.staleKeys_=new Array,this.maxStaleKeys=5,this.renderedSourceKey_}getStaleKeys(){return this.staleKeys_}prependStaleKey(t){this.staleKeys_.unshift(t),this.staleKeys_.length>this.maxStaleKeys&&(this.staleKeys_.length=this.maxStaleKeys)}updateStaleKeys(t){this.renderedSourceKey_?this.renderedSourceKey_!==t&&(this.prependStaleKey(this.renderedSourceKey_),this.renderedSourceKey_=t):this.renderedSourceKey_=t}getFeatures(t){return cd()}getData(t){return null}prepareFrame(t){return cd()}renderFrame(t,e){return cd()}forEachFeatureAtCoordinate(t,e,i,n,s){}getLayer(){return this.layer_}handleFontsChanged(){}handleImageChange_(t){const e=t.target;2!==e.getState()&&3!==e.getState()||this.renderIfReadyAndVisible()}loadImage(t){let e=t.getState();return 2!=e&&3!=e&&t.addEventListener(vd,this.boundHandleImageChange_),0==e&&(t.load(),e=t.getState()),2==e}renderIfReadyAndVisible(){const t=this.getLayer();t&&t.getVisible()&&"ready"===t.getSourceState()&&t.changed()}renderDeferred(t){}disposeInternal(){delete this.layer_,super.disposeInternal()}},Hg=[];let Kg=null;const $g=class extends Vg{constructor(t){super(t),this.container=null,this.renderedResolution,this.tempTransform=Qd(),this.pixelTransform=Qd(),this.inversePixelTransform=Qd(),this.context=null,this.deferredContext_=null,this.containerReused=!1,this.frameState=null}
vendor: 58,880 bytes, line 2
2getImageData(t,e,i){let n;Kg||(Kg=Du(1,1,void 0,{willReadFrequently:!0})),Kg.clearRect(0,0,1,1);try{Kg.drawImage(t,e,i,1,1,0,0,1,1),n=Kg.getImageData(0,0,1,1).data}catch{return Kg=null,null}return n}getBackground(t){let e=this.getLayer().getBackground();return"function"==typeof e&&(e=e(t.viewState.resolution)),e||void 0}useContainer(t,e,i,n,s){if(Uu(t)&&0===this.pixelTransform[1]&&0===this.pixelTransform[2]&&0===this.pixelTransform[4]&&0===this.pixelTransform[5]&&t.width===n&&t.height===s){const e=t,n=e.getContext("2d");if(n)return this.container=t,this.context=n,this.containerReused=!0,void(i&&(n.fillStyle=i,n.fillRect(0,0,e.width,e.height)))}const r=this.getLayer().getClassName();let o,a;if(t&&t.className===r&&(!i||t&&t.style.backgroundColor&&Nd(hd(t.style.backgroundColor),hd(i)))){const e=t.firstElementChild;Uu(e)&&(a=e.getContext("2d"))}if(a&&function(t,e){const i=rf(t),n=rf(e);for(let t=0;t<6;++t)if(0!==Math.round((i[t]-n[t])*sf[t]))return!1;return!0}(a.canvas.style.transform,e)?(this.container=t,this.context=a,this.containerReused=!0):this.containerReused?(this.container=null,this.context=null,this.containerReused=!1):this.container&&(this.container.style.backgroundColor=null),!this.container){o=Ou?qu():document.createElement("div"),o.className=r;let t=o.style;t.position="absolute",t.width="100%",t.height="100%",a=Du();const e=a.canvas;o.appendChild(e),t=e.style,t.position="absolute",t.left="0",t.transformOrigin="top left",this.container=o,this.context=a}this.containerReused||!i||this.container.style.backgroundColor||(this.container.style.backgroundColor=i)}clipUnrotated(t,e,i){const n=$r(i),s=Xr(i),r=Br(i),o=Gr(i);tf(e.coordinateToPixelTransform,n),tf(e.coordinateToPixelTransform,s),tf(e.coordinateToPixelTransform,r),tf(e.coordinateToPixelTransform,o);const a=this.inversePixelTransform;tf(a,n),tf(a,s),tf(a,r),tf(a,o),t.save(),t.beginPath(),t.moveTo(Math.round(n[0]),Math.round(n[1])),t.lineTo(Math.round(s[0]),Math.round(s[1])),t.lineTo(Math.round(r[0]),Math.round(r[1])),t.lineTo(Math.round(o[0]),Math.round(o[1])),t.clip()}prepareContainer(t,e){const i=t.extent,n=t.viewState.resolution,s=t.viewState.rotation,r=t.pixelRatio,o=Math.round(Yr(i)/n*r),a=Math.round(Vr(i)/n*r);ef(this.pixelTransform,t.size[0]/2,t.size[1]/2,1/r,1/r,s,-o/2,-a/2),nf(this.inversePixelTransform,this.pixelTransform);const h="matrix("+this.pixelTransform.join(", ")+")",l=this.getBackground(t);if(this.useContainer(e,h,l,o,a),!this.containerReused){const t=this.context.canvas;t.width!=o||t.height!=a?(t.width=o,t.height=a):this.context.clearRect(0,0,o,a),h!==t.style.transform&&(t.style.transform=h)}}dispatchRenderEvent_(t,e,i){const n=this.getLayer();if(n.hasListener(t)){const s=new Gg(t,this.inversePixelTransform,i,e);n.dispatchEvent(s)}}preRender(t,e){this.frameState=e,e.declutter||this.dispatchRenderEvent_(Bg,t,e)}postRender(t,e){e.declutter||this.dispatchRenderEvent_(zg,t,e)}renderDeferredInternal(t){}getRenderContext(t){return t.declutter&&!this.deferredContext_&&(this.deferredContext_=new Wg),t.declutter?this.deferredContext_.getContext():this.context}renderDeferred(t){t.declutter&&(this.dispatchRenderEvent_(Bg,this.context,t),t.declutter&&this.deferredContext_&&(this.deferredContext_.draw(this.context),this.deferredContext_.clear()),this.renderDeferredInternal(t),this.dispatchRenderEvent_(zg,this.context,t))}getRenderTransform(t,e,i,n,s,r,o){const a=s/2,h=r/2,l=n/e,c=-l,u=-t[0]+o,d=-t[1];return ef(this.tempTransform,a,h,l,c,-i,u,d)}disposeInternal(){delete this.frameState,super.disposeInternal()}};function Xg(t,e,i){if(!(i in t))return t[i]=new Set([e]),!0;const n=t[i],s=n.has(e);return s||n.add(e),!s}function Yg(t,e,i){const n=t[i];return!!n&&n.delete(e)}function Zg(t,e){const i=t.layerStatesArray[t.layerIndex];i.extent&&(e=Hr(e,Pa(i.extent,t.viewState.projection)));const n=i.layer.getRenderSource();if(!n.getWrapX()){const i=n.getTileGridForProjection(t.viewState.projection).getExtent();i&&(e=Hr(e,i))}return e}const Jg=class extends $g{constructor(t,e){super(t),e=e||{},this.extentChanged=!0,this.renderComplete=!1,this.renderedExtent_=null,this.renderedPixelRatio,this.renderedProjection=null,this.renderedTiles=[],this.renderedSourceRevision_,this.tempExtent=[1/0,1/0,-1/0,-1/0],this.tempTileRange_=new gg(0,0,0,0),this.tempTileCoord_=mg(0,0,0);const i=void 0!==e.cacheSize?e.cacheSize:512;this.tileCache_=new jg(i),this.sourceTileCache_=null,this.layerExtent=null,this.maxStaleKeys=.5*i}getTileCache(){return this.tileCache_}getSourceTileCache(){return this.sourceTileCache_||(this.sourceTileCache_=new jg(512)),this.sourceTileCache_}getOrCreateTile(t,e,i,n){const s=this.tileCache_,r=this.getLayer().getSource(),o=_g(r,r.getKey(),t,e,i);let a;if(s.containsKey(o))a=s.get(o);else{const h=n.viewState.projection,l=r.getProjection();if(a=r.getTile(t,e,i,n.pixelRatio,h,!l||ya(l,h)?void 0:this.getSourceTileCache()),!a)return null;s.set(o,a)}return a}getTile(t,e,i,n){return this.getOrCreateTile(t,e,i,n)||null}getData(t){const e=this.frameState;if(!e)return null;const i=this.getLayer(),n=tf(e.pixelToCoordinateTransform,t.slice()),s=i.getExtent();if(s&&!Er(s,n))return null;const r=e.viewState,o=i.getRenderSource(),a=o.getTileGridForProjection(r.projection),h=o.getTilePixelRatio(e.pixelRatio);for(let t=a.getZForResolution(r.resolution);t>=a.getMinZoom();--t){const i=a.getTileCoordForCoordAndZ(n,t),s=this.getTile(t,i[1],i[2],e);if(!s||2!==s.getState())continue;const l=a.getOrigin(t),c=eg(a.getTileSize(t)),u=a.getResolution(t);let d;if(s instanceof kg||s instanceof Dg)d=s.getImage();else{if(!(s instanceof Pg))continue;if(d=Cg(s.getData()),!d)continue}const f=Math.floor(h*((n[0]-l[0])/u-i[1]*c[0])),p=Math.floor(h*((l[1]-n[1])/u-i[2]*c[1])),g=Math.round(h*o.getGutterForProjection(r.projection));return this.getImageData(d,f+g,p+g)}return null}prepareFrame(t){this.renderedProjection?t.viewState.projection!==this.renderedProjection&&(this.tileCache_.clear(),this.renderedProjection=t.viewState.projection):this.renderedProjection=t.viewState.projection;const e=this.getLayer().getSource();if(!e)return!1;const i=e.getRevision();return this.renderedSourceRevision_?this.renderedSourceRevision_!==i&&(this.renderedSourceRevision_=i,this.renderedSourceKey_===e.getKey()&&(this.tileCache_.clear(),this.sourceTileCache_?.clear())):this.renderedSourceRevision_=i,!0}enqueueTilesForNextExtent(){return!0}enqueueTiles(t,e,i,n,s){const r=t.viewState,o=this.getLayer(),a=o.getRenderSource(),h=a.getTileGridForProjection(r.projection),l=dd(a);l in t.wantedTiles||(t.wantedTiles[l]={});const c=t.wantedTiles[l],u=o.getMapInternal(),d=Math.max(i-s,h.getMinZoom(),h.getZForResolution(Math.min(o.getMaxResolution(),u?u.getView().getResolutionForZoom(Math.max(o.getMinZoom(),0)):h.getResolution(0)),a.zDirection)),f=r.rotation,p=f?Wr(r.center,r.resolution,f,t.size):void 0;for(let s=i;s>=d;--s){const i=h.getTileRangeForExtentAndZ(e,s,this.tempTileRange_),r=h.getResolution(s);for(let e=i.minX;e<=i.maxX;++e)for(let o=i.minY;o<=i.maxY;++o){if(f&&!h.tileCoordIntersectsViewport([s,e,o],p))continue;const i=this.getTile(s,e,o,t);if(!i)continue;if(!Xg(n,i,s))continue;const a=i.getKey();if(c[a]=!0,0===i.getState()&&!t.tileQueue.isKeyQueued(a)){const n=mg(s,e,o,this.tempTileCoord_);t.tileQueue.enqueue([i,l,h.getTileCoordCenter(n),r])}}}}findStaleTile_(t,e){const i=this.tileCache_,n=t[0],s=t[1],r=t[2],o=this.getStaleKeys();for(let t=0;t<o.length;++t){const a=_g(this.getLayer().getSource(),o[t],n,s,r);if(i.containsKey(a)){const t=i.peek(a);if(2===t.getState())return t.endTransition(dd(this)),Xg(e,t,n),!0}}return!1}findAltTiles_(t,e,i,n){const s=t.getTileRangeForTileCoordAndZ(e,i,this.tempTileRange_);if(!s)return!1;let r=!0;const o=this.tileCache_,a=this.getLayer().getRenderSource(),h=a.getKey();for(let t=s.minX;t<=s.maxX;++t)for(let e=s.minY;e<=s.maxY;++e){const s=_g(a,h,i,t,e);let l=!1;if(o.containsKey(s)){const t=o.peek(s);2===t.getState()&&(Xg(n,t,i),l=!0)}l||(r=!1)}return r}renderFrame(t,e){this.renderComplete=!0;const i=t.layerStatesArray[t.layerIndex],n=t.viewState,s=n.projection,r=n.resolution,o=n.center,a=t.pixelRatio,h=this.getLayer(),l=h.getSource(),c=l.getTileGridForProjection(s),u=c.getZForResolution(r,l.zDirection),d=c.getResolution(u);this.updateStaleKeys(l.getKey());let f=t.extent;const p=l.getTilePixelRatio(a);this.prepareContainer(t,e);const g=this.context.canvas.width,m=this.context.canvas.height;this.layerExtent=i.extent?Pa(i.extent):null,this.layerExtent&&(f=Hr(f,this.layerExtent));const _=d*g/2/p,v=d*m/2/p,y=[o[0]-_,o[1]-v,o[0]+_,o[1]+v],w={};this.renderedTiles.length=0;const b=h.getPreload();if(t.nextExtent&&this.enqueueTilesForNextExtent()){const e=c.getZForResolution(n.nextResolution,l.zDirection),i=Zg(t,t.nextExtent);this.enqueueTiles(t,i,e,w,b)}const x=Zg(t,f);if(this.enqueueTiles(t,x,u,w,0),b>0&&setTimeout(()=>{this.enqueueTiles(t,x,u-1,w,b-1)},0),!(u in w))return this.container;const S=dd(this),E=t.time;for(const e of w[u]){const i=e.getState();if(4===i)continue;const n=e.tileCoord;if(2===i&&1===e.getAlpha(S,E)){e.endTransition(S);continue}if(3!==i&&(this.renderComplete=!1),this.findStaleTile_(n,w)){Yg(w,e,u),t.animate=!0;continue}if(this.findAltTiles_(c,n,u+1,w))continue;const s=c.getMinZoom();for(let t=u-1;t>=s&&!this.findAltTiles_(c,n,t,w);--t);}const A=d/r*a/p,C=this.getRenderContext(t);ef(this.tempTransform,g/2,m/2,A,A,0,-g/2,-m/2),this.layerExtent&&this.clipUnrotated(C,t,this.layerExtent),l.getInterpolate()||(C.imageSmoothingEnabled=!1),this.preRender(C,t);const M=Object.keys(w).map(Number);M.sort(Cd);const L=[],P=[],k=[];for(let e=M.length-1;e>=0;--e){const i=M[e],n=l.getTilePixelSize(i,a,s),r=c.getResolution(i)/d,o=n[0]*r*A,h=n[1]*r*A,f=c.getTileCoordForCoordAndZ($r(y),i),g=c.getTileCoordExtent(f),m=tf(this.tempTransform,[p*(g[0]-y[0])/d,p*(y[3]-g[3])/d]),_=p*l.getGutterForProjection(s);for(const e of w[i]){if(2!==e.getState())continue;const n=e.tileCoord,s=f[1]-n[1],r=Math.round(m[0]-(s-1)*o),a=f[2]-n[2],c=Math.round(m[1]-(a-1)*h),d=Math.round(m[0]-s*o),p=Math.round(m[1]-a*h),g=r-d,v=c-p,y=i===u;if(y&&e.inTransition(S)){k.push({tile:e,x:d,y:p,w:g,h:v,gutter:_}),this.renderedTiles.unshift(e),this.updateUsedTiles(t.usedTiles,l,e);continue}const w=[d,p,d+g,p+v],b=[];for(let t=0,e=L.length;t<e;++t)i<P[t]&&Zr(w,L[t])&&b.push(L[t]);let x;b.length>0&&(x=eo(w,b)),L.push(w),P.push(i),this.drawTile(e,t,d,p,g,v,_,y,x),this.renderedTiles.unshift(e),this.updateUsedTiles(t.usedTiles,l,e)}}for(let e=0,i=k.length;e<i;++e){const{tile:i,x:n,y:s,w:r,h:o,gutter:a}=k[e];this.drawTile(i,t,n,s,r,o,a,!0,void 0)}if(this.renderedResolution=d,this.extentChanged=!this.renderedExtent_||!Ir(this.renderedExtent_,y),this.renderedExtent_=y,this.renderedPixelRatio=a,this.postRender(this.context,t),this.layerExtent&&C.restore(),C.imageSmoothingEnabled=!0,this.renderComplete){const e=(t,e)=>{const i=dd(l),n=e.wantedTiles[i],s=n?Object.keys(n).length:0;this.updateCacheSize(s),this.tileCache_.expireCache(),this.sourceTileCache_?.expireCache()};t.postRenderFunctions.push(e)}return this.container}updateCacheSize(t){this.tileCache_.highWaterMark=Math.max(this.tileCache_.highWaterMark,2*t)}drawTile(t,e,i,n,s,r,o,a,h){let l;if(t instanceof Pg){if(l=Cg(t.getData()),!l)throw new Error("Rendering array data is not yet supported")}else l=this.getTileImage(t);if(!l)return;const c=this.getRenderContext(e),u=dd(this),d=e.layerStatesArray[e.layerIndex],f=d.opacity*(a?t.getAlpha(u,e.time):1),p=f!==c.globalAlpha;p&&(c.save(),c.globalAlpha=f);const g=l.width-2*o,m=l.height-2*o;if(h){const t=g/s,e=m/r;for(let s=0,r=h.length;s<r;++s){const r=h[s],a=r[0],u=r[1],d=r[2]-r[0],f=r[3]-r[1];c.drawImage(l,o+(a-i)*t,o+(u-n)*e,d*t,f*e,a,u,d,f)}}else c.drawImage(l,o,o,g,m,i,n,s,r);p&&c.restore(),f!==d.opacity?e.animate=!0:a&&t.endTransition(u)}getImage(){const t=this.context;return t?t.canvas:null}getTileImage(t){return t.getImage()}updateUsedTiles(t,e,i){const n=dd(e);n in t||(t[n]={}),t[n][i.getKey()]=!0}},Qg={CENTER:"center",RESOLUTION:"resolution",ROTATION:"rotation"};function tm(t,e,i){return function(n,s,r,o,a){if(!n)return;if(!s&&!e)return n;const h=e?0:r[0]*s,l=e?0:r[1]*s,c=a?a[0]:0,u=a?a[1]:0;let d=t[0]+h/2+c,f=t[2]-h/2+c,p=t[1]+l/2+u,g=t[3]-l/2+u;d>f&&(d=(f+d)/2,f=d),p>g&&(p=(g+p)/2,g=p);let m=io(n[0],d,f),_=io(n[1],p,g);if(o&&i&&s){const t=30*s;m+=-t*Math.log(1+Math.max(0,d-n[0])/t)+t*Math.log(1+Math.max(0,n[0]-f)/t),_+=-t*Math.log(1+Math.max(0,p-n[1])/t)+t*Math.log(1+Math.max(0,n[1]-g)/t)}return[m,_]}}function em(t){return t}function im(t,e,i,n){const s=Yr(e)/i[0],r=Vr(e)/i[1];return n?Math.min(t,Math.max(s,r)):Math.min(t,Math.min(s,r))}function nm(t,e,i){let n=Math.min(t,e);return n*=Math.log(1+50*Math.max(0,t/e-1))/50+1,i&&(n=Math.max(n,i),n/=Math.log(1+50*Math.max(0,i/t-1))/50+1),io(n,i/2,2*e)}function sm(t,e,i,n,s){return i=void 0===i||i,function(r,o,a,h){if(void 0!==r){const o=n?im(t,n,a,s):t;return i&&h?nm(r,o,e):io(r,e,o)}}}function rm(t){if(void 0!==t)return 0}function om(t){if(void 0!==t)return t}function am(t,e){setTimeout(function(){t(e)},0)}function hm(t){return!(t.sourceCenter&&t.targetCenter&&!po(t.sourceCenter,t.targetCenter))&&t.sourceResolution===t.targetResolution&&t.sourceRotation===t.targetRotation}function lm(t,e,i,n,s){const r=Math.cos(-s);let o=Math.sin(-s),a=t[0]*r-t[1]*o,h=t[1]*r+t[0]*o;return a+=(e[0]/2-i[0])*n,h+=(i[1]-e[1]/2)*n,o=-o,[a*r-h*o,h*r+a*o]}const cm=class extends Yd{constructor(t){super(),this.on,this.once,this.un,t=Object.assign({},t),this.hints_=[0,0],this.animations_=[],this.updateAnimationKey_,this.projection_=ma(t.projection,"EPSG:3857"),this.viewportSize_=[100,100],this.targetCenter_=null,this.targetResolution_,this.targetRotation_,this.nextCenter_=null,this.nextResolution_,this.nextRotation_,this.cancelAnchor_=void 0,t.projection&&function(t){ca=!(void 0===t||t)}(),t.center&&(t.center=Ma(t.center,this.projection_)),t.extent&&(t.extent=Pa(t.extent,this.projection_)),this.applyOptions_(t)}applyOptions_(t){const e=Object.assign({},t);for(const t in Qg)delete e[t];this.setProperties(e,!0);const i=function(t){let e,i,n;let s=void 0!==t.minZoom?t.minZoom:0,r=void 0!==t.maxZoom?t.maxZoom:28;const o=void 0!==t.zoomFactor?t.zoomFactor:2,a=void 0!==t.multiWorld&&t.multiWorld,h=void 0===t.smoothResolutionConstraint||t.smoothResolutionConstraint,l=void 0!==t.showFullExtent&&t.showFullExtent,c=ma(t.projection,"EPSG:3857"),u=c.getExtent();let d=t.constrainOnlyCenter,f=t.extent;if(a||f||!c.isGlobal()||(d=!1,f=u),void 0!==t.resolutions){const o=t.resolutions;i=o[s],n=void 0!==o[r]?o[r]:o[o.length-1],e=t.constrainResolution?function(t,e,i,n){return e=void 0===e||e,function(s,r,o,a){if(void 0!==s){const h=t[0],l=t[t.length-1],c=i?im(h,i,o,n):h;if(a)return e?nm(s,c,l):io(s,l,c);const u=Math.min(c,s),d=Math.floor(Ld(t,u,r));return t[d]>c&&d<t.length-1?t[d+1]:t[d]}}}(o,h,!d&&f,l):sm(i,n,h,!d&&f,l)}else{const a=(u?Math.max(Yr(u),Vr(u)):360*vo.degrees/c.getMetersPerUnit())/256/Math.pow(2,0),p=a/Math.pow(2,28);i=t.maxResolution,void 0!==i?s=0:i=a/Math.pow(o,s),n=t.minResolution,void 0===n&&(n=void 0!==t.maxZoom?void 0!==t.maxResolution?i/Math.pow(o,r):a/Math.pow(o,r):p),r=s+Math.floor(Math.log(i/n)/Math.log(o)),n=i/Math.pow(o,r-s),e=t.constrainResolution?function(t,e,i,n,s,r){return n=void 0===n||n,i=void 0!==i?i:0,function(o,a,h,l){if(void 0!==o){const c=s?im(e,s,h,r):e;if(l)return n?nm(o,c,i):io(o,i,c);const u=1e-9,d=Math.ceil(Math.log(e/c)/Math.log(t)-u),f=-a*(.5-u)+.5,p=Math.min(c,o),g=Math.floor(Math.log(e/p)/Math.log(t)+f),m=Math.max(d,g);return io(e/Math.pow(t,m),i,c)}}}(o,i,n,h,!d&&f,l):sm(i,n,h,!d&&f,l)}return{constraint:e,maxResolution:i,minResolution:n,minZoom:s,zoomFactor:o}}(t);this.maxResolution_=i.maxResolution,this.minResolution_=i.minResolution,this.zoomFactor_=i.zoomFactor,this.resolutions_=t.resolutions,this.padding_=t.padding,this.minZoom_=i.minZoom;const n=function(t){if(void 0!==t.extent){const e=void 0===t.smoothExtentConstraint||t.smoothExtentConstraint;return tm(t.extent,t.constrainOnlyCenter,e)}const e=ma(t.projection,"EPSG:3857");if(!0!==t.multiWorld&&e.isGlobal()){const t=e.getExtent().slice();return t[0]=-1/0,t[2]=1/0,tm(t,!1,!1)}return em}(t),s=i.constraint,r=function(t){if(void 0===t.enableRotation||t.enableRotation){const e=t.constrainRotation;return void 0===e||!0===e?function(){const t=oo(5);return function(e,i){return i||void 0===e?e:Math.abs(e)<=t?0:e}}():!1===e?om:"number"==typeof e?function(t){const e=2*Math.PI/t;return function(t,i){return i?t:void 0!==t?t=Math.floor(t/e+.5)*e:void 0}}(e):om}return rm}(t);this.constraints_={center:n,resolution:s,rotation:r},this.setRotation(void 0!==t.rotation?t.rotation:0),this.setCenterInternal(void 0!==t.center?t.center:null),void 0!==t.resolution?this.setResolution(t.resolution):void 0!==t.zoom&&this.setZoom(t.zoom)}get padding(){return this.padding_}set padding(t){let e=this.padding_;this.padding_=t;const i=this.getCenterInternal();if(i){const n=t||[0,0,0,0];e=e||[0,0,0,0];const s=this.getResolution(),r=s/2*(n[3]-e[3]+e[1]-n[1]),o=s/2*(n[0]-e[0]+e[2]-n[2]);this.setCenterInternal([i[0]+r,i[1]-o])}}getUpdatedOptions_(t){const e=this.getProperties();return void 0!==e.resolution?e.resolution=this.getResolution():e.zoom=this.getZoom(),e.center=this.getCenterInternal(),e.rotation=this.getRotation(),Object.assign({},e,t)}animate(t){this.isDef()&&!this.getAnimating()&&this.resolveConstraints(0);const e=new Array(arguments.length);for(let t=0;t<e.length;++t){let i=arguments[t];i.center&&(i=Object.assign({},i),i.center=Ma(i.center,this.getProjection())),i.anchor&&(i=Object.assign({},i),i.anchor=Ma(i.anchor,this.getProjection())),e[t]=i}this.animateInternal.apply(this,e)}animateInternal(t){let e,i=arguments.length;i>1&&"function"==typeof arguments[i-1]&&(e=arguments[i-1],--i);let n=0;for(;n<i&&!this.isDef();++n){const t=arguments[n];t.center&&this.setCenterInternal(t.center),void 0!==t.zoom?this.setZoom(t.zoom):t.resolution&&this.setResolution(t.resolution),void 0!==t.rotation&&this.setRotation(t.rotation)}if(n===i)return void(e&&am(e,!0));let s=Date.now(),r=this.targetCenter_.slice(),o=this.targetResolution_,a=this.targetRotation_;const h=[];for(;n<i;++n){const t=arguments[n],i={start:s,complete:!1,anchor:t.anchor,duration:void 0!==t.duration?t.duration:1e3,easing:t.easing||Sg,callback:e};if(t.center&&(i.sourceCenter=r,i.targetCenter=t.center.slice(),r=i.targetCenter),void 0!==t.zoom?(i.sourceResolution=o,i.targetResolution=this.getResolutionForZoom(t.zoom),o=i.targetResolution):t.resolution&&(i.sourceResolution=o,i.targetResolution=t.resolution,o=i.targetResolution),void 0!==t.rotation){i.sourceRotation=a;const e=ao(t.rotation-a+Math.PI,2*Math.PI)-Math.PI;i.targetRotation=a+e,a=i.targetRotation}hm(i)?i.complete=!0:s+=i.duration,h.push(i)}this.animations_.push(h),this.setHint(0,1),this.updateAnimations_()}getAnimating(){return this.hints_[0]>0}getInteracting(){return this.hints_[1]>0}cancelAnimations(){let t;this.setHint(0,-this.hints_[0]);for(let e=0,i=this.animations_.length;e<i;++e){const i=this.animations_[e];if(i[0].callback&&am(i[0].callback,!1),!t)for(let e=0,n=i.length;e<n;++e){const n=i[e];if(!n.complete){t=n.anchor;break}}}this.animations_.length=0,this.cancelAnchor_=t,this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN}updateAnimations_(){if(void 0!==this.updateAnimationKey_&&(cancelAnimationFrame(this.updateAnimationKey_),this.updateAnimationKey_=void 0),!this.getAnimating())return;const t=Date.now();let e=!1;for(let i=this.animations_.length-1;i>=0;--i){const n=this.animations_[i];let s=!0;for(let i=0,r=n.length;i<r;++i){const r=n[i];if(r.complete)continue;const o=t-r.start;let a=r.duration>0?o/r.duration:1;a>=1?(r.complete=!0,a=1):s=!1;const h=r.easing(a);if(r.sourceCenter){const t=r.sourceCenter[0],e=r.sourceCenter[1],i=r.targetCenter[0],n=r.targetCenter[1];this.nextCenter_=r.targetCenter;const s=t+h*(i-t),o=e+h*(n-e);this.targetCenter_=[s,o]}if(r.sourceResolution&&r.targetResolution){const t=1===h?r.targetResolution:r.sourceResolution+h*(r.targetResolution-r.sourceResolution);if(r.anchor){const e=this.getViewportSize_(this.getRotation()),i=this.constraints_.resolution(t,0,e,!0);this.targetCenter_=this.calculateCenterZoom(i,r.anchor)}this.nextResolution_=r.targetResolution,this.targetResolution_=t,this.applyTargetState_(!0)}if(void 0!==r.sourceRotation&&void 0!==r.targetRotation){const t=1===h?ao(r.targetRotation+Math.PI,2*Math.PI)-Math.PI:r.sourceRotation+h*(r.targetRotation-r.sourceRotation);if(r.anchor){const e=this.constraints_.rotation(t,!0);this.targetCenter_=this.calculateCenterRotate(e,r.anchor)}this.nextRotation_=r.targetRotation,this.targetRotation_=t}if(this.applyTargetState_(!0),e=!0,!r.complete)break}if(s){this.animations_[i]=null,this.setHint(0,-1),this.nextCenter_=null,this.nextResolution_=NaN,this.nextRotation_=NaN;const t=n[0].callback;t&&am(t,!0)}}this.animations_=this.animations_.filter(Boolean),e&&void 0===this.updateAnimationKey_&&(this.updateAnimationKey_=requestAnimationFrame(this.updateAnimations_.bind(this)))}calculateCenterRotate(t,e){let i;const n=this.getCenterInternal();var s,r;return void 0!==n&&(i=[n[0]-e[0],n[1]-e[1]],go(i,t-this.getRotation()),r=e,(s=i)[0]+=+r[0],s[1]+=+r[1]),i}calculateCenterZoom(t,e){let i;const n=this.getCenterInternal(),s=this.getResolution();return void 0!==n&&void 0!==s&&(i=[e[0]-t*(e[0]-n[0])/s,e[1]-t*(e[1]-n[1])/s]),i}getViewportSize_(t){const e=this.viewportSize_;if(t){const i=e[0],n=e[1];return[Math.abs(i*Math.cos(t))+Math.abs(n*Math.sin(t)),Math.abs(i*Math.sin(t))+Math.abs(n*Math.cos(t))]}return e}setViewportSize(t){this.viewportSize_=Array.isArray(t)?t.slice():[100,100],this.getAnimating()||this.resolveConstraints(0)}getCenter(){const t=this.getCenterInternal();return t?Ca(t,this.getProjection()):t}getCenterInternal(){return this.get(Qg.CENTER)}getConstraints(){return this.constraints_}getConstrainResolution(){return this.get("constrainResolution")}getHints(t){return void 0!==t?(t[0]=this.hints_[0],t[1]=this.hints_[1],t):this.hints_.slice()}calculateExtent(t){return La(this.calculateExtentInternal(t),this.getProjection())}calculateExtentInternal(t){t=t||this.getViewportSizeMinusPadding_();const e=this.getCenterInternal();Zd(e,"The view center is not defined");const i=this.getResolution();Zd(void 0!==i,"The view resolution is not defined");const n=this.getRotation();return Zd(void 0!==n,"The view rotation is not defined"),Ur(e,i,n,t)}getMaxResolution(){return this.maxResolution_}getMinResolution(){return this.minResolution_}getMaxZoom(){return this.getZoomForResolution(this.minResolution_)}setMaxZoom(t){this.applyOptions_(this.getUpdatedOptions_({maxZoom:t}))}getMinZoom(){return this.getZoomForResolution(this.maxResolution_)}setMinZoom(t){this.applyOptions_(this.getUpdatedOptions_({minZoom:t}))}setConstrainResolution(t){this.applyOptions_(this.getUpdatedOptions_({constrainResolution:t}))}getProjection(){return this.projection_}getResolution(){return this.get(Qg.RESOLUTION)}getResolutions(){return this.resolutions_}getResolutionForExtent(t,e){return this.getResolutionForExtentInternal(Pa(t,this.getProjection()),e)}getResolutionForExtentInternal(t,e){e=e||this.getViewportSizeMinusPadding_();const i=Yr(t)/e[0],n=Vr(t)/e[1];return Math.max(i,n)}getResolutionForValueFunction(t){t=t||2;const e=this.getConstrainedResolution(this.maxResolution_),i=this.minResolution_,n=Math.log(e/i)/Math.log(t);return function(i){return e/Math.pow(t,i*n)}}getRotation(){return this.get(Qg.ROTATION)}getValueForResolutionFunction(t){const e=Math.log(t||2),i=this.getConstrainedResolution(this.maxResolution_),n=this.minResolution_,s=Math.log(i/n)/e;return function(t){return Math.log(i/t)/e/s}}getViewportSizeMinusPadding_(t){let e=this.getViewportSize_(t);const i=this.padding_;return i&&(e=[e[0]-i[1]-i[3],e[1]-i[0]-i[2]]),e}getState(){const t=this.getProjection(),e=this.getResolution(),i=this.getRotation();let n=this.getCenterInternal();const s=this.padding_;if(s){const t=this.getViewportSizeMinusPadding_();n=lm(n,this.getViewportSize_(),[t[0]/2+s[3],t[1]/2+s[0]],e,i)}return{center:n.slice(0),projection:void 0!==t?t:null,resolution:e,nextCenter:this.nextCenter_,nextResolution:this.nextResolution_,nextRotation:this.nextRotation_,rotation:i,zoom:this.getZoom()}}getViewStateAndExtent(){return{viewState:this.getState(),extent:this.calculateExtent()}}getZoom(){let t;const e=this.getResolution();return void 0!==e&&(t=this.getZoomForResolution(e)),t}getZoomForResolution(t){let e,i,n=this.minZoom_||0;if(this.resolutions_){const s=Ld(this.resolutions_,t,1);n=s,e=this.resolutions_[s],i=s==this.resolutions_.length-1?2:e/this.resolutions_[s+1]}else e=this.maxResolution_,i=this.zoomFactor_;return n+Math.log(e/t)/Math.log(i)}getResolutionForZoom(t){if(this.resolutions_?.length){if(1===this.resolutions_.length)return this.resolutions_[0];const e=io(Math.floor(t),0,this.resolutions_.length-2),i=this.resolutions_[e]/this.resolutions_[e+1];return this.resolutions_[e]/Math.pow(i,io(t-e,0,1))}return this.maxResolution_/Math.pow(this.zoomFactor_,t-this.minZoom_)}fit(t,e){let i;if(Zd(Array.isArray(t)||"function"==typeof t.getSimplifiedGeometry,"Invalid extent or geometry provided as `geometry`"),Array.isArray(t))Zd(!Jr(t),"Cannot fit empty extent provided as `geometry`"),i=_p(Pa(t,this.getProjection()));else if("Circle"===t.getType()){const e=Pa(t.getExtent(),this.getProjection());i=_p(e),i.rotate(this.getRotation(),zr(e))}else{const e=Aa();i=e?t.clone().transform(e,this.getProjection()):t}this.fitInternal(i,e)}rotatedExtentForGeometry(t){const e=this.getRotation(),i=Math.cos(e),n=Math.sin(-e),s=t.getFlatCoordinates(),r=t.getStride();let o=1/0,a=1/0,h=-1/0,l=-1/0;for(let t=0,e=s.length;t<e;t+=r){const e=s[t]*i-s[t+1]*n,r=s[t]*n+s[t+1]*i;o=Math.min(o,e),a=Math.min(a,r),h=Math.max(h,e),l=Math.max(l,r)}return[o,a,h,l]}fitInternal(t,e){let i=(e=e||{}).size;i||(i=this.getViewportSizeMinusPadding_());const n=void 0!==e.padding?e.padding:[0,0,0,0],s=void 0!==e.nearest&&e.nearest;let r;r=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.getResolutionForZoom(e.maxZoom):0;const o=this.rotatedExtentForGeometry(t);let a=this.getResolutionForExtentInternal(o,[i[0]-n[1]-n[3],i[1]-n[0]-n[2]]);a=isNaN(a)?r:Math.max(a,r),a=this.getConstrainedResolution(a,s?0:1);const h=this.getRotation(),l=Math.sin(h),c=Math.cos(h),u=zr(o);u[0]+=(n[1]-n[3])/2*a,u[1]+=(n[0]-n[2])/2*a;const d=u[0]*c-u[1]*l,f=u[1]*c+u[0]*l,p=this.getConstrainedCenter([d,f],a),g=e.callback?e.callback:Od;void 0!==e.duration?this.animateInternal({resolution:a,center:p,duration:e.duration,easing:e.easing},g):(this.targetResolution_=a,this.targetCenter_=p,this.applyTargetState_(!1,!0),am(g,!0))}centerOn(t,e,i){this.centerOnInternal(Ma(t,this.getProjection()),e,i)}centerOnInternal(t,e,i){this.setCenterInternal(lm(t,e,i,this.getResolution(),this.getRotation()))}calculateCenterShift(t,e,i,n){let s;const r=this.padding_;if(r&&t){const o=this.getViewportSizeMinusPadding_(-i),a=lm(t,n,[o[0]/2+r[3],o[1]/2+r[0]],e,i);s=[t[0]-a[0],t[1]-a[1]]}return s}isDef(){return!!this.getCenterInternal()&&void 0!==this.getResolution()}adjustCenter(t){const e=Ca(this.targetCenter_,this.getProjection());this.setCenter([e[0]+t[0],e[1]+t[1]])}adjustCenterInternal(t){const e=this.targetCenter_;this.setCenterInternal([e[0]+t[0],e[1]+t[1]])}adjustResolution(t,e){e=e&&Ma(e,this.getProjection()),this.adjustResolutionInternal(t,e)}adjustResolutionInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.getViewportSize_(this.getRotation()),s=this.constraints_.resolution(this.targetResolution_*t,0,n,i);e&&(this.targetCenter_=this.calculateCenterZoom(s,e)),this.targetResolution_*=t,this.applyTargetState_()}adjustZoom(t,e){this.adjustResolution(Math.pow(this.zoomFactor_,-t),e)}adjustRotation(t,e){e&&(e=Ma(e,this.getProjection())),this.adjustRotationInternal(t,e)}adjustRotationInternal(t,e){const i=this.getAnimating()||this.getInteracting(),n=this.constraints_.rotation(this.targetRotation_+t,i);e&&(this.targetCenter_=this.calculateCenterRotate(n,e)),this.targetRotation_+=t,this.applyTargetState_()}setCenter(t){this.setCenterInternal(t?Ma(t,this.getProjection()):t)}setCenterInternal(t){this.targetCenter_=t,this.applyTargetState_()}setHint(t,e){return this.hints_[t]+=e,this.changed(),this.hints_[t]}setResolution(t){this.targetResolution_=t,this.applyTargetState_()}setRotation(t){this.targetRotation_=t,this.applyTargetState_()}setZoom(t){this.setResolution(this.getResolutionForZoom(t))}applyTargetState_(t,e){const i=this.getAnimating()||this.getInteracting()||e,n=this.constraints_.rotation(this.targetRotation_,i),s=this.getViewportSize_(n),r=this.constraints_.resolution(this.targetResolution_,0,s,i),o=this.constraints_.center(this.targetCenter_,r,s,i,this.calculateCenterShift(this.targetCenter_,r,n,s));this.get(Qg.ROTATION)!==n&&this.set(Qg.ROTATION,n),this.get(Qg.RESOLUTION)!==r&&(this.set(Qg.RESOLUTION,r),this.set("zoom",this.getZoom(),!0)),o&&this.get(Qg.CENTER)&&po(this.get(Qg.CENTER),o)||this.set(Qg.CENTER,o),this.getAnimating()&&!t&&this.cancelAnimations(),this.cancelAnchor_=void 0}resolveConstraints(t,e,i){t=void 0!==t?t:200;const n=e||0,s=this.constraints_.rotation(this.targetRotation_),r=this.getViewportSize_(s),o=this.constraints_.resolution(this.targetResolution_,n,r),a=this.constraints_.center(this.targetCenter_,o,r,!1,this.calculateCenterShift(this.targetCenter_,o,s,r));if(0===t&&!this.cancelAnchor_)return this.targetResolution_=o,this.targetRotation_=s,this.targetCenter_=a,void this.applyTargetState_();i=i||(0===t?this.cancelAnchor_:void 0),this.cancelAnchor_=void 0,this.getResolution()===o&&this.getRotation()===s&&this.getCenterInternal()&&po(this.getCenterInternal(),a)||(this.getAnimating()&&this.cancelAnimations(),this.animateInternal({rotation:s,center:a,resolution:o,duration:t,easing:xg,anchor:i}))}beginInteraction(){this.resolveConstraints(0),this.setHint(1,1)}endInteraction(t,e,i){i=i&&Ma(i,this.getProjection()),this.endInteractionInternal(t,e,i)}endInteractionInternal(t,e,i){this.getInteracting()&&(this.setHint(1,-1),this.resolveConstraints(t,e,i))}getConstrainedCenter(t,e){const i=this.getViewportSize_(this.getRotation());return this.constraints_.center(t,e||this.getResolution(),i)}getConstrainedZoom(t,e){const i=this.getResolutionForZoom(t);return this.getZoomForResolution(this.getConstrainedResolution(i,e))}getConstrainedResolution(t,e){e=e||0;const i=this.getViewportSize_(this.getRotation());return this.constraints_.resolution(t,e,i)}};function um(t,e){if(!t.visible)return!1;const i=e.resolution;if(i<t.minResolution||i>=t.maxResolution)return!1;const n=e.zoom;return n>t.minZoom&&n<=t.maxZoom}const dm=class extends Wp{constructor(t){const e=Object.assign({},t);delete e.source,super(e),this.on,this.once,this.un,this.mapPrecomposeKey_=null,this.mapRenderKey_=null,this.sourceChangeKey_=null,this.renderer_=null,this.sourceReady_=!1,this.rendered=!1,t.render&&(this.render=t.render),t.map&&this.setMap(t.map),this.addChangeListener(Up,this.handleSourcePropertyChange_);const i=t.source?t.source:null;this.setSource(i)}getLayersArray(t){return(t=t||[]).push(this),t}getLayerStatesArray(t){return(t=t||[]).push(this.getLayerState()),t}getSource(){return this.get(Up)||null}getRenderSource(){return this.getSource()}getSourceState(){const t=this.getSource();return t?t.getState():"undefined"}handleSourceChange_(){this.changed(),this.sourceReady_||"ready"!==this.getSource().getState()||(this.sourceReady_=!0,this.dispatchEvent("sourceready"))}handleSourcePropertyChange_(){this.sourceChangeKey_&&(_d(this.sourceChangeKey_),this.sourceChangeKey_=null),this.sourceReady_=!1;const t=this.getSource();t&&(this.sourceChangeKey_=gd(t,vd,this.handleSourceChange_,this),"ready"===t.getState()&&(this.sourceReady_=!0,setTimeout(()=>{this.dispatchEvent("sourceready")},0))),this.changed()}getFeatures(t){return this.renderer_?this.renderer_.getFeatures(t):Promise.resolve([])}getData(t){return this.renderer_&&this.rendered?this.renderer_.getData(t):null}isVisible(t){let e;const i=this.getMapInternal();let n;if(!t&&i&&(t=i.getView()),e=t instanceof cm?{viewState:t.getState(),extent:t.calculateExtent()}:t,!e.layerStatesArray&&i&&(e.layerStatesArray=i.getLayerGroup().getLayerStatesArray()),e.layerStatesArray){if(n=e.layerStatesArray.find(t=>t.layer===this),!n)return!1}else n=this.getLayerState();const s=this.getExtent();return um(n,e.viewState)&&(!s||Zr(s,e.extent))}getAttributions(t){if(!this.isVisible(t))return[];const e=this.getSource()?.getAttributions();if(!e)return[];let i=e(t instanceof cm?t.getViewStateAndExtent():t);return Array.isArray(i)||(i=[i]),i}render(t,e){const i=this.getRenderer();return i.prepareFrame(t)?(this.rendered=!0,i.renderFrame(t,e)):null}unrender(){this.rendered=!1}getDeclutter(){}renderDeclutter(t,e){}renderDeferred(t){const e=this.getRenderer();e&&e.renderDeferred(t)}setMapInternal(t){t||this.unrender(),this.set("map",t)}getMapInternal(){return this.get("map")}setMap(t){this.mapPrecomposeKey_&&(_d(this.mapPrecomposeKey_),this.mapPrecomposeKey_=null),t||this.changed(),this.mapRenderKey_&&(_d(this.mapRenderKey_),this.mapRenderKey_=null),t&&(this.mapPrecomposeKey_=gd(t,qg,this.handlePrecompose_,this),this.mapRenderKey_=gd(this,vd,t.render,t),this.changed())}handlePrecompose_(t){const e=t.frameState.layerStatesArray,i=this.getLayerState(!1);Zd(!e.some(t=>t.layer===i.layer),"A layer can only be added to the map once. Use either `layer.setMap()` or `map.addLayer()`, not both."),e.push(i)}setSource(t){this.set(Up,t)}getRenderer(){return this.renderer_||(this.renderer_=this.createRenderer()),this.renderer_}hasRenderer(){return!!this.renderer_}createRenderer(){return null}clearRenderer(){this.renderer_&&(this.renderer_.dispose(),delete this.renderer_)}disposeInternal(){this.clearRenderer(),this.setSource(null),super.disposeInternal()}},fm="preload",pm="useInterimTilesOnError",gm=class extends dm{constructor(t){t=t||{};const e=Object.assign({},t),i=t.cacheSize;delete t.cacheSize,delete e.preload,delete e.useInterimTilesOnError,super(e),this.on,this.once,this.un,this.cacheSize_=i,this.setPreload(void 0!==t.preload?t.preload:0),this.setUseInterimTilesOnError(void 0===t.useInterimTilesOnError||t.useInterimTilesOnError)}getCacheSize(){return this.cacheSize_}getPreload(){return this.get(fm)}setPreload(t){this.set(fm,t)}getUseInterimTilesOnError(){return this.get(pm)}setUseInterimTilesOnError(t){this.set(pm,t)}getData(t){return super.getData(t)}},mm=class extends gm{constructor(t){super(t)}createRenderer(){return new Jg(this,{cacheSize:this.getCacheSize()})}},_m=class{drawCustom(t,e,i,n,s){}drawGeometry(t){}setStyle(t){}drawCircle(t,e,i){}drawFeature(t,e,i){}drawGeometryCollection(t,e,i){}drawLineString(t,e,i){}drawMultiLineString(t,e,i){}drawMultiPoint(t,e,i){}drawMultiPolygon(t,e,i){}drawPoint(t,e,i){}drawPolygon(t,e,i){}drawText(t,e,i){}setFillStrokeStyle(t,e){}setImageStyle(t,e){}setTextStyle(t,e){}},vm="ol-hidden",ym="ol-unselectable",wm="ol-unsupported",bm="ol-control",xm="ol-collapsed",Sm=new RegExp(["^\\s*(?=(?:(?:[-a-z]+\\s*){0,2}(italic|oblique))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(small-caps))?)","(?=(?:(?:[-a-z]+\\s*){0,2}(bold(?:er)?|lighter|[1-9]00 ))?)","(?:(?:normal|\\1|\\2|\\3)\\s*){0,3}((?:xx?-)?","(?:small|large)|medium|smaller|larger|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))","(?:\\s*\\/\\s*(normal|[\\.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])?))","?\\s*([-,\\\"\\'\\sa-z0-9]+?)\\s*$"].join(""),"i"),Em=["style","variant","weight","size","lineHeight","family"],Am={normal:400,bold:700},Cm=function(t){const e=t.match(Sm);if(!e)return null;const i={lineHeight:"normal",size:"1.2em",style:"normal",weight:"400",variant:"normal"};for(let t=0,n=Em.length;t<n;++t){const n=e[t+1];void 0!==n&&(i[Em[t]]="string"==typeof n?n.trim():n)}return isNaN(Number(i.weight))&&i.weight in Am&&(i.weight=Am[i.weight]),i.families=i.family.split(/,\s?/).map(t=>t.trim().replace(/^['"]|['"]$/g,"")),i},Mm="10px sans-serif",Lm=[],Pm=[0,0,0,0],km=new Yd;let Nm,Im=null;const Tm={},Om=new Set(["serif","sans-serif","monospace","cursive","fantasy","system-ui","ui-serif","ui-sans-serif","ui-monospace","ui-rounded","emoji","math","fangsong"]);function Rm(t,e,i){return`${t} ${e} 16px "${i}"`}const Fm=function(){const t=100;let e,i;async function n(t){await i.ready;const e=Cm(t),n=e.families[0].toLowerCase(),s=e.weight,r=[];if(i.forEach(t=>{const i=t.family.replace(/^['"]|['"]$/g,"").toLowerCase(),o=Am[t.weight]||t.weight;i===n&&t.style===e.style&&o==s&&r.push(t)}),0===r.length)return!1;const o=await Promise.all(r.map(t=>t.load().then(()=>!0,()=>!1)));return o.some(t=>t)}async function s(){await i.ready;let r=!0;const o=km.getProperties(),a=Object.keys(o).filter(e=>o[e]<t);for(let e=a.length-1;e>=0;--e){const i=a[e];let s=o[i];s<t&&(await n(i)?(fd(Tm),km.set(i,t)):(s+=10,km.set(i,s,!0),s<t&&(r=!1)))}e=void 0,r||(e=setTimeout(s,100))}return async function(t){i||(i=Ou?self.fonts:document.fonts);const n=Cm(t);if(!n)return;const r=n.families;let o=!1;for(const t of r){if(Om.has(t))continue;const e=Rm(n.style,n.weight,t);void 0===km.get(e)&&(km.set(e,0,!0),o=!0)}o&&(clearTimeout(e),e=setTimeout(s,100))}}(),Dm=function(){let t;return function(e){let i=Tm[e];if(null==i){if(Ou){const t=Cm(e),n=jm(e,"Žg");i=(isNaN(Number(t.lineHeight))?1.2:Number(t.lineHeight))*(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)}else t||(t=document.createElement("div"),t.innerHTML="M",t.style.minHeight="0",t.style.maxHeight="none",t.style.height="auto",t.style.padding="0",t.style.border="none",t.style.position="absolute",t.style.display="block",t.style.left="-99999px"),t.style.font=e,document.body.appendChild(t),i=t.offsetHeight,document.body.removeChild(t);Tm[e]=i}return i}}();function jm(t,e){return Im||(Im=Du(1,1)),t!=Nm&&(Im.font=t,Nm=Im.font),Im.measureText(e)}function Gm(t,e){return jm(t,e).width}function Bm(t,e,i){if(e in i)return i[e];const n=e.split("\n").reduce((e,i)=>Math.max(e,Gm(t,i)),0);return i[e]=n,n}const zm={BEGIN_GEOMETRY:0,BEGIN_PATH:1,CIRCLE:2,CLOSE_PATH:3,CUSTOM:4,DRAW_CHARS:5,DRAW_IMAGE:6,END_GEOMETRY:7,FILL:8,MOVE_TO_LINE_TO:9,SET_FILL_STYLE:10,SET_STROKE_STYLE:11,STROKE:12},qm=[zm.FILL],Um=[zm.STROKE],Wm=[zm.BEGIN_PATH],Vm=[zm.CLOSE_PATH],Hm=zm,Km=class extends _m{constructor(t,e,i,n){super(),this.tolerance=t,this.maxExtent=e,this.pixelRatio=n,this.maxLineWidth=0,this.resolution=i,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_=null,this.bufferedMaxExtent_=null,this.instructions=[],this.coordinates=[],this.tmpCoordinate_=[],this.hitDetectionInstructions=[],this.state={}}applyPixelRatio(t){const e=this.pixelRatio;return 1==e?t:t.map(function(t){return t*e})}appendFlatPointCoordinates(t,e){const i=this.getBufferedMaxExtent(),n=this.tmpCoordinate_,s=this.coordinates;let r=s.length;for(let o=0,a=t.length;o<a;o+=e)n[0]=t[o],n[1]=t[o+1],Er(i,n)&&(s[r++]=n[0],s[r++]=n[1]);return r}appendFlatLineCoordinates(t,e,i,n,s,r){const o=this.coordinates;let a=o.length;const h=this.getBufferedMaxExtent();r&&(e+=n);let l=t[e],c=t[e+1];const u=this.tmpCoordinate_;let d,f,p,g=!0;for(d=e+n;d<i;d+=n)u[0]=t[d],u[1]=t[d+1],p=Mr(h,u),p!==f?(g&&(o[a++]=l,o[a++]=c,g=!1),o[a++]=u[0],o[a++]=u[1]):1===p?(o[a++]=u[0],o[a++]=u[1],g=!1):g=!0,l=u[0],c=u[1],f=p;return(s&&g||d===e+n)&&(o[a++]=l,o[a++]=c),a}drawCustomCoordinates_(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r){const o=i[r],a=this.appendFlatLineCoordinates(t,e,o,n,!1,!1);s.push(a),e=o}return e}drawCustom(t,e,i,n,s){this.beginGeometry(t,e,s);const r=t.getType(),o=t.getStride(),a=this.coordinates.length;let h,l,c,u,d;switch(r){case"MultiPolygon":h=t.getOrientedFlatCoordinates(),u=[];const e=t.getEndss();d=0;for(let t=0,i=e.length;t<i;++t){const i=[];d=this.drawCustomCoordinates_(h,d,e[t],o,i),u.push(i)}this.instructions.push([Hm.CUSTOM,a,u,t,i,Zf,s]),this.hitDetectionInstructions.push([Hm.CUSTOM,a,u,t,n||i,Zf,s]);break;case"Polygon":case"MultiLineString":c=[],h="Polygon"==r?t.getOrientedFlatCoordinates():t.getFlatCoordinates(),d=this.drawCustomCoordinates_(h,0,t.getEnds(),o,c),this.instructions.push([Hm.CUSTOM,a,c,t,i,Yf,s]),this.hitDetectionInstructions.push([Hm.CUSTOM,a,c,t,n||i,Yf,s]);break;case"LineString":case"Circle":h=t.getFlatCoordinates(),l=this.appendFlatLineCoordinates(h,0,h.length,o,!1,!1),this.instructions.push([Hm.CUSTOM,a,l,t,i,Xf,s]),this.hitDetectionInstructions.push([Hm.CUSTOM,a,l,t,n||i,Xf,s]);break;case"MultiPoint":h=t.getFlatCoordinates(),l=this.appendFlatPointCoordinates(h,o),l>a&&(this.instructions.push([Hm.CUSTOM,a,l,t,i,Xf,s]),this.hitDetectionInstructions.push([Hm.CUSTOM,a,l,t,n||i,Xf,s]));break;case"Point":h=t.getFlatCoordinates(),this.coordinates.push(h[0],h[1]),l=this.coordinates.length,this.instructions.push([Hm.CUSTOM,a,l,t,i,void 0,s]),this.hitDetectionInstructions.push([Hm.CUSTOM,a,l,t,n||i,void 0,s])}this.endGeometry(e)}beginGeometry(t,e,i){this.beginGeometryInstruction1_=[Hm.BEGIN_GEOMETRY,e,0,t,i],this.instructions.push(this.beginGeometryInstruction1_),this.beginGeometryInstruction2_=[Hm.BEGIN_GEOMETRY,e,0,t,i],this.hitDetectionInstructions.push(this.beginGeometryInstruction2_)}finish(){return{instructions:this.instructions,hitDetectionInstructions:this.hitDetectionInstructions,coordinates:this.coordinates}}reverseHitDetectionInstructions(){const t=this.hitDetectionInstructions;let e;t.reverse();const i=t.length;let n,s,r=-1;for(e=0;e<i;++e)n=t[e],s=n[0],s==Hm.END_GEOMETRY?r=e:s==Hm.BEGIN_GEOMETRY&&(n[2]=e,Pd(this.hitDetectionInstructions,r,e),r=-1)}fillStyleToState(t,e={}){if(t){const i=t.getColor();e.fillPatternScale=i&&"object"==typeof i&&"src"in i?this.pixelRatio:1,e.fillStyle=Qp(i||"#000")??void 0}else e.fillStyle=void 0;return e}strokeStyleToState(t,e={}){if(t){const i=t.getColor();e.strokeStyle=Qp(i||"#000");const n=t.getLineCap();e.lineCap=void 0!==n?n:"round";const s=t.getLineDash();e.lineDash=s?s.slice():Lm;const r=t.getLineDashOffset();e.lineDashOffset=r||0;const o=t.getLineJoin();e.lineJoin=void 0!==o?o:"round";const a=t.getWidth();e.lineWidth=void 0!==a?a:1;const h=t.getMiterLimit();e.miterLimit=void 0!==h?h:10;const l=t.getOffset();e.strokeOffset=l??0,e.lineWidth>this.maxLineWidth&&(this.maxLineWidth=e.lineWidth,this.bufferedMaxExtent_=null)}else e.strokeStyle=void 0,e.lineCap=void 0,e.lineDash=null,e.lineDashOffset=void 0,e.lineJoin=void 0,e.lineWidth=void 0,e.miterLimit=void 0,e.strokeOffset=void 0;return e}setFillStrokeStyle(t,e){const i=this.state;this.fillStyleToState(t,i),this.strokeStyleToState(e,i)}createFill(t){const e=t.fillStyle,i=[Hm.SET_FILL_STYLE,e];return"string"!=typeof e&&i.push(t.fillPatternScale),i}applyStroke(t){this.instructions.push(this.createStroke(t))}createStroke(t){return[Hm.SET_STROKE_STYLE,t.strokeStyle,t.lineWidth*this.pixelRatio,t.lineCap,t.lineJoin,t.miterLimit,t.lineDash?this.applyPixelRatio(t.lineDash):null,t.lineDashOffset*this.pixelRatio]}updateFillStyle(t,e){const i=t.fillStyle;(void 0!==i&&"string"!=typeof i||t.currentFillStyle!=i)&&(this.instructions.push(e.call(this,t)),t.currentFillStyle=i)}updateStrokeStyle(t,e){const i=t.strokeStyle,n=t.lineCap,s=t.lineDash,r=t.lineDashOffset,o=t.lineJoin,a=t.lineWidth,h=t.miterLimit,l=t.strokeOffset;(t.currentStrokeStyle!=i||t.currentLineCap!=n||s!=t.currentLineDash&&!Nd(t.currentLineDash,s)||t.currentLineDashOffset!=r||t.currentLineJoin!=o||t.currentLineWidth!=a||t.currentMiterLimit!=h||t.currentStrokeOffset!=l)&&(e.call(this,t),t.currentStrokeStyle=i,t.currentLineCap=n,t.currentLineDash=s,t.currentLineDashOffset=r,t.currentLineJoin=o,t.currentLineWidth=a,t.currentMiterLimit=h,t.currentStrokeOffset=l)}endGeometry(t){this.beginGeometryInstruction1_[2]=this.instructions.length,this.beginGeometryInstruction1_=null,this.beginGeometryInstruction2_[2]=this.hitDetectionInstructions.length,this.beginGeometryInstruction2_=null;const e=[Hm.END_GEOMETRY,t];this.instructions.push(e),this.hitDetectionInstructions.push(e)}getBufferedMaxExtent(){if(!this.bufferedMaxExtent_&&(this.bufferedMaxExtent_=xr(this.maxExtent),this.maxLineWidth>0)){const t=this.resolution*(this.maxLineWidth+1)/2;br(this.bufferedMaxExtent_,t,this.bufferedMaxExtent_)}return this.bufferedMaxExtent_}},$m=class extends Km{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinatess_(t,e,i,n,s){const r=this.state,o=void 0!==r.fillStyle,a=void 0!==r.strokeStyle,h=i.length;this.instructions.push(Wm),this.hitDetectionInstructions.push(Wm);for(let r=0;r<h;++r){const o=i[r],h=this.coordinates.length,l=this.appendFlatLineCoordinates(t,e,o,n,!0,!a);this.instructions.push([Hm.MOVE_TO_LINE_TO,h,l,s*this.pixelRatio,!0]),this.hitDetectionInstructions.push([Hm.MOVE_TO_LINE_TO,h,l,s,!0]),a&&(this.instructions.push(Vm),this.hitDetectionInstructions.push(Vm)),e=o}return o&&(this.instructions.push(qm),this.hitDetectionInstructions.push(qm)),a&&(this.instructions.push(Um),this.hitDetectionInstructions.push(Um)),e}drawCircle(t,e,i){const n=this.state,s=n.fillStyle,r=n.strokeStyle,o=n.strokeOffset;if(void 0===s&&void 0===r)return;if(this.handleStrokeOffset_(()=>this.drawCircle(t,e,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Hm.SET_FILL_STYLE,"#000"]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Hm.SET_STROKE_STYLE,"#000",n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Lm,0]);const a=t.getFlatCoordinates(),h=t.getStride(),l=this.coordinates.length;this.appendFlatLineCoordinates(a,0,a.length,h,!1,!1);const c=[Hm.CIRCLE,l,o];this.instructions.push(Wm,c),this.hitDetectionInstructions.push(Wm,c),void 0!==n.fillStyle&&(this.instructions.push(qm),this.hitDetectionInstructions.push(qm)),void 0!==n.strokeStyle&&(this.instructions.push(Um),this.hitDetectionInstructions.push(Um)),this.endGeometry(e)}drawPolygon(t,e,i){const n=this.state,s=n.fillStyle,r=n.strokeStyle,o=n.strokeOffset;if(void 0===s&&void 0===r)return;if(this.handleStrokeOffset_(()=>this.drawPolygon(t,e,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Hm.SET_FILL_STYLE,"#000"]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Hm.SET_STROKE_STYLE,"#000",n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Lm,0]);const a=t.getEnds(),h=t.getOrientedFlatCoordinates(),l=t.getStride();this.drawFlatCoordinatess_(h,0,a,l,o),this.endGeometry(e)}drawMultiPolygon(t,e,i){const n=this.state,s=n.fillStyle,r=n.strokeStyle,o=n.strokeOffset;if(void 0===s&&void 0===r)return;if(this.handleStrokeOffset_(()=>this.drawMultiPolygon(t,e,i)))return;this.setFillStrokeStyles_(),this.beginGeometry(t,e,i),void 0!==n.fillStyle&&this.hitDetectionInstructions.push([Hm.SET_FILL_STYLE,"#000"]),void 0!==n.strokeStyle&&this.hitDetectionInstructions.push([Hm.SET_STROKE_STYLE,"#000",n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Lm,0]);const a=t.getEndss(),h=t.getOrientedFlatCoordinates(),l=t.getStride();let c=0;for(let t=0,e=a.length;t<e;++t)c=this.drawFlatCoordinatess_(h,c,a[t],l,o);this.endGeometry(e)}finish(){this.reverseHitDetectionInstructions(),this.state=null;const t=this.tolerance;if(0!==t){const e=this.coordinates;for(let i=0,n=e.length;i<n;++i)e[i]=Tf(e[i],t)}return super.finish()}setFillStrokeStyles_(){const t=this.state;this.updateFillStyle(t,this.createFill),this.updateStrokeStyle(t,this.applyStroke)}handleStrokeOffset_(t){const e=this.state,i=e.fillStyle,n=e.strokeStyle,s=e.strokeOffset;return Math.abs(s)>0&&void 0!==i&&void 0!==n&&(e.strokeStyle=void 0,e.strokeOffset=0,t(),e.fillStyle=void 0,e.strokeStyle=n,e.strokeOffset=s,t(),e.fillStyle=i,!0)}};let Xm=0,Ym=1;function Zm(t,e,i,n,s,r,o,a){const h=o-s,l=a-r;let c=0,u=1;if(0===h){if(s<t||s>i)return!1}else{let e=(t-s)/h,n=(i-s)/h;if(e>n){const t=e;e=n,n=t}if(e>c&&(c=e),n<u&&(u=n),c>u)return!1}if(0===l){if(r<e||r>n)return!1}else{let t=(e-r)/l,i=(n-r)/l;if(t>i){const e=t;t=i,i=e}if(t>c&&(c=t),i<u&&(u=i),c>u)return!1}return Xm=c,Ym=u,!0}function Jm(t,e,i,n,s){const r=[];let o=i,a=0,h=e.slice(i,2);for(;a<t&&o+s<n;){const[i,n]=h.slice(-2),l=e[o+s],c=e[o+s+1],u=Math.sqrt((l-i)*(l-i)+(c-n)*(c-n));if(a+=u,a>=t){const e=(t-a+u)/u,d=ho(i,l,e),f=ho(n,c,e);h.push(d,f),r.push(h),h=[d,f],a==t&&(o+=s),a=0}else if(a<t)h.push(e[o+s],e[o+s+1]),o+=s;else{const t=u-a,e=ho(i,l,t/u),d=ho(n,c,t/u);h.push(e,d),r.push(h),h=[e,d],a=0,o+=s}}return a>0&&r.push(h),r}function Qm(t,e,i,n,s){let r,o,a,h,l,c,u,d,f,p,g=i,m=i,_=0,v=0,y=i;for(o=i;o<n;o+=s){const i=e[o],n=e[o+1];void 0!==l&&(f=i-l,p=n-c,h=Math.sqrt(f*f+p*p),void 0!==u&&(v+=a,r=Math.acos((u*f+d*p)/(a*h)),r>t&&(v>_&&(_=v,g=y,m=o),v=0,y=o-s)),a=h,u=f,d=p),l=i,c=n}return v+=h,v>_?[y,o]:[g,m]}const t_={left:0,center:.5,right:1,top:0,middle:.5,hanging:.2,alphabetic:.8,ideographic:.8,bottom:1},e_={Circle:$m,Default:Km,Image:class extends Km{constructor(t,e,i,n){super(t,e,i,n),this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.anchorX_=void 0,this.anchorY_=void 0,this.height_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.scale_=void 0,this.width_=void 0,this.declutterMode_=void 0,this.declutterImageWithText_=void 0}drawPoint(t,e,i){if(!this.image_||this.maxExtent&&!Er(this.maxExtent,t.getFlatCoordinates()))return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),s=t.getStride(),r=this.coordinates.length,o=this.appendFlatPointCoordinates(n,s);this.instructions.push([Hm.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Hm.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}drawMultiPoint(t,e,i){if(!this.image_)return;this.beginGeometry(t,e,i);const n=t.getFlatCoordinates(),s=[];for(let e=0,i=n.length;e<i;e+=t.getStride())this.maxExtent&&!Er(this.maxExtent,n.slice(e,e+2))||s.push(n[e],n[e+1]);const r=this.coordinates.length,o=this.appendFlatPointCoordinates(s,2);this.instructions.push([Hm.DRAW_IMAGE,r,o,this.image_,this.anchorX_*this.imagePixelRatio_,this.anchorY_*this.imagePixelRatio_,Math.ceil(this.height_*this.imagePixelRatio_),this.opacity_,this.originX_*this.imagePixelRatio_,this.originY_*this.imagePixelRatio_,this.rotateWithView_,this.rotation_,[this.scale_[0]*this.pixelRatio/this.imagePixelRatio_,this.scale_[1]*this.pixelRatio/this.imagePixelRatio_],Math.ceil(this.width_*this.imagePixelRatio_),this.declutterMode_,this.declutterImageWithText_]),this.hitDetectionInstructions.push([Hm.DRAW_IMAGE,r,o,this.hitDetectionImage_,this.anchorX_,this.anchorY_,this.height_,1,this.originX_,this.originY_,this.rotateWithView_,this.rotation_,this.scale_,this.width_,this.declutterMode_,this.declutterImageWithText_]),this.endGeometry(e)}finish(){return this.reverseHitDetectionInstructions(),this.anchorX_=void 0,this.anchorY_=void 0,this.hitDetectionImage_=null,this.image_=null,this.imagePixelRatio_=void 0,this.height_=void 0,this.scale_=void 0,this.opacity_=void 0,this.originX_=void 0,this.originY_=void 0,this.rotateWithView_=void 0,this.rotation_=void 0,this.width_=void 0,super.finish()}setImageStyle(t,e){const i=t.getAnchor(),n=t.getSize(),s=t.getOrigin();this.imagePixelRatio_=t.getPixelRatio(this.pixelRatio),this.anchorX_=i[0],this.anchorY_=i[1],this.hitDetectionImage_=t.getHitDetectionImage(),this.image_=t.getImage(this.pixelRatio),this.height_=n[1],this.opacity_=t.getOpacity(),this.originX_=s[0],this.originY_=s[1],this.rotateWithView_=t.getRotateWithView(),this.rotation_=t.getRotation(),this.scale_=t.getScaleArray(),this.width_=n[0],this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}},LineString:class extends Km{constructor(t,e,i,n){super(t,e,i,n)}drawFlatCoordinates_(t,e,i,n,s){const r=this.coordinates.length,o=this.appendFlatLineCoordinates(t,e,i,n,!1,!1);return this.instructions.push([Hm.MOVE_TO_LINE_TO,r,o,s*this.pixelRatio]),this.hitDetectionInstructions.push([Hm.MOVE_TO_LINE_TO,r,o,s]),i}drawLineString(t,e,i){const n=this.state,s=n.strokeStyle,r=n.lineWidth,o=n.strokeOffset;if(void 0===s||void 0===r)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([Hm.SET_STROKE_STYLE,"#000",n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Lm,0],Wm);const a=t.getFlatCoordinates(),h=t.getStride();this.drawFlatCoordinates_(a,0,a.length,h,o),this.hitDetectionInstructions.push(Um),this.endGeometry(e)}drawMultiLineString(t,e,i){const n=this.state,s=n.strokeStyle,r=n.lineWidth,o=n.strokeOffset;if(void 0===s||void 0===r)return;this.updateStrokeStyle(n,this.applyStroke),this.beginGeometry(t,e,i),this.hitDetectionInstructions.push([Hm.SET_STROKE_STYLE,"#000",n.lineWidth,n.lineCap,n.lineJoin,n.miterLimit,Lm,0],Wm);const a=t.getEnds(),h=t.getFlatCoordinates(),l=t.getStride();let c=0;for(let t=0,e=a.length;t<e;++t)c=this.drawFlatCoordinates_(h,c,a[t],l,o);this.hitDetectionInstructions.push(Um),this.endGeometry(e)}finish(){const t=this.state;return null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&this.instructions.push(Um),this.reverseHitDetectionInstructions(),this.state=null,super.finish()}applyStroke(t){null!=t.lastStroke&&t.lastStroke!=this.coordinates.length&&(this.instructions.push(Um),t.lastStroke=this.coordinates.length),t.lastStroke=0,super.applyStroke(t),this.instructions.push(Wm)}},Polygon:$m,Text:class extends Km{constructor(t,e,i,n){super(t,e,i,n),this.labels_=null,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=void 0,this.textKeepUpright_=void 0,this.textRotation_=0,this.textFillState_=null,this.fillStates={},this.fillStates["#000"]={fillStyle:"#000"},this.textStrokeState_=null,this.strokeStates={},this.textState_={},this.textStates={},this.textKey_="",this.fillKey_="",this.strokeKey_="",this.declutterMode_=void 0,this.declutterImageWithText_=void 0}finish(){const t=super.finish();return t.textStates=this.textStates,t.fillStates=this.fillStates,t.strokeStates=this.strokeStates,t}drawText(t,e,i){const n=this.textFillState_,s=this.textStrokeState_,r=this.textState_;if(""===this.text_||!r||!n&&!s)return;const o=this.coordinates;let a=o.length;const h=t.getType();let l=null,c=t.getStride();if("line"!==r.placement||"LineString"!=h&&"MultiLineString"!=h&&"Polygon"!=h&&"MultiPolygon"!=h){let n=r.overflow?null:[];switch(h){case"Point":case"MultiPoint":l=t.getFlatCoordinates();break;case"LineString":l=t.getFlatMidpoint();break;case"Circle":l=t.getCenter();break;case"MultiLineString":l=t.getFlatMidpoints(),c=2;break;case"Polygon":l=t.getFlatInteriorPoint(),r.overflow||n.push(l[2]/this.resolution),c=3;break;case"MultiPolygon":const e=t.getFlatInteriorPoints();l=[];for(let t=0,i=e.length;t<i;t+=3)r.overflow||n.push(e[t+2]/this.resolution),l.push(e[t],e[t+1]);if(0===l.length)return;c=2}const s=this.appendFlatPointCoordinates(l,c);if(s===a)return;if(n&&(s-a)/2!==l.length/c){let t=a/2;n=n.filter((e,i)=>{const n=o[2*(t+i)]===l[i*c]&&o[2*(t+i)+1]===l[i*c+1];return n||--t,n})}this.saveTextStates_();const u=r.backgroundFill?this.createFill(this.fillStyleToState(r.backgroundFill)):null,d=r.backgroundStroke?this.createStroke(this.strokeStyleToState(r.backgroundStroke)):null;this.beginGeometry(t,e,i);let f=r.padding;if(f!=Pm&&(r.scale[0]<0||r.scale[1]<0)){let t=r.padding[0],e=r.padding[1],i=r.padding[2],n=r.padding[3];r.scale[0]<0&&(e=-e,n=-n),r.scale[1]<0&&(t=-t,i=-i),f=[t,e,i,n]}const p=this.pixelRatio;this.instructions.push([Hm.DRAW_IMAGE,a,s,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[1,1],NaN,this.declutterMode_,this.declutterImageWithText_,f==Pm?Pm:f.map(function(t){return t*p}),u,d,this.text_,this.textKey_,this.strokeKey_,this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]);const g=1/p,m=u?u.slice(0):null;m&&(m[1]="#000"),this.hitDetectionInstructions.push([Hm.DRAW_IMAGE,a,s,null,NaN,NaN,NaN,1,0,0,this.textRotateWithView_,this.textRotation_,[g,g],NaN,this.declutterMode_,this.declutterImageWithText_,f,m,d,this.text_,this.textKey_,this.strokeKey_,this.fillKey_?"#000":this.fillKey_,this.textOffsetX_,this.textOffsetY_,n]),this.endGeometry(e)}else{const n=t.getExtent();if(!Zr(this.maxExtent,n))return;let s;if(l=t.getFlatCoordinates(),"LineString"==h)s=[l.length];else if("MultiLineString"==h)s=t.getEnds();else if("Polygon"==h)s=t.getEnds().slice(0,1);else if("MultiPolygon"==h){const e=t.getEndss();s=[];for(let t=0,i=e.length;t<i;++t)s.push(e[t][0])}if(("LineString"==h||"MultiLineString"==h)&&!Ar(this.getBufferedMaxExtent(),n)){const t=function(t,e,i,n){const s=n[0],r=n[1],o=n[2],a=n[3],h=[],l=[];let c,u,d=!1,f=0;for(let n=0,p=e.length;n<p;++n){const p=e[n];let g=t[f],m=t[f+1],_=!1;for(let e=f+i;e<p;e+=i){const i=t[e],n=t[e+1];if(Zm(s,r,o,a,g,m,i,n)){const t=i-g,e=n-m,s=g+Xm*t,r=m+Xm*e,o=g+Ym*t,a=m+Ym*e;d&&_&&s===c&&r===u?h.push(o,a):(d&&l.push(h.length),h.push(s,r,o,a),d=!0),c=o,u=a,_=!0}g=i,m=n}f=p}return d&&l.push(h.length),{flatCoordinates:h,ends:l}}(l,s,c,this.getBufferedMaxExtent());if(l=t.flatCoordinates,s=t.ends,c=2,0===s.length)return}this.beginGeometry(t,e,i);const u=r.repeat,d=u?void 0:r.textAlign;let f=0;for(let t=0,e=s.length;t<e;++t){let e;e=u?Jm(u*this.resolution,l,f,s[t],c):[l.slice(f,s[t])];for(let i=0,n=e.length;i<n;++i){const n=e[i];let h=0,l=n.length;if(null==d){const t=Qm(r.maxAngle,n,0,n.length,2);h=t[0],l=t[1]}for(let t=h;t<l;t+=c)o.push(n[t],n[t+1]);const u=o.length;f=s[t],this.drawChars_(a,u),a=u}}this.endGeometry(e)}}saveTextStates_(){const t=this.textStrokeState_,e=this.textState_,i=this.textFillState_,n=this.strokeKey_;t&&(n in this.strokeStates||(this.strokeStates[n]={strokeStyle:t.strokeStyle,lineCap:t.lineCap,lineDashOffset:t.lineDashOffset,lineWidth:t.lineWidth,lineJoin:t.lineJoin,miterLimit:t.miterLimit,lineDash:t.lineDash}));const s=this.textKey_;s in this.textStates||(this.textStates[s]={font:e.font,textAlign:e.textAlign||"center",justify:e.justify,textBaseline:e.textBaseline||"middle",scale:e.scale});const r=this.fillKey_;i&&(r in this.fillStates||(this.fillStates[r]={fillStyle:i.fillStyle}))}drawChars_(t,e){const i=this.textStrokeState_,n=this.textState_,s=this.strokeKey_,r=this.textKey_,o=this.fillKey_;this.saveTextStates_();const a=this.pixelRatio,h=t_[n.textBaseline],l=this.textOffsetX_*a,c=this.textOffsetY_*a,u=this.text_,d=i?i.lineWidth*Math.abs(n.scale[0])/2:0;this.instructions.push([Hm.DRAW_CHARS,t,e,h,n.overflow,o,n.maxAngle,a,c,s,d*a,u,r,1,this.declutterMode_,this.textKeepUpright_,l]),this.hitDetectionInstructions.push([Hm.DRAW_CHARS,t,e,h,n.overflow,o?"#000":o,n.maxAngle,a,c,s,d*a,u,r,1/a,this.declutterMode_,this.textKeepUpright_,l])}setTextStyle(t,e){let i,n,s;
2if(t){const e=t.getFill();e?(n=this.textFillState_,n||(n={},this.textFillState_=n),n.fillStyle=Qp(e.getColor()||"#000")):(n=null,this.textFillState_=n);const r=t.getStroke();if(r){s=this.textStrokeState_,s||(s={},this.textStrokeState_=s);const t=r.getLineDash(),e=r.getLineDashOffset(),i=r.getWidth(),n=r.getMiterLimit();s.lineCap=r.getLineCap()||"round",s.lineDash=t?t.slice():Lm,s.lineDashOffset=void 0===e?0:e,s.lineJoin=r.getLineJoin()||"round",s.lineWidth=void 0===i?1:i,s.miterLimit=void 0===n?10:n,s.strokeStyle=Qp(r.getColor()||"#000")}else s=null,this.textStrokeState_=s;i=this.textState_;const o=t.getFont()||Mm;Fm(o);const a=t.getScaleArray();i.overflow=t.getOverflow(),i.font=o,i.maxAngle=t.getMaxAngle(),i.placement=t.getPlacement(),i.textAlign=t.getTextAlign(),i.repeat=t.getRepeat(),i.justify=t.getJustify(),i.textBaseline=t.getTextBaseline()||"middle",i.backgroundFill=t.getBackgroundFill(),i.backgroundStroke=t.getBackgroundStroke(),i.padding=t.getPadding()||Pm,i.scale=void 0===a?[1,1]:a;const h=t.getOffsetX(),l=t.getOffsetY(),c=t.getRotateWithView(),u=t.getKeepUpright(),d=t.getRotation();this.text_=t.getText()||"",this.textOffsetX_=void 0===h?0:h,this.textOffsetY_=void 0===l?0:l,this.textRotateWithView_=void 0!==c&&c,this.textKeepUpright_=void 0===u||u,this.textRotation_=void 0===d?0:d,this.strokeKey_=s?("string"==typeof s.strokeStyle?s.strokeStyle:dd(s.strokeStyle))+s.lineCap+s.lineDashOffset+"|"+s.lineWidth+s.lineJoin+s.miterLimit+"["+s.lineDash.join()+"]":"",this.textKey_=i.font+i.scale+(i.textAlign||"?")+(i.repeat||"?")+(i.justify||"?")+(i.textBaseline||"?"),this.fillKey_=n&&n.fillStyle?"string"==typeof n.fillStyle?n.fillStyle:"|"+dd(n.fillStyle):""}else this.text_="";this.declutterMode_=t.getDeclutterMode(),this.declutterImageWithText_=e}}},i_=class{constructor(t,e,i,n){this.tolerance_=t,this.maxExtent_=e,this.pixelRatio_=n,this.resolution_=i,this.buildersByZIndex_={}}finish(){const t={};for(const e in this.buildersByZIndex_){t[e]=t[e]||{};const i=this.buildersByZIndex_[e];for(const n in i){const s=i[n].finish();t[e][n]=s}}return t}getBuilder(t,e){const i=void 0!==t?t.toString():"0";let n=this.buildersByZIndex_[i];void 0===n&&(n={},this.buildersByZIndex_[i]=n);let s=n[e];return void 0===s&&(s=new(0,e_[e])(this.tolerance_,this.maxExtent_,this.resolution_,this.pixelRatio_),n[e]=s),s}};function n_(t,e,i,n,s,r,o,a){o=o??[],a=a??n;const h=t[e+n],l=t[e+n+1],c=t[i-2*n],u=t[i-2*n+1];let d,f,p,g,m,_,v,y,w=0;for(let b=e;b<i;b+=n){p=d,g=f,m=void 0,_=void 0,b+n<i&&(m=t[b+n],_=t[b+n+1]),r&&b===e&&(p=c,g=u),r&&b===i-n&&(m=h,_=l),d=t[b],f=t[b+1],[v,y]=s_(d,f,p,g,m,_,s),o[w++]=v,o[w++]=y;for(let e=2;e<a;e++)o[w++]=t[b+e]}return o.length!=w&&(o.length=w),o}function s_(t,e,i,n,s,r,o){let a,h;void 0!==i&&void 0!==n?(a=t-i,h=e-n):void 0!==s&&void 0!==r?(a=s-t,h=r-e):(a=1,h=0);const l=Math.hypot(a,h),c=a/l,u=h/l;if(a=-u,h=c,void 0===i||void 0===n)return[t+a*o,e+h*o];if(void 0===s||void 0===r)return[t+a*o,e+h*o];const d=function(t,e,i){const n=Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])),s=[(e[0]-t[0])/n,(e[1]-t[1])/n],r=[-s[1],s[0]],o=Math.sqrt((i[0]-t[0])*(i[0]-t[0])+(i[1]-t[1])*(i[1]-t[1])),a=[(i[0]-t[0])/o,(i[1]-t[1])/o];let h=0===n||0===o?0:Math.acos(io(a[0]*s[0]+a[1]*s[1],-1,1));return h=Math.max(h,1e-5),a[0]*r[0]+a[1]*r[1]>0?h:2*Math.PI-h}([t,e],[i,n],[s,r]);if(Math.cos(d)>.998)return[t+c*o,e+u*o];const f=Math.cos(d/2),p=Math.sin(d/2);return[t+1/p*(p*a+f*h)*o,e+1/p*(-f*a+p*h)*o]}function r_(t,e,i=!1){for(let n=0,s=t.length-2;n<s;n+=e)for(let s=i&&0===n?t.length-3*e:t.length-2*e;s>n+e;s-=e){const i=t[n],r=t[n+1],o=t[n+e],a=t[n+e+1],h=t[s],l=t[s+1],c=t[s+e],u=t[s+e+1],d=(u-l)*(o-i)-(c-h)*(a-r);if(0===d)continue;const f=((c-h)*(r-l)-(u-l)*(i-h))/d,p=((o-i)*(r-l)-(a-r)*(i-h))/d;if(f>0&&f<1&&p>0&&p<1){const h=i+f*(o-i),l=r+f*(a-r);t[n+e]=h,t[n+e+1]=l,t.splice(n+2*e,s-n-e);break}}return t}let o_;function a_(t,e,i,n,s,r,o,a,h,l,c,u,d=!0){let f=t[e],p=t[e+1],g=0,m=0,_=0,v=0;function y(){g=f,m=p,f=t[e+=n],p=t[e+1],v+=_,_=Math.sqrt((f-g)*(f-g)+(p-m)*(p-m))}do{y()}while(e<i-n&&v+_<r);let w=0===_?0:(r-v)/_;const b=ho(g,f,w),x=ho(m,p,w),S=e-n,E=v,A=r+a*h(l,s,c);for(;e<i-n&&v+_<A;)y();w=0===_?0:(A-v)/_;const C=ho(g,f,w),M=ho(m,p,w);let L=!1;if(d)if(u){const t=[b,x,C,M];af(t,0,4,2,u,t,t),L=t[0]>t[2]}else L=b>C;const P=Math.PI,k=[],N=S+n===e;let I;if(_=0,v=E,f=t[e=S],p=t[e+1],N){y(),I=Math.atan2(p-m,f-g),L&&(I+=I>0?-P:P);const t=(C+b)/2,e=(M+x)/2;return k[0]=[t,e,(A-r)/2,I,s],k}s=s.replace(/\n/g," ");const T=Array.from((o_||(o_=new Intl.Segmenter(void 0,{granularity:"grapheme"})),o_).segment(s),t=>
vendor: 4,492 bytes, line 2
2t.segment);for(let t=0,s=T.length;t<s;){y();let u=Math.atan2(p-m,f-g);if(L&&(u+=u>0?-P:P),void 0!==I){let t=u-I;if(t+=t>P?-2*P:t<-P?2*P:0,Math.abs(t)>o)return null}I=u;const d=t;let b=0;for(;t<s;++t){const o=a*h(l,T[L?s-t-1:t],c);if(e+n<i&&v+_<r+b+o/2)break;b+=o}if(t===d)continue;const x=(L?T.slice(s-t,s-d):T.slice(d,t)).join("");w=0===_?0:(r+b/2-v)/_;const S=ho(g,f,w),E=ho(m,p,w);k.push([S,E,b/2,u,x]),r+=b}return k}const h_=[1/0,1/0,-1/0,-1/0],l_=[],c_=[],u_=[],d_=[];function f_(t){return t[3].declutterBox}const p_=new RegExp("["+String.fromCharCode(1425)+"-"+String.fromCharCode(2303)+String.fromCharCode(64285)+"-"+String.fromCharCode(65023)+String.fromCharCode(65136)+"-"+String.fromCharCode(65276)+String.fromCharCode(67584)+"-"+String.fromCharCode(69631)+String.fromCharCode(124928)+"-"+String.fromCharCode(126975)+"]");function g_(t,e){return"start"===e?e=p_.test(t)?"right":"left":"end"===e&&(e=p_.test(t)?"left":"right"),t_[e]}function m_(t,e,i){return i>0&&t.push("\n",""),t.push(e,""),t}function __(t,e,i){return i%2==0&&(t+=e),t}const v_=class{constructor(t,e,i,n,s){this.overlaps=i,this.pixelRatio=e,this.resolution=t,this.alignAndScaleFill_,this.instructions=n.instructions,this.coordinates=n.coordinates,this.coordinateCache_={},this.renderedTransform_=Qd(),this.hitDetectionInstructions=n.hitDetectionInstructions,this.pixelCoordinates_=null,this.viewRotation_=0,this.fillStates=n.fillStates||{},this.strokeStates=n.strokeStates||{},this.textStates=n.textStates||{},this.widths_={},this.labels_={},this.zIndexContext_=s?new Wg:null}getZIndexContext(){return this.zIndexContext_}createLabel(t,e,i,n){const s=t+e+i+n;if(this.labels_[s])return this.labels_[s];const r=n?this.strokeStates[n]:null,o=i?this.fillStates[i]:null,a=this.textStates[e],h=this.pixelRatio,l=[a.scale[0]*h,a.scale[1]*h],c=a.justify?t_[a.justify]:g_(Array.isArray(t)?t[0]:t,a.textAlign||"center"),u=n&&r.lineWidth?r.lineWidth:0,d=Array.isArray(t)?t:String(t).split("\n").reduce(m_,[]),{width:f,height:p,widths:g,heights:m,lineWidths:_}=function(t,e){const i=[],n=[],s=[];let r=0,o=0,a=0,h=0;for(let l=0,c=e.length;l<=c;l+=2){const u=e[l];if("\n"===u||l===c){r=Math.max(r,o),s.push(o),o=0,a+=h,h=0;continue}const d=e[l+1]||t.font,f=Gm(d,u);i.push(f),o+=f;const p=Dm(d);n.push(p),h=Math.max(h,p)}return{width:r,height:a,widths:i,heights:n,lineWidths:s}}(a,d),v=f+u,y=[],w=(v+2)*l[0],b=(p+u)*l[1],x={width:w<0?Math.floor(w):Math.ceil(w),height:b<0?Math.floor(b):Math.ceil(b),contextInstructions:y};1==l[0]&&1==l[1]||y.push("scale",l),n&&(y.push("strokeStyle",r.strokeStyle),y.push("lineWidth",u),y.push("lineCap",r.lineCap),y.push("lineJoin",r.lineJoin),y.push("miterLimit",r.miterLimit),y.push("setLineDash",[r.lineDash]),y.push("lineDashOffset",r.lineDashOffset)),i&&y.push("fillStyle",o.fillStyle),y.push("textBaseline","middle"),y.push("textAlign","center");const S=.5-c;let E=c*v+S*u;const A=[],C=[];let M,L=0,P=0,k=0,N=0;for(let t=0,e=d.length;t<e;t+=2){const e=d[t];if("\n"===e){P+=L,L=0,E=c*v+S*u,++N;continue}const s=d[t+1]||a.font;s!==M&&(n&&A.push("font",s),i&&C.push("font",s),M=s),L=Math.max(L,m[k]);const r=[e,E+S*g[k]+c*(g[k]-_[N]),.5*(u+L)+P];E+=g[k],n&&A.push("strokeText",r),i&&C.push("fillText",r),++k}return Array.prototype.push.apply(y,A),Array.prototype.push.apply(y,C),this.labels_[s]=x,x}replayTextBackground_(t,e,i,n,s,r,o){t.beginPath(),t.moveTo.apply(t,e),t.lineTo.apply(t,i),t.lineTo.apply(t,n),t.lineTo.apply(t,s),t.lineTo.apply(t,e),r&&(this.alignAndScaleFill_=r[2],t.fillStyle=r[1],this.fill_(t)),o&&(this.setStrokeStyle_(t,o),t.stroke())}calculateImageOrLabelDimensions_(t,e,i,n,s,r,o,a,h,l,c,u,d,f,p,g){let m=i-(o*=u[0]),_=n-(a*=u[1]);const v=s+h>t?t-h:s,y=r+l>e?e-l:r,w=f[3]+v*u[0]+f[1],b=f[0]+y*u[1]+f[2],x=m-f[3],S=_-f[0];let E;return(p||0!==c)&&(l_[0]=x,d_[0]=x,l_[1]=S,c_[1]=S,c_[0]=x+w,u_[0]=c_[0],u_[1]=S+b,d_[1]=u_[1]),0!==c?(E=ef(Qd(),i,n,1,1,c,-i,-n),tf(E,l_),tf(E,c_),tf(E,u_),tf(E,d_),Lr(Math.min(l_[0],c_[0],u_[0],d_[0]),Math.min(l_[1],c_[1],u_[1],d_[1]),Math.max(l_[0],c_[0],u_[0],d_[0]),Math.max(l_[1],c_[1],u_[1],d_[1]),h_)):Lr(Math.min(x,x+w),Math.min(S,S+b),Math.max(x,x+w),Math.max(S,S+b),h_),d&&(m=Math.round(m),_=Math.round(_)),{drawImageX:m,drawImageY:_,drawImageW:v,drawImageH:y,originX:h,originY:l,declutterBox:{minX:h_[0],minY:h_[1],maxX:h_[2],maxY:h_[3],value:g},canvasTransform:E,scale:u}}replayImageOrLabel_(t,e,i,n,s,r,o){const a=!(!r&&!o),h=n.declutterBox,l=o?o[2]*n.scale[0]/2:0;return h.minX-l<=e[0]&&h.maxX+l>=0&&h.minY-l<=e[1]&&h.maxY+l>
2=0&&(a&&this.replayTextBackground_(t,l_,c_,u_,d_,r,o),function(t,e,i,n,s,r,o,a,h,l,c){t.save(),1!==i&&(void 0===t.globalAlpha?t.globalAlpha=t=>t.globalAlpha*=i:t.globalAlpha*=i),e&&t.transform.apply(t,e),n.contextInstructions?(t.translate(h,l),t.scale(c[0],c[1]),function(t,e){const i=t.contextInstructions;for(let t=0,n=i.length;t<n;t+=2)Array.isArray(i[t+1])?e[i[t]].apply(e,i[t+1]):e[i[t]]=i[t+1]}(n,t)):c[0]<0||c[1]<0?(t.translate(h,l),t.scale(c[0],c[1]),t.drawImage(n,s,r,o,a,0,0,o,a)):t.drawImage(n,s,r,o,a,h,l,o*c[0],a*c[1]),t.restore()}(t,n.canvasTransform,s,i,n.originX,n.originY,n.drawImageW,n.drawImageH,n.drawImageX,n.drawImageY,n.scale)),!0}fill_(t){const e=this.alignAndScaleFill_;if(e){const i=tf(this.renderedTransform_,[0,0]),n=512*this.pixelRatio;t.save(),t.translate(i[0]%n,i[1]%n),1!==e&&t.scale(e,e)}t.fill(),e&&t.restore()}setStrokeStyle_(t,e){t.strokeStyle=e[1],e[1]&&(t.lineWidth=e[2],t.lineCap=e[3],t.lineJoin=e[4],t.miterLimit=e[5],t.lineDashOffset=e[7],t.setLineDash(e[6]))}drawLabelWithPointPlacement_(t,e,i,n){const s=this.textStates[e],r=this.createLabel(t,e,n,i),o=this.strokeStates[i],a=this.pixelRatio,h=g_(Array.isArray(t)?t[0]:t,s.textAlign||"center"),l=t_[s.textBaseline||"middle"],c=o&&o.lineWidth?o.lineWidth:0;return{label:r,anchorX:h*(r.width/a-2*s.scale[0])+2*(.5-h)*c,anchorY:l*r.height/a+2*(.5-l)*c}}execute_(t,e,i,n,s,r,o,a){const h=this.zIndexContext_;let l;var c,u;this.pixelCoordinates_&&Nd(i,this.renderedTransform_)?l=this.pixelCoordinates_:(this.pixelCoordinates_||(this.pixelCoordinates_=[]),l=of(this.coordinates,0,this.coordinates.length,2,i,this.pixelCoordinates_),u=i,(c=this.renderedTransform_)[0]=u[0],c[1]=u[1],c[2]=u[2],c[3]=u[3],c[4]=u[4],c[5]=u[5]);let d=0;const f=n.length;let p,g=0;const m=[];let _,v,y,w,b,x,S,E,A,C,M,L,P,k=0,N=0;const I=this.coordinateCache_,T=this.viewRotation_,O=Math.round(1e12*Math.atan2(-i[1],i[0]))/1e12,R={context:t,pixelRatio:this.pixelRatio,resolution:this.resolution,rotation:T},F=this.instructions!=n||this.overlaps?0:200;let D,j,G,B;for(;d<f;){const i=n[d];switch(i[0]){case Hm.BEGIN_GEOMETRY:D=i[1],B=i[3],D.getGeometry()?void 0===o||Zr(o,B.getExtent())?++d:d=i[2]+1:d=i[2],h&&(h.zIndex=i[4]);break;case Hm.BEGIN_PATH:k>F&&(this.fill_(t),k=0),N>F&&(t.stroke(),N=0),k||N||(t.beginPath(),b=NaN,x=NaN),++d;break;case Hm.CIRCLE:g=i[1],y=i[2]??0;const n=l[g],c=l[g+1],u=l[g+2]-y-n,f=l[g+3]-y-c,z=Math.sqrt(u*u+f*f);t.moveTo(n+z,c),t.arc(n,c,z,0,2*Math.PI,!0),++d;break;case Hm.CLOSE_PATH:t.closePath(),++d;break;case Hm.CUSTOM:g=i[1],p=i[2];const q=i[3],U=i[4],W=i[5];R.geometry=q,R.feature=D,d in I||(I[d]=[]);const V=I[d];
vendor: 22,628 bytes, line 2
2W?W(l,g,p,2,V):(V[0]=l[g],V[1]=l[g+1],V.length=2),h&&(h.zIndex=i[6]),U(V,R),++d;break;case Hm.DRAW_IMAGE:g=i[1],p=i[2],A=i[3],_=i[4],v=i[5];let H=i[6];const K=i[7],$=i[8],X=i[9],Y=i[10];let Z=i[11];const J=i[12];let Q=i[13];w=i[14]||"declutter";const tt=i[15];if(!A&&i.length>=20){C=i[19],M=i[20],L=i[21],P=i[22];const t=this.drawLabelWithPointPlacement_(C,M,L,P);A=t.label,i[3]=A;const e=i[23];_=(t.anchorX-e)*this.pixelRatio,i[4]=_;const n=i[24];v=(t.anchorY-n)*this.pixelRatio,i[5]=v,H=A.height,i[6]=H,Q=A.width,i[13]=Q}let et,it,nt,st;i.length>25&&(et=i[25]),i.length>17?(it=i[16],nt=i[17],st=i[18]):(it=Pm,nt=null,st=null),Y&&O?Z+=T:Y||O||(Z-=T);let rt=0;for(;g<p;g+=2){if(et&&et[rt++]<Q/this.pixelRatio)continue;const i=this.calculateImageOrLabelDimensions_(A.width,A.height,l[g],l[g+1],Q,H,_,v,$,X,Z,J,s,it,!!nt||!!st,D),n=[t,e,A,i,K,nt,st];if(a){let t,e,s,r,o;if(tt){const i=p-g;if(!tt[i]){tt[i]={args:n,declutterMode:w};continue}const r=tt[i];t=r.args,e=r.declutterMode,delete tt[i],s=f_(t)}if(!t||"declutter"===e&&a.collides(s)||(r=!0),"declutter"===w&&a.collides(i.declutterBox)||(o=!0),"declutter"===e&&"declutter"===w){const t=r&&o;r=t,o=t}r&&("none"!==e&&a.insert(s),this.replayImageOrLabel_.apply(this,t)),o&&("none"!==w&&a.insert(i.declutterBox),this.replayImageOrLabel_.apply(this,n))}else this.replayImageOrLabel_.apply(this,n)}++d;break;case Hm.DRAW_CHARS:const ot=i[1],at=i[2],ht=i[3],lt=i[4];P=i[5];const ct=i[6],ut=i[7],dt=i[8];L=i[9];const ft=i[10];C=i[11],Array.isArray(C)&&(C=C.reduce(__,"")),M=i[12];const pt=[i[13],i[13]];w=i[14]||"declutter";const gt=i[15],mt=i[16],_t=this.textStates[M],vt=_t.font,yt=[_t.scale[0]*ut,_t.scale[1]*ut];let wt;vt in this.widths_?wt=this.widths_[vt]:(wt={},this.widths_[vt]=wt);const bt=ip(l,ot,at,2),xt=Math.abs(yt[0])*Bm(vt,C,wt);if(lt||xt<=bt){const i=a_(l,ot,at,2,C,(bt-xt)*g_(C,this.textStates[M].textAlign),ct,Math.abs(yt[0]),Bm,vt,wt,O?0:this.viewRotation_,gt);t:if(i){const n=[];let s,r,o,h,l;if(L)for(s=0,r=i.length;s<r;++s){l=i[s],o=l[4],h=this.createLabel(o,M,"",L),_=l[2]+(yt[0]<0?-ft:ft)-mt,v=ht*h.height+2*(.5-ht)*ft*yt[1]/yt[0]-dt;const r=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,_,v,0,0,l[3],pt,!1,Pm,!1,D);if(a&&"declutter"===w&&a.collides(r.declutterBox))break t;n.push([t,e,h,r,1,null,null])}if(P)for(s=0,r=i.length;s<r;++s){l=i[s],o=l[4],h=this.createLabel(o,M,P,""),_=l[2]-mt,v=ht*h.height-dt;const r=this.calculateImageOrLabelDimensions_(h.width,h.height,l[0],l[1],h.width,h.height,_,v,0,0,l[3],pt,!1,Pm,!1,D);if(a&&"declutter"===w&&a.collides(r.declutterBox))break t;n.push([t,e,h,r,1,null,null])}a&&"none"!==w&&a.load(n.map(f_));for(let t=0,e=n.length;t<e;++t)this.replayImageOrLabel_.apply(this,n[t])}}++d;break;case Hm.END_GEOMETRY:if(void 0!==r){D=i[1];const t=r(D,B,w);if(t)return t}++d;break;case Hm.FILL:F?k++:this.fill_(t),++d;break;case Hm.MOVE_TO_LINE_TO:let St,Et,At;if(g=i[1],p=i[2],y=i[3],y){const t=(i[4]??!1)||Math.abs(l[g]-l[p-2])<1e-6&&Math.abs(l[g+1]-l[p-1])<1e-6;n_(l,g,p,2,y,t,m),r_(m,2,t),St=m,Et=0,At=St.length}else St=l,Et=g,At=p;j=St[Et],G=St[Et+1],t.moveTo(j,G),b=j+.5|0,x=G+.5|0;for(let e=Et+2;e<At;e+=2)j=St[e],G=St[e+1],S=j+.5|0,E=G+.5|0,e!=At-2&&S===b&&E===x||(t.lineTo(j,G),b=S,x=E);++d;break;case Hm.SET_FILL_STYLE:this.alignAndScaleFill_=i[2],k?(this.fill_(t),k=0,N&&(t.stroke(),N=0)):N&&i[1]&&(t.stroke(),N=0),t.fillStyle=i[1],++d;break;case Hm.SET_STROKE_STYLE:k&&i[1]&&(this.fill_(t),k=0),N&&(t.stroke(),N=0),this.setStrokeStyle_(t,i),++d;break;case Hm.STROKE:F?N++:t.stroke(),++d;break;default:++d}}k&&this.fill_(t),N&&t.stroke()}execute(t,e,i,n,s,r){this.viewRotation_=n,this.execute_(t,e,i,this.instructions,s,void 0,void 0,r)}executeHitDetection(t,e,i,n,s){return this.viewRotation_=i,this.execute_(t,[t.canvas.width,t.canvas.height],e,this.hitDetectionInstructions,!0,n,s)}},y_=["Polygon","Circle","LineString","Image","Text","Default"],w_=["Image","Text"],b_=y_.filter(t=>!w_.includes(t));let x_=!1,S_=!1;const E_={},A_=class{constructor(t,e,i,n,s,r,o){this.maxExtent_=t,this.overlaps_=n,this.pixelRatio_=i,this.resolution_=e,this.renderBuffer_=r,this.executorsByZIndex_={},this.hitDetectionContext_=null,this.hitDetectionTransform_=Qd(),this.renderedContext_=null,this.deferredZIndexContexts_={},this.createExecutors_(s,o)}clip(t,e){const i=this.getClipCoords(e);t.beginPath(),t.moveTo(i[0],i[1]),t.lineTo(i[2],i[3]),t.lineTo(i[4],i[5]),t.lineTo(i[6],i[7]),t.clip()}createExecutors_(t,e){for(const i in t){let n=this.executorsByZIndex_[i];void 0===n&&(n={},this.executorsByZIndex_[i]=n);const s=t[i];for(const t in s){const i=s[t];n[t]=new v_(this.resolution_,this.pixelRatio_,this.overlaps_,i,e)}}}hasExecutors(t){for(const e in this.executorsByZIndex_){const i=this.executorsByZIndex_[e];for(let e=0,n=t.length;e<n;++e)if(t[e]in i)return!0}return!1}forEachFeatureAtCoordinate(t,e,i,n,s,r){!1===S_&&function(){let t=0;const e=e=>{const i=Du(1,1,null,{willReadFrequently:e});let n=0;const s=performance.now();for(;performance.now()-s<50;++n)i.fillStyle=`rgba(255,0,${n%256},1)`,i.fillRect(0,0,1,1),i.getImageData(0,0,1,1);return t=n>t?n:t,n},i={[e(!0)]:!0,[e(!1)]:!1,[e(void 0)]:void 0};x_=i[t],S_=!0}();const o=2*(n=Math.round(n))+1,a=ef(this.hitDetectionTransform_,n+.5,n+.5,1/e,-1/e,-i,-t[0],-t[1]),h=!this.hitDetectionContext_;h&&(this.hitDetectionContext_=Du(o,o,null,{willReadFrequently:x_}));const l=this.hitDetectionContext_;let c;l.canvas.width!==o||l.canvas.height!==o?(l.canvas.width=o,l.canvas.height=o):h||l.clearRect(0,0,o,o),void 0!==this.renderBuffer_&&(c=[1/0,1/0,-1/0,-1/0],Or(c,t),br(c,e*(this.renderBuffer_+n),c));const u=function(t){if(void 0!==E_[t])return E_[t];const e=2*t+1,i=t*t,n=new Array(i+1);for(let s=0;s<=t;++s)for(let r=0;r<=t;++r){const o=s*s+r*r;if(o>i)break;let a=n[o];a||(a=[],n[o]=a),a.push(4*((t+s)*e+(t+r))+3),s>0&&a.push(4*((t-s)*e+(t+r))+3),r>0&&(a.push(4*((t+s)*e+(t-r))+3),s>0&&a.push(4*((t-s)*e+(t-r))+3))}const s=[];for(let t=0,e=n.length;t<e;++t)n[t]&&s.push(...n[t]);return E_[t]=s,s}(n);let d;function f(t,e,i){const a=l.getImageData(0,0,o,o).data;for(let h=0,c=u.length;h<c;h++)if(a[u[h]]>0){if(!r||"none"===i||"Image"!==d&&"Text"!==d||r.includes(t)){const i=(u[h]-3)/4,r=n-i%o,a=n-(i/o|0),l=s(t,e,r*r+a*a);if(l)return l}l.clearRect(0,0,o,o);break}}const p=Object.keys(this.executorsByZIndex_).map(Number);let g,m,_,v,y;for(p.sort(Cd),g=p.length-1;g>=0;--g){const t=p[g].toString();for(_=this.executorsByZIndex_[t],m=y_.length-1;m>=0;--m)if(d=y_[m],v=_[d],void 0!==v&&(y=v.executeHitDetection(l,a,i,f,c),y))return y}}getClipCoords(t){const e=this.maxExtent_;if(!e)return null;const i=e[0],n=e[1],s=e[2],r=e[3],o=[i,n,i,r,s,r,s,n];return of(o,0,8,2,t,o),o}isEmpty(){return pd(this.executorsByZIndex_)}execute(t,e,i,n,s,r,o){const a=Object.keys(this.executorsByZIndex_).map(Number);a.sort(o?Md:Cd),r=r||y_;const h=y_.length;for(let l=0,c=a.length;l<c;++l){const c=a[l].toString(),u=this.executorsByZIndex_[c];for(let c=0,d=r.length;c<d;++c){const d=r[c],f=u[d];if(void 0!==f){const r=null===o?void 0:f.getZIndexContext(),c=r?r.getContext():t,u=this.maxExtent_&&"Image"!==d&&"Text"!==d;if(u&&(c.save(),this.clip(c,i)),r&&"Text"!==d&&"Image"!==d?r.pushFunction(t=>f.execute(t,e,i,n,s,o)):f.execute(c,e,i,n,s,o),u&&c.restore(),r){r.offset();const t=a[l]*h+y_.indexOf(d);this.deferredZIndexContexts_[t]||(this.deferredZIndexContexts_[t]=[]),this.deferredZIndexContexts_[t].push(r)}}}}this.renderedContext_=t}getDeferredZIndexContexts(){return this.deferredZIndexContexts_}getRenderedContext(){return this.renderedContext_}renderDeferred(){const t=this.deferredZIndexContexts_,e=Object.keys(t).map(Number).sort(Cd);for(let i=0,n=e.length;i<n;++i)t[e[i]].forEach(t=>{t.draw(this.renderedContext_),t.clear()}),t[e[i]].length=0}};function C_(t,e,i,n){return void 0!==i&&void 0!==n?[i/t,n/e]:void 0!==i?i/t:void 0!==n?n/e:1}class M_ extends ng{constructor(t){const e=void 0!==(t=t||{}).opacity?t.opacity:1,i=void 0!==t.rotation?t.rotation:0,n=void 0!==t.scale?t.scale:1,s=void 0!==t.rotateWithView&&t.rotateWithView;super({opacity:e,rotation:i,scale:n,displacement:void 0!==t.displacement?t.displacement:[0,0],rotateWithView:s,declutterMode:t.declutterMode}),this.anchor_=void 0!==t.anchor?t.anchor:[.5,.5],this.normalizedAnchor_=null,this.anchorOrigin_=void 0!==t.anchorOrigin?t.anchorOrigin:"top-left",this.anchorXUnits_=void 0!==t.anchorXUnits?t.anchorXUnits:"fraction",this.anchorYUnits_=void 0!==t.anchorYUnits?t.anchorYUnits:"fraction",this.crossOrigin_=void 0!==t.crossOrigin?t.crossOrigin:null,this.referrerPolicy_=t.referrerPolicy;const r=void 0!==t.img?t.img:null;let o,a=t.src;if(Zd(!(void 0!==a&&r),"`image` and `src` cannot be provided at the same time"),void 0!==a&&0!==a.length||!r||(a=r.src||dd(r)),Zd(void 0!==a&&a.length>0,"A defined and non-empty `src` or `image` must be provided"),Zd(!((void 0!==t.width||void 0!==t.height)&&void 0!==t.scale),"`width` or `height` cannot be provided together with `scale`"),void 0!==t.src?o=0:void 0!==r&&(o="complete"in r?r.complete?r.src?2:0:1:2),this.color_=void 0!==t.color?hd(t.color):null,this.iconImage_=qd(r,a,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},o,this.color_),this.offset_=void 0!==t.offset?t.offset:[0,0],this.offsetOrigin_=void 0!==t.offsetOrigin?t.offsetOrigin:"top-left",this.origin_=null,this.size_=void 0!==t.size?t.size:null,this.initialOptions_,void 0!==t.width||void 0!==t.height){let e,i;if(t.size)[e,i]=t.size;else{const n=this.getImage(1);if(n.width&&n.height)e=n.width,i=n.height;else if(n instanceof HTMLImageElement){this.initialOptions_=t;const e=()=>{if(this.unlistenImageChange(e),!this.initialOptions_)return;const i=this.iconImage_.getSize();this.setScale(C_(i[0],i[1],t.width,t.height))};return void this.listenImageChange(e)}}void 0!==e&&this.setScale(C_(e,i,t.width,t.height))}}clone(){let t,e,i;return this.initialOptions_?(e=this.initialOptions_.width,i=this.initialOptions_.height):(t=this.getScale(),t=Array.isArray(t)?t.slice():t),new M_({anchor:this.anchor_.slice(),anchorOrigin:this.anchorOrigin_,anchorXUnits:this.anchorXUnits_,anchorYUnits:this.anchorYUnits_,color:this.color_&&this.color_.slice?this.color_.slice():this.color_||void 0,crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_,offset:this.offset_.slice(),offsetOrigin:this.offsetOrigin_,opacity:this.getOpacity(),rotateWithView:this.getRotateWithView(),rotation:this.getRotation(),scale:t,width:e,height:i,size:null!==this.size_?this.size_.slice():void 0,src:this.getSrc(),displacement:this.getDisplacement().slice(),declutterMode:this.getDeclutterMode()})}getAnchor(){let t=this.normalizedAnchor_;if(!t){t=this.anchor_;const e=this.getSize();if("fraction"==this.anchorXUnits_||"fraction"==this.anchorYUnits_){if(!e)return null;t=this.anchor_.slice(),"fraction"==this.anchorXUnits_&&(t[0]*=e[0]),"fraction"==this.anchorYUnits_&&(t[1]*=e[1])}if("top-left"!=this.anchorOrigin_){if(!e)return null;t===this.anchor_&&(t=this.anchor_.slice()),"top-right"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[0]=-t[0]+e[0]),"bottom-left"!=this.anchorOrigin_&&"bottom-right"!=this.anchorOrigin_||(t[1]=-t[1]+e[1])}this.normalizedAnchor_=t}const e=this.getDisplacement(),i=this.getScaleArray();return[t[0]-e[0]/i[0],t[1]+e[1]/i[1]]}setAnchor(t){this.anchor_=t,this.normalizedAnchor_=null}getColor(){return this.color_}setColor(t){const e=t?hd(t):null;if(this.color_===e||this.color_&&e&&this.color_.length===e.length&&this.color_.every((t,i)=>t===e[i]))return;this.color_=e;const i=this.getSrc(),n=void 0!==i?null:this.getHitDetectionImage(),s=void 0!==i?0:this.iconImage_.getImageState();this.iconImage_=qd(n,i,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},s,this.color_)}getImage(t){return this.iconImage_.getImage(t)}getPixelRatio(t){return this.iconImage_.getPixelRatio(t)}getImageSize(){return this.iconImage_.getSize()}getImageState(){return this.iconImage_.getImageState()}getHitDetectionImage(){return this.iconImage_.getHitDetectionImage()}getOrigin(){if(this.origin_)return this.origin_;let t=this.offset_;if("top-left"!=this.offsetOrigin_){const e=this.getSize(),i=this.iconImage_.getSize();if(!e||!i)return null;t=t.slice(),"top-right"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[0]=i[0]-e[0]-t[0]),"bottom-left"!=this.offsetOrigin_&&"bottom-right"!=this.offsetOrigin_||(t[1]=i[1]-e[1]-t[1])}return this.origin_=t,this.origin_}getSrc(){return this.iconImage_.getSrc()}setSrc(t){this.iconImage_=qd(null,t,{crossOrigin:this.crossOrigin_,referrerPolicy:this.referrerPolicy_},0,this.color_)}getSize(){return this.size_?this.size_:this.iconImage_.getSize()}getWidth(){const t=this.getScaleArray();return this.size_?this.size_[0]*t[0]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[0]*t[0]:void 0}getHeight(){const t=this.getScaleArray();return this.size_?this.size_[1]*t[1]:2==this.iconImage_.getImageState()?this.iconImage_.getSize()[1]*t[1]:void 0}setScale(t){delete this.initialOptions_,super.setScale(t)}listenImageChange(t){this.iconImage_.addEventListener(vd,t)}load(){this.iconImage_.load()}unlistenImageChange(t){this.iconImage_.removeEventListener(vd,t)}ready(){return this.iconImage_.ready()}}const L_=M_,P_=class extends _m{constructor(t,e,i,n,s,r,o){super(),this.context_=t,this.pixelRatio_=e,this.extent_=i,this.transform_=n,this.transformRotation_=n?lo(Math.atan2(n[1],n[0]),10):0,this.viewRotation_=s,this.squaredTolerance_=r,this.userTransform_=o,this.contextFillState_=null,this.contextStrokeState_=null,this.contextTextState_=null,this.fillState_=null,this.strokeState_=null,this.image_=null,this.imageAnchorX_=0,this.imageAnchorY_=0,this.imageHeight_=0,this.imageOpacity_=0,this.imageOriginX_=0,this.imageOriginY_=0,this.imageRotateWithView_=!1,this.imageRotation_=0,this.imageScale_=[0,0],this.imageWidth_=0,this.text_="",this.textOffsetX_=0,this.textOffsetY_=0,this.textRotateWithView_=!1,this.textRotation_=0,this.textScale_=[0,0],this.textFillState_=null,this.textStrokeState_=null,this.textState_=null,this.pixelCoordinates_=[],this.tmpLocalTransform_=Qd()}drawImages_(t,e,i,n){if(!this.image_)return;const s=of(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_,o=this.tmpLocalTransform_,a=r.globalAlpha;1!=this.imageOpacity_&&(r.globalAlpha=a*this.imageOpacity_);let h=this.imageRotation_;0===this.transformRotation_&&(h-=this.viewRotation_),this.imageRotateWithView_&&(h+=this.viewRotation_);for(let t=0,e=s.length;t<e;t+=2){const e=s[t]-this.imageAnchorX_,i=s[t+1]-this.imageAnchorY_;if(0!==h||1!=this.imageScale_[0]||1!=this.imageScale_[1]){const t=e+this.imageAnchorX_,n=i+this.imageAnchorY_;ef(o,t,n,1,1,h,-t,-n),r.save(),r.transform.apply(r,o),r.translate(t,n),r.scale(this.imageScale_[0],this.imageScale_[1]),r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,-this.imageAnchorX_,-this.imageAnchorY_,this.imageWidth_,this.imageHeight_),r.restore()}else r.drawImage(this.image_,this.imageOriginX_,this.imageOriginY_,this.imageWidth_,this.imageHeight_,e,i,this.imageWidth_,this.imageHeight_)}1!=this.imageOpacity_&&(r.globalAlpha=a)}drawText_(t,e,i,n){if(!this.textState_||""===this.text_)return;this.textFillState_&&this.setContextFillState_(this.textFillState_),this.textStrokeState_&&this.setContextStrokeState_(this.textStrokeState_),this.setContextTextState_(this.textState_);const s=of(t,e,i,n,this.transform_,this.pixelCoordinates_),r=this.context_;let o=this.textRotation_;for(0===this.transformRotation_&&(o-=this.viewRotation_),this.textRotateWithView_&&(o+=this.viewRotation_);e<i;e+=n){const t=s[e]+this.textOffsetX_,i=s[e+1]+this.textOffsetY_;0!==o||1!=this.textScale_[0]||1!=this.textScale_[1]?(r.save(),r.translate(t-this.textOffsetX_,i-this.textOffsetY_),r.rotate(o),r.translate(this.textOffsetX_,this.textOffsetY_),r.scale(this.textScale_[0],this.textScale_[1]),this.textStrokeState_&&r.strokeText(this.text_,0,0),this.textFillState_&&r.fillText(this.text_,0,0),r.restore()):(this.textStrokeState_&&r.strokeText(this.text_,t,i),this.textFillState_&&r.fillText(this.text_,t,i))}}moveToLineTo_(t,e,i,n,s,r){const o=this.context_;let a=of(t,e,i,n,this.transform_,this.pixelCoordinates_);if(Math.abs(r)>0){const t=a.length,e=s||Math.abs(a[0]-a[t-2])<1e-6&&Math.abs(a[1]-a[t-1])<1e-6;a=n_(a,0,t,2,r,e,a),r_(a,2,e)}o.moveTo(a[0],a[1]);let h=a.length;s&&(h-=2);for(let t=2;t<h;t+=2)o.lineTo(a[t],a[t+1]);return s&&o.closePath(),i}drawRings_(t,e,i,n,s){for(let r=0,o=i.length;r<o;++r)e=this.moveToLineTo_(t,e,i[r],n,!0,s);return e}drawCircle(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Zr(this.extent_,t.getExtent())){if(this.fillState_||this.strokeState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=function(t,e,i){const n=t.getFlatCoordinates();if(!n)return null;const s=t.getStride();return of(n,0,n.length,s,e,i)}(t,this.transform_,this.pixelCoordinates_),i=e[2]-e[0],n=e[3]-e[1],s=Math.sqrt(i*i+n*n),r=this.context_;r.beginPath(),r.arc(e[0],e[1],s,0,2*Math.PI),this.fillState_&&r.fill(),this.strokeState_&&r.stroke()}""!==this.text_&&this.drawText_(t.getCenter(),0,2,2)}}setStyle(t){this.setFillStrokeStyle(t.getFill(),t.getStroke()),this.setImageStyle(t.getImage()),this.setTextStyle(t.getText())}setTransform(t){this.transform_=t}drawGeometry(t){switch(t.getType()){case"Point":this.drawPoint(t);break;case"LineString":this.drawLineString(t);break;case"Polygon":this.drawPolygon(t);break;case"MultiPoint":this.drawMultiPoint(t);break;case"MultiLineString":this.drawMultiLineString(t);break;case"MultiPolygon":this.drawMultiPolygon(t);break;case"GeometryCollection":this.drawGeometryCollection(t);break;case"Circle":this.drawCircle(t)}}drawFeature(t,e){const i=e.getGeometryFunction()(t);i&&(this.setStyle(e),this.drawGeometry(i))}drawGeometryCollection(t){const e=t.getGeometriesArray();for(let t=0,i=e.length;t<i;++t)this.drawGeometry(e[t])}drawPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawMultiPoint(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getFlatCoordinates(),i=t.getStride();this.image_&&this.drawImages_(e,0,e.length,i),""!==this.text_&&this.drawText_(e,0,e.length,i)}drawLineString(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Zr(this.extent_,t.getExtent())){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();e.beginPath(),this.moveToLineTo_(i,0,i.length,t.getStride(),!1,this.strokeState_.strokeOffset),e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoint();this.drawText_(e,0,2,2)}}}drawMultiLineString(t){this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_));const e=t.getExtent();if(Zr(this.extent_,e)){if(this.strokeState_){this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getFlatCoordinates();let n=0;const s=t.getEnds(),r=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t)n=this.moveToLineTo_(i,n,s[t],r,!1,this.strokeState_.strokeOffset);e.stroke()}if(""!==this.text_){const e=t.getFlatMidpoints();this.drawText_(e,0,e.length,2)}}}drawPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Zr(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_;e.beginPath(),this.drawRings_(t.getOrientedFlatCoordinates(),0,t.getEnds(),t.getStride(),this.strokeState_?.strokeOffset),this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoint();this.drawText_(e,0,2,2)}}}drawMultiPolygon(t){if(this.squaredTolerance_&&(t=t.simplifyTransformed(this.squaredTolerance_,this.userTransform_)),Zr(this.extent_,t.getExtent())){if(this.strokeState_||this.fillState_){this.fillState_&&this.setContextFillState_(this.fillState_),this.strokeState_&&this.setContextStrokeState_(this.strokeState_);const e=this.context_,i=t.getOrientedFlatCoordinates();let n=0;const s=t.getEndss(),r=t.getStride();e.beginPath();for(let t=0,e=s.length;t<e;++t){const e=s[t];n=this.drawRings_(i,n,e,r,this.strokeState_?.strokeOffset)}this.fillState_&&e.fill(),this.strokeState_&&e.stroke()}if(""!==this.text_){const e=t.getFlatInteriorPoints();this.drawText_(e,0,e.length,2)}}}setContextFillState_(t){const e=this.context_,i=this.contextFillState_;i?i.fillStyle!=t.fillStyle&&(i.fillStyle=t.fillStyle,e.fillStyle=t.fillStyle):(e.fillStyle=t.fillStyle,this.contextFillState_={fillStyle:t.fillStyle})}setContextStrokeState_(t){const e=this.context_,i=this.contextStrokeState_;i?(i.lineCap!=t.lineCap&&(i.lineCap=t.lineCap,e.lineCap=t.lineCap),Nd(i.lineDash,t.lineDash)||e.setLineDash(i.lineDash=t.lineDash),i.lineDashOffset!=t.lineDashOffset&&(i.lineDashOffset=t.lineDashOffset,e.lineDashOffset=t.lineDashOffset),i.lineJoin!=t.lineJoin&&(i.lineJoin=t.lineJoin,e.lineJoin=t.lineJoin),i.lineWidth!=t.lineWidth&&(i.lineWidth=t.lineWidth,e.lineWidth=t.lineWidth),i.miterLimit!=t.miterLimit&&(i.miterLimit=t.miterLimit,e.miterLimit=t.miterLimit),i.strokeStyle!=t.strokeStyle&&(i.strokeStyle=t.strokeStyle,e.strokeStyle=t.strokeStyle)):(e.lineCap=t.lineCap,e.setLineDash(t.lineDash),e.lineDashOffset=t.lineDashOffset,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.strokeStyle=t.strokeStyle,this.contextStrokeState_={lineCap:t.lineCap,lineDash:t.lineDash,lineDashOffset:t.lineDashOffset,lineJoin:t.lineJoin,lineWidth:t.lineWidth,miterLimit:t.miterLimit,strokeStyle:t.strokeStyle})}setContextTextState_(t){const e=this.context_,i=this.contextTextState_,n=t.textAlign?t.textAlign:"center";i?(i.font!=t.font&&(i.font=t.font,e.font=t.font),i.textAlign!=n&&(i.textAlign=n,e.textAlign=n),i.textBaseline!=t.textBaseline&&(i.textBaseline=t.textBaseline,e.textBaseline=t.textBaseline)):(e.font=t.font,e.textAlign=n,e.textBaseline=t.textBaseline,this.contextTextState_={font:t.font,textAlign:n,textBaseline:t.textBaseline})}setFillStrokeStyle(t,e){if(t){const e=t.getColor();this.fillState_={fillStyle:Qp(e||"#000")}}else this.fillState_=null;if(e){const t=e.getColor(),i=e.getLineCap(),n=e.getLineDash(),s=e.getLineDashOffset(),r=e.getLineJoin(),o=e.getWidth(),a=e.getMiterLimit(),h=n||Lm,l=e.getOffset();
2this.strokeState_={lineCap:void 0!==i?i:"round",lineDash:1===this.pixelRatio_?h:h.map(t=>t*this.pixelRatio_),lineDashOffset:(s||0)*this.pixelRatio_,lineJoin:void 0!==r?r:"round",lineWidth:(void 0!==o?o:1)*this.pixelRatio_,miterLimit:void 0!==a?a:10,strokeStyle:Qp(t||"#000"),strokeOffset:(l??0)*this.pixelRatio_}}else this.strokeState_=null}setImageStyle(t){let e;if(!t||!(e=t.getSize()))return void(this.image_=null);const i=t.getPixelRatio(this.pixelRatio_),n=t.getAnchor(),s=t.getOrigin();this.image_=t.getImage(this.pixelRatio_),this.imageAnchorX_=n[0]*i,this.imageAnchorY_=n[1]*i,this.imageHeight_=e[1]*i,this.imageOpacity_=t.getOpacity(),this.imageOriginX_=s[0],this.imageOriginY_=s[1],this.imageRotateWithView_=t.getRotateWithView(),this.imageRotation_=t.getRotation();const r=t.getScaleArray();this.imageScale_=[r[0]*this.pixelRatio_/i,r[1]*this.pixelRatio_/i],this.imageWidth_=e[0]*i}setTextStyle(t){if(t){const e=t.getFill();if(e){const t=e.getColor();this.textFillState_={fillStyle:Qp(t||"#000")}}else this.textFillState_=null;const i=t.getStroke();if(i){const t=i.getColor(),e=i.getLineCap(),n=i.getLineDash(),s=i.getLineDashOffset(),r=i.getLineJoin(),o=i.getWidth(),a=i.getMiterLimit();this.textStrokeState_={lineCap:void 0!==e?e:"round",lineDash:n||Lm,lineDashOffset:s||0,lineJoin:void 0!==r?r:"round",lineWidth:void 0!==o?o:1,miterLimit:void 0!==a?a:10,strokeStyle:Qp(t||"#000")}}else this.textStrokeState_=null;const n=t.getFont(),s=t.getOffsetX(),r=t.getOffsetY(),o=t.getRotateWithView(),a=t.getRotation(),h=t.getScaleArray(),l=t.getText(),c=t.getTextAlign(),u=t.getTextBaseline();this.textState_={font:void 0!==n?n:Mm,textAlign:void 0!==c?c:"center",textBaseline:void 0!==u?u:"middle"},this.text_=void 0!==l?Array.isArray(l)?l.reduce((t,e,i)=>t+(i%2?" ":e),""):l:"",this.textOffsetX_=void 0!==s?this.pixelRatio_*s:0,this.textOffsetY_=void 0!==r?this.pixelRatio_*r:0,this.textRotateWithView_=void 0!==o&&o,this.textRotation_=void 0!==a?a:0,this.textScale_=[this.pixelRatio_*h[0],this.pixelRatio_*h[1]]}else this.text_=""}},k_=.5,N_={Point:function(t,e,i,n,s,r){const o=i.getImage(),a=i.getText(),h=a&&a.getText(),l=r&&o&&h?{}:void 0;if(o){if(2!=o.getImageState())return;const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(o,l),r.drawPoint(e,n,s)}if(h){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a,l),r.drawText(e,n,s)}},LineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},Polygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},MultiPoint:function(t,e,i,n,s,r){const o=i.getImage(),a=o&&0!==o.getOpacity(),h=i.getText(),l=h&&h.getText(),c=r&&a&&l?{}:void 0;if(a){if(2!=o.getImageState())return;const r=t.getBuilder(i.getZIndex(),"Image");r.setImageStyle(o,c),r.drawMultiPoint(e,n,s)}if(l){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(h,c),r.drawText(e,n,s)}},MultiLineString:function(t,e,i,n,s){const r=i.getStroke();if(r){const o=t.getBuilder(i.getZIndex(),"LineString");o.setFillStrokeStyle(null,r),o.drawMultiLineString(e,n,s)}const o=i.getText();if(o&&o.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(o),r.drawText(e,n,s)}},MultiPolygon:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(o||r){const a=t.getBuilder(i.getZIndex(),"Polygon");a.setFillStrokeStyle(r,o),a.drawMultiPolygon(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}},GeometryCollection:function(t,e,i,n,s,r){const o=e.getGeometriesArray();let a,h;for(a=0,h=o.length;a<h;++a)(0,N_[o[a].getType()])(t,o[a],i,n,s,r)},Circle:function(t,e,i,n,s){const r=i.getFill(),o=i.getStroke();if(r||o){const a=t.getBuilder(i.getZIndex(),"Circle");a.setFillStrokeStyle(r,o),a.drawCircle(e,n,s)}const a=i.getText();if(a&&a.getText()){const r=t.getBuilder(i.getZIndex(),"Text");r.setTextStyle(a),r.drawText(e,n,s)}}};function I_(t,e){return parseInt(dd(t),10)-parseInt(dd(e),10)}function T_(t,e){const i=O_(t,e);return i*i}function O_(t,e){return.5*t/e}function R_(t,e,i,n,s,r,o,a){const h=[],l=i.getImage();if(l){let t=!0;const e=l.getImageState();2==e||3==e?t=!1:0==e&&l.load(),t&&h.push(l.ready())}const c=i.getFill();c&&c.loading()&&h.push(c.ready());const u=h.length>0;return u&&Promise.all(h).then(()=>
2s(null)),function(t,e,i,n,s,r,o){const a=i.getGeometryFunction()(e);if(!a)return;const h=a.simplifyTransformed(n,s);i.getRenderer()?F_(t,h,i,e,o):(0,N_[h.getType()])(t,h,i,e,o,r)}(t,e,i,n,r,o,a),u}function F_(t,e,i,n,s){if("GeometryCollection"==e.getType()){const r=e.getGeometries();for(let e=0,o=r.length;e<o;++e)F_(t,r[e],i,n,s);return}t.getBuilder(i.getZIndex(),"Default").drawCustom(e,n,i.getRenderer(),i.getHitDetectionRenderer(),s)}const D_=class extends $g{constructor(t){super(t),this.boundHandleStyleImageChange_=this.handleStyleImageChange_.bind(this),this.animatingOrInteracting_,this.hitDetectionImageData_=null,this.clipExtent_=null,this.extendX_=!1,this.renderedFeatures_=null,this.renderedRevision_=-1,this.renderedResolution_=NaN,this.renderedExtent_=[1/0,1/0,-1/0,-1/0],this.wrappedRenderedExtent_=[1/0,1/0,-1/0,-1/0],this.renderedRotation_,this.renderedCenter_=null,this.renderedProjection_=null,this.renderedPixelRatio_=1,this.renderedRenderOrder_=null,this.renderedFrameDeclutter_,this.replayGroup_=null,this.replayGroupChanged=!0,this.clipping=!0,this.targetContext_=null,this.opacity_=1}renderWorlds(t,e,i){const n=e.extent,s=e.viewState,r=s.center,o=s.resolution,a=s.projection,h=s.rotation,l=a.getExtent(),c=this.getLayer().getSource(),u=this.getLayer().getDeclutter(),d=e.pixelRatio,f=e.viewHints,p=!(f[0]||f[1]),g=this.context,m=Math.round(Yr(n)/o*d),_=Math.round(Vr(n)/o*d),v=c.getWrapX()&&a.canWrapX(),y=v?Yr(l):null,w=v?Math.ceil((n[2]-l[2])/y)+(this.extendX_?2:1):1;let b=v?Math.floor((n[0]-l[0])/y)-(this.extendX_?1:0):0;do{let n=this.getRenderTransform(r,o,0,d,m,_,b*y);e.declutter&&(n=n.slice(0)),t.execute(g,[g.canvas.width,g.canvas.height],n,h,p,void 0===i?y_:i?w_:b_,i?u&&e.declutter[u]:void 0)}while(++b<w)}setDrawContext_(){1!==this.opacity_&&(this.targetContext_=this.context,this.context=Du(this.context.canvas.width,this.context.canvas.height,Hg))}resetDrawContext_(){if(1!==this.opacity_&&this.targetContext_){const t=this.targetContext_.globalAlpha;this.targetContext_.globalAlpha=this.opacity_,this.targetContext_.drawImage(this.context.canvas,0,0),this.targetContext_.globalAlpha=t,Bu(this.context),Hg.push(this.context.canvas),this.context=this.targetContext_,this.targetContext_=null}}renderDeclutter(t){this.replayGroup_&&this.getLayer().getDeclutter()&&this.renderWorlds(this.replayGroup_,t,!0)}renderDeferredInternal(t){this.replayGroup_&&(this.clipExtent_&&this.clipUnrotated(this.context,t,this.clipExtent_),this.replayGroup_.renderDeferred(),this.clipExtent_&&(this.context.restore(),this.clipExtent_=null),this.resetDrawContext_())}renderFrame(t,e){const i=t.layerStatesArray[t.layerIndex];this.opacity_=i.opacity;const n=t.viewState;this.prepareContainer(t,e);const s=this.context,r=this.replayGroup_;let o=r&&!r.isEmpty();if(!o&&!this.getLayer().hasListener(Bg)&&!this.getLayer().hasListener(zg))return this.container;this.setDrawContext_(),this.preRender(s,t);n.projection;this.clipExtent_=null;let a=!1;if(o&&i.extent&&this.clipping){const e=Pa(i.extent);o=Zr(e,t.extent),o&&!Ar(e,t.extent)&&(t.declutter?this.clipExtent_=e:(this.clipUnrotated(s,t,e),a=!0))}return o&&this.renderWorlds(r,t,!this.getLayer().getDeclutter()&&void 0),a&&s.restore(),this.postRender(s,t),this.renderedRotation_!==n.rotation&&(this.renderedRotation_=n.rotation,this.hitDetectionImageData_=null),t.declutter||this.resetDrawContext_(),this.container}getFeatures(t){return new Promise(e=>{if(this.frameState&&!this.hitDetectionImageData_&&!this.animatingOrInteracting_){const t=this.frameState.size.slice(),e=this.renderedCenter_,i=this.renderedResolution_,n=this.renderedRotation_,s=this.renderedProjection_,r=this.wrappedRenderedExtent_,o=this.getLayer(),a=[],h=.5*t[0],l=.5*t[1];a.push(this.getRenderTransform(e,i,n,.5,h,l,0).slice());const c=o.getSource(),u=s.getExtent();if(c.getWrapX()&&s.canWrapX()&&!Ar(u,r)){let t=r[0];const s=Yr(u);let o,c=0;for(;t<u[0];)--c,o=s*c,a.push(this.getRenderTransform(e,i,n,.5,h,l,o).slice()),t+=s;for(c=0,t=r[2];t>u[2];)++c,o=s*c,a.push(this.getRenderTransform(e,i,n,.5,h,l,o).slice()),t-=s}const d=Aa();
vendor: 11,260 bytes, line 2
2this.hitDetectionImageData_=function(t,e,i,n,s,r,o,a,h){const l=h?La(s):s,c=Du(t[0]*k_,t[1]*k_);c.imageSmoothingEnabled=!1;const u=c.canvas,d=new P_(c,k_,s,null,o,a,h?wa(Aa(),h):null),f=i.length,p=Math.floor(16777215/f),g={};for(let t=1;t<=f;++t){const e=i[t-1],s=e.getStyleFunction()||n;if(!s)continue;let o=s(e,r);if(!o)continue;Array.isArray(o)||(o=[o]);const a=(t*p).toString(16).padStart(7,"#00000");for(let t=0,i=o.length;t<i;++t){const i=o[t],n=i.getGeometryFunction()(e);if(!n||!Zr(l,n.getExtent()))continue;const s=i.clone(),r=s.getFill();r&&r.setColor(a);const h=s.getStroke();h&&(h.setColor(a),h.setLineDash(null)),s.setText(void 0);const c=i.getImage();if(c){const t=c.getImageSize();if(!t)continue;const e=Du(t[0],t[1],void 0,{alpha:!1}),i=e.canvas;e.fillStyle=a,e.fillRect(0,0,i.width,i.height),s.setImage(new L_({img:i,anchor:c.getAnchor(),anchorXUnits:"pixels",anchorYUnits:"pixels",offset:c.getOrigin(),opacity:1,size:c.getSize(),scale:c.getScale(),rotation:c.getRotation(),rotateWithView:c.getRotateWithView()}))}const u=s.getZIndex()||0;let d=g[u];d||(d={},g[u]=d,d.Polygon=[],d.Circle=[],d.LineString=[],d.Point=[]);const f=n.getType();if("GeometryCollection"===f){const t=n.getGeometriesArrayRecursive();for(let e=0,i=t.length;e<i;++e){const i=t[e];d[i.getType().replace("Multi","")].push(i,s)}}else d[f.replace("Multi","")].push(n,s)}}const m=Object.keys(g).map(Number).sort(Cd);for(let t=0,i=m.length;t<i;++t){const i=g[m[t]];for(const t in i){const n=i[t];for(let t=0,i=n.length;t<i;t+=2){d.setStyle(n[t+1]);for(let i=0,s=e.length;i<s;++i)d.setTransform(e[i]),d.drawGeometry(n[t])}}}return c.getImageData(0,0,u.width,u.height)}(t,a,this.renderedFeatures_,o.getStyleFunction(),r,i,n,T_(i,this.renderedPixelRatio_),d?s:null)}e(function(t,e,i){const n=[];if(i){const s=Math.floor(Math.round(t[0])*k_),r=Math.floor(Math.round(t[1])*k_),o=4*(io(s,0,i.width-1)+io(r,0,i.height-1)*i.width),a=i.data[o],h=i.data[o+1],l=i.data[o+2]+256*(h+256*a),c=Math.floor(16777215/e.length);l&&l%c===0&&n.push(e[l/c-1])}return n}(t,this.renderedFeatures_,this.hitDetectionImageData_))})}forEachFeatureAtCoordinate(t,e,i,n,s){if(!this.replayGroup_)return;const r=e.viewState.resolution,o=e.viewState.rotation,a=this.getLayer(),h={},l=this.getLayer().getDeclutter();return this.replayGroup_.forEachFeatureAtCoordinate(t,r,o,i,function(t,e,i){const r=dd(t),o=h[r];if(o){if(!0!==o&&i<o.distanceSq){if(0===i)return h[r]=!0,s.splice(s.lastIndexOf(o),1),n(t,a,e);o.geometry=e,o.distanceSq=i}}else{if(0===i)return h[r]=!0,n(t,a,e);s.push(h[r]={feature:t,layer:a,geometry:e,distanceSq:i,callback:n})}},l?e.declutter?.[l]?.all().map(t=>t.value):null)}handleFontsChanged(){const t=this.getLayer();t.getVisible()&&this.replayGroup_&&t.changed()}handleStyleImageChange_(t){this.renderIfReadyAndVisible()}prepareFrame(t){const e=this.getLayer(),i=e.getSource();if(!i)return!1;const n=t.viewHints[0],s=t.viewHints[1],r=e.getUpdateWhileAnimating(),o=e.getUpdateWhileInteracting();if(this.ready&&!r&&n||!o&&s)return this.animatingOrInteracting_=!0,!0;this.animatingOrInteracting_=!1;const a=t.extent,h=t.viewState,l=h.projection,c=h.resolution,u=t.pixelRatio,d=e.getRevision(),f=e.getRenderBuffer();let p=e.getRenderOrder();void 0===p&&(p=I_);const g=h.center.slice(),m=br(a,f*c),_=m.slice(),v=[m.slice()],y=l.getExtent(),w=i.getWrapX()&&l.canWrapX();if(this.extendX_=!1,w){const t=i.getExtent();t&&!Jr(t)&&(this.extendX_=t[0]<y[0]||t[2]>y[2])}if(w&&(!Ar(y,t.extent)||this.extendX_)){const t=Yr(y),e=Math.max(Yr(m)/2,t);let i=y[0],n=y[2];this.extendX_&&(i-=t,n+=t),m[0]=i-e,m[2]=n+e,mo(g,l);const s=Qr(v[0],l);s[0]<y[0]&&s[2]<y[2]?v.push([s[0]+t,s[1],s[2]+t,s[3]]):s[0]>y[0]&&s[2]>y[2]&&v.push([s[0]-t,s[1],s[2]-t,s[3]])}if(this.ready&&this.renderedResolution_==c&&this.renderedPixelRatio_===u&&this.renderedRevision_==d&&this.renderedRenderOrder_==p&&this.renderedFrameDeclutter_===!!t.declutter&&Ar(this.wrappedRenderedExtent_,m))return Nd(this.renderedExtent_,_)||(this.hitDetectionImageData_=null,this.renderedExtent_=_),this.renderedCenter_=g,this.replayGroupChanged=!1,!0;this.replayGroup_=null;const b=new i_(O_(c,u),m,c,u),x=Aa();let S;if(x){for(let t=0,e=v.length;t<e;++t){const e=La(v[t]);i.loadFeatures(e,ka(c),x)}S=wa(x,l)}else for(let t=0,e=v.length;t<e;++t)i.loadFeatures(v[t],c,l);const E=T_(c,u);let A=!0;const C=(t,i)=>{let n;const s=t.getStyleFunction()||e.getStyleFunction();if(s&&(n=s(t,c)),n){const e=this.renderFeature(t,E,n,b,S,this.getLayer().getDeclutter(),i);A=A&&!e}},M=La(m),L=i.getFeaturesInExtent(M);p&&L.sort(p);for(let t=0,e=L.length;t<e;++t)C(L[t],t);this.renderedFeatures_=L,this.ready=A;const P=b.finish(),k=new A_(m,c,u,i.getOverlaps(),P,e.getRenderBuffer(),!!t.declutter);return this.renderedResolution_=c,this.renderedRevision_=d,this.renderedRenderOrder_=p,this.renderedFrameDeclutter_=!!t.declutter,this.renderedExtent_=_,this.wrappedRenderedExtent_=m,this.renderedCenter_=g,this.renderedProjection_=l,this.renderedPixelRatio_=u,this.replayGroup_=k,this.hitDetectionImageData_=null,this.replayGroupChanged=!0,!0}renderFeature(t,e,i,n,s,r,o){if(!i)return!1;let a=!1;if(Array.isArray(i))for(let h=0,l=i.length;h<l;++h)a=R_(n,t,i[h],e,this.boundHandleStyleImageChange_,s,r,o)||a;else a=R_(n,t,i,e,this.boundHandleStyleImageChange_,s,r,o);return a}};function j_(t,e,i=0,n=t.length-1,s=B_){for(;n>i;){if(n-i>600){const r=n-i+1,o=e-i+1,a=Math.log(r),h=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*h*(r-h)/r)*(o-r/2<0?-1:1);j_(t,e,Math.max(i,Math.floor(e-o*h/r+l)),Math.min(n,Math.floor(e+(r-o)*h/r+l)),s)}const r=t[e];let o=i,a=n;for(G_(t,i,e),s(t[n],r)>0&&G_(t,i,n);o<a;){for(G_(t,o,a),o++,a--;s(t[o],r)<0;)o++;for(;s(t[a],r)>0;)a--}0===s(t[i],r)?G_(t,i,a):(a++,G_(t,a,n)),a<=e&&(i=a+1),e<=a&&(n=a-1)}}function G_(t,e,i){const n=t[e];t[e]=t[i],t[i]=n}function B_(t,e){return t<e?-1:t>e?1:0}class z_{constructor(t=9){this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()}all(){return this._all(this.data,[])}search(t){let e=this.data;const i=[];if(!Q_(t,e))return i;const n=this.toBBox,s=[];for(;e;){for(let r=0;r<e.children.length;r++){const o=e.children[r],a=e.leaf?n(o):o;Q_(t,a)&&(e.leaf?i.push(o):J_(t,a)?this._all(o,i):s.push(o))}e=s.pop()}return i}collides(t){let e=this.data;if(!Q_(t,e))return!1;const i=[];for(;e;){for(let n=0;n<e.children.length;n++){const s=e.children[n],r=e.leaf?this.toBBox(s):s;if(Q_(t,r)){if(e.leaf||J_(t,r))return!0;i.push(s)}}e=i.pop()}return!1}load(t){if(!t||!t.length)return this;if(t.length<this._minEntries){for(let e=0;e<t.length;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this.data.children.length)if(this.data.height===e.height)this._splitRoot(this.data,e);else{if(this.data.height<e.height){const t=this.data;this.data=e,e=t}this._insert(e,this.data.height-e.height-1,!0)}else this.data=e;return this}insert(t){return t&&this._insert(t,this.data.height-1),this}clear(){return this.data=tv([]),this}remove(t,e){if(!t)return this;let i=this.data;const n=this.toBBox(t),s=[],r=[];let o,a,h;for(;i||s.length;){if(i||(i=s.pop(),a=s[s.length-1],o=r.pop(),h=!0),i.leaf){const n=q_(t,i.children,e);if(-1!==n)return i.children.splice(n,1),s.push(i),this._condense(s),this}h||i.leaf||!J_(i,n)?a?(o++,i=a.children[o],h=!1):i=null:(s.push(i),r.push(o),o=0,a=i,i=i.children[0])}return this}toBBox(t){return t}compareMinX(t,e){return t.minX-e.minX}compareMinY(t,e){return t.minY-e.minY}toJSON(){return this.data}fromJSON(t){return this.data=t,this}_all(t,e){const i=[];for(;t;)t.leaf?e.push(...t.children):i.push(...t.children),t=i.pop();return e}_build(t,e,i,n){const s=i-e+1;let r,o=this._maxEntries;if(s<=o)return r=tv(t.slice(e,i+1)),U_(r,this.toBBox),r;n||(n=Math.ceil(Math.log(s)/Math.log(o)),o=Math.ceil(s/Math.pow(o,n-1))),r=tv([]),r.leaf=!1,r.height=n;const a=Math.ceil(s/o),h=a*Math.ceil(Math.sqrt(o));ev(t,e,i,h,this.compareMinX);for(let s=e;s<=i;s+=h){const e=Math.min(s+h-1,i);ev(t,s,e,a,this.compareMinY);for(let i=s;i<=e;i+=a){const s=Math.min(i+a-1,e);r.children.push(this._build(t,i,s,n-1))}}return U_(r,this.toBBox),r}_chooseSubtree(t,e,i,n){for(;n.push(e),!e.leaf&&n.length-1!==i;){let i,n=1/0,s=1/0;for(let r=0;r<e.children.length;r++){const o=e.children[r],a=$_(o),h=Y_(t,o)-a;h<s?(s=h,n=a<n?a:n,i=o):h===s&&a<n&&(n=a,i=o)}e=i||e.children[0]}return e}_insert(t,e,i){const n=i?t:this.toBBox(t),s=[],r=this._chooseSubtree(n,this.data,e,s);for(r.children.push(t),V_(r,n);e>=0&&s[e].children.length>this._maxEntries;)this._split(s,e),e--;this._adjustParentBBoxes(n,s,e)}_split(t,e){const i=t[e],n=i.children.length,s=this._minEntries;this._chooseSplitAxis(i,s,n);const r=this._chooseSplitIndex(i,s,n),o=tv(i.children.splice(r,i.children.length-r));o.height=i.height,o.leaf=i.leaf,U_(i,this.toBBox),U_(o,this.toBBox),e?t[e-1].children.push(o):this._splitRoot(i,o)}_splitRoot(t,e){this.data=tv([t,e]),this.data.height=t.height+1,this.data.leaf=!1,U_(this.data,this.toBBox)}_chooseSplitIndex(t,e,i){let n,s=1/0,r=1/0;for(let o=e;o<=i-e;o++){const e=W_(t,0,o,this.toBBox),a=W_(t,o,i,this.toBBox),h=Z_(e,a),l=$_(e)+$_(a);h<s?(s=h,n=o,r=l<r?l:r):h===s&&l<r&&(r=l,n=o)}return n||i-e}_chooseSplitAxis(t,e,i){const n=t.leaf?this.compareMinX:H_,s=t.leaf?this.compareMinY:K_;this._allDistMargin(t,e,i,n)<this._allDistMargin(t,e,i,s)&&t.children.sort(n)}_allDistMargin(t,e,i,n){t.children.sort(n);const s=this.toBBox,r=W_(t,0,e,s),o=W_(t,i-e,i,s);let a=X_(r)+X_(o);for(let n=e;n<i-e;n++){const e=t.children[n];V_(r,t.leaf?s(e):e),a+=X_(r)}for(let n=i-e-1;n>=e;n--){const e=t.children[n];V_(o,t.leaf?s(e):e),a+=X_(o)}return a}_adjustParentBBoxes(t,e,i){for(let n=i;n>=0;n--)V_(e[n],t)}_condense(t){for(let e,i=t.length-1;i>=0;i--)0===t[i].children.length?i>0?(e=t[i-1].children,e.splice(e.indexOf(t[i]),1)):this.clear():U_(t[i],this.toBBox)}}function q_(t,e,i){if(!i)return e.indexOf(t);for(let n=0;n<e.length;n++)if(i(t,e[n]))return n;return-1}function U_(t,e){W_(t,0,t.children.length,e,t)}function W_(t,e,i,n,s){s||(s=tv(null)),s.minX=1/0,s.minY=1/0,s.maxX=-1/0,s.maxY=-1/0;for(let r=e;r<i;r++){const e=t.children[r];V_(s,t.leaf?n(e):e)}return s}function V_(t,e){return t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY),t}function H_(t,e){return t.minX-e.minX}function K_(t,e){return t.minY-e.minY}function $_(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function X_(t){return t.maxX-t.minX+(t.maxY-t.minY)}function Y_(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function Z_(t,e){const i=Math.max(t.minX,e.minX),n=Math.max(t.minY,e.minY),s=Math.min(t.maxX,e.maxX),r=Math.min(t.maxY,e.maxY);return Math.max(0,s-i)*Math.max(0,r-n)}function J_(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function Q_(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function tv(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ev(t,e,i,n,s){const r=[e,i];for(;r.length;){if((i=r.pop())-(e=r.pop())<=n)continue;const o=e+Math.ceil((i-e)/n/2)*n;j_(t,o,e,i,s),r.push(e,o,o,i)}}let iv=0;const nv=1<<iv++,sv=1<<iv++,rv=1<<iv++,ov=1<<iv++,av=1<<iv++,hv=1<<iv++,lv=Math.pow(2,6)-1,cv={[nv]:"boolean",[sv]:"number",[rv]:"str
2ing",[ov]:"color",[av]:"number[]",[hv]:"size"},uv=Object.keys(cv).map(Number).sort(Cd);function dv(t){const e=[];for(const i of uv)fv(t,i)&&e.push(cv[i]);return 0===e.length?"untyped":e.length<3?e.join(" or "):e.slice(0,-1).join(", ")+", or "+e[e.length-1]}function fv(t,e){return(t&e)===e}function pv(t,e){return!!(t&e)}function gv(t,e){return t===e}class mv{constructor(t,e){if(!function(t){return t in cv}(t))throw new Error(`literal expressions must have a specific type, got ${dv(t)}`);this.type=t,this.value=e}}class _v{constructor(t,e,...i){this.type=t,this.operator=e,this.args=i}}function vv(t){return{variables:new Map,properties:new Map,featureId:!1,geometryType:!1,mCoordinate:!1,mapState:!1,inputVariables:t}}function yv(t,e,i){switch(typeof t){case"boolean":if(gv(e,rv))return new mv(rv,t?"true":"false");if(!fv(e,nv))throw new Error(`got a boolean, but expected ${dv(e)}`);return new mv(nv,t);case"number":if(gv(e,hv))return new mv(hv,eg(t));if(gv(e,nv))return new mv(nv,!!t);if(gv(e,rv))return new mv(rv,t.toString());if(!fv(e,sv))throw new Error(`got a number, but expected ${dv(e)}`);return new mv(sv,t);case"string":if(gv(e,ov))return new mv(ov,ad(t));if(gv(e,nv))return new mv(nv,!!t);if(!fv(e,rv))throw new Error(`got a string, but expected ${dv(e)}`);return new mv(rv,t)}if(!Array.isArray(t))throw new Error("expression must be an array or a primitive value");if(0===t.length)throw new Error("empty expression");if("string"==typeof t[0])return function(t,e,i){const n=t[0],s=fy[n];if(!s)throw new Error(`unknown operator: ${n}`);return s(t,e,i)}(t,e,i);for(const e of t)if("number"!=typeof e)throw new Error("expected an array of numbers");if(gv(e,hv)){if(2!==t.length)throw new Error(`expected an array of two values for a size, got ${t.length}`);return new mv(hv,t)}if(gv(e,ov)){if(3===t.length)return new mv(ov,[...t,1]);if(4===t.length)return new mv(ov,t);throw new Error(`expected an array of 3 or 4 values for a color, got ${t.length}`)}if(!fv(e,av))throw new Error(`got an array of numbers, but expected ${dv(e)}`);return new mv(av,t)}const wv="get",bv="var",xv="concat",Sv="geometry-type",Ev="line-metric",Av="any",Cv="all",Mv="!",Lv="resolution",Pv="zoom",kv="time",Nv="==",Iv="!=",Tv=">",Ov=">=",Rv="<",Fv="<=",Dv="*",jv="/",Gv="+",Bv="-",zv="clamp",qv="%",Uv="^",Wv="abs",Vv="floor",Hv="ceil",Kv="round",$v="sin",Xv="cos",Yv="atan",Zv="sqrt",Jv="match",Qv="between",ty="interpolate",ey="coalesce",iy="case",ny="in",sy="number",ry="string",oy="array",ay="color",hy="id",ly="band",cy="palette",uy="to-string",dy="has",fy={[wv]:xy(_y(1,1/0),py),[bv]:function(t,e,i){const n=t[1];if("string"!=typeof n)throw new Error("expected a string argument for var operation");let s=e;const r=i.inputVariables?.[n];if(void 0!==r){const t=yv(r,lv,i);if(!(t instanceof mv))throw new Error(`style variables should only be literal values (no expressions!), variable name: ${n}`);let o=t.type;if("string"==typeof r&&pv(s,ov)&&!pv(s,rv)?o=ov:Array.isArray(r)&&2===r.length&&pv(s,hv)&&!pv(s,av)&&(o=hv),s&=o,0===s)throw new Error(`the type expected from the var operator (${dv(e)}) did not have any overlap with the type of the corresponding style variables (${dv(o)}), variable name: ${n}`)}if(i.variables.has(n)){const t=i.variables.get(n);if(s&=t,0===s)throw new Error(`a new type expected from the var operator (${dv(e)}) did not have any overlap with the previous type expected for it (${dv(t)}), variable name: ${n}`)}return i.variables.set(n,s),new _v(s,"var",new mv(rv,n))},[dy]:xy(_y(1,1/0),py),[hy]:xy(function(t,e,i){i.featureId=!0},my),[xv]:xy(_y(2,1/0),yy(rv)),[Sv]:xy(function(t,e,i){i.geometryType=!0},my),[Ev]:xy(function(t,e,i){i.mCoordinate=!0},my),[Lv]:xy(gy,my),[Pv]:xy(gy,my),[kv]:xy(gy,my),[Av]:xy(_y(2,1/0),yy(nv)),[Cv]:xy(_y(2,1/0),yy(nv)),[Mv]:xy(_y(1,1),yy(nv)),[Nv]:xy(_y(2,2),wy()),[Iv]:xy(_y(2,2),wy()),[Tv]:xy(_y(2,2),yy(sv)),[Ov]:xy(_y(2,2),yy(sv)),[Rv]:xy(_y(2,2),yy(sv)),[Fv]:xy(_y(2,2),yy(sv)),[Dv]:xy(_y(2,1/0),vy),[ey]:xy(_y(2,1/0),vy),[jv]:xy(_y(2,2),yy(sv)),[Gv]:xy(_y(2,1/0),yy(sv)),[Bv]:xy(_y(2,2),yy(sv)),[zv]:xy(_y(3,3),yy(sv)),[qv]:xy(_y(2,2),yy(sv)),[Uv]:xy(_y(2,2),yy(sv)),[Wv]:xy(_y(1,1),yy(sv)),[Vv]:xy(_y(1,1),yy(sv)),[Hv]:xy(_y(1,1),yy(sv)),[Kv]:xy(_y(1,1),yy(sv)),[$v]:xy(_y(1,1),yy(sv)),[Xv]:xy(_y(1,1),yy(sv)),[Yv]:xy(_y(1,2),yy(sv)),[Zv]:xy(_y(1,1),yy(sv)),[Jv]:xy(_y(4,1/0),by,function(t,e,
vendor: 4,460 bytes, line 2
2i){const n=t.length-1,s=yv(t[t.length-1],e,i);let r=rv|sv|nv;const o=new Array(n-2);for(let e=0;e<n-2;e+=2){try{r&=yv(t[e+2],r,i).type}catch(t){throw new Error(`failed to parse argument ${e+1} of match expression: ${t.message}`)}if(0===r)throw new Error("no common type was found among the arguments of match expression")}for(let e=0;e<n-2;e+=2){try{const n=yv(t[e+2],r,i);o[e]=n}catch(t){throw new Error(`failed to parse argument ${e+1} of match expression: ${t.message}`)}try{const n=yv(t[e+3],s.type,i);o[e+1]=n}catch(t){throw new Error(`failed to parse argument ${e+2} of match expression: ${t.message}`)}}return[yv(t[1],r,i),...o,s]}),[Qv]:xy(_y(3,3),yy(sv)),[ty]:xy(_y(6,1/0),by,function(t,e,i){const n=t[1];let s;switch(n[0]){case"linear":s=1;break;case"exponential":const t=n[1];if("number"!=typeof t||t<=0)throw new Error(`expected a number base for exponential interpolation, got ${JSON.stringify(t)} instead`);s=t;break;default:throw new Error(`invalid interpolation type: ${JSON.stringify(n)}`)}const r=new mv(sv,s);let o;try{o=yv(t[2],sv,i)}catch(t){throw new Error(`failed to parse argument 1 in interpolate expression: ${t.message}`)}const a=new Array(t.length-3);for(let n=0;n<a.length;n+=2){try{const e=yv(t[n+3],sv,i);a[n]=e}catch(t){throw new Error(`failed to parse argument ${n+2} for interpolate expression: ${t.message}`)}try{const s=yv(t[n+4],e,i);a[n+1]=s}catch(t){throw new Error(`failed to parse argument ${n+3} for interpolate expression: ${t.message}`)}}return[r,o,...a]}),[iy]:xy(_y(3,1/0),function(t,e,i){const n=t[0],s=t.length-1;if(s%2==0)throw new Error(`expected an odd number of arguments for ${n}, got ${s} instead`)},function(t,e,i){const n=yv(t[t.length-1],e,i),s=new Array(t.length-1);for(let e=0;e<s.length-1;e+=2){try{const n=yv(t[e+1],nv,i);s[e]=n}catch(t){throw new Error(`failed to parse argument ${e} of case expression: ${t.message}`)}try{const r=yv(t[e+2],n.type,i);s[e+1]=r}catch(t){throw new Error(`failed to parse argument ${e+1} of case expression: ${t.message}`)}}return s[s.length-1]=n,s}),[ny]:xy(_y(2,2),function(t,e,i){let n,s=t[2];if(!Array.isArray(s))throw new Error('the second argument for the "in" operator must be an array');if("literal"===s[0]){if(s=s[1],!Array.isArray(s))throw new Error('failed to parse "in" expression: the literal operator must be followed by an array')}else if("string"==typeof s[0])throw new Error('for the "in" operator, a string array should be wrapped in a "literal" operator to disambiguate from expressions');n="string"==typeof s[0]?rv:sv;const r=new Array(s.length);for(let t=0;t<r.length;t++)try{const e=yv(s[t],n,i);r[t]=e}catch(e){throw new Error(`failed to parse haystack item ${t} for "in" expression: ${e.message}`)}return[yv(t[1],n,i),...r]}),[sy]:xy(_y(1,1/0),yy(lv)),[ry]:xy(_y(1,1/0),yy(lv)),[oy]:xy(_y(1,1/0),yy(sv)),[ay]:xy(_y(1,4),yy(sv)),[ly]:xy(_y(1,3),yy(sv)),[cy]:xy(_y(2,2),function(t,e,i){let n;try{n=yv(t[1],sv,i)}catch(t){throw new Error(`failed to parse first argument in palette expression: ${t.message}`)}const s=t[2];if(!Array.isArray(s))throw new Error("the second argument of palette must be an array");const r=new Array(s.length);for(let t=0;t<r.length;t++){let e;try{e=yv(s[t],ov,i)}catch(e){throw new Error(`failed to parse color at index ${t} in palette expression: ${e.message}`)}if(!(e instanceof mv))throw new Error(`the palette color at index ${t} must be a literal value`);r[t]=e}return[n,...r]}),[uy]:xy(_y(1,1),yy(nv|sv|rv|ov))};function py(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r<n;++r){const n=t[r+1];switch(typeof n){case"number":s[r]=new mv(sv,n);break;case"string":s[r]=new mv(rv,n);break;default:throw new Error(`expected a string key or numeric array index for a get operation, got ${n}`)}0===r&&i.properties.set(String(n),e)}return s}function gy(t,e,i){i.mapState=!0}function my(t,e,i){const n=t[0];if(1!==t.length)throw new Error(`expected no arguments for ${n} operation`);return[]}function _y(t,e){return function(i,n,s){const r=i[0],o=i.length-1;if(t===e){if(o!==t)throw new Error(`expected ${t} argument${1===t?"":"s"} for ${r}, got ${o}`)}else if(o<t||o>e)throw new Error(`expected ${e===1/0?`${t} or more`:`${t} to ${e}`} arguments for ${r}, got ${o}`)}}function vy(t,e,i){const n=t.length-1,s=new Array(n);for(let r=0;r<n;++r){const n=yv(t[r+1],e,i);s[r]=n}return s}function yy(t){return function(e,i,n){const s=e.length-1,r=new Array(s);for(let i=0;i<s;++i){const s=yv(e[i+1],t,n);r[i]=s}return r}}
2function wy(){return function(t,e,i){const n=t[0],s=t.length-1,r=new Array(s);let o=lv;for(let e=0;e<s;++e)o&=yv(t[e+1],o,i).type;if(0===o)throw new Error(`no common type was found among the arguments of ${n}`);for(let e=0;e<s;++e){const n=yv(t[e+1],o,i);r[e]=n}return r}}function by(t,e,i){const n=t[0],s=t.length-1;if(s%2==1)throw new Error(`expected an even number of arguments for operation ${n}, got ${s} instead`)}function xy(...t){return function(e,i,n){const s=e[0];let r;for(let s=0;s<t.length;s++){const o=t[s](e,i,n);if(s==t.length-1){if(!o)throw new Error("expected last argument validator to return the parsed args");r=o}}return new _v(i,s,...r)}}function Sy(t){if(!t)return"";const e=t.getType();switch(e){case"Point":case"LineString":case"Polygon":return e;case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.substring(5);case"Circle":return"Polygon";case"GeometryCollection":return Sy(t.getGeometries()[0]);default:return""}}function Ey(t,e,i){return Ay(yv(t,e,i),i)}function Ay(t,e){if(t instanceof mv){if(t.type===ov&&"string"==typeof t.value){const e=ad(t.value);return function(){return e}}return function(){return t.value}}const i=t.operator;switch(i){case sy:case ry:case ey:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i<n;++i)s[i]=Ay(t.args[i],e);switch(i){case ey:return t=>{for(let e=0;e<n;++e){const i=s[e](t);if(null!=i)return i}throw new Error("Expected one of the values to be non-null")};case sy:case ry:return t=>{for(let e=0;e<n;++e){const n=s[e](t);if(typeof n===i)return n}throw new Error(`Expected one of the values to be a ${i}`)};default:throw new Error(`Unsupported assertion operator ${i}`)}}(t,e);case wv:case bv:case dy:return function(t){const e=t.args[0].value;switch(t.operator){case wv:return i=>{const n=t.args;let s=i.properties[e];for(let t=1,e=n.length;t<e;++t)s=s[n[t].value];return s};case bv:return t=>t.variables[e];case dy:return i=>{const n=t.args;if(!(e in i.properties))return!1;let s=i.properties[e];for(let t=1,e=n.length;t<e;++t){const e=n[t].value;if(!s||!Object.hasOwn(s,e))return!1;s=s[e]}return!0};default:throw new Error(`Unsupported accessor operator ${t.operator}`)}}(t);case"id":return t=>t.featureId;case Sv:return t=>t.geometryType;case xv:{const i=t.args.map(t=>Ay(t,e));return t=>"".concat(...i.map(e=>e(t).toString()))}case Lv:return t=>t.resolution;case Av:case Cv:case Qv:case ny:case"!":return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i<n;++i)s[i]=Ay(t.args[i],e);switch(i){case Av:return t=>{for(let e=0;e<n;++e)if(s[e](t))return!0;return!1};case Cv:return t=>{for(let e=0;e<n;++e)if(!s[e](t))return!1;return!0};case Qv:return t=>{const e=s[0](t),i=s[1](t),n=s[2](t);return e>=i&&e<=n};case ny:return t=>{const e=s[0](t);for(let i=1;i<n;++i)if(e===s[i](t))return!0;return!1};case"!":return t=>!s[0](t);default:throw new Error(`Unsupported logical operator ${i}`)}}(t,e);case Nv:case Iv:case"<":case Fv:case">":case Ov:return function(t,e){const i=t.operator,n=Ay(t.args[0],e),s=Ay(t.args[1],e);switch(i){case Nv:return t=>n(t)===s(t);case Iv:return t=>n(t)!==s(t);case"<":return t=>n(t)<s(t);case Fv:return t=>n(t)<=s(t);case">":return t=>n(t)>s(t);case Ov:return t=>n(t)>=s(t);default:throw new Error(`Unsupported comparison operator ${i}`)}}(t,e);case"*":case"/":case"+":case"-":case zv:case"%":case"^":case Wv:case Vv:case Hv:case Kv:case $v:case Xv:case Yv:case Zv:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i<n;++i)s[i]=Ay(t.args[i],e);switch(i){case"*":return t=>{let e=1;for(let i=0;i<n;++i)e*=s[i](t);return e};case"/":return t=>s[0](t)/s[1](t);case"+":return t=>{let e=0;for(let i=0;i<n;++i)e+=s[i](t);return e};case"-":return t=>s[0](t)-s[1](t);case zv:return t=>{const e=s[0](t),i=s[1](t);if(e<i)return i;const n=s[2](t);return e>n?n:e};case"%":return t=>s[0](t)%s[1](t);case"^":return t=>Math.pow(s[0](t),s[1](t));case Wv:return t=>Math.abs(s[0](t));case Vv:return t=>Math.floor(s[0](t));case Hv:return t=>Math.ceil(s[0](t));case Kv:return t=>Math.round(s[0](t));case $v:return t=>Math.sin(s[0](t));case Xv:return t=>Math.cos(s[0](t));case Yv:return 2===n?t=>Math.atan2(s[0](t),s[1](t)):t=>Math.atan(s[0](t));case Zv:return t=>Math.sqrt(s[0](t));default:throw new Error(`Unsupported numeric operator ${i}`)}}(t,e);case iy:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Ay(t.args[s],e);return t=>{for(let e=0;e<i-1;e+=2)if(n[e](t))return n[e+1](t);return n[i-1](t)}}(t,e);case Jv:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Ay(t.args[s],e);return t=>{const e=n[0](t);for(let s=1;s<i-1;s+=2)if(e===n[s](t))return n[s+1](t);return n[i-1](t)}}(t,e);case ty:return function(t,e){const i=t.args.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Ay(t.args[s],e);return t=>{const e=n[0](t),s=n[1](t);let r,o;for(let a=2;a<i;a+=2){const i=n[a](t);let h=n[a+1](t);const l=Array.isArray(h);if(l&&(h=ed(h)),i>=s)return 2===a?h:l?My(e,s,r,o,i,h):Cy(e,s,r,o,i,h);r=i,o=h}return o}}(t,e);case uy:return function(t,e){const i=t.operator,n=t.args.length,s=new Array(n);for(let i=0;i<n;++i)s[i]=Ay(t.args[i],e);if(i===uy)return e=>{const i=s[0](e);return t.args[0].type===ov?ld(i):i.toString()};throw new Error(`Unsupported convert operator ${i}`)}(t,e);default:throw new Error(`Unsupported operator ${i}`)}}
vendor: 5,078 bytes, line 2
2function Cy(t,e,i,n,s,r){const o=s-i;if(0===o)return n;const a=e-i;return n+(1===t?a/o:(Math.pow(t,a)-1)/(Math.pow(t,o)-1))*(r-n)}function My(t,e,i,n,s,r){if(0===s-i)return n;const o=od(n),a=od(r);let h=a[2]-o[2];return h>180?h-=360:h<-180&&(h+=360),function(t){const e=(t[0]+16)/116,i=t[1],n=t[2]*Math.PI/180,s=nd(e),r=nd(e+i/500*Math.cos(n)),o=nd(e-i/200*Math.sin(n)),a=id(3.021973625*r-1.617392459*s-.404875592*o),h=id(-.943766287*r+1.916279586*s+.027607165*o),l=id(.069407491*r-.22898585*s+1.159737864*o);return[io(a+.5|0,0,255),io(h+.5|0,0,255),io(l+.5|0,0,255),t[3]]}([Cy(t,e,i,o[0],s,a[0]),Cy(t,e,i,o[1],s,a[1]),o[2]+Cy(t,e,i,0,s,h),Cy(t,e,i,n[3],s,r[3])])}class Ly{constructor(t){t=t||{},this.font_=t.font,this.rotation_=t.rotation,this.rotateWithView_=t.rotateWithView,this.keepUpright_=t.keepUpright,this.scale_=t.scale,this.scaleArray_=eg(void 0!==t.scale?t.scale:1),this.text_=t.text,this.textAlign_=t.textAlign,this.justify_=t.justify,this.repeat_=t.repeat,this.textBaseline_=t.textBaseline,this.fill_=void 0!==t.fill?t.fill:new Vd({color:"#333"}),this.maxAngle_=void 0!==t.maxAngle?t.maxAngle:Math.PI/4,this.placement_=void 0!==t.placement?t.placement:"point",this.overflow_=!!t.overflow,this.stroke_=void 0!==t.stroke?t.stroke:null,this.offsetX_=void 0!==t.offsetX?t.offsetX:0,this.offsetY_=void 0!==t.offsetY?t.offsetY:0,this.backgroundFill_=t.backgroundFill?t.backgroundFill:null,this.backgroundStroke_=t.backgroundStroke?t.backgroundStroke:null,this.padding_=void 0===t.padding?null:t.padding,this.declutterMode_=t.declutterMode}clone(){const t=this.getScale();return new Ly({font:this.getFont(),placement:this.getPlacement(),repeat:this.getRepeat(),maxAngle:this.getMaxAngle(),overflow:this.getOverflow(),rotation:this.getRotation(),rotateWithView:this.getRotateWithView(),keepUpright:this.getKeepUpright(),scale:Array.isArray(t)?t.slice():t,text:this.getText(),textAlign:this.getTextAlign(),justify:this.getJustify(),textBaseline:this.getTextBaseline(),fill:this.getFill()instanceof Vd?this.getFill().clone():this.getFill(),stroke:this.getStroke()?this.getStroke().clone():void 0,offsetX:this.getOffsetX(),offsetY:this.getOffsetY(),backgroundFill:this.getBackgroundFill()?this.getBackgroundFill().clone():void 0,backgroundStroke:this.getBackgroundStroke()?this.getBackgroundStroke().clone():void 0,padding:this.getPadding()||void 0,declutterMode:this.getDeclutterMode()})}getOverflow(){return this.overflow_}getFont(){return this.font_}getMaxAngle(){return this.maxAngle_}getPlacement(){return this.placement_}getRepeat(){return this.repeat_}getOffsetX(){return this.offsetX_}getOffsetY(){return this.offsetY_}getFill(){return this.fill_}getRotateWithView(){return this.rotateWithView_}getKeepUpright(){return this.keepUpright_}getRotation(){return this.rotation_}getScale(){return this.scale_}getScaleArray(){return this.scaleArray_}getStroke(){return this.stroke_}getText(){return this.text_}getTextAlign(){return this.textAlign_}getJustify(){return this.justify_}getTextBaseline(){return this.textBaseline_}getBackgroundFill(){return this.backgroundFill_}getBackgroundStroke(){return this.backgroundStroke_}getPadding(){return this.padding_}getDeclutterMode(){return this.declutterMode_}setOverflow(t){this.overflow_=t}setFont(t){this.font_=t}setMaxAngle(t){this.maxAngle_=t}setOffsetX(t){this.offsetX_=t}setOffsetY(t){this.offsetY_=t}setPlacement(t){this.placement_=t}setRepeat(t){this.repeat_=t}setRotateWithView(t){this.rotateWithView_=t}setKeepUpright(t){this.keepUpright_=t}setFill(t){this.fill_=t}setRotation(t){this.rotation_=t}setScale(t){this.scale_=t,this.scaleArray_=eg(void 0!==t?t:1)}setStroke(t){this.stroke_=t}setText(t){this.text_=t}setTextAlign(t){this.textAlign_=t}setJustify(t){this.justify_=t}setTextBaseline(t){this.textBaseline_=t}setBackgroundFill(t){this.backgroundFill_=t}setBackgroundStroke(t){this.backgroundStroke_=t}setPadding(t){this.padding_=t}}const Py=Ly;function ky(t){return!0}function Ny(t,e){e=e??vv();const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=Iy(t[s],e);const s={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""},r=new Array(i);return function(t,o){if(s.properties=t.getPropertiesInternal(),s.resolution=o,e.featureId){const e=t.getId();s.featureId=void 0!==e?e:null}e.geometryType&&(s.geometryType=Sy(t.getGeometry()));let a=0;for(let t=0;t<i;++t){const e=n[t](s);e&&(r[a]=e,a+=1)}return r.length=a,r}}function Iy(t,e){const i=Ty(t,"",e),n=Oy(t,"",e),s=function(t,e){const i="text-",n=Dy(t,i+"value",e);if(!n)return null;const s=Ty(t,i,e),r=Ty(t,i+"background-",e),o=Oy(t,i,e),a=Oy(t,i+"background-",e),h=Dy(t,i+"font",e),l=Fy(t,i+"max-angle",e),c=Fy(t,i+"offset-x",e),u=Fy(t,i+"offset-y",e),d=jy(t,i+"overflow",e),f=Dy(t,i+"placement",e),p=Fy(t,i+"repeat",e),g=Uy(t,i+"scale",e),m=jy(t,i+"rotate-with-view",e),_=Fy(t,i+"rotation",e),v=Dy(t,i+"align",e),y=Dy(t,i+"justify",e),w=Dy(t,i+"baseline",e),b=jy(t,i+"keep-upright",e),x=By(t,i+"padding",e),S=Ky(t,i+"declutter-mode"),E=new Py({declutterMode:S});return function(t){if(E.setText(n(t)),s&&E.setFill(s(t)),r&&E.setBackgroun
2dFill(r(t)),o&&E.setStroke(o(t)),a&&E.setBackgroundStroke(a(t)),h&&E.setFont(h(t)),l&&E.setMaxAngle(l(t)),c&&E.setOffsetX(c(t)),u&&E.setOffsetY(u(t)),d&&E.setOverflow(d(t)),f){const e=f(t);if("point"!==e&&"line"!==e)throw new Error("Expected point or line for text-placement");E.setPlacement(e)}if(p&&E.setRepeat(p(t)),g&&E.setScale(g(t)),m&&E.setRotateWithView(m(t)),_&&E.setRotation(_(t)),v){const e=v(t);if("left"!==e&&"center"!==e&&"right"!==e&&"end"!==e&&"start"!==e)throw new Error("Expected left, right, center, start, or end for text-align");E.setTextAlign(e)}if(y){const e=y(t);if("left"!==e&&"right"!==e&&"center"!==e)throw new Error("Expected left, right, or center for text-justify");E.setJustify(e)}if(w){const e=w(t);if("bottom"!==e&&"top"!==e&&"middle"!==e&&"alphabetic"!==e&&"hanging"!==e)throw new Error("Expected bottom, top, middle, alphabetic, or hanging for text-baseline");E.setTextBaseline(e)}return x&&E.setPadding(x(t)),b&&E.setKeepUpright(b(t)),E}}(t,e),r=function(t,e){return"icon-src"in t?function(t,e){const i="icon-",n=i+"src",s=Xy(t[n],n),r=zy(t,i+"anchor",e),o=Uy(t,i+"scale",e),a=Fy(t,i+"opacity",e),h=zy(t,i+"displacement",e),l=Fy(t,i+"rotation",e),c=jy(t,i+"rotate-with-view",e),u=Vy(t,i+"anchor-origin"),d=Hy(t,i+"anchor-x-units"),f=Hy(t,i+"anchor-y-units"),p=Ry(t,i+"color");let g,m=null;void 0!==p&&(Array.isArray(p)&&p.length>0&&"string"==typeof p[0]?m=Gy(t,i+"color",e):g=Zy(p,i+"color"));const _=function(t,e){const i=t[e];if(void 0!==i){if("string"!=typeof i)throw new Error(`Expected a string for ${e}`);return i}}(t,i+"cross-origin"),v=function(t,e){const i=t[e];if(void 0!==i)return $y(i,e)}(t,i+"offset"),y=Vy(t,i+"offset-origin"),w=Wy(t,i+"width"),b=Wy(t,i+"height"),x=function(t,e){const i=t[e];if(void 0!==i){if("number"==typeof i)return eg(i);if(!Array.isArray(i))throw new Error(`Expected a number or size array for ${e}`);if(2!==i.length||"number"!=typeof i[0]||"number"!=typeof i[1])throw new Error(`Expected a number or size array for ${e}`);return i}}(t,i+"size"),S={src:s,anchorOrigin:u,anchorXUnits:d,anchorYUnits:f,crossOrigin:_,offset:v,offsetOrigin:y,height:b,width:w,size:x,declutterMode:Ky(t,i+"declutter-mode")};let E=null;return function(t){if(E)m&&E.setColor(m(t));else{const e=m?m(t):g;E=new L_(void 0!==e?Object.assign({},S,{color:e}):Object.assign({},S))}return a&&E.setOpacity(a(t)),h&&E.setDisplacement(h(t)),l&&E.setRotation(l(t)),c&&E.setRotateWithView(c(t)),o&&E.setScale(o(t)),r&&E.setAnchor(r(t)),E}}(t,e):"shape-points"in t?function(t,e){const i="shape-",n=i+"points",s=i+"radius",r=Yy(t[n],n);if(!(s in t))throw new Error(`Expected a number for ${s}`);const o=Fy(t,s,e),a="number"==typeof t[s]?t[s]:5,h=i+"radius2",l=Fy(t,h,e),c="number"==typeof t[h]?t[h]:void 0,u=Ty(t,i,e),d=Oy(t,i,e),f=Uy(t,i+"scale",e),p=zy(t,i+"displacement",e),g=Fy(t,i+"rotation",e),m=jy(t,i+"rotate-with-view",e),_=Wy(t,i+"angle"),v=Ky(t,i+"declutter-mode"),y=new rg({points:r,radius:a,radius2:c,angle:_,declutterMode:v});return function(t){return o&&y.setRadius(o(t)),l&&y.setRadius2(l(t)),u&&y.setFill(u(t)),d&&y.setStroke(d(t)),p&&y.setDisplacement(p(t)),g&&y.setRotation(g(t)),m&&y.setRotateWithView(m(t)),f&&y.setScale(f(t)),y}}(t,e):"circle-radius"in t?function(t,e){const i="circle-",n=Ty(t,i,e),s=Oy(t,i,e),r=Fy(t,i+"radius",e),o=Uy(t,i+"scale",e),a=zy(t,i+"displacement",e),h=Fy(t,i+"rotation",e),l=jy(t,i+"rotate-with-view",e),c=Ky(t,i+"declutter-mode"),u=new ag({radius:5,declutterMode:c});return function(t){return r&&u.setRadius(r(t)),n&&u.setFill(n(t)),s&&u.setStroke(s(t)),a&&u.setDisplacement(a(t)),h&&u.setRotation(h(t)),l&&u.setRotateWithView(l(t)),o&&u.setScale(o(t)),u}}(t,e):null}(t,e),o=Fy(t,"z-index",e);if(!(i||n||s||r||pd(t)))throw new Error("No fill, stroke, point, or text symbolizer properties in style: "+JSON.stringify(t));const a=new dg;return function(t){let e=!0;if(i){const n=i(t);n&&(e=!1),a.setFill(n)}if(n){const i=n(t);i&&(e=!1),a.setStroke(i)}if(s){const i=s(t);i&&(e=!1),a.setText(i)}if(r){const i=r(t);i&&(e=!1),a.setImage(i)}return o&&a.setZIndex(o(t)),e?null:a}}function Ty(t,e,i){let n;
vendor: 16,240 bytes, line 2
2if(e+"fill-pattern-src"in t)n=function(t,e,i){const n=Dy(t,e+"pattern-src",i),s=qy(t,e+"pattern-offset",i),r=qy(t,e+"pattern-size",i),o=Gy(t,e+"color",i);return function(t){return{src:n(t),offset:s&&s(t),size:r&&r(t),color:o&&o(t)}}}(t,e+"fill-",i);else{if("none"===t[e+"fill-color"])return t=>null;n=Gy(t,e+"fill-color",i)}if(!n)return null;const s=new Vd;return function(t){const e=n(t);return e===Wu?null:(s.setColor(e),s)}}function Oy(t,e,i){const n=Fy(t,e+"stroke-width",i),s=Gy(t,e+"stroke-color",i);if(!n&&!s)return null;const r=Dy(t,e+"stroke-line-cap",i),o=Dy(t,e+"stroke-line-join",i),a=By(t,e+"stroke-line-dash",i),h=Fy(t,e+"stroke-line-dash-offset",i),l=Fy(t,e+"stroke-miter-limit",i),c=Fy(t,e+"stroke-offset",i),u=new Jp;return function(t){if(s){const e=s(t);if(e===Wu)return null;u.setColor(e)}if(n&&u.setWidth(n(t)),r){const e=r(t);if("butt"!==e&&"round"!==e&&"square"!==e)throw new Error("Expected butt, round, or square line cap");u.setLineCap(e)}if(o){const e=o(t);if("bevel"!==e&&"round"!==e&&"miter"!==e)throw new Error("Expected bevel, round, or miter line join");u.setLineJoin(e)}return a&&u.setLineDash(a(t)),h&&u.setLineDashOffset(h(t)),l&&u.setMiterLimit(l(t)),c&&u.setOffset(c(t)),u}}function Ry(t,e){if(!(e in t))return;const i=t[e];return void 0===i?void 0:i}function Fy(t,e,i){const n=Ry(t,e);if(void 0===n)return;const s=Ey(n,sv,i);return function(t){return Yy(s(t),e)}}function Dy(t,e,i){const n=Ry(t,e);if(void 0===n)return null;const s=Ey(n,rv,i);return function(t){return Xy(s(t),e)}}function jy(t,e,i){const n=Ry(t,e);if(void 0===n)return null;const s=Ey(n,nv,i);return function(t){const i=s(t);if("boolean"!=typeof i)throw new Error(`Expected a boolean for ${e}`);return i}}function Gy(t,e,i){const n=Ry(t,e);if(void 0===n)return null;const s=Ey(n,ov,i);return function(t){return Zy(s(t),e)}}function By(t,e,i){const n=Ry(t,e);if(void 0===n)return null;if(Array.isArray(n)&&(0===n.length||"string"!=typeof n[0])){const t=n.map((t,n)=>{if("number"==typeof t)return()=>t;const s=Ey(t,sv,i);return function(t){return Yy(s(t),`${e}[${n}]`)}});return function(e){const i=new Array(t.length);for(let n=0;n<t.length;++n)i[n]=t[n](e);return i}}const s=Ey(n,av,i);return function(t){return $y(s(t),e)}}function zy(t,e,i){const n=Ry(t,e);if(void 0===n)return null;const s=Ey(n,av,i);return function(t){const i=$y(s(t),e);if(2!==i.length)throw new Error(`Expected two numbers for ${e}`);return i}}function qy(t,e,i){const n=Ry(t,e);if(void 0===n)return null;const s=Ey(n,av,i);return function(t){return Jy(s(t),e)}}function Uy(t,e,i){const n=Ry(t,e);if(void 0===n)return null;const s=Ey(n,av|sv,i);return function(t){return i=s(t),n=e,"number"==typeof i?i:Jy(i,n);var i,n}}function Wy(t,e){const i=t[e];if(void 0!==i){if("number"!=typeof i)throw new Error(`Expected a number for ${e}`);return i}}function Vy(t,e){const i=t[e];if(void 0!==i){if("bottom-left"!==i&&"bottom-right"!==i&&"top-left"!==i&&"top-right"!==i)throw new Error(`Expected bottom-left, bottom-right, top-left, or top-right for ${e}`);return i}}function Hy(t,e){const i=t[e];if(void 0!==i){if("pixels"!==i&&"fraction"!==i)throw new Error(`Expected pixels or fraction for ${e}`);return i}}function Ky(t,e){const i=t[e];if(void 0!==i){if("string"!=typeof i)throw new Error(`Expected a string for ${e}`);if("declutter"!==i&&"obstacle"!==i&&"none"!==i)throw new Error(`Expected declutter, obstacle, or none for ${e}`);return i}}function $y(t,e){if(!Array.isArray(t))throw new Error(`Expected an array for ${e}`);const i=t.length;for(let n=0;n<i;++n)if("number"!=typeof t[n])throw new Error(`Expected an array of numbers for ${e}`);return t}function Xy(t,e){if("string"!=typeof t)throw new Error(`Expected a string for ${e}`);return t}function Yy(t,e){if("number"!=typeof t)throw new Error(`Expected a number for ${e}`);return t}function Zy(t,e){if("string"==typeof t)return t;const i=$y(t,e),n=i.length;if(n<3||n>4)throw new Error(`Expected a color with 3 or 4 values for ${e}`);return i}function Jy(t,e){const i=$y(t,e);if(2!==i.length)throw new Error(`Expected an array of two numbers for ${e}`);return i}const Qy="renderOrder",tw=class extends dm{constructor(t){t=t||{};const e=Object.assign({},t);delete e.style,delete e.renderBuffer,delete e.updateWhileAnimating,delete e.updateWhileInteracting,super(e),this.declutter_=t.declutter?String(t.declutter):void 0,this.renderBuffer_=void 0!==t.renderBuffer?t.renderBuffer:100,this.style_=null,this.styleFunction_=void 0,this.setStyle(t.style),this.updateWhileAnimating_=void 0!==t.updateWhileAnimating&&t.updateWhileAnimating,this.updateWhileInteracting_=void 0!==t.updateWhileInteracting&&t.updateWhileInteracting}getDeclutter(){return this.declutter_}getFeatures(t){return super.getFeatures(t)}getRenderBuffer(){return this.renderBuffer_}getRenderOrder(){return this.get(Qy)}getStyle(){return this.style_}getStyleFunction(){return this.styleFunction_}getUpdateWhileAnimating(){return this.updateWhileAnimating_}getUpdateWhileInteracting(){return this.updateWhileInteracting_}renderDeclutter(t,e){const i=this.getDeclutter();i in t.declutter==0&&(t.declutter[i]=new z_(9)),this.getRenderer().renderDeclutter(t,e)}setRenderOrder(t){this.set(Qy,t)}setStyle(t){this.style_=void 0===t?cg:t;const e=function(t){if(void 0===t)return cg;if(!t)return null;if("function"==typeof t)return t;if(t instanceof dg)return t;if(Array.isArray(t)&&0===t.length)return[];if(Array.isArray(t)&&t[0]instanceof dg){const e=t.length,i=new Array(e);for(let n=0;n<e;++n){const e=t[n];if(!(e instanceof dg))throw new Error("Expected a list of style instances");i[n]=e}return i}return function(t,e){if(e=e??vv(),!Array.isArray(t))return Ny([t],e);const i=t.length;if("style"in t[0]){const n=new Array(i);for(let e=0;e<i;++e){const i=t[e];if(!("style"in i))throw new Error("Expected a list of rules with a style property");n[e]=i}return function(t,e){const i=function(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s){const i=t[s],r="filter"in i?Ey(i.filter,nv,e):ky;let o;if(Array.isArray(i.style)){const t=i.style.length;o=new Array(t);for(let n=0;n<t;++n)o[n]=Iy(i.style[n],e)}else o=[Iy(i.style,e)];n[s]={filter:r,styles:o}}return function(e){const s=[];let r=!1;for(let o=0;o<i;++o)if((0,n[o].filter)(e)&&(!t[o].else||!r)){r=!0;for(const t of n[o].styles){const i=t(e);i&&s.push(i)}}return s}}(t,e=e??vv()),n={variables:{},properties:{},resolution:NaN,featureId:null,geometryType:""};return function(t,s){if(n.properties=t.getPropertiesInternal(),n.resolution=s,e.featureId){const e=t.getId();n.featureId=void 0!==e?e:null}return e.geometryType&&(n.geometryType=Sy(t.getGeometry())),i(n)}}(n,e)}return Ny(t,e)}(t)}(t);this.styleFunction_=null===t?void 0:function(t){let e;if("function"==typeof t)e=t;else{let i;Array.isArray(t)?i=t:(Zd("function"==typeof t.getZIndex,"Expected an `Style` or an array of `Style`"),i=[t]),e=function(){return i}}return e}(e),this.changed()}setDeclutter(t){this.declutter_=t?String(t):void 0,this.changed()}},ew=class extends tw{constructor(t){super(t)}createRenderer(){return new D_(this)}};function iw(t,e){return function(i,n,s,r,o){!function(t,e,i,n,s,r,o){const a=new XMLHttpRequest;a.open("GET","function"==typeof t?t(i,n,s):t,!0),"arraybuffer"==e.getType()&&(a.responseType="arraybuffer"),a.withCredentials=false,a.onload=function(t){if(!a.status||a.status>=200&&a.status<300){const t=e.getType();try{let n;"text"==t||"json"==t?n=a.responseText:"xml"==t?n=a.responseXML||a.responseText:"arraybuffer"==t&&(n=a.response),n?r(e.readFeatures(n,{extent:i,featureProjection:s}),e.readProjection(n)):o()}catch{o()}}else o()},a.onerror=o,a.send()}(t,e,i,n,s,(t,e)=>{this.addFeatures(t),void 0!==r&&r(t)},()=>{this.changed(),void 0!==o&&o()})}}function nw(t,e){return[[-1/0,-1/0,1/0,1/0]]}const sw=class{constructor(t){this.rbush_=new z_(t),this.items_={}}insert(t,e){const i={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3],value:e};this.rbush_.insert(i),this.items_[dd(e)]=i}load(t,e){const i=new Array(e.length);for(let n=0,s=e.length;n<s;n++){const s=t[n],r=e[n],o={minX:s[0],minY:s[1],maxX:s[2],maxY:s[3],value:r};i[n]=o,this.items_[dd(r)]=o}this.rbush_.load(i)}remove(t){const e=dd(t),i=this.items_[e];return delete this.items_[e],null!==this.rbush_.remove(i)}update(t,e){const i=this.items_[dd(e)];Ir([i.minX,i.minY,i.maxX,i.maxY],t)||(this.remove(e),this.insert(t,e))}getAll(){return this.rbush_.all().map(function(t){return t.value})}getInExtent(t){const e={minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]};return this.rbush_.search(e).map(function(t){return t.value})}forEach(t){return this.forEach_(this.getAll(),t)}forEachInExtent(t,e){return this.forEach_(this.getInExtent(t),e)}forEach_(t,e){let i;for(let n=0,s=t.length;n<s;n++)if(i=e(t[n]),i)return i;return i}isEmpty(){return pd(this.items_)}clear(){this.rbush_.clear(),this.items_={}}getExtent(t){const e=this.rbush_.toJSON();return Lr(e.minX,e.minY,e.maxX,e.maxY,t)}concat(t){this.rbush_.load(t.rbush_.all());for(const e in t.items_)this.items_[e]=t.items_[e]}};function rw(t){return t?"function"==typeof t?t:(Array.isArray(t)||(t=[t]),e=>t):null}const ow=class extends Yd{constructor(t){super(),this.projection=fa(t.projection),this.attributions_=rw(t.attributions),this.attributionsCollapsible_=t.attributionsCollapsible??!0,this.loading=!1,this.state_=void 0!==t.state?t.state:"ready",this.wrapX_=void 0!==t.wrapX&&t.wrapX,this.interpolate_=!!t.interpolate,this.viewResolver=null,this.viewRejector=null;const e=this;this.viewPromise_=new Promise(function(t,i){e.viewResolver=t,e.viewRejector=i})}getAttributions(){return this.attributions_}getAttributionsCollapsible(){return this.attributionsCollapsible_}getProjection(){return this.projection}getResolutions(t){return null}getView(){return this.viewPromise_}ready(){const t=this.getState();return"ready"===t?Promise.resolve():"error"===t?Promise.reject(new Error("Source failed to load")):new Promise((t,e)=>{const i=()=>{const n=this.getState();"ready"===n?(this.un("change",i),t()):"error"===n&&(this.un("change",i),e(new Error("Source failed to load")))};this.on("change",i)})}getState(){return this.state_}getWrapX(){return this.wrapX_}getInterpolate(){return this.interpolate_}refresh(){this.changed()}setAttributions(t){this.attributions_=rw(t),this.changed()}setState(t){this.state_=t,this.changed()}},aw="addfeature",hw="removefeature";class lw extends Fd{constructor(t,e,i){super(t),this.feature=e,this.features=i}}const cw=class extends ow{constructor(t){super({attributions:(t=t||{}).attributions,interpolate:!0,projection:void 0,state:"ready",wrapX:void 0===t.wrapX||t.wrapX}),this.on,this.once,this.un,this.loader_=Od,this.format_=t.format||null,this.overlaps_=void 0===t.overlaps||t.overlaps,this.url_=t.url,void 0!==t.loader?this.loader_=t.loader:void 0!==this.url_&&(Zd(this.format_,"`format` must be set when `url` is set"),this.loader_=iw(this.url_,this.format_)),this.strategy_=void 0!==t.strategy?t.strategy:nw;const e=void 0===t.useSpatialIndex||t.useSpatialIndex;let i,n;this.featuresRtree_=e?new sw:null,this.loadedExtentsRtree_=new sw,this.nullGeometryFeatures_={},this.idIndex_={},this.uidIndex_={},this.featureChangeKeys_={},this.featuresCollection_=null,Array.isArray(t.features)?n=t.features:t.features&&(i=t.features,n=i.getArray()),e||void 0!==i||(i=new Op(n)),void 0!==n&&this.addFeaturesInternal(n),void 0!==i&&this.bindFeaturesCollection_(i)}addFeature(t){this.addFeatureInternal(t),this.changed()}addFeatureInternal(t){const e=dd(t);if(!this.addToIndex_(e,t))return void(this.featuresCollection_&&this.featuresCollection_.remove(t));this.setupChangeEvents_(e,t);const i=t.getGeometry();if(i){const e=i.getExtent();this.featuresRtree_&&this.featuresRtree_.insert(e,t)}else this.nullGeometryFeatures_[e]=t;this.dispatchEvent(new lw(aw,t))}setupChangeEvents_(t,e){e instanceof jf||(this.featureChangeKeys_[t]=[gd(e,vd,this.handleFeatureChange_,this),gd(e,Hd,this.handleFeatureChange_,this)])}addToIndex_(t,e){let i=!0;if(void 0!==e.getId()){const t=String(e.getId());if(t in this.idIndex_)if(e instanceof jf){const n=this.idIndex_[t];n instanceof jf?Array.isArray(n)?n.push(e):this.idIndex_[t]=[n,e]:i=!1}else i=!1;else this.idIndex_[t]=e}return i&&(Zd(!(t in this.uidIndex_),"The passed `feature` was already added to the source"),this.uidIndex_[t]=e),i}addFeatures(t){this.addFeaturesInternal(t),this.changed()}addFeaturesInternal(t){const e=[],i=[],n=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],s=dd(n);this.addToIndex_(s,n)&&i.push(n)}for(let t=0,s=i.length;t<s;t++){const s=i[t],r=dd(s);this.setupChangeEvents_(r,s);const o=s.getGeometry();if(o){const t=o.getExtent();e.push(t),n.push(s)}else this.nullGeometryFeatures_[r]=s}if(this.featuresRtree_&&this.featuresRtree_.load(e,n),this.hasListener(aw))for(let t=0,e=i.length;t<e;t++)this.dispatchEvent(new lw(aw,i[t]))}bindFeaturesCollection_(t){let e=!1;this.addEventListener(aw,function(i){e||(e=!0,t.push(i.feature),e=!1)}),this.addEventListener(hw,function(i){e||(e=!0,t.remove(i.feature),e=!1)}),t.addEventListener(kp,t=>{e||(e=!0,this.addFeature(t.element),e=!1)}),t.addEventListener(Np,t=>{e||(e=!0,this.removeFeature(t.element),e=!1)}),this.featuresCollection_=t}clear(t){if(t){for(const t in this.featureChangeKeys_)this.featureChangeKeys_[t].forEach(_d);this.featuresCollection_||(this.featureChangeKeys_={},this.idIndex_={},this.uidIndex_={})}else if(this.featuresRtree_){this.featuresRtree_.forEach(t=>{this.removeFeatureInternal(t)});for(const t in this.nullGeometryFeatures_)this.removeFeatureInternal(this.nullGeometryFeatures_[t])}this.featuresCollection_&&this.featuresCollection_.clear(),this.featuresRtree_&&this.featuresRtree_.clear(),this.nullGeometryFeatures_={};const e=new lw("clear");this.dispatchEvent(e),this.changed()}forEachFeature(t){if(this.featuresRtree_)return this.featuresRtree_.forEach(t);this.featuresCollection_&&this.featuresCollection_.forEach(t)}forEachFeatureAtCoordinateDirect(t,e){const i=[t[0],t[1],t[0],t[1]];return this.forEachFeatureInExtent(i,function(i){const n=i.getGeometry();if(n instanceof jf||n.intersectsCoordinate(t))return e(i)})}forEachFeatureInExtent(t,e){if(this.featuresRtree_)return this.featuresRtree_.forEachInExtent(t,e);this.featuresCollection_&&this.featuresCollection_.forEach(e)}forEachFeatureIntersectingExtent(t,e){return this.forEachFeatureInExtent(t,function(i){const n=i.getGeometry();if(n instanceof jf||n.intersectsExtent(t)){const t=e(i);if(t)return t}})}getFeaturesCollection(){return this.featuresCollection_}getFeatures(){let t;return this.featuresCollection_?t=this.featuresCollection_.getArray().slice(0):this.featuresRtree_&&(t=this.featuresRtree_.getAll(),pd(this.nullGeometryFeatures_)||kd(t,Object.values(this.nullGeometryFeatures_))),t}getFeaturesAtCoordinate(t){const e=[];return this.forEachFeatureAtCoordinateDirect(t,function(t){e.push(t)}),e}getFeaturesInExtent(t,e){if(this.featuresRtree_){if(!(e&&e.canWrapX()&&this.getWrapX()))return this.featuresRtree_.getInExtent(t);const i=to(t,e);return[].concat(...i.map(t=>this.featuresRtree_.getInExtent(t)))}return this.featuresCollection_?this.featuresCollection_.getArray().slice(0):[]}getClosestFeatureToCoordinate(t,e){const i=t[0],n=t[1];let s=null;const r=[NaN,NaN];let o=1/0;const a=[-1/0,-1/0,1/0,1/0];return e=e||Id,this.featuresRtree_.forEachInExtent(a,function(t){if(e(t)){const e=t.getGeometry(),h=o;if(o=e instanceof jf?0:e.closestPointXY(i,n,r,o),o<h){s=t;const e=Math.sqrt(o);a[0]=i-e,a[1]=n-e,a[2]=i+e,a[3]=n+e}}}),s}getExtent(t){return this.featuresRtree_?.getExtent(t)??null}getFeatureById(t){const e=this.idIndex_[t.toString()];return void 0!==e?e:null}getFeatureByUid(t){const e=this.uidIndex_[t];return void 0!==e?e:null}getFormat(){return this.format_}getOverlaps(){return this.overlaps_}getUrl(){return this.url_}handleFeatureChange_(t){const e=t.target,i=dd(e),n=e.getGeometry();if(n){const t=n.getExtent();i in this.nullGeometryFeatures_?(delete this.nullGeometryFeatures_[i],this.featuresRtree_&&this.featuresRtree_.insert(t,e)):this.featuresRtree_&&this.featuresRtree_.update(t,e)}else i in this.nullGeometryFeatures_||(this.featuresRtree_&&this.featuresRtree_.remove(e),this.nullGeometryFeatures_[i]=e);const s=e.getId();if(void 0!==s){const t=s.toString();this.idIndex_[t]!==e&&(this.removeFromIdIndex_(e),this.idIndex_[t]=e)}
2else this.removeFromIdIndex_(e),this.uidIndex_[i]=e;this.changed(),this.dispatchEvent(new lw("changefeature",e))}hasFeature(t){const e=t.getId();if(void 0!==e){const i=this.idIndex_[String(e)];return Array.isArray(i)?i.includes(t):i===t}return dd(t)in this.uidIndex_}isEmpty(){return this.featuresRtree_?this.featuresRtree_.isEmpty()&&pd(this.nullGeometryFeatures_):!this.featuresCollection_||0===this.featuresCollection_.getLength()}loadFeatures(t,e,i){const n=this.loadedExtentsRtree_,s=this.strategy_(t,e,i);for(let t=0,r=s.length;t<r;++t){const r=s[t];if(!n.forEachInExtent(r,function(t){return Ar(t.extent,r)})){this.loading=Number(this.loading)+1,this.dispatchEvent(new lw("featuresloadstart"));const t=t=>{this.loading=Number(this.loading)-1,this.dispatchEvent(new lw("featuresloadend",void 0,t))},s=()=>{this.changed(),this.loading=Number(this.loading)-1,this.dispatchEvent(new lw("featuresloaderror"))};let o=!1;const a=this.loader_.call(this,r,e,i,e=>o||t(e),()=>o||s());a instanceof Promise?(o=!0,a.then(e=>{this.addFeatures(e),t(e)}).catch(s)):this.loader_.length<4&&(this.loading=!1),n.insert(r,{extent:r.slice()})}}}refresh(){this.clear(!0),this.loadedExtentsRtree_.clear(),super.refresh()}removeLoadedExtent(t){const e=this.loadedExtentsRtree_,i=[];e.forEachInExtent(t,function(t){i.push(t)}),i.forEach(i=>{e.remove(i);const n=Kr(i.extent,t);for(const t of n)e.insert(t,{extent:t})})}removeFeatures(t){let e=!1;for(let i=0,n=t.length;i<n;++i)e=this.removeFeatureInternal(t[i])||e;e&&this.changed()}removeFeature(t){t&&this.removeFeatureInternal(t)&&this.changed()}removeFeatureInternal(t){const e=dd(t);if(!(e in this.uidIndex_))return!1;e in this.nullGeometryFeatures_?delete this.nullGeometryFeatures_[e]:this.featuresRtree_&&this.featuresRtree_.remove(t);const i=this.featureChangeKeys_[e];i?.forEach(_d),delete this.featureChangeKeys_[e];const n=t.getId();if(void 0!==n){const e=n.toString(),i=this.idIndex_[e];i===t?delete this.idIndex_[e]:Array.isArray(i)&&(i.splice(i.indexOf(t),1),1===i.length&&(this.idIndex_[e]=i[0]))}return delete this.uidIndex_[e],this.hasListener(hw)&&this.dispatchEvent(new lw(hw,t)),!0}removeFromIdIndex_(t){for(const e in this.idIndex_)if(this.idIndex_[e]===t){delete this.idIndex_[e];break}}setLoader(t){this.loader_=t}setUrl(t){Zd(this.format_,"`format` must be set when `url` is set"),this.url_=t,this.setLoader(iw(t,this.format_))}setOverlaps(t){this.overlaps_=t,this.changed()}};function uw(t,e){const i=[];Object.keys(e).forEach(function(t){null!==e[t]&&void 0!==e[t]&&i.push(t+"="+encodeURIComponent(e[t]))});const n=i.join("&");return t=t.replace(/[?&]$/,""),(t+=t.includes("?")?"&":"?")+n}const dw=/\{z\}/g,fw=/\{x\}/g,pw=/\{y\}/g,gw=/\{-y\}/g;function mw(t){const e=[];let i=/\{([a-z])-([a-z])\}/.exec(t);if(i){const n=i[1].charCodeAt(0),s=i[2].charCodeAt(0);let r;for(r=n;r<=s;++r)e.push(t.replace(i[0],String.fromCharCode(r)));return e}if(i=/\{(\d+)-(\d+)\}/.exec(t),i){const n=parseInt(i[2],10);for(let s=parseInt(i[1],10);s<=n;s++)e.push(t.replace(i[0],s.toString()));return e}return e.push(t),e}function _w(t,e){return function(i,n,s){if(!i)return;let r;const o=i[0];if(e){const t=e.getFullTileRange(o);t&&(r=t.getHeight()-1)}return function(t,e,i,n,s){return t.replace(dw,e.toString()).replace(fw,i.toString()).replace(pw,n.toString()).replace(gw,function(){if(void 0===s)throw new Error("If the URL template has a {-y} placeholder, the grid extent must be known");return(s-n).toString()})}(t,o,i[1],i[2],r)}}function vw(t){return 1===t.length?t[0]:function(e,i,n){if(!e)return;const s=function(t){return function(t,e,i){return(e<<t)+i}(t[0],t[1],t[2])}(e),r=ao(s,t.length);return t[r](e,i,n)}}function yw(t){let e=t.getDefaultTileGrid();return e||(e=function(t){return function(t,e,i,n){n=void 0!==n?n:"top-left";const s=function(t,e,i,n){e=void 0!==e?e:42,i=eg(void 0!==i?i:256);const s=Vr(t),r=Yr(t);n=n>0?n:Math.max(r/i[0],s/i[1]);const o=e+1,a=new Array(o);for(let t=0;t<o;++t)a[t]=n/Math.pow(2,t);return a}(t,e,i);return new yg({extent:t,origin:qr(t,n),resolutions:s,tileSize:i})}(ww(t),void 0,void 0,void 0)}(t),t.setDefaultTileGrid(e)),e}function ww(t){let e=(t=fa(t)).getExtent();if(!e){const i=180*vo.degrees/t.getMetersPerUnit();e=Lr(-i,-i,i,i)}return e}class bw extends Fd{constructor(t,e){super(t),this.tile=e}}const xw=class extends ow{constructor(t){super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,projection:t.projection,state:t.state,wrapX:t.wrapX,interpolate:t.interpolate}),this.on,this.once,this.un,this.tilePixelRatio_=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null;this.tileGrid&&eg(this.tileGrid.getTileSize(this.tileGrid.getMinZoom()),[256,256]),this.tmpSize=[0,0],this.key_=t.key||dd(this),this.tileOptions={transition:t.transition,interpolate:t.interpolate},this.zDirection=t.zDirection?t.zDirection:0}getGutterForProjection(t){return 0}getKey(){return this.key_}setKey(t){this.key_!==t&&(this.key_=t,this.changed())}getResolutions(t){const e=t?this.getTileGridForProjection(t):this.tileGrid;return e?e.getResolutions():null}getTile(t,e,i,n,s,r){return cd()}getTileGrid(){return this.tileGrid}getTileGridForProjection(t){return this.tileGrid?this.tileGrid:yw(t)}getTilePixelRatio(t){return this.tilePixelRatio_}getTilePixelSize(t,e,i){const n=this.getTileGridForProjection(i),s=this.getTilePixelRatio(e),r=eg(n.getTileSize(t),this.tmpSize);return 1==s?r:(o=r,a=s,void 0===(h=this.tmpSize)&&(h=[0,0]),h[0]=o[0]*a+.5|0,h[1]=o[1]*a+.5|0,h);var o,a,h}getTileCoordForTileUrlFunction(t,e){const i=void 0!==e?e:this.getProjection(),n=void 0!==e?this.getTileGridForProjection(i):this.tileGrid||this.getTileGridForProjection(i);
vendor: 5,951 bytes, line 2
2return this.getWrapX()&&i.isGlobal()&&(t=function(t,e,i){const n=e[0],s=t.getTileCoordCenter(e),r=ww(i);if(!Er(r,s)){const e=Yr(r),i=Math.ceil((r[0]-s[0])/e);return s[0]+=e*i,t.getTileCoordForCoordAndZ(s,n)}return e}(n,t,i)),function(t,e){const i=t[0],n=t[1],s=t[2];if(e.getMinZoom()>i||i>e.getMaxZoom())return!1;const r=e.getFullTileRange(i);return!r||r.containsXY(n,s)}(t,n)?t:null}clear(){}refresh(){this.clear(),super.refresh()}};class Sw extends xw{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX,transition:t.transition,interpolate:t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.generateTileUrlFunction_=this.tileUrlFunction===Sw.prototype.tileUrlFunction,this.tileLoadFunction=t.tileLoadFunction,t.tileUrlFunction&&(this.tileUrlFunction=t.tileUrlFunction),this.urls=null,t.urls?this.setUrls(t.urls):t.url&&this.setUrl(t.url),this.tileLoadingKeys_={}}getTileLoadFunction(){return this.tileLoadFunction}getTileUrlFunction(){return Object.getPrototypeOf(this).tileUrlFunction===this.tileUrlFunction?this.tileUrlFunction.bind(this):this.tileUrlFunction}getUrls(){return this.urls}handleTileChange(t){const e=t.target,i=dd(e),n=e.getState();let s;1==n?(this.tileLoadingKeys_[i]=!0,s="tileloadstart"):i in this.tileLoadingKeys_&&(delete this.tileLoadingKeys_[i],s=3==n?"tileloaderror":2==n?"tileloadend":void 0),null!=s&&this.dispatchEvent(new bw(s,e))}setTileLoadFunction(t){this.tileLoadFunction=t,this.changed()}setTileUrlFunction(t,e){this.tileUrlFunction=t,void 0!==e?this.setKey(e):this.changed()}setUrl(t){const e=mw(t);this.urls=e,this.setUrls(e)}setUrls(t){this.urls=t;const e=t.join("\n");this.generateTileUrlFunction_?this.setTileUrlFunction(function(t,e){const i=t.length,n=new Array(i);for(let s=0;s<i;++s)n[s]=_w(t[s],e);return vw(n)}(t,this.tileGrid),e):this.setKey(e)}tileUrlFunction(t,e,i){}}const Ew=Sw;function Aw(t,e){if(Ou){const i=t.getCrossOrigin();let n="same-origin",s="same-origin";"anonymous"===i||""===i?(n="cors",s="omit"):"use-credentials"===i&&(n="cors",s="include");const r={mode:n,credentials:s,referrerPolicy:t.getReferrerPolicy()};return void fetch(e,r).then(t=>{if(!t.ok)throw new Error(`HTTP ${t.status}`);return t.blob()}).then(t=>createImageBitmap(t)).then(e=>{const i=t.getImage();i.width=e.width,i.height=e.height,i.getContext("2d").drawImage(e,0,0),e.close?.(),i.dispatchEvent(new Event("load"))}).catch(()=>{t.getImage().dispatchEvent(new Event("error"))})}t.getImage().src=e}const Cw=class extends Ew{constructor(t){super({attributions:t.attributions,cacheSize:t.cacheSize,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Aw,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX,transition:t.transition,interpolate:void 0===t.interpolate||t.interpolate,key:t.key,attributionsCollapsible:t.attributionsCollapsible,zDirection:t.zDirection}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.referrerPolicy=t.referrerPolicy,this.tileClass=void 0!==t.tileClass?t.tileClass:kg,this.tileGridForProjection={},this.reprojectionErrorThreshold_=t.reprojectionErrorThreshold,this.renderReprojectionEdges_=!1}getGutterForProjection(t){return this.getProjection()&&t&&!ya(this.getProjection(),t)?0:this.getGutter()}getGutter(){return 0}getKey(){let t=super.getKey();return this.getInterpolate()||(t+=":disable-interpolation"),t}getTileGridForProjection(t){const e=this.getProjection();if(this.tileGrid&&(!e||ya(e,t)))return this.tileGrid;const i=dd(t);return i in this.tileGridForProjection||(this.tileGridForProjection[i]=yw(t)),this.tileGridForProjection[i]}createTile_(t,e,i,n,s,r){const o=[t,e,i],a=this.getTileCoordForTileUrlFunction(o,s),h=a?this.tileUrlFunction(a,n,s):void 0,l=new this.tileClass(o,void 0!==h?0:4,void 0!==h?h:"",{crossOrigin:this.crossOrigin,referrerPolicy:this.referrerPolicy},this.tileLoadFunction,this.tileOptions);return l.key=r,l.addEventListener(vd,this.handleTileChange.bind(this)),l}getTile(t,e,i,n,s,r){const o=this.getProjection();if(!o||!s||ya(o,s))return this.getTileInternal(t,e,i,n,o||s);const a=[t,e,i],h=this.getKey(),l=this.getTileGridForProjection(o),c=this.getTileGridForProjection(s),u=this.getTileCoordForTileUrlFunction(a,s),d=new Dg(o,l,s,c,a,u,this.getTilePixelRatio(n),this.getGutter(),(t,e,i,n)=>this.getTileInternal(t,e,i,n,o,r),this.reprojectionErrorThreshold_,this.renderReprojectionEdges_,this.tileOptions);return d.key=h,d}getTileInternal(t,e,i,n,s,r){const o=this.getKey(),a=_g(this,o,t,e,i);if(r&&r.containsKey(a))return r.get(a);const h=this.createTile_(t,e,i,n,s,o);return r?.set(a,h),h}setRenderReprojectionEdges(t){this.renderReprojectionEdges_!=t&&(this.renderReprojectionEdges_=t,this.changed())}setTileGridForProjection(t,e){const i=fa(t);if(i){const t=dd(i);t in this.tileGridForProjection||(this.tileGridForProjection[t]=e)}}},Mw=class extends Cw{constructor(t){const e=void 0!==t.requestEncoding?t.requestEncoding:"KVP",i=t.tileGrid;let n=t.urls;void 0===n&&void 0!==t.url&&(n=mw(t.url)),super({attributions:t.attributions,attributionsCollapsible:t.attributionsCollapsible,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,interpolate:t.interpolate,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileClass:t.tileClass,tileGrid:i,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,urls:n,wrapX:void 0!==t.wrapX&&t.wrapX,transition:t.transition,zDirection:t.zDirection}),this.version_=void 0!==t.version?t.version:"1.0.0",this.format_=void 0!==t.format?t.format:"image/jpeg",this.dimensions_=void 0!==t.dimensions?t.dimensions:{},this.layer_=t.layer,this.matrixSet_=t.matrixSet,this.style_=t.style,this.requestEncoding_=e,this.setKey(this.getKeyForDimensions_()
2),n&&n.length>0&&(this.tileUrlFunction=vw(n.map(this.createFromWMTSTemplate.bind(this))))}setUrls(t){this.urls=t;const e=t.join("\n");this.setTileUrlFunction(vw(t.map(this.createFromWMTSTemplate.bind(this))),e)}getDimensions(){return this.dimensions_}getFormat(){return this.format_}getLayer(){return this.layer_}getMatrixSet(){return this.matrixSet_}getRequestEncoding(){return this.requestEncoding_}getStyle(){return this.style_}getVersion(){return this.version_}getKeyForDimensions_(){const t=this.urls?this.urls.slice(0):[];for(const e in this.dimensions_)t.push(e+"-"+this.dimensions_[e]);return t.join("/")}updateDimensions(t){Object.assign(this.dimensions_,t),this.setKey(this.getKeyForDimensions_())}createFromWMTSTemplate(t){const e=this.requestEncoding_,i={layer:this.layer_,style:this.style_,tilematrixset:this.matrixSet_};"KVP"==e&&Object.assign(i,{Service:"WMTS",Request:"GetTile",Version:this.version_,Format:this.format_}),t="KVP"==e?uw(t,i):t.replace(/\{(\w+?)\}/g,function(t,e){return e.toLowerCase()in i?i[e.toLowerCase()]:t});const n=this.tileGrid,s=this.dimensions_;return function(i,r,o){if(!i)return;const a={TileMatrix:n.getMatrixId(i[0]),TileCol:i[1],TileRow:i[2]};Object.assign(a,s);let h=t;return h="KVP"==e?uw(h,a):h.replace(/\{(\w+?)\}/g,function(t,e){return encodeURIComponent(a[e])}),h}}},Lw=(t,e={})=>{const i=e.resolutions||Cu,n=new wg({origin:[42e4,35e4],resolutions:i,matrixIds:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27]}),s=e.format||"png";return new Mw({crossOrigin:"anonymous",attributions:[Lu],url:"https://wmts{5-9}.geo.admin.ch/1.0.0/{Layer}/default/current/21781/{TileMatrix}/{TileRow}/{TileCol}.".replace("http:",location.protocol)+s,projection:Mu,tileGrid:n,layer:e.serverLayerName||t,requestEncoding:"REST"})},Pw=new mm({source:Lw("ch.swisstopo.swisstlm3d-karte-farbe",{format:"png",crossOrigin:"anonymous"}),name:"pktlm3d"}),kw=new mm({source:Lw("ch.swisstopo.pixelkarte-farbe",{format:"jpeg",crossOrigin:"anonymous"}),name:"pkcolor"}),Nw=new mm({source:Lw("ch.swisstopo.swissalti3d-reliefschattierung",{format:"png",crossOrigin:"anonymous"}),name:"pkalti3d"}),Iw=new mm({source:Lw("ch.bafu.ren-fliessgewaesser_seen",{format:"png",crossOrigin:"anonymous"}),name:"pkhydro"}),Tw=()=>{const t=new ew({source:new cw({format:new Pp,url:Eu.resourcesRouteUrl+"/resources/json/ws_high.geojson",crossOrigin:"anonymous"}),style:new dg({fill:new Vd({color:[220,220,220,1]})}),name:"wsmountains"}),e=new ew({source:new cw({format:new Pp,url:Eu.resourcesRouteUrl+"/resources/json/borders.geojson",crossOrigin:"anonymous"}),style:new dg({stroke:new Jp({color:"black",width:1})}),name:"borders"}),i=new ew({source:new cw({format:new Pp,attributions:[Lu],url:Eu.resourcesRouteUrl+"/resources/json/lakes.geojson",crossOrigin:"anonymous"}),style:new dg({fill:new Vd({color:[191,233,255,1]})}),name:"lakes"}),n=new ew({source:new cw({format:new Pp,url:Eu.resourcesRouteUrl+"/resources/json/rivers.geojson",crossOrigin:"anonymous"}),style:new dg({stroke:new Jp({color:[191,233,255,1],width:1})}),name:"rivers"});return new Yp({layers:[t,n,e,i],name:"simple"})},Ow=Tw(),Rw=Ow.getLayersArray().find(t=>"wsmountains"===t.get("name")),Fw=new Yp({layers:[Nw,Iw],name:"relief"}),Dw=new ew({name:"Biogeo",opacity:.8,visible:!1,source:new cw({format:new Pp,url:Eu.resourcesRouteUrl+"/resources/json/biogeo.geojson"}),style:new dg({stroke:new Jp({color:[110,13,16],width:2})})});function jw(t,e,i){return new ew({source:new cw({format:new Pp,url:t}),style:e,name:i})}new ew({source:new cw({format:new Pp,url:Eu.resourcesRouteUrl+"/resources/json/cantons.geojson"}),style:new dg({stroke:new Jp({color:[187,143,206],width:.7})}),name:"cantons"});const Gw="postrender",Bw="loadstart",zw="loadend",qw=class extends Yd{constructor(t){super();const e=t.element;!e||t.target||e.style.pointerEvents||(e.style.pointerEvents="auto"),this.element=e||null,this.target_=null,this.map_=null,this.listenerKeys=[],t.render&&(this.render=t.render),t.target&&this.setTarget(t.target)}disposeInternal(){this.element?.remove(),super.disposeInternal()}getMap(){return this.map_}setMap(t){this.map_&&this.element?.remove();for(let t=0,e=this.listenerKeys.length;t<e;++t)_d(this.listenerKeys[t]);if(this.listenerKeys.length=0,this.map_=t,t){const e=this.target_??t.getOverlayContainerStopEvent();this.element&&e.appendChild(this.element),this.render!==Od&&this.listenerKeys.push(gd(t,Gw,this.render,this)),t.render()}}render(t){}setTarget(t){this.target_="string"==typeof t?document.getElementById(t):t}},Uw=class extends qw{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target}),this.ulElement_=document.createElement("ul"),this.collapsed_=void 0===t.collapsed||t.collapsed,this.userCollapsed_=this.collapsed_,this.overrideCollapsible_=void 0!==t.collapsible,this.collapsible_=void 0===t.collapsible||t.collapsible,this.collapsible_||(this.collapsed_=!1),this.attributions_=t.attributions;const e=void 0!==t.className?t.className:"ol-attribution",i=void 0!==t.tipLabel?t.tipLabel:"Attributions",n=void 0!==t.expandClassName?t.expandClassName:e+"-expand",s=void 0!==t.collapseLabel?t.collapseLabel:"›",r=void 0!==t.collapseClassName?t.collapseClassName:e+"-collapse";"string"==typeof s?(this.collapseLabel_=document.createElement("span"),this.collapseLabel_.textContent=s,this.collapseLabel_.className=r):this.collapseLabel_=s;const o=void 0!==t.label?t.label:"i";"string"==typeof o?(this.label_=document.createElement("span"),this.label_.textContent=o,this.label_.className=n):this.label_=o;const a=this.collapsible_&&!this.collapsed_?this.collapseLabel_:this.label_;this.toggleButton_=document.createElement("button"),this.toggleButton_.setAttribute("type","button"),this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_)),this.toggleButton_.title=i,this.toggleButton_.appendChild(a),this.toggleButton_.addEventListener(wd,this.handleClick_.bind(this),!1);const h=e+" "+ym+" "+bm+(this.collapsed_&&this.collapsible_?" "+xm:"")+(this.collapsible_?"":" ol-uncollapsible"),l=this.element;l.className=h,l.appendChild(this.toggleButton_),l.appendChild(this.ulElement_),this.renderedAttributions_=[],this.renderedVisible_=!0}collectSourceAttributions_(t){const e=this.getMap().getAllLayers(),i=new Set(e.flatMap(e=>e.getAttributions(t)));if(void 0!==this.attributions_&&(Array.isArray(this.attributions_)?this.attributions_.forEach(t=>i.add(t)):i.add(this.attributions_)),!this.overrideCollapsible_){const t=!e.some(t=>!1===t.getSource()?.getAttributionsCollapsible());this.setCollapsible(t)}return Array.from(i)}async updateElement_(t){if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=await Promise.all(this.collectSourceAttributions_(t).map(t=>{return e=()=>t,function(){let t;try{t=e()}catch(t){return Promise.reject(t)}return t instanceof Promise?t:Promise.resolve(t)}();var e})),i=e.length>0;if(this.renderedVisible_!=i&&(this.element.style.display=i?"":"none",this.renderedVisible_=i),!Nd(e,this.renderedAttributions_)){!function(t){for(;
vendor: 9,966 bytes, line 2
2t.lastChild;)t.lastChild.remove()}(this.ulElement_);for(let t=0,i=e.length;t<i;++t){const i=document.createElement("li");i.innerHTML=e[t],this.ulElement_.appendChild(i)}this.renderedAttributions_=e}}handleClick_(t){t.preventDefault(),this.handleToggle_(),this.userCollapsed_=this.collapsed_}handleToggle_(){this.element.classList.toggle(xm),this.collapsed_?zu(this.collapseLabel_,this.label_):zu(this.label_,this.collapseLabel_),this.collapsed_=!this.collapsed_,this.toggleButton_.setAttribute("aria-expanded",String(!this.collapsed_))}getCollapsible(){return this.collapsible_}setCollapsible(t){this.collapsible_!==t&&(this.collapsible_=t,this.element.classList.toggle("ol-uncollapsible"),this.userCollapsed_&&this.handleToggle_())}setCollapsed(t){this.userCollapsed_=t,this.collapsible_&&this.collapsed_!==t&&this.handleToggle_()}getCollapsed(){return this.collapsed_}render(t){this.updateElement_(t.frameState)}},Ww=class extends qw{constructor(t){t=t||{},super({element:document.createElement("div"),render:t.render,target:t.target});const e=void 0!==t.className?t.className:"ol-rotate",i=void 0!==t.label?t.label:"⇧",n=void 0!==t.compassClassName?t.compassClassName:"ol-compass";this.label_=null,"string"==typeof i?(this.label_=document.createElement("span"),this.label_.className=n,this.label_.textContent=i):(this.label_=i,this.label_.classList.add(n));const s=t.tipLabel?t.tipLabel:"Reset rotation",r=document.createElement("button");r.className=e+"-reset",r.setAttribute("type","button"),r.title=s,r.appendChild(this.label_),r.addEventListener(wd,this.handleClick_.bind(this),!1);const o=e+" "+ym+" "+bm,a=this.element;a.className=o,a.appendChild(r),this.callResetNorth_=t.resetNorth?t.resetNorth:void 0,this.duration_=void 0!==t.duration?t.duration:250,this.autoHide_=void 0===t.autoHide||t.autoHide,this.rotation_=void 0,this.autoHide_&&this.element.classList.add(vm)}handleClick_(t){t.preventDefault(),void 0!==this.callResetNorth_?this.callResetNorth_():this.resetNorth_()}resetNorth_(){const t=this.getMap().getView();if(!t)return;const e=t.getRotation();void 0!==e&&(this.duration_>0&&e%(2*Math.PI)!=0?t.animate({rotation:0,duration:this.duration_,easing:xg}):t.setRotation(0))}render(t){const e=t.frameState;if(!e)return;const i=e.viewState.rotation;if(i!=this.rotation_){const t="rotate("+i+"rad)";if(this.autoHide_){const t=this.element.classList.contains(vm);t||0!==i?t&&0!==i&&this.element.classList.remove(vm):this.element.classList.add(vm)}this.label_.style.transform=t}this.rotation_=i}},Vw=class extends qw{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target});const e=void 0!==t.className?t.className:"ol-zoom",i=void 0!==t.delta?t.delta:1,n=void 0!==t.zoomInClassName?t.zoomInClassName:e+"-in",s=void 0!==t.zoomOutClassName?t.zoomOutClassName:e+"-out",r=void 0!==t.zoomInLabel?t.zoomInLabel:"+",o=void 0!==t.zoomOutLabel?t.zoomOutLabel:"–",a=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",h=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",l=document.createElement("button");l.className=n,l.setAttribute("type","button"),l.title=a,l.appendChild("string"==typeof r?document.createTextNode(r):r),l.addEventListener(wd,this.handleClick_.bind(this,i),!1);const c=document.createElement("button");c.className=s,c.setAttribute("type","button"),c.title=h,c.appendChild("string"==typeof o?document.createTextNode(o):o),c.addEventListener(wd,this.handleClick_.bind(this,-i),!1);const u=e+" "+ym+" "+bm,d=this.element;d.className=u,d.appendChild(l),d.appendChild(c),this.duration_=void 0!==t.duration?t.duration:250}handleClick_(t,e){e.preventDefault(),this.zoomByDelta_(t)}zoomByDelta_(t){const e=this.getMap().getView();if(!e)return;const i=e.getZoom();if(void 0!==i){const n=e.getConstrainedZoom(i+t);this.duration_>0?(e.getAnimating()&&e.cancelAnimations(),e.animate({zoom:n,duration:this.duration_,easing:xg})):e.setZoom(n)}}};function Hw(t){t=t||{};const e=new Op;return(void 0===t.zoom||t.zoom)&&e.push(new Vw(t.zoomOptions)),(void 0===t.rotate||t.rotate)&&e.push(new Ww(t.rotateOptions)),(void 0===t.attribution||t.attribution)&&e.push(new Uw(t.attributionOptions)),e}const Kw="units",$w=[1,2,5],Xw=25.4/.28,Yw=class extends qw{constructor(t){t=t||{};const e=document.createElement("div");e.style.pointerEvents="none",super({element:e,render:t.render,target:t.target}),this.on,this.once,this.un;const i=void 0!==t.className?t.className:t.bar?"ol-scale-bar":"ol-scale-line";this.innerElement_=document.createElement("div"),this.innerElement_.className=i+"-inner",this.element.className=i+" "+ym,this.element.appendChild(this.innerElement_),this.viewState_=null,this.minWidth_=void 0!==t.minWidth?t.minWidth:64,this.maxWidth_=t.maxWidth,this.renderedVisible_=!1,this.renderedWidth_=void 0,this.renderedHTML_="",this.addChangeListener(Kw,this.handleUnitsChanged_),this.setUnits(t.units||"metric"),this.scaleBar_=t.bar||!1,this.scaleBarSteps_=t.steps||4,this.scaleBarText_=t.text||!1,this.dpi_=t.dpi||void 0}getUnits(){return this.get(Kw)}handleUnitsChanged_(){this.updateElement_()}setUnits(t){this.set(Kw,t)}setDpi(t){this.dpi_=t}updateElement_(){const t=this.viewState_;if(!t)return void(this.renderedVisible_&&(this.element.style.display="none",this.renderedVisible_=!1));const e=t.center,i=t.projection,n=this.getUnits(),s="degrees"==n?"degrees":"m";let r=pa(i,t.resolution,e,s);const o=this.minWidth_*(this.dpi_||Xw)/Xw,a=void 0!==this.maxWidth_?this.maxWidth_*(this.dpi_||Xw)/Xw:void 0;let h=o*r,l="";if("degrees"==n){const t=vo.degrees;h*=t,h<t/60?(l="″",r*=3600):h<t?(l="′",r*=60):l="°"}else if("imperial"==n)h<.9144?(l="in",r/=.0254):h<1609.344?(l="ft",r/=.3048):(l="mi",r/=1609.344);else if("nautical"==n)r/=1852,l="NM";else if("metric"==n)h<1e-6?(l="nm",r*=1e9):h<.001?(l="μm",r*=1e6):h<1?(l="mm",r*=1e3):h<1e3?l="m":(l="km",r/=1e3);else{if("us"!=n)throw new Error("Invalid units");h<.9144?(l="in",r*=39.37):h<1609.344?(l="ft",r/=.30480061):(l="mi",r/=1609.3472)}let c,u,d,f,p,g=3*Math.floor(Math.log(o*r)/Math.log(10)),m=0;for(;;){d=Math.floor(g/3);const t=Math.pow(10,d);if(c=$w[(g%3+3)%3]*t,u=Math.round(c/r),isNaN(u))return this.element.style.display="none",void(this.renderedVisible_=!1);if(void 0!==a&&u>=a){c=m,u=f,d=p;break}if(u>=o)break;m=c,f=u,p=d,++g}const _=this.scaleBar_?this.createScaleBar(u,c,l):c.toFixed(d<0?-d:0)+" "+l;this.renderedHTML_!=_&&(this.innerElement_.innerHTML=_,this.renderedHTML_=_),this.renderedWidth_!=u&&(this.innerElement_.style.width=u+"px",this.renderedWidth_=u),this.renderedVisible_||(this.element.style.display="",this.renderedVisible_=!0)}createScaleBar(t,e,i){const n=this.getScaleForResolution(),s=n<1?Math.round(1/n).toLocaleString()+" : 1":"1 : "+Math.round(n).toLocaleString(),r=this.scaleBarSteps_,o=t/r,a=[this.createMarker("absolute")];for(let n=0;n<r;++n){const s=n%2==0?"ol-scale-singlebar-odd":"ol-scale-singlebar-even";a.push(`<div><div class="ol-scale-singlebar ${s}" style="width: ${o}px;"></div>`+this.createMarker("relative")+(n%2==0||2===r?this.createStepText(n,t,!1,e,i):"")+"</div>")}return a.push(this.createStepText(r,t,!0,e,i)),(this.scaleBarText_?`<div class="ol-scale-text" style="width: ${t}px;">`+s+"</div>":"")+a.join("")}createMarker(t){return`<div class="ol-scale-step-marker" style="position: ${t}; top: ${"absolute"===t?3:-10}px;"></div>`}createStepText(t,e,i,n,s){const r=(0===t?0:Math.round(n/this.scaleBarSteps_*t*100)/100)+(0===t?"":" "+s);return`<div class="ol-scale-step-text" style="margin-left: ${0===t?-3:e/this.scaleBarSteps_*-1}px;text-align: ${0===t?"left":"center"};min-width: ${0===t?0:e/this.scaleBarSteps_*2}px;left: ${i?e+"px":"unset"};">`+r+"</div>"}getScaleForResolution(){return pa(this.viewState_.projection,this.viewState_.resolution,this.viewState_.center,"m")*(1e3/25.4)*(this.dpi_||Xw)}render(t){const e=t.frameState;this.viewState_=e?e.viewState:null,this.updateElement_()}},Zw="layergroup",Jw="size",Qw="target",tb="view",eb=["fullscreenchange","webkitfullscreenchange"];function ib(t){const e=t.body;return!!(e.webkitRequestFullscreen||e.requestFullscreen&&t.fullscreenEnabled)}function nb(t){return!(!t.webkitIsFullScreen&&!t.fullscreenElement)}function sb(t){t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}const rb=class extends qw{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.on,this.once,this.un,this.keys_=void 0!==t.keys&&t.keys,this.source_=t.source,this.isInFullscreen_=!1,this.boundHandleMapTargetChange_=this.handleMapTargetChange_.bind(this),this.cssClassName_=void 0!==t.className?t.className:"ol-full-screen",this.documentListeners_=[],this.activeClassName_=void 0!==t.activeClassName?t.activeClassName.split(" "):[this.cssClassName_+"-true"],this.inactiveClassName_=void 0!==t.inactiveClassName?t.inactiveClassName.split(" "):[this.cssClassName_+"-false"];const e=void 0!==t.label?t.label:"⤢";this.labelNode_="string"==typeof e?document.createTextNode(e):e;const i=void 0!==t.labelActive?t.labelActive:"×";this.labelActiveNode_="string"==typeof i?document.createTextNode(i):i;const n=t.tipLabel?t.tipLabel:"Toggle full-screen";this.button_=document.createElement("button"),this.button_.title=n,this.button_.setAttribute("type","button"),this.button_.appendChild(this.labelNode_),this.button_.addEventListener(wd,this.handleClick_.bind(this),!1),this.setClassName_(this.button_,this.isInFullscreen_),this.element.className=`${this.cssClassName_} ${ym} ${bm}`,this.element.appendChild(this.button_)}handleClick_(t){t.preventDefault(),this.handleFullScreen_()}handleFullScreen_(){const t=this.getMap();if(!t)return;const e=t.getOwnerDocument();if(ib(e))if(nb(e))!function(t){t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen&&t.webkitExitFullscreen()}(e);else{let i;i=this.source_?"string"==typeof this.source_?e.getElementById(this.source_):this.source_:t.getTargetElement(),this.keys_?function(t){t.webkitRequestFullscreen?t.webkitRequestFullscreen():sb(t)}
2(i):sb(i)}}handleFullScreenChange_(){const t=this.getMap();if(!t)return;const e=this.isInFullscreen_;this.isInFullscreen_=nb(t.getOwnerDocument()),e!==this.isInFullscreen_&&(this.setClassName_(this.button_,this.isInFullscreen_),this.isInFullscreen_?(zu(this.labelActiveNode_,this.labelNode_),this.dispatchEvent("enterfullscreen")):(zu(this.labelNode_,this.labelActiveNode_),this.dispatchEvent("leavefullscreen")),t.updateSize())}setClassName_(t,e){e?(t.classList.remove(...this.inactiveClassName_),t.classList.add(...this.activeClassName_)):(t.classList.remove(...this.activeClassName_),t.classList.add(...this.inactiveClassName_))}setMap(t){const e=this.getMap();e&&e.removeChangeListener(Qw,this.boundHandleMapTargetChange_),super.setMap(t),this.handleMapTargetChange_(),t&&t.addChangeListener(Qw,this.boundHandleMapTargetChange_)}handleMapTargetChange_(){const t=this.documentListeners_;for(let e=0,i=t.length;e<i;++e)_d(t[e]);t.length=0;const e=this.getMap();if(e){const i=e.getOwnerDocument();ib(i)?this.element.classList.remove(wm):this.element.classList.add(wm);for(let e=0,n=eb.length;e<n;++e)t.push(gd(i,eb[e],this.handleFullScreenChange_,this));this.handleFullScreenChange_()}}},ob=class extends qw{constructor(t){t=t||{},super({element:document.createElement("div"),target:t.target}),this.extent=t.extent?t.extent:null,this.fitOptions=t.fitOptions||{};const e=void 0!==t.className?t.className:"ol-zoom-extent",i=void 0!==t.label?t.label:"E",n=void 0!==t.tipLabel?t.tipLabel:"Fit to extent",s=document.createElement("button");s.setAttribute("type","button"),s.title=n,s.appendChild("string"==typeof i?document.createTextNode(i):i),s.addEventListener(wd,this.handleClick_.bind(this),!1);const r=e+" "+ym+" "+bm,o=this.element;o.className=r,o.appendChild(s)}handleClick_(t){t.preventDefault(),this.handleZoomToExtent()}handleZoomToExtent(){const t=this.getMap().getView(),e=this.extent?Pa(this.extent,t.getProjection()):t.getProjection().getExtent();t.fitInternal(_p(e),this.fitOptions)}};let ab,hb,lb,cb,ub=0,db="",fb=2016,pb=10;const gb=()=>ub,mb=t=>{ub=t},_b=t=>{db=t},vb=()=>cb,yb=t=>{cb=t},wb=t=>{ab=t},bb=()=>{if(!hb){const t=document.querySelector('input[name="atlaslayer"]:checked');hb=t?t.value:4}return hb},xb=()=>{if(!lb){const t=document.querySelector('input[name="symbolization"]:checked');t&&(lb=t.value)}return lb},Sb=()=>fb,Eb=()=>pb;var Ab=function(t,e){return Ab=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},Ab(t,e)};function Cb(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}Ab(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var Mb=function(){return Mb=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},Mb.apply(this,arguments)};
vendor: 5,983 bytes, line 2
2function Lb(t,e,i){if(i||2===arguments.length)for(var n,s=0,r=e.length;s<r;s++)!n&&s in e||(n||(n=Array.prototype.slice.call(e,0,s)),n[s]=e[s]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var Pb,kb="ADD_CHOICE",Nb="REMOVE_CHOICE",Ib="FILTER_CHOICES",Tb="ACTIVATE_CHOICES",Ob="CLEAR_CHOICES",Rb="ADD_GROUP",Fb="ADD_ITEM",Db="REMOVE_ITEM",jb="HIGHLIGHT_ITEM",Gb="search",Bb="removeItem",zb="highlightItem",qb=["fuseOptions","classNames"],Ub="text",Wb="select-one",Vb="select-multiple",Hb=function(t){return{type:kb,choice:t}},Kb=function(t){return{type:Fb,item:t}},$b=function(t){return{type:Db,item:t}},Xb=function(t,e){return{type:jb,item:t,highlighted:e}},Yb=function(t){return Array.from({length:t},function(){return Math.floor(36*Math.random()+0).toString(36)}).join("")},Zb=function(t,e,i){return void 0===i&&(i=1),i>0?e.scrollTop+e.offsetHeight>=t.offsetTop+t.offsetHeight:t.offsetTop>=e.scrollTop},Jb=function(t){if("string"!=typeof t){if(null==t)return"";if("object"==typeof t){if("raw"in t)return Jb(t.raw);if("trusted"in t)return t.trusted}return t}return t.replace(/&/g,"&amp;").replace(/>/g,"&gt;").replace(/</g,"&lt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;")},Qb=(Pb=document.createElement("div"),function(t){Pb.innerHTML=t.trim();for(var e=Pb.children[0];Pb.firstChild;)Pb.removeChild(Pb.firstChild);return e}),tx=function(t){return"function"==typeof t?t():t},ex=function(t){if("string"==typeof t)return t;if("object"==typeof t){if("trusted"in t)return t.trusted;if("raw"in t)return t.raw}return""},ix=function(t){if("string"==typeof t)return t;if("object"==typeof t){if("escaped"in t)return t.escaped;if("trusted"in t)return t.trusted}return""},nx=function(t,e){return{id:t.id,highlighted:t.highlighted,labelClass:t.labelClass,labelDescription:ex(t.labelDescription),customProperties:t.customProperties,disabled:t.disabled,active:t.active,label:t.label,placeholder:t.placeholder,value:t.value,groupValue:t.group?t.group.label:void 0,element:t.element,keyCode:e}},sx=function(t,e,i){return"function"==typeof t?t(Jb(e),ex(e),i):t},rx=function(t,e){return t?ix(e):Jb(e)},ox=function(t,e,i){t.innerHTML=rx(e,i)},ax=function(t,e){return t.rank-e.rank},hx=function(t){return Array.isArray(t)?t:[t]},lx=function(t){return t&&Array.isArray(t)?t.map(function(t){return".".concat(t)}).join(""):".".concat(t)},cx=function(t,e){var i;(i=t.classList).add.apply(i,hx(e))},ux=function(t,e){var i;(i=t.classList).remove.apply(i,hx(e))},dx=function(t){if(void 0!==t)try{return JSON.parse(t)}catch(e){return t}return{}},fx=function(){function t(t){var e=t.element,i=t.type,n=t.classNames;this.element=e,this.classNames=n,this.type=i,this.isActive=!1}return t.prototype.show=function(){return cx(this.element,this.classNames.activeState),this.type!==Ub&&this.element.setAttribute("aria-expanded","true"),this.isActive=!0,this},t.prototype.hide=function(){return ux(this.element,this.classNames.activeState),this.type!==Ub&&this.element.setAttribute("aria-expanded","false"),this.isActive=!1,this},t}(),px=function(){function t(t){var e=t.element,i=t.type,n=t.classNames,s=t.position;this.element=e,this.classNames=n,this.type=i,this.position=s,this.isOpen=!1,this.isFlipped=!1,this.isDisabled=!1,this.isLoading=!1}return t.prototype.shouldFlip=function(t,e){var i=!1;return"auto"===this.position?i=this.element.getBoundingClientRect().top-e>=0&&!window.matchMedia("(min-height: ".concat(t+1,"px)")).matches:"top"===this.position&&(i=!0),i},t.prototype.setActiveDescendant=function(t){this.element.setAttribute("aria-activedescendant",t)},t.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},t.prototype.open=function(t,e){cx(this.element,this.classNames.openState),this.element.setAttribute("aria-expanded","true"),this.isOpen=!0,this.shouldFlip(t,e)&&(cx(this.element,this.classNames.flippedState),this.isFlipped=!0)},t.prototype.close=function(){ux(this.element,this.classNames.openState),this.element.setAttribute("aria-expanded","false"),this.removeActiveDescendant(),this.isOpen=!1,this.isFlipped&&(ux(this.element,this.classNames.flippedState),this.isFlipped=!1)},t.prototype.addFocusState=function(){cx(this.element,this.classNames.focusState)},t.prototype.removeFocusState=function(){ux(this.element,this.classNames.focusState)},t.prototype.addInvalidState=function(){cx(this.element,this.classNames.invalidState)},t.prototype.removeInvalidState=function(){ux(this.element,this.classNames.invalidState)},t.prototype.enable=function(){ux(this.element,this.classNames.disabledState),this.element.removeAttribute("aria-disabled"),this.type===Wb&&this.element.setAttribute("tabindex","0"),this.isDisabled=!1},t.prototype.disable=function(){cx(this.element,this.classNames.disabledState),this.element.setAttribute("aria-disabled","true"),this.type===Wb&&this.element.setAttribute("tabindex","-1"),this.isDisabled=!0},t.prototype.wrap=function(t){var e=this.element,i=t.parentNode;i&&(t.nextSibling?i.insertBefore(e,t.nextSibling):i.appendChild(e)),e.appendChild(t)},t.prototype.unwrap=function(t){var e=this.element,i=e.parentNode;i&&(i.insertBefore(t,e),i.removeChild(e))},t.prototype.addLoadingState=function(){cx(this.element,this.classNames.loadingState),this.element.setAttribute("aria-busy","true"),this.isLoading=!0},t.prototype.removeLoadingState=function(){ux(this.element,this.classNames.loadingState),this.element.removeAttribute("aria-busy"),this.isLoading=!1},t}(),gx=function(){function t(t){var e=t.element,i=t.type,n=t.classNames,s=t.preventPaste;this.element=e,this.type=i,this.classNames=n,this.preventPaste=s,this.isFocussed=this.element.isEqualNode(document.activeElement),this.isDisabled=e.disabled,this._onPaste=this._onPaste.bind(this),this._onInput=this._onInput.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this)}return Object.defineProperty(t.prototype,"placeholder",{set:function(t){this.element.placeholder=t}
2,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(t){this.element.value=t},enumerable:!1,configurable:!0}),t.prototype.addEventListeners=function(){var t=this.element;t.addEventListener("paste",this._onPaste),t.addEventListener("input",this._onInput,{passive:!0}),t.addEventListener("focus",this._onFocus,{passive:!0}),t.addEventListener("blur",this._onBlur,{passive:!0})},t.prototype.removeEventListeners=function(){var t=this.element;t.removeEventListener("input",this._onInput),t.removeEventListener("paste",this._onPaste),t.removeEventListener("focus",this._onFocus),t.removeEventListener("blur",this._onBlur)},t.prototype.enable=function(){this.element.removeAttribute("disabled"),this.isDisabled=!1},t.prototype.disable=function(){this.element.setAttribute("disabled",""),this.isDisabled=!0},t.prototype.focus=function(){this.isFocussed||this.element.focus()},t.prototype.blur=function(){this.isFocussed&&this.element.blur()},t.prototype.clear=function(t){return void 0===t&&(t=!0),this.element.value="",t&&this.setWidth(),this},t.prototype.setWidth=function(){var t=this.element,e=t.value,i=t.placeholder,n=0,s=0;if(e||i){var r=document.createElement("span");r.style.position="absolute",r.style.visibility="hidden",r.style.whiteSpace="pre",r.style.height="auto",r.style.width="auto",r.style.minWidth="1ch",cx(r,Array.from(t.classList)),t.after(r);var o=parseFloat(getComputedStyle(r).width);Number.isNaN(o)?(n=i.length,s=e.length):(i&&(r.innerText=i,n=parseFloat(getComputedStyle(r).width)/o),e&&(r.innerText=e,s=parseFloat(getComputedStyle(r).width)/o)),r.remove()}t.style.minWidth="".concat(Math.ceil(n)+1,"ch"),t.style.width="".concat(Math.ceil(s)+1,"ch")},t.prototype.setActiveDescendant=function(t){this.element.setAttribute("aria-activedescendant",t)},t.prototype.removeActiveDescendant=function(){this.element.removeAttribute("aria-activedescendant")},t.prototype._onInput=function(){this.type!==Wb&&this.setWidth()},t.prototype._onPaste=function(t){this.preventPaste&&t.preventDefault()},t.prototype._onFocus=function(){this.isFocussed=!0},t.prototype._onBlur=function(){this.isFocussed=!1},t}(),mx=function(){function t(t){var e=t.element;this.element=e,this.scrollPos=this.element.scrollTop,this.height=this.element.offsetHeight}return t.prototype.prepend=function(t){var e=this.element.firstElementChild;e?this.element.insertBefore(t,e):this.element.append(t)},t.prototype.scrollToTop=function(){this.element.scrollTop=0},t.prototype.scrollToChildElement=function(t,e){var i=this;if(t){var n=this.element.offsetHeight,s=this.element.scrollTop+n,r=t.offsetHeight,o=t.offsetTop+r,a=e>0?this.element.scrollTop+o-s:t.offsetTop;requestAnimationFrame(function(){i._animateScroll(a,e)})}},t.prototype._scrollDown=function(t,e,i){var n=(i-t)/e,s=n>1?n:1;this.element.scrollTop=t+s},t.prototype._scrollUp=function(t,e,i){var n=(t-i)/e,s=n>1?n:1;this.element.scrollTop=t-s},t.prototype._animateScroll=function(t,e){var i=this,n=this.element.scrollTop,s=!1;e>0?(this._scrollDown(n,4,t),n<t&&(s=!0)):(this._scrollUp(n,4,t),n>t&&(s=!0)),s&&requestAnimationFrame(function(){i._animateScroll(t,e)})},t}(),_x=function(){function t(t){var e=t.element,i=t.classNames;this.element=e,this.classNames=i,this.isDisabled=!1}return Object.defineProperty(t.prototype,"isActive",{get:function(){return"active"===this.element.dataset.choice},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this.element.dir},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.element.value},set:function(t){this.element.setAttribute("value",t),this.element.value=t},enumerable:!1,configurable:!0}),t.prototype.conceal=function(){var t=this.element;cx(t,this.classNames.input),t.hidden=!0,t.tabIndex=-1;var e=t.getAttribute("style");e&&t.setAttribute("data-choice-orig-style",e),t.setAttribute("data-choice","active")},t.prototype.reveal=function(){var t=this.element;ux(t,this.classNames.input),t.hidden=!1,t.removeAttribute("tabindex");var e=t.getAttribute("data-choice-orig-style");e?(t.removeAttribute("data-choice-orig-style"),t.setAttribute("style",e)):t.removeAttribute("style"),t.removeAttribute("data-choice")},t.prototype.enable=function(){this.element.removeAttribute("disabled"),this.element.disabled=!1,this.isDisabled=!1},t.prototype.disable=function(){this.element.setAttribute("disabled",""),this.element.disabled=!0,this.isDisabled=!0}
2,t.prototype.triggerEvent=function(t,e){!function(t,e,i){void 0===i&&(i=null);var n=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0});t.dispatchEvent(n)}(this.element,t,e||{})},t}(),vx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Cb(e,t),e}(_x),yx=function(t,e){return void 0===e&&(e=!0),void 0===t?e:!!t},wx=function(t){if("string"==typeof t&&(t=t.split(" ").filter(function(t){return t.length})),Array.isArray(t)&&t.length)return t},bx=function(t,e,i){if(void 0===i&&(i=!0),"string"==typeof t){var n=Jb(t);return bx({value:t,label:i||n===t?t:{escaped:n,raw:t},selected:!0},!1)}var s=t;if("choices"in s){if(!e)throw new TypeError("optGroup is not allowed");var r=s,o=r.choices.map(function(t){return bx(t,!1)});return{id:0,label:ex(r.label)||r.value,active:!!o.length,disabled:!!r.disabled,choices:o}}var a=s;return{id:0,group:null,score:0,rank:0,value:a.value,label:a.label||a.value,active:yx(a.active),selected:yx(a.selected,!1),disabled:yx(a.disabled,!1),placeholder:yx(a.placeholder,!1),highlighted:!1,labelClass:wx(a.labelClass),labelDescription:a.labelDescription,customProperties:a.customProperties}},xx=function(t){return"SELECT"===t.tagName},Sx=function(t){function e(e){var i=e.element,n=e.classNames,s=e.template,r=e.extractPlaceholder,o=t.call(this,{element:i,classNames:n})||this;return o.template=s,o.extractPlaceholder=r,o}return Cb(e,t),Object.defineProperty(e.prototype,"placeholderOption",{get:function(){return this.element.querySelector('option[value=""]')||this.element.querySelector("option[placeholder]")},enumerable:!1,configurable:!0}),e.prototype.addOptions=function(t){var e=this,i=document.createDocumentFragment();t.forEach(function(t){var n=t;if(!n.element){var s=e.template(n);i.appendChild(s),n.element=s}}),this.element.appendChild(i)},e.prototype.optionsAsChoices=function(){var t=this,e=[];return this.element.querySelectorAll(":scope > option, :scope > optgroup").forEach(function(i){!function(t){return"OPTION"===t.tagName}(i)?function(t){return"OPTGROUP"===t.tagName}(i)&&e.push(t._optgroupToChoice(i)):e.push(t._optionToChoice(i))}),e},e.prototype._optionToChoice=function(t){return!t.hasAttribute("value")&&t.hasAttribute("placeholder")&&(t.setAttribute("value",""),t.value=""),{id:0,group:null,score:0,rank:0,value:t.value,label:t.label,element:t,active:!0,selected:this.extractPlaceholder?t.selected:t.hasAttribute("selected"),disabled:t.disabled,highlighted:!1,placeholder:this.extractPlaceholder&&(!t.value||t.hasAttribute("placeholder")),labelClass:void 0!==t.dataset.labelClass?wx(t.dataset.labelClass):void 0,labelDescription:void 0!==t.dataset.labelDescription?{trusted:t.dataset.labelDescription}:void 0,customProperties:dx(t.dataset.customProperties)}},e.prototype._optgroupToChoice=function(t){var e=this,i=t.querySelectorAll("option"),n=Array.from(i).map(function(t){return e._optionToChoice(t)});return{id:0,label:t.label||"",element:t,active:!!n.length,disabled:t.disabled,choices:n}},e}(_x),Ex={items:[],choices:[],silent:!1,renderChoiceLimit:-1,maxItemCount:-1,closeDropdownOnSelect:"auto",singleModeForMultiSelect:!1,addChoices:!1,addItems:!0,addItemFilter:function(t){return!!t&&""!==t},removeItems:!0,removeItemButton:!1,removeItemButtonAlignLeft:!1,editItems:!1,allowHTML:!1,allowHtmlUserInput:!1,duplicateItemsAllowed:!0,delimiter:",",paste:!0,searchEnabled:!0,searchChoices:!0,searchDisabledChoices:!1,searchFloor:1,searchResultLimit:4,searchFields:["label","value"],position:"auto",resetScrollPosition:!0,shouldSort:!0,shouldSortItems:!1,sorter:function(t,e){var i=t.value,n=t.label,s=void 0===n?i:n,r=e.value,o=e.label,a=void 0===o?r:o;return ex(s).localeCompare(ex(a),[],{sensitivity:"base",ignorePunctuation:!0,numeric:!0})},shadowRoot:null,placeholder:!0,placeholderValue:null,searchPlaceholderValue:null,prependValue:null,appendValue:null,renderSelectedChoices:"auto",searchRenderSelectedChoices:!0,loadingText:"Loading...",noResultsText:"No results found",noChoicesText:"No choices to choose from",itemSelectText:"Press to select",uniqueItemText:"Only unique values can be added",customAddItemText:"Only values matching specific conditions can be added",addItemText:function(t){return'Press Enter to add <b>"'.concat(t,'"</b>')},removeItemIconText:function(){return"Remove item"}
2,removeItemLabelText:function(t,e,i){return"Remove item: ".concat(i?Jb(i.label):t)},maxItemText:function(t){return"Only ".concat(t," values can be added")},valueComparer:function(t,e){return t===e},fuseOptions:{includeScore:!0},labelId:"",callbackOnInit:null,callbackOnCreateTemplates:null,classNames:{containerOuter:["choices"],containerInner:["choices__inner"],input:["choices__input"],inputCloned:["choices__input--cloned"],list:["choices__list"],listItems:["choices__list--multiple"],listSingle:["choices__list--single"],listDropdown:["choices__list--dropdown"],item:["choices__item"],itemSelectable:["choices__item--selectable"],itemDisabled:["choices__item--disabled"],itemChoice:["choices__item--choice"],description:["choices__description"],placeholder:["choices__placeholder"],group:["choices__group"],groupHeading:["choices__heading"],button:["choices__button"],activeState:["is-active"],focusState:["is-focused"],openState:["is-open"],disabledState:["is-disabled"],highlightedState:["is-highlighted"],selectedState:["is-selected"],flippedState:["is-flipped"],loadingState:["is-loading"],invalidState:["is-invalid"],notice:["choices__notice"],addChoice:["choices__item--selectable","add-choice"],noResults:["has-no-results"],noChoices:["has-no-choices"]},appendGroupInSearch:!1},Ax=function(t){var e=t.itemEl;e&&(e.remove(),t.itemEl=void 0)},Cx={groups:function(t,e){var i=t,n=!0;switch(e.type){case Rb:i.push(e.group);break;case Ob:i=[];break;default:n=!1}return{state:i,update:n}},items:function(t,e,i){var n=t,s=!0;switch(e.type){case Fb:e.item.selected=!0,(r=e.item.element)&&(r.selected=!0,r.setAttribute("selected","")),n.push(e.item);break;case Db:var r;if(e.item.selected=!1,r=e.item.element){r.selected=!1,r.removeAttribute("selected");var o=r.parentElement;o&&xx(o)&&o.type===Wb&&(o.value="")}Ax(e.item),n=n.filter(function(t){return t.id!==e.item.id});break;case Nb:Ax(e.choice),n=n.filter(function(t){return t.id!==e.choice.id});break;case jb:var a=e.highlighted,h=n.find(function(t){return t.id===e.item.id});h&&h.highlighted!==a&&(h.highlighted=a,i&&function(t,e,i){var n=t.itemEl;n&&(ux(n,i),cx(n,e))}(h,a?i.classNames.highlightedState:i.classNames.selectedState,a?i.classNames.selectedState:i.classNames.highlightedState));break;default:s=!1}return{state:n,update:s}},choices:function(t,e,i){var n=t,s=!0;switch(e.type){case kb:n.push(e.choice);break;case Nb:e.choice.choiceEl=void 0,e.choice.group&&(e.choice.group.choices=e.choice.group.choices.filter(function(t){return t.id!==e.choice.id})),n=n.filter(function(t){return t.id!==e.choice.id});break;case Fb:case Db:e.item.choiceEl=void 0;break;case Ib:var r=[];e.results.forEach(function(t){r[t.item.id]=t}
2),n.forEach(function(t){var e=r[t.id];void 0!==e?(t.score=e.score,t.rank=e.rank,t.active=!0):(t.score=0,t.rank=0,t.active=!1),i&&i.appendGroupInSearch&&(t.choiceEl=void 0)});break;case Tb:n.forEach(function(t){t.active=e.active,i&&i.appendGroupInSearch&&(t.choiceEl=void 0)});break;case Ob:n=[];break;default:s=!1}return{state:n,update:s}}},Mx=function(){function t(t){this._state=this.defaultState,this._listeners=[],this._txn=0,this._context=t}return Object.defineProperty(t.prototype,"defaultState",{get:function(){return{groups:[],items:[],choices:[]}},enumerable:!1,configurable:!0}),t.prototype.changeSet=function(t){return{groups:t,items:t,choices:t}},t.prototype.reset=function(){this._state=this.defaultState;var t=this.changeSet(!0);this._txn?this._changeSet=t:this._listeners.forEach(function(e){return e(t)})},t.prototype.subscribe=function(t){return this._listeners.push(t),this},t.prototype.dispatch=function(t){var e=this,i=this._state,n=!1,s=this._changeSet||this.changeSet(!1);Object.keys(Cx).forEach(function(r){var o=Cx[r](i[r],t,e._context);o.update&&(n=!0,s[r]=!0,i[r]=o.state)}),n&&(this._txn?this._changeSet=s:this._listeners.forEach(function(t){return t(s)}))},t.prototype.withTxn=function(t){this._txn++;try{t()}finally{if(this._txn=Math.max(0,this._txn-1),!this._txn){var e=this._changeSet;e&&(this._changeSet=void 0,this._listeners.forEach(function(t){return t(e)}))}}},Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"items",{get:function(){return this.state.items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"highlightedActiveItems",{get:function(){return this.items.filter(function(t){return t.active&&t.highlighted})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choices",{get:function(){return this.state.choices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeChoices",{get:function(){return this.choices.filter(function(t){return t.active})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"searchableChoices",{get:function(){var t=this._context;return this.choices.filter(function(e){return!e.placeholder&&(t.searchDisabledChoices||!e.disabled)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"groups",{get:function(){return this.state.groups},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"activeGroups",{get:function(){var t=this;return this.state.groups.filter(function(e){var i=e.active&&!e.disabled,n=t.state.choices.some(function(t){return t.active&&!t.disabled});return i&&n},[])},enumerable:!1,configurable:!0}),t.prototype.inTxn=function(){return this._txn>0},t.prototype.getChoiceById=function(t){return this.activeChoices.find(function(e){return e.id===t})},t.prototype.getGroupById=function(t){return this.groups.find(function(e){return e.id===t})},t}(),Lx="no-choices",Px="no-results",kx="add-choice";function Nx(t,e,i){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,e);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Ix(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function Tx(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ix(Object(i),!0).forEach(function(e){Nx(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ix(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function Ox(t){return Array.isArray?Array.isArray(t):"[object Array]"===Bx(t)}function Rx(t){return"string"==typeof t}function Fx(t){return"number"==typeof t}function Dx(t){return"object"==typeof t}function jx(t){return null!=t}function Gx(t){return!t.trim().length}
vendor: 10,319 bytes, line 2
2function Bx(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const zx=Object.prototype.hasOwnProperty;class qx{constructor(t){this._keys=[],this._keyMap={};let e=0;t.forEach(t=>{let i=Ux(t);this._keys.push(i),this._keyMap[i.id]=i,e+=i.weight}),this._keys.forEach(t=>{t.weight/=e})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ux(t){let e=null,i=null,n=null,s=1,r=null;if(Rx(t)||Ox(t))n=t,e=Wx(t),i=Vx(t);else{if(!zx.call(t,"name"))throw new Error("Missing name property in key");const o=t.name;if(n=o,zx.call(t,"weight")&&(s=t.weight,s<=0))throw new Error((t=>`Property 'weight' in key '${t}' must be a positive integer`)(o));e=Wx(o),i=Vx(o),r=t.getFn}return{path:e,id:i,weight:s,src:n,getFn:r}}function Wx(t){return Ox(t)?t:t.split(".")}function Vx(t){return Ox(t)?t.join("."):t}const Hx={useExtendedSearch:!1,getFn:function(t,e){let i=[],n=!1;const s=(t,e,r)=>{if(jx(t))if(e[r]){const o=t[e[r]];if(!jx(o))return;if(r===e.length-1&&(Rx(o)||Fx(o)||function(t){return!0===t||!1===t||function(t){return Dx(t)&&null!==t}(t)&&"[object Boolean]"==Bx(t)}(o)))i.push(function(t){return null==t?"":function(t){if("string"==typeof t)return t;let e=t+"";return"0"==e&&1/t==-1/0?"-0":e}(t)}(o));else if(Ox(o)){n=!0;for(let t=0,i=o.length;t<i;t+=1)s(o[t],e,r+1)}else e.length&&s(o,e,r+1)}else i.push(t)};return s(t,Rx(e)?e.split("."):e,0),n?i:i[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Kx=Tx(Tx(Tx(Tx({},{isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1}),{includeMatches:!1,findAllMatches:!1,minMatchCharLength:1}),{location:0,threshold:.6,distance:100}),Hx);const $x=/[^ ]+/g;class Xx{constructor({getFn:t=Kx.getFn,fieldNormWeight:e=Kx.fieldNormWeight}={}){this.norm=function(t=1,e=3){const i=new Map,n=Math.pow(10,e);return{get(e){const s=e.match($x).length;if(i.has(s))return i.get(s);const r=1/Math.pow(s,.5*t),o=parseFloat(Math.round(r*n)/n);return i.set(s,o),o},clear(){i.clear()}}}(e,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((t,e)=>{this._keysMap[t.id]=e})}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,Rx(this.docs[0])?this.docs.forEach((t,e)=>{this._addString(t,e)}):this.docs.forEach((t,e)=>{this._addObject(t,e)}),this.norm.clear())}add(t){const e=this.size();Rx(t)?this._addString(t,e):this._addObject(t,e)}removeAt(t){this.records.splice(t,1);for(let e=t,i=this.size();e<i;e+=1)this.records[e].i-=1}getValueForItemAtKeyId(t,e){return t[this._keysMap[e]]}size(){return this.records.length}_addString(t,e){if(!jx(t)||Gx(t))return;let i={v:t,i:e,n:this.norm.get(t)};this.records.push(i)}_addObject(t,e){let i={i:e,$:{}};this.keys.forEach((e,n)=>{let s=e.getFn?e.getFn(t):this.getFn(t,e.path);if(jx(s))if(Ox(s)){let t=[];const e=[{nestedArrIndex:-1,value:s}];for(;e.length;){const{nestedArrIndex:i,value:n}=e.pop();if(jx(n))if(Rx(n)&&!Gx(n)){let e={v:n,i,n:this.norm.get(n)};t.push(e)}else Ox(n)&&n.forEach((t,i)=>{e.push({nestedArrIndex:i,value:t})})}i.$[n]=t}else if(Rx(s)&&!Gx(s)){let t={v:s,n:this.norm.get(s)};i.$[n]=t}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Yx(t,e,{getFn:i=Kx.getFn,fieldNormWeight:n=Kx.fieldNormWeight}={}){const s=new Xx({getFn:i,fieldNormWeight:n});return s.setKeys(t.map(Ux)),s.setSources(e),s.create(),s}function Zx(t,{errors:e=0,currentLocation:i=0,expectedLocation:n=0,distance:s=Kx.distance,ignoreLocation:r=Kx.ignoreLocation}={}){const o=e/t.length;if(r)return o;const a=Math.abs(n-i);return s?o+a/s:a?1:o}const Jx=32;function Qx(t){let e={};for(let i=0,n=t.length;i<n;i+=1){const s=t.charAt(i);e[s]=(e[s]||0)|1<<n-i-1}return e}class tS{constructor(t,{location:e=Kx.location,threshold:i=Kx.threshold,distance:n=Kx.distance,includeMatches:s=Kx.includeMatches,findAllMatches:r=Kx.findAllMatches,minMatchCharLength:o=Kx.minMatchCharLength,isCaseSensitive:a=Kx.isCaseSensitive,ignoreLocation:h=Kx.ignoreLocation}={}){if(this.options={location:e,threshold:i,distance:n,includeMatches:s,findAllMatches:r,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(t,e)=>{this.chunks.push({pattern:t,alphabet:Qx(t),startIndex:e})},c=this.pattern.length;if(c>Jx){let t=0;const e=c%Jx,i=c-e;for(;t<i;)l(this.pattern.substr(t,Jx),t),t+=Jx;if(e){const t=c-Jx;l(this.pattern.substr(t),t)}}else l(this.pattern,0)}searchIn(t){const{isCaseSensitive:e,includeMatches:i}=this.options;if(e||(t=t.toLowerCase()),this.pattern===t){let e={isMatch:!0,score:0};return i&&(e.indices=[[0,t.length-1]]),e}const{location:n,distance:s,threshold:r,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],c=0,u=!1;this.chunks.forEach(({pattern:e,alphabet:d,startIndex:f})=>{const{isMatch:p,score:g,indices:m}=function(t,e,i,{location:n=Kx.location,distance:s=Kx.distance,threshold:r=Kx.threshold,findAllMatches:o=Kx.findAllMatches,minMatchCharLength:a=Kx.minMatchCharLength,includeMatches:h=Kx.includeMatches,ignoreLocation:l=Kx.ignoreLocation}={}){if(e.length>Jx)throw new Error("Pattern length exceeds max of 32.");const c=e.length,u=t.length,d=Math.max(0,Math.min(n,u));let f=r,p=d;const g=a>1||h,m=g?Array(u):[];let _;for(;(_=t.indexOf(e,p))>-1;){let t=Zx(e,{currentLocation:_,expectedLocation:d,distance:s,ignoreLocation:l});if(f=Math.min(t,f),p=_+c,g){let t=0;for(;t<c;)m[_+t]=1,t+=1}}p=-1;let v=[],y=1,w=c+u;const b=1<<c-1;for(let n=0;n<c;n+=1){let r=0,a=w;for(;r<a;)Zx(e,{errors:n,currentLocation:d+a,expectedLocation:d,distance:s,ignoreLocation:l})<=f?r=a:w=a,a=Math.floor((w-r)/2+r);w=a;let h=Math.max(1,d-a+1),_=o?u:Math.min(d+a,u)+c,x=Array(_+2);x[_+1]=(1<<n)-1;for(let r=_;r>=h;r-=1){let o=r-1,a=i[t.charAt(o)];if(g&&(m[o]=+!!a),x[r]=(x[r+1]<<1|1)&a,n&&(x[r]|=(v[r+1]|v[r])<<1|1|v[r+1]),x[r]&b&&(y=Zx(e,{errors:n,currentLocation:o,expectedLocation:d,distance:s,ignoreLocation:l}),y<=f)){if(f=y,p=o,p<=d)break;h=Math.max(1,2*d-p)}}if(Zx(e,{errors:n+1,currentLocation:d,expectedLocation:d,distance:s,ignoreLocation:l})>f)break;v=x}const x={isMatch:p>=0,score:Math.max(.001,y)};if(g){const t=function(t=[],e=Kx.minMatchCharLength){let i=[],n=-1,s=-1,r=0;for(let o=t.length;r<o;r+=1){let o=t[r];o&&-1===n?n=r:o||-1===n||(s=r-1,s-n+1>=e&&i.push([n,s]),n=-1)}return t[r-1]&&r-n>=e&&i.push([n,r-1]),i}(m,a);t.length?h&&(x.indices=t):x.isMatch=!1}return x}(t,e,d,{location:n+f,distance:s,threshold:r,findAllMatches:o,minMatchCharLength:a,includeMatches:i,ignoreLocation:h});p&&(u=!0),c+=g,p&&m&&(l=[...l,...m])});let d={isMatch:u,score:u?c/this.chunks.length:1};return u&&i&&(d.indices=l),d}}class eS{constructor(t){this.pattern=t}static isMultiMatch(t){return iS(t,this.multiRegex)}static isSingleMatch(t){return iS(t,this.singleRegex)}search(){}}function iS(t,e){const i=t.match(e);return i?i[1]:null}class nS extends eS{constructor(t,{location:e=Kx.location,threshold:i=Kx.threshold,distance:n=Kx.distance,includeMatches:s=Kx.includeMatches,findAllMatches:r=Kx.findAllMatches,minMatchCharLength:o=Kx.minMatchCharLength,isCaseSensitive:a=Kx.isCaseSensitive,ignoreLocation:h=Kx.ignoreLocation}={}){super(t),this._bitapSearch=new tS(t,{location:e,threshold:i,distance:n,includeMatches:s,findAllMatches:r,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class sS extends eS{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let e,i=0;const n=[],s=this.pattern.length;for(;(e=t.indexOf(this.pattern,i))>-1;)i=e+s,n.push([e,i-1]);const r=!!n.length;return{isMatch:r,score:r?0:1,indices:n}}}const rS=[class extends eS{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const e=t===this.pattern;return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},sS,class extends eS{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const e=t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,this.pattern.length-1]}}},class extends eS{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const e=!t.startsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends eS{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const e=!t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},class extends eS{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const e=t.endsWith(this.pattern);return{isMatch:e,score:e?0:1,indices:[t.length-this.pattern.length,t.length-1]}}},class extends eS{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const e=-1===t.indexOf(this.pattern);return{isMatch:e,score:e?0:1,indices:[0,t.length-1]}}},nS],oS=rS.length,aS=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,hS=new Set([nS.type,sS.type]);const lS=[];function cS(t,e){for(let i=0,n=lS.length;i<n;i+=1){let n=lS[i];if(n.condition(t,e))return new n(t,e)}return new tS(t,e)}const uS="$and",dS="$path",fS=t=>!(!t[uS]&&!t.$or),pS=t=>({[uS]:Object.keys(t).map(e=>({[e]:t[e]}))});function gS(t,e,{auto:i=!0}={}){const n=t=>{let s=Object.keys(t);const r=(t=>!!t[dS])(t);if(!r&&s.length>1&&!fS(t))return n(pS(t));if((t=>!Ox(t)&&Dx(t)&&!fS(t))(t)){const n=r?t[dS]:s[0],o=r?t.$val:t[n];if(!Rx(o))throw new Error((t=>`Invalid value for key ${t}`)(n));const a={keyId:Vx(n),pattern:o};return i&&(a.searcher=cS(o,e)),a}let o={children:[],operator:s[0]};
vendor: 4,854 bytes, line 2
2return s.forEach(e=>{const i=t[e];Ox(i)&&i.forEach(t=>{o.children.push(n(t))})}),o};return fS(t)||(t=pS(t)),n(t)}function mS(t,e){const i=t.matches;e.matches=[],jx(i)&&i.forEach(t=>{if(!jx(t.indices)||!t.indices.length)return;const{indices:i,value:n}=t;let s={indices:i,value:n};t.key&&(s.key=t.key.src),t.idx>-1&&(s.refIndex=t.idx),e.matches.push(s)})}function _S(t,e){e.score=t.score}class vS{constructor(t,e={},i){this.options=Tx(Tx({},Kx),e),this.options.useExtendedSearch,this._keyStore=new qx(this.options.keys),this.setCollection(t,i)}setCollection(t,e){if(this._docs=t,e&&!(e instanceof Xx))throw new Error("Incorrect 'index' type");this._myIndex=e||Yx(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){jx(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const e=[];for(let i=0,n=this._docs.length;i<n;i+=1){const s=this._docs[i];t(s,i)&&(this.removeAt(i),i-=1,n-=1,e.push(s))}return e}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:e=-1}={}){const{includeMatches:i,includeScore:n,shouldSort:s,sortFn:r,ignoreFieldNorm:o}=this.options;let a=Rx(t)?Rx(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return function(t,{ignoreFieldNorm:e=Kx.ignoreFieldNorm}){t.forEach(t=>{let i=1;t.matches.forEach(({key:t,norm:n,score:s})=>{const r=t?t.weight:null;i*=Math.pow(0===s&&r?Number.EPSILON:s,(r||1)*(e?1:n))}),t.score=i})}(a,{ignoreFieldNorm:o}),s&&a.sort(r),Fx(e)&&e>-1&&(a=a.slice(0,e)),function(t,e,{includeMatches:i=Kx.includeMatches,includeScore:n=Kx.includeScore}={}){const s=[];return i&&s.push(mS),n&&s.push(_S),t.map(t=>{const{idx:i}=t,n={item:e[i],refIndex:i};return s.length&&s.forEach(e=>{e(t,n)}),n})}(a,this._docs,{includeMatches:i,includeScore:n})}_searchStringList(t){const e=cS(t,this.options),{records:i}=this._myIndex,n=[];return i.forEach(({v:t,i,n:s})=>{if(!jx(t))return;const{isMatch:r,score:o,indices:a}=e.searchIn(t);r&&n.push({item:t,idx:i,matches:[{score:o,value:t,norm:s,indices:a}]})}),n}_searchLogical(t){const e=gS(t,this.options),i=(t,e,n)=>{if(!t.children){const{keyId:i,searcher:s}=t,r=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(e,i),searcher:s});return r&&r.length?[{idx:n,item:e,matches:r}]:[]}const s=[];for(let r=0,o=t.children.length;r<o;r+=1){const o=t.children[r],a=i(o,e,n);if(a.length)s.push(...a);else if(t.operator===uS)return[]}return s},n=this._myIndex.records,s={},r=[];return n.forEach(({$:t,i:n})=>{if(jx(t)){let o=i(e,t,n);o.length&&(s[n]||(s[n]={idx:n,item:t,matches:[]},r.push(s[n])),o.forEach(({matches:t})=>{s[n].matches.push(...t)}))}}),r}_searchObjectList(t){const e=cS(t,this.options),{keys:i,records:n}=this._myIndex,s=[];return n.forEach(({$:t,i:n})=>{if(!jx(t))return;let r=[];i.forEach((i,n)=>{r.push(...this._findMatches({key:i,value:t[n],searcher:e}))}),r.length&&s.push({idx:n,item:t,matches:r})}),s}_findMatches({key:t,value:e,searcher:i}){if(!jx(e))return[];let n=[];if(Ox(e))e.forEach(({v:e,i:s,n:r})=>{if(!jx(e))return;const{isMatch:o,score:a,indices:h}=i.searchIn(e);o&&n.push({score:a,key:t,value:e,idx:s,norm:r,indices:h})});else{const{v:s,n:r}=e,{isMatch:o,score:a,indices:h}=i.searchIn(s);o&&n.push({score:a,key:t,value:s,norm:r,indices:h})}return n}}vS.version="7.0.0",vS.createIndex=Yx,vS.parseIndex=function(t,{getFn:e=Kx.getFn,fieldNormWeight:i=Kx.fieldNormWeight}={}){const{keys:n,records:s}=t,r=new Xx({getFn:e,fieldNormWeight:i});return r.setKeys(n),r.setIndexRecords(s),r},vS.config=Kx,vS.parseQuery=gS,function(...t){lS.push(...t)}(class{constructor(t,{isCaseSensitive:e=Kx.isCaseSensitive,includeMatches:i=Kx.includeMatches,minMatchCharLength:n=Kx.minMatchCharLength,ignoreLocation:s=Kx.ignoreLocation,findAllMatches:r=Kx.findAllMatches,location:o=Kx.location,threshold:a=Kx.threshold,distance:h=Kx.distance}={}){this.query=null,this.options={isCaseSensitive:e,includeMatches:i,minMatchCharLength:n,findAllMatches:r,ignoreLocation:s,location:o,threshold:a,distance:h},this.pattern=e?t:t.toLowerCase(),this.query=function(t,e={}){return t.split("|").map(t=>{let i=t.trim().split(aS).filter(t=>t&&!!t.trim()),n=[];for(let t=0,s=i.length;t<s;t+=1){const s=i[t];let r=!1,o=-1;for(;!r&&++o<oS;){const t=rS[o];let i=t.isMultiMatch(s);i&&(n.push(new t(i,e)),r=!0)}if(!r)for(o=-1;++o<oS;){const t=rS[o];let i=t.isSingleMatch(s);if(i){n.push(new t(i,e));break}}}return n})}(this.pattern,this.options)}static condition(t,e){return e.useExtendedSearch}searchIn(t){const e=this.query;if(!e)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:n}=this.options;t=n?t:t.toLowerCase();let s=0,r=[],o=0;for(let n=0,a=e.length;n<a;n+=1){const a=e[n];r.length=0,s=0;for(let e=0,n=a.length;e<n;e+=1){const n=a[e],{isMatch:h,indices:l,score:c}=n.search(t);
vendor: 5,165 bytes, line 2
2if(!h){o=0,s=0,r.length=0;break}if(s+=1,o+=c,i){const t=n.constructor.type;hS.has(t)?r=[...r,...l]:r.push(l)}}if(s){let t={isMatch:!0,score:o/s};return i&&(t.indices=r),t}}return{isMatch:!1,score:1}}});var yS=function(){function t(t){this._haystack=[],this._fuseOptions=Mb(Mb({},t.fuseOptions),{keys:Lb([],t.searchFields,!0),includeMatches:!0})}return t.prototype.index=function(t){this._haystack=t,this._fuse&&this._fuse.setCollection(t)},t.prototype.reset=function(){this._haystack=[],this._fuse=void 0},t.prototype.isEmptyIndex=function(){return!this._haystack.length},t.prototype.search=function(t){return this._fuse||(this._fuse=new vS(this._haystack,this._fuseOptions)),this._fuse.search(t).map(function(t,e){return{item:t.item,score:t.score||0,rank:e+1}})},t}(),wS=function(t,e,i){var n=t.dataset,s=e.customProperties,r=e.labelClass,o=e.labelDescription;r&&(n.labelClass=hx(r).join(" ")),o&&(n.labelDescription=ex(o)),i&&s&&("string"==typeof s?n.customProperties=s:"object"!=typeof s||function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0}(s)||(n.customProperties=JSON.stringify(s)))},bS=function(t,e,i){var n=e&&t.querySelector("label[for='".concat(e,"']")),s=n&&n.innerText;s&&i.setAttribute("aria-label",s)},xS={containerOuter:function(t,e,i,n,s,r,o){var a=t.classNames.containerOuter,h=document.createElement("div");return cx(h,a),h.dataset.type=r,e&&(h.dir=e),n&&(h.tabIndex=0),i&&(h.setAttribute("role",s?"combobox":"listbox"),s?h.setAttribute("aria-autocomplete","list"):o||bS(this._docRoot,this.passedElement.element.id,h),h.setAttribute("aria-haspopup","true"),h.setAttribute("aria-expanded","false")),o&&h.setAttribute("aria-labelledby",o),h},containerInner:function(t){var e=t.classNames.containerInner,i=document.createElement("div");return cx(i,e),i},itemList:function(t,e){var i=t.searchEnabled,n=t.classNames,s=n.list,r=n.listSingle,o=n.listItems,a=document.createElement("div");return cx(a,s),cx(a,e?r:o),this._isSelectElement&&i&&a.setAttribute("role","listbox"),a},placeholder:function(t,e){var i=t.allowHTML,n=t.classNames.placeholder,s=document.createElement("div");return cx(s,n),ox(s,i,e),s},item:function(t,e,i){var n=t.allowHTML,s=t.removeItemButtonAlignLeft,r=t.removeItemIconText,o=t.removeItemLabelText,a=t.classNames,h=a.item,l=a.button,c=a.highlightedState,u=a.itemSelectable,d=a.placeholder,f=ex(e.value),p=document.createElement("div");if(cx(p,h),e.labelClass){var g=document.createElement("span");ox(g,n,e.label),cx(g,e.labelClass),p.appendChild(g)}else ox(p,n,e.label);if(p.dataset.item="",p.dataset.id=e.id,p.dataset.value=f,wS(p,e,!0),(e.disabled||this.containerOuter.isDisabled)&&p.setAttribute("aria-disabled","true"),this._isSelectElement&&(p.setAttribute("aria-selected","true"),p.setAttribute("role","option")),e.placeholder&&(cx(p,d),p.dataset.placeholder=""),cx(p,e.highlighted?c:u),i){e.disabled&&ux(p,u),p.dataset.deletable="";var m=document.createElement("button");m.type="button",cx(m,l);var _=nx(e);ox(m,!0,sx(r,e.value,_));var v=sx(o,e.value,_);v&&m.setAttribute("aria-label",v),m.dataset.button="",s?p.insertAdjacentElement("afterbegin",m):p.appendChild(m)}return p},choiceList:function(t,e){var i=t.classNames.list,n=document.createElement("div");return cx(n,i),e||n.setAttribute("aria-multiselectable","true"),n.setAttribute("role","listbox"),n},choiceGroup:function(t,e){var i=t.allowHTML,n=t.classNames,s=n.group,r=n.groupHeading,o=n.itemDisabled,a=e.id,h=e.label,l=e.disabled,c=ex(h),u=document.createElement("div");cx(u,s),l&&cx(u,o),u.setAttribute("role","group"),u.dataset.group="",u.dataset.id=a,u.dataset.value=c,l&&u.setAttribute("aria-disabled","true");var d=document.createElement("div");return cx(d,r),ox(d,i,h||""),u.appendChild(d),u},choice:function(t,e,i,n){var s=t.allowHTML,r=t.classNames,o=r.item,a=r.itemChoice,h=r.itemSelectable,l=r.selectedState,c=r.itemDisabled,u=r.description,d=r.placeholder,f=e.label,p=ex(e.value),g=document.createElement("div");g.id=e.elementId,cx(g,o),cx(g,a),n&&"string"==typeof f&&(f=rx(s,f),f={trusted:f+=" (".concat(n,")")});var m=g;if(e.labelClass){var _=document.createElement("span");ox(_,s,f),cx(_,e.labelClass),m=_,g.appendChild(_)}else ox(g,s,f);if(e.labelDescription){var v="".concat(e.elementId,"-description");m.setAttribute("aria-describedby",v);var y=document.createElement("span");ox(y,s,e.labelDescription),y.id=v,cx(y,u),g.appendChild(y)}return e.selected&&cx(g,l),e.placeholder&&cx(g,d),g.setAttribute("role",e.group?"treeitem":"option"),g.dataset.choice="",g.dataset.id=e.id,g.dataset.value=p,i&&(g.dataset.selectText=i),e.group&&(g.dataset.groupId="".concat(e.group.id)),wS(g,e,!1),e.disabled?(cx(g,c),g.dataset.choiceDisabled="",g.setAttribute("aria-disabled","true")):(cx(g,h),g.dataset.choiceSelectable="",g.setAttribute("aria-selected",e.selected?"true":"false")),g},input:function(t,e){var i=t.classNames,n=i.input,s=i.inputCloned,r=t.labelId,o=document.createElement("input");return o.type="search",cx(o,n),cx(o,s),o.autocomplete="off",o.autocapitalize="off",o.spellcheck=!1,o.setAttribute("aria-autocomplete","list"),e?o.setAttribute("aria-label",e):r||bS(this._docRoot,this.passedElement.element.i
2d,o),o},dropdown:function(t,e){var i=t.classNames,n=i.list,s=i.listDropdown,r=document.createElement("div");return cx(r,n),cx(r,s),e!==Ub&&r.setAttribute("aria-expanded","false"),r},notice:function(t,e,i){var n=t.classNames,s=n.item,r=n.itemChoice,o=n.addChoice,a=n.noResults,h=n.noChoices,l=n.notice;void 0===i&&(i="");var c=document.createElement("div");switch(ox(c,!0,e),cx(c,s),cx(c,r),cx(c,l),i){case kx:cx(c,o);break;case Px:cx(c,a);break;case Lx:cx(c,h)}return i===kx&&(c.dataset.choiceSelectable="",c.dataset.choice=""),c},option:function(t){var e=ex(t.label),i=new Option(e,t.value,!1,t.selected);return wS(i,t,!0),i.disabled=t.disabled,t.selected&&i.setAttribute("selected",""),i}},SS="-ms-scroll-limit"in document.documentElement.style&&"-ms-ime-align"in document.documentElement.style,ES={},AS=function(t){if(t)return t.dataset.id?parseInt(t.dataset.id,10):void 0},CS="[data-choice-selectable]",MS=function(){function t(e,i){void 0===e&&(e="[data-choice]"),void 0===i&&(i={});var n=this;this.initialisedOK=void 0,this._hasNonChoicePlaceholder=!1,this._lastAddedChoiceId=0,this._lastAddedGroupId=0;var s=t.defaults;this.config=Mb(Mb(Mb({},s.allOptions),s.options),i),qb.forEach(function(t){n.config[t]=Mb(Mb(Mb({},s.allOptions[t]),s.options[t]),i[t])});var r=this.config;r.silent||this._validateConfig();var o=r.shadowRoot||document.documentElement;this._docRoot=o;var a="string"==typeof e?o.querySelector(e):e;if(!a||"object"!=typeof a||"INPUT"!==a.tagName&&!xx(a)){if(!a&&"string"==typeof e)throw TypeError("Selector ".concat(e," failed to find an element"));throw TypeError("Expected one of the following types text|select-one|select-multiple")}var h=a.type,l=h===Ub;(l||1!==r.maxItemCount)&&(r.singleModeForMultiSelect=!1),r.singleModeForMultiSelect&&(h=Vb);var c=h===Wb,u=h===Vb,d=c||u;if(this._elementType=h,this._isTextElement=l,this._isSelectOneElement=c,this._isSelectMultipleElement=u,this._isSelectElement=c||u,this._canAddUserChoices=l&&r.addItems||d&&r.addChoices,"boolean"!=typeof r.renderSelectedChoices&&(r.renderSelectedChoices="always"===r.renderSelectedChoices||c),"auto"===r.closeDropdownOnSelect?r.closeDropdownOnSelect=l||c||r.singleModeForMultiSelect:r.closeDropdownOnSelect=yx(r.closeDropdownOnSelect),r.placeholder&&(r.placeholderValue?this._hasNonChoicePlaceholder=!0:a.dataset.placeholder&&(this._hasNonChoicePlaceholder=!0,r.placeholderValue=a.dataset.placeholder)),i.addItemFilter&&"function"!=typeof i.addItemFilter){var f=i.addItemFilter instanceof RegExp?i.addItemFilter:new RegExp(i.addItemFilter);r.addItemFilter=f.test.bind(f)}if(this._isTextElement)this.passedElement=new vx({element:a,classNames:r.classNames});else{var p=a;this.passedElement=new Sx({element:p,classNames:r.classNames,template:function(t){return n._templates.option(t)},extractPlaceholder:r.placeholder&&!this._hasNonChoicePlaceholder})}if(this.initialised=!1,this._store=new Mx(r),this._currentValue="",r.searchEnabled=!l&&r.searchEnabled,this._canSearch=r.searchEnabled,this._isScrollingOnIe=!1,this._highlightPosition=0,this._wasTap=!0,this._placeholderValue=this._generatePlaceholderValue(),this._baseId=function(t){var e=t.id||t.name&&"".concat(t.name,"-").concat(Yb(2))||Yb(4);return e=e.replace(/(:|\.|\[|\]|,)/g,""),"".concat("choices-","-").concat(e)}(a),this._direction=a.dir,!this._direction){var g=window.getComputedStyle(a).direction;g!==window.getComputedStyle(document.documentElement).direction&&(this._direction=g)}if(this._idNames={itemChoice:"item-choice"},this._templates=s.templates,this._render=this._render.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onInput=this._onInput.bind(this),this._onClick=this._onClick.bind(this),this._onTouchMove=this._onTouchMove.bind(this),this._onTouchEnd=this._onTouchEnd.bind(this),this._onMouseDown=this._onMouseDown.bind(this),this._onMouseOver=this._onMouseOver.bind(this),this._onFormReset=this._onFormReset.bind(this),this._onSelectKey=this._onSelectKey.bind(this),this._onEnterKey=this._onEnterKey.bind(this),this._onEscapeKey=this._onEscapeKey.bind(this),this._onDirectionKey=this._onDirectionKey.bind(this),this._onDeleteKey=this._onDeleteKey.bind(this),this._onChange=this._onChange.bind(this),this._onInvalid=this._onInvalid.bind(this),this.passedElement.isActive)return r.silent||console.warn("Trying to initialise Choices on element already initialised",{element:e}),this.initialised=!0,void(this.initialisedOK=!1);this.init(),this._initialItems=this._store.items.map(function(t){return t.value})}return Object.defineProperty(t,"defaults",{get:function(){return Object.preventExtensions({get options(){return ES},get allOptions(){return Ex},get templates(){return xS}})}
2,enumerable:!1,configurable:!0}),t.prototype.init=function(){if(!this.initialised&&void 0===this.initialisedOK){this._searcher=function(t){return new yS(t)}(this.config),this._loadChoices(),this._createTemplates(),this._createElements(),this._createStructure(),this._isTextElement&&!this.config.addItems||this.passedElement.element.hasAttribute("disabled")||this.passedElement.element.closest("fieldset:disabled")?this.disable():(this.enable(),this._addEventListeners()),this._initStore(),this.initialised=!0,this.initialisedOK=!0;var t=this.config.callbackOnInit;"function"==typeof t&&t.call(this)}},t.prototype.destroy=function(){this.initialised&&(this._removeEventListeners(),this.passedElement.reveal(),this.containerOuter.unwrap(this.passedElement.element),this._store._listeners=[],this.clearStore(!1),this._stopSearch(),this._templates=t.defaults.templates,this.initialised=!1,this.initialisedOK=void 0)},t.prototype.enable=function(){return this.passedElement.isDisabled&&this.passedElement.enable(),this.containerOuter.isDisabled&&(this._addEventListeners(),this.input.enable(),this.containerOuter.enable()),this},t.prototype.disable=function(){return this.passedElement.isDisabled||this.passedElement.disable(),this.containerOuter.isDisabled||(this._removeEventListeners(),this.input.disable(),this.containerOuter.disable()),this},t.prototype.highlightItem=function(t,e){if(void 0===e&&(e=!0),!t||!t.id)return this;var i=this._store.items.find(function(e){return e.id===t.id});return!i||i.highlighted||(this._store.dispatch(Xb(i,!0)),e&&this.passedElement.triggerEvent(zb,nx(i))),this},t.prototype.unhighlightItem=function(t,e){if(void 0===e&&(e=!0),!t||!t.id)return this;var i=this._store.items.find(function(e){return e.id===t.id});return i&&i.highlighted?(this._store.dispatch(Xb(i,!1)),e&&this.passedElement.triggerEvent("unhighlightItem",nx(i)),this):this},t.prototype.highlightAll=function(){var t=this;return this._store.withTxn(function(){t._store.items.forEach(function(e){e.highlighted||(t._store.dispatch(Xb(e,!0)),t.passedElement.triggerEvent(zb,nx(e)))})}),this},t.prototype.unhighlightAll=function(){var t=this;return this._store.withTxn(function(){t._store.items.forEach(function(e){e.highlighted&&(t._store.dispatch(Xb(e,!1)),t.passedElement.triggerEvent(zb,nx(e)))})}),this},t.prototype.removeActiveItemsByValue=function(t){var e=this;return this._store.withTxn(function(){e._store.items.filter(function(e){return e.value===t}).forEach(function(t){return e._removeItem(t)})}),this},t.prototype.removeActiveItems=function(t){var e=this;return this._store.withTxn(function(){e._store.items.filter(function(e){return e.id!==t}).forEach(function(t){return e._removeItem(t)})}),this},t.prototype.removeHighlightedItems=function(t){var e=this;return void 0===t&&(t=!1),this._store.withTxn(function(){e._store.highlightedActiveItems.forEach(function(i){e._removeItem(i),t&&e._triggerChange(i.value)})}),this},t.prototype.showDropdown=function(t){var e=this;if(this.dropdown.isActive)return this;void 0===t&&(t=!this._canSearch),this.dropdown.show();var i=this.dropdown.element.getBoundingClientRect();return this.containerOuter.open(i.bottom,i.height),t||this.input.focus(),requestAnimationFrame(function(){e.passedElement.triggerEvent("showDropdown");var t=e.choiceList.element.querySelector(lx(e.config.classNames.selectedState));null===t||Zb(t,e.choiceList.element)||(e.choiceList.element.scrollTop=t.offsetTop)}),this},t.prototype.hideDropdown=function(t){var e=this;return this.dropdown.isActive?(this._removeHighlightedChoices(),requestAnimationFrame(function(){e.dropdown.hide(),e.containerOuter.close(),!t&&e._canSearch&&(e.input.removeActiveDescendant(),e.input.blur()),e.passedElement.triggerEvent("hideDropdown")}),this):this},t.prototype.getValue=function(t){var e=this._store.items.map(function(e){return t?e.value:nx(e)});return this._isSelectOneElement||this.config.singleModeForMultiSelect?e[0]:e},t.prototype.setValue=function(t){var e=this;return this.initialisedOK?(this._store.withTxn(function(){t.forEach(function(t){t&&e._addChoice(bx(t,!1))})}),this._searcher.reset(),this):(this._warnChoicesInitFailed("setValue"),this)},t.prototype.setChoiceByValue=function(t){var e=this;return this.initialisedOK?(this._isTextElement||(this._store.withTxn(function(){(Array.isArray(t)?t:[t]).forEac
2h(function(t){return e._findAndSelectChoiceByValue(t)}),e.unhighlightAll()}),this._searcher.reset()),this):(this._warnChoicesInitFailed("setChoiceByValue"),this)},t.prototype.setChoices=function(t,e,i,n,s,r){var o=this;if(void 0===e&&(e="value"),void 0===i&&(i="label"),void 0===n&&(n=!1),void 0===s&&(s=!0),void 0===r&&(r=!1),!this.initialisedOK)return this._warnChoicesInitFailed("setChoices"),this;if(!this._isSelectElement)throw new TypeError("setChoices can't be used with INPUT based Choices");if("string"!=typeof e||!e)throw new TypeError("value parameter must be a name of 'value' field in passed objects");if("function"==typeof t){var a=t(this);if("function"==typeof Promise&&a instanceof Promise)return new Promise(function(t){return requestAnimationFrame(t)}).then(function(){return o._handleLoadingState(!0)}).then(function(){return a}).then(function(t){return o.setChoices(t,e,i,n,s,r)}).catch(function(t){o.config.silent||console.error(t)}).then(function(){return o._handleLoadingState(!1)}).then(function(){return o});if(!Array.isArray(a))throw new TypeError(".setChoices first argument function must return either array of choices or Promise, got: ".concat(typeof a));t=a}if(!Array.isArray(t))throw new TypeError(".setChoices must be called either with array of choices with a function resulting into Promise of array of choices");return this.containerOuter.removeLoadingState(),this._store.withTxn(function(){s&&(o._isSearching=!1),n&&o.clearChoices(!0,r);var a="value"===e,h="label"===i;t.forEach(function(t){if("choices"in t){var n=t;h||(n=Mb(Mb({},n),{label:n[i]})),o._addGroup(bx(n,!0))}else{var s=t;h&&a||(s=Mb(Mb({},s),{value:s[e],label:s[i]}));var r=bx(s,!1);o._addChoice(r),r.placeholder&&!o._hasNonChoicePlaceholder&&(o._placeholderValue=ix(r.label))}}),o.unhighlightAll()}),this.dropdown.isActive&&this._canAddUserChoices&&this._canCreateItem(this.input.value),this._searcher.reset(),this},t.prototype.refresh=function(t,e,i){var n=this;return void 0===t&&(t=!1),void 0===e&&(e=!1),void 0===i&&(i=!1),this._isSelectElement?(this._store.withTxn(function(){var s=n.passedElement.optionsAsChoices(),r={};i||n._store.items.forEach(function(t){t.id&&t.active&&t.selected&&(r[t.value]=!0)}),n.clearStore(!1);var o=function(t){i?n._store.dispatch($b(t)):r[t.value]&&(t.selected=!0)};s.forEach(function(t){"choices"in t?t.choices.forEach(o):o(t)}),n._addPredefinedChoices(s,e,t),n._isSearching&&n._searchChoices(n.input.value)}),this):(this.config.silent||console.warn("refresh method can only be used on choices backed by a <select> element"),this)},t.prototype.removeChoice=function(t){var e=this._store.choices.find(function(e){return e.value===t});return e?(this._clearNotice(),this._store.dispatch(function(t){return{type:Nb,choice:t}}(e)),this._searcher.reset(),e.selected&&this.passedElement.triggerEvent(Bb,nx(e)),this):this},t.prototype.clearChoices=function(t,e){var i=this;return void 0===t&&(t=!0),void 0===e&&(e=!1),t&&(e?this.passedElement.element.replaceChildren(""):this.passedElement.element.querySelectorAll(":not([selected])").forEach(function(t){t.remove()})),this.itemList.element.replaceChildren(""),this.choiceList.element.replaceChildren(""),this._clearNotice(),this._store.withTxn(function(){var t=e?[]:i._store.items;i._store.reset(),t.forEach(function(t){i._store.dispatch(Hb(t)),i._store.dispatch(Kb(t))})}),this._searcher.reset(),this},t.prototype.clearStore=function(t){return void 0===t&&(t=!0),this.clearChoices(t,!0),this._stopSearch(),this._lastAddedChoiceId=0,this._lastAddedGroupId=0,this},t.prototype.clearInput=function(){var t=!this._isSelectOneElement;return this.input.clear(t),this._stopSearch(),this},t.prototype._validateConfig=function(){var t=this.config,e=function(t,e){var i=Object.keys(t).sort(),n=Object.keys(e).sort();return i.filter(function(t){return n.indexOf(t)<0})}(t,Ex);e.length&&console.warn("Unknown config option(s) passed",e.join(", ")),t.allowHTML&&t.allowHtmlUserInput&&(t.addItems&&console.warn("Warning: allowHTML/allowHtmlUserInput/addItems all being true is strongly not recommended and may lead to XSS attacks"),t.addChoices&&console.warn("Warning: allowHTML/allowHtmlUserInput/addChoices all being true is strongly not recommended and may lead to XSS attacks"))},t.prototype._render=function(t){void 0===t&&(t={choices:!0,groups:!0,items:!0}),this._store.inTxn()||(this._isSelectElement&&(t.choices||t.groups)&&this._renderChoices(),t.items&&this._renderItems())},t.prototype._renderChoices=function(){var t=this;if(this._canAddItems()){var e=this.config,i=this._isSearching,n=this._store,s=n.activeGroups,r=n.activeChoices,o=i?e.searchResultLimit:e.renderChoiceLimit;if(this._isSelectElement){var a=r.filter(function(t){return!t.element});a.length&&this.passedElement.addOptions(a)}var h=document.createDocumentFragment(),l=function(t){return t.filter(function(t){return!t.placeholder&&(i?(e.searchRenderSelectedChoices||!t.selected)&&!!t.rank:e.renderSelectedChoices||!t.selected)})},c=e.appendGroupInSearch&&i,u=!1,d=null,f=function(n,s){i?n.sort(ax):e.shouldSort&&n.sort(e.sorter);var r=n.length;r=!s&&o>0&&r>o?o:r,r--,n.every(function(n,s){var o=n.choiceEl||t._templates.choice(e,n,e.itemSelectText,c&&n.group?n.group.label:void 0);
2return n.choiceEl=o,h.appendChild(o),i||!n.selected?u=!0:d||(d=o),s<r})};r.length&&(e.resetScrollPosition&&requestAnimationFrame(function(){return t.choiceList.scrollToTop()}),this._hasNonChoicePlaceholder||i||!this._isSelectOneElement||f(r.filter(function(t){return t.placeholder&&!t.group}),!1),s.length&&!i?(e.shouldSort&&s.sort(e.sorter),f(r.filter(function(t){return!t.placeholder&&!t.group}),!1),s.forEach(function(e){var i=l(e.choices);if(i.length){if(e.label){var n=e.groupEl||t._templates.choiceGroup(t.config,e);e.groupEl=n,n.remove(),h.appendChild(n)}f(i,!0)}})):f(l(r),!1)),u||!i&&h.children.length&&e.renderSelectedChoices||(this._notice||(this._notice={text:tx(i?e.noResultsText:e.noChoicesText),type:i?Px:Lx}),h.replaceChildren("")),this._renderNotice(h),this.choiceList.element.replaceChildren(h),this._highlightChoice(d)}},t.prototype._renderItems=function(){var t=this,e=this._store.items||[],i=this.itemList.element,n=this.config,s=document.createDocumentFragment(),r=function(t){return i.querySelector('[data-item][data-id="'.concat(t.id,'"]'))},o=function(e){var i=e.itemEl;i&&i.parentElement||(i=r(e)||t._templates.item(n,e,n.removeItemButton),e.itemEl=i,s.appendChild(i))};e.forEach(o);var a=!!s.childNodes.length;if(this._isSelectOneElement){var h=i.children.length;if(a||h>1){var l=i.querySelector(lx(n.classNames.placeholder));l&&l.remove()}else a||h||!this._placeholderValue||(a=!0,o(bx({selected:!0,value:"",label:this._placeholderValue,placeholder:!0},!1)))}a&&(i.append(s),n.shouldSortItems&&!this._isSelectOneElement&&(e.sort(n.sorter),e.forEach(function(t){var e=r(t);e&&(e.remove(),s.append(e))}),i.append(s))),this._isTextElement&&(this.passedElement.value=e.map(function(t){return t.value}).join(n.delimiter))},t.prototype._displayNotice=function(t,e,i){void 0===i&&(i=!0);var n=this._notice;n&&(n.type===e&&n.text===t||n.type===kx&&(e===Px||e===Lx))?i&&this.showDropdown(!0):(this._clearNotice(),this._notice=t?{text:t,type:e}:void 0,this._renderNotice(),i&&t&&this.showDropdown(!0))},t.prototype._clearNotice=function(){if(this._notice){var t=this.choiceList.element.querySelector(lx(this.config.classNames.notice));t&&t.remove(),this._notice=void 0}},t.prototype._renderNotice=function(t){var e=this._notice;if(e){var i=this._templates.notice(this.config,e.text,e.type);t?t.append(i):this.choiceList.prepend(i)}},t.prototype._getChoiceForOutput=function(t,e){return nx(t,e)},t.prototype._triggerChange=function(t){null!=t&&this.passedElement.triggerEvent("change",{value:t})},t.prototype._handleButtonAction=function(t){var e=this,i=this._store.items;if(i.length&&this.config.removeItems&&this.config.removeItemButton){var n=t&&AS(t.closest("[data-id]")),s=n&&i.find(function(t){return t.id===n});s&&this._store.withTxn(function(){if(e._removeItem(s),e._triggerChange(s.value),e._isSelectOneElement&&!e._hasNonChoicePlaceholder){var t=(e.config.shouldSort?e._store.choices.reverse():e._store.choices).find(function(t){return t.placeholder});t&&(e._addItem(t),e.unhighlightAll(),t.value&&e._triggerChange(t.value))}})}},t.prototype._handleItemAction=function(t,e){var i=this;void 0===e&&(e=!1);var n=this._store.items;if(n.length&&this.config.removeItems&&!this._isSelectOneElement){var s=AS(t);s&&(n.forEach(function(t){t.id!==s||t.highlighted?!e&&t.highlighted&&i.unhighlightItem(t):i.highlightItem(t)}),this.input.focus())}},t.prototype._handleChoiceAction=function(t){var e=this,i=AS(t),n=i&&this._store.getChoiceById(i);if(!n||n.disabled)return!1;var s=this.dropdown.isActive;if(!n.selected){if(!this._canAddItems())return!0;this._store.withTxn(function(){e._addItem(n,!0,!0),e.clearInput(),e.unhighlightAll()}),this._triggerChange(n.value)}return s&&this.config.closeDropdownOnSelect&&(this.hideDropdown(!0),this.containerOuter.element.focus()),!0},t.prototype._handleBackspace=function(t){var e=this.config;if(e.removeItems&&t.length){var i=t[t.length-1],n=t.some(function(t){return t.highlighted});e.editItems&&!n&&i?(this.input.value=i.value,this.input.setWidth(),this._removeItem(i),this._triggerChange(i.value)):(n||this.highlightItem(i,!1),this.removeHighlightedItems(!0))}},t.prototype._loadChoices=function(){var t,e=this,i=this.config;if(this._isTextElement){if(this._presetChoices=i.items.map(function(t){return bx(t,!1)}),this.passedElement.value){var n=this.passedElement.value.split(i.delimiter).map(function(t){return bx(t,!1,e.config.allowHtmlUserInput)});this._presetChoices=this._presetChoices.concat(n)}
vendor: 14,602 bytes, line 2
2this._presetChoices.forEach(function(t){t.selected=!0})}else if(this._isSelectElement){this._presetChoices=i.choices.map(function(t){return bx(t,!0)});var s=this.passedElement.optionsAsChoices();s&&(t=this._presetChoices).push.apply(t,s)}},t.prototype._handleLoadingState=function(t){void 0===t&&(t=!0);var e=this.itemList.element;t?(this.disable(),this.containerOuter.addLoadingState(),this._isSelectOneElement?e.replaceChildren(this._templates.placeholder(this.config,this.config.loadingText)):this.input.placeholder=this.config.loadingText):(this.enable(),this.containerOuter.removeLoadingState(),this._isSelectOneElement?(e.replaceChildren(""),this._render()):this.input.placeholder=this._placeholderValue||"")},t.prototype._handleSearch=function(t){if(this.input.isFocussed)if(null!=t&&t.length>=this.config.searchFloor){var e=this.config.searchChoices?this._searchChoices(t):0;null!==e&&this.passedElement.triggerEvent(Gb,{value:t,resultCount:e})}else this._store.choices.some(function(t){return!t.active})&&this._stopSearch()},t.prototype._canAddItems=function(){var t=this.config,e=t.maxItemCount,i=t.maxItemText;return!t.singleModeForMultiSelect&&e>0&&e<=this._store.items.length?(this.choiceList.element.replaceChildren(""),this._notice=void 0,this._displayNotice("function"==typeof i?i(e):i,kx,!1),!1):(this._notice&&this._notice.type===kx&&this._clearNotice(),!0)},t.prototype._canCreateItem=function(t){var e=this.config,i=!0,n="";if(i&&this._store.choices.find(function(i){return e.valueComparer(i.value,t)})){if(this._isSelectElement)return this._displayNotice("",kx),!1;e.duplicateItemsAllowed||(i=!1,n=sx(e.uniqueItemText,t,void 0))}return i&&"function"==typeof e.addItemFilter&&!e.addItemFilter(t)&&(i=!1,n=sx(e.customAddItemText,t,void 0)),i&&(n=sx(e.addItemText,t,void 0)),n&&this._displayNotice(n,kx),i},t.prototype._searchChoices=function(t){var e=t.trim().replace(/\s{2,}/," ");if(!e.length||e===this._currentValue)return null;var i=this._searcher;i.isEmptyIndex()&&i.index(this._store.searchableChoices);var n=i.search(e);this._currentValue=e,this._highlightPosition=0,this._isSearching=!0;var s=this._notice;return(s&&s.type)!==kx&&(n.length?this._clearNotice():this._displayNotice(tx(this.config.noResultsText),Px)),this._store.dispatch(function(t){return{type:Ib,results:t}}(n)),n.length},t.prototype._stopSearch=function(){this._isSearching&&(this._currentValue="",this._isSearching=!1,this._clearNotice(),this._store.dispatch({type:Tb,active:!0}),this.passedElement.triggerEvent(Gb,{value:"",resultCount:0}))},t.prototype._addEventListeners=function(){var t=this._docRoot,e=this.containerOuter.element,i=this.input.element,n=this.passedElement.element;t.addEventListener("touchend",this._onTouchEnd,!0),e.addEventListener("keydown",this._onKeyDown,!0),e.addEventListener("mousedown",this._onMouseDown,!0),t.addEventListener("click",this._onClick,{passive:!0}),t.addEventListener("touchmove",this._onTouchMove,{passive:!0}),this.dropdown.element.addEventListener("mouseover",this._onMouseOver,{passive:!0}),this._isSelectOneElement&&(e.addEventListener("focus",this._onFocus,{passive:!0}),e.addEventListener("blur",this._onBlur,{passive:!0})),i.addEventListener("keyup",this._onKeyUp,{passive:!0}),i.addEventListener("input",this._onInput,{passive:!0}),i.addEventListener("focus",this._onFocus,{passive:!0}),i.addEventListener("blur",this._onBlur,{passive:!0}),i.form&&i.form.addEventListener("reset",this._onFormReset,{passive:!0}),n.hasAttribute("required")&&(n.addEventListener("change",this._onChange,{passive:!0}),n.addEventListener("invalid",this._onInvalid,{passive:!0})),this.input.addEventListeners()},t.prototype._removeEventListeners=function(){var t=this._docRoot,e=this.containerOuter.element,i=this.input.element,n=this.passedElement.element;t.removeEventListener("touchend",this._onTouchEnd,!0),e.removeEventListener("keydown",this._onKeyDown,!0),e.removeEventListener("mousedown",this._onMouseDown,!0),t.removeEventListener("click",this._onClick),t.removeEventListener("touchmove",this._onTouchMove),this.dropdown.element.removeEventListener("mouseover",this._onMouseOver),this._isSelectOneElement&&(e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur)),i.removeEventListener("keyup",this._onKeyUp),i.removeEventListener("input",this._onInput),i.removeEventListener("focus",this._onFocus),i.removeEventListener("blur",this._onBlur),i.form&&i.form.removeEventListener("reset",this._onFormReset),n.hasAttribute("required")&&(n.removeEventListener("change",this._onChange),n.removeEventListener("invalid",this._onInvalid)),this.input.removeEventListeners()},t.prototype._onKeyDown=function(t){var e=t.keyCode,i=this.dropdown.isActive,n=1===t.key.length||2===t.key.length&&t.key.charCodeAt(0)>=55296||"Unidentified"===t.key;switch(this._isTextElement||i||27===e||9===e||16===e||(this.showDropdown(),!this.input.isFocussed&&n&&(this.input.value+=t.key," "===t.key&&t.preventDefault())),e){case 65:return this._onSelectKey(t,this.itemList.element.hasChildNodes());case 13:return this._onEnterKey(t,i);case 27:return this._onEscapeKey(t,i);case 38:case 33:case 40:case 34:return this._onDirectionKey(t,i);case 8:case 46:return this._onDeleteKey(t,this._store.items,this.input.isFocussed)}},t.prototype._onKeyUp=function(){this._canSearch=this.config.searchEnabled},t.prototype._onInput=function(){var t=this.input.value;t?this._canAddItems()&&(this._canSearch&&this._handleSearch(t),this._canAddUserChoices&&(this._canCreateItem(t),this._isSelectElement&&(this._highlightPosition=0,this._highlightChoice()))):this._isTextElement?this.hideDropdown(!0):this._stopSearch()},t.prototype._onSelectKey=function(t,e){(t.ctrlKey||t.metaKey)&&e&&(this._canSearch=!1,this.config.removeItems&&!this.input.value&&this.input.element===document.activeElement&&this.highlightAll())},t.prototype._onEnterKey=function(t,e){var i=this,n=this.input.value,s=t.target;if(t.preventDefault(),s&&s.hasAttribute("data-button"))this._handleButtonAction(s);else if(e){var r=this.dropdown.element.querySelector(lx(this.config.classNames.highlightedState));if(!r||!this._handleChoiceAction(r))if(s&&n){if(this._canAddItems()){var o=!1;this._store.withTxn(function(){if(!(o=i._findAndSelectChoiceByValue(n,!0))){if(!i._canAddUserChoices)return;if(!i._canCreateItem(n))return;i._addChoice(bx(n,!1,i.config.allowHtmlUserInput),!0,!0),o=!0}i.clearInput(),i.unhighlightAll()}),o&&(this._triggerChange(n),this.config.closeDropdownOnSelect&&this.hideDropdown(!0))}}else this.hideDropdown(!0)}else(this._isSelectElement||this._notice)&&this.showDropdown()},t.prototype._onEscapeKey=function(t,e){e&&(t.stopPropagation(),this.hideDropdown(!0),this._stopSearch(),this.containerOuter.element.focus())},t.prototype._onDirectionKey=function(t,e){var i=t.keyCode;if(e||this._isSelectOneElement){this.showDropdown(),this._canSearch=!1;var n=40===i||34===i?1:-1,s=void 0;if(t.metaKey||34===i||33===i)s=n>0?this.dropdown.element.querySelector("".concat(CS,":last-of-type")):this.dropdown.element.querySelector(CS);else{var r=this.dropdown.element.querySelector(lx(this.config.classNames.highlightedState))||this.dropdown.element.querySelector(lx(this.config.classNames.selectedState));s=r?function(t,e,i){void 0===i&&(i=1);for(var n="".concat(i>0?"next":"previous","ElementSibling"),s=t[n];s;){if(s.matches(e))return s;s=s[n]}return null}(r,CS,n):this.dropdown.element.querySelector(CS)}s&&(Zb(s,this.choiceList.element,n)||this.choiceList.scrollToChildElement(s,n),this._highlightChoice(s)),t.preventDefault()}},t.prototype._onDeleteKey=function(t,e,i){this._isSelectOneElement||t.target.value||!i||(this._handleBackspace(e),t.preventDefault())},t.prototype._onTouchMove=function(){this._wasTap&&(this._wasTap=!1)},t.prototype._onTouchEnd=function(t){var e=(t||t.touches[0]).target;this._wasTap&&this.containerOuter.element.contains(e)&&((e===this.containerOuter.element||e===this.containerInner.element)&&(this._isTextElement?this.input.focus():this._isSelectMultipleElement&&this.showDropdown()),t.stopPropagation()),this._wasTap=!0},t.prototype._onMouseDown=function(t){var e=t.target;if(e instanceof Element){if(SS&&this.choiceList.element.contains(e)){var i=this.choiceList.element.firstElementChild;this._isScrollingOnIe="ltr"===this._direction?t.offsetX>=i.offsetWidth:t.offsetX<i.offsetLeft}if(e!==this.input.element){var n=e.closest("[data-button],[data-item],[data-choice]");n instanceof HTMLElement&&("button"in n.dataset?this._handleButtonAction(n):"item"in n.dataset?this._handleItemAction(n,t.shiftKey):"choice"in n.dataset&&this._handleChoiceAction(n)),t.preventDefault()}}},t.prototype._onMouseOver=function(t){var e=t.target;e instanceof HTMLElement&&"choice"in e.dataset&&this._highlightChoice(e)},t.prototype._onClick=function(t){var e=t.target,i=this.containerOuter;i.element.contains(e)?this.dropdown.isActive||i.isDisabled?this._isSelectOneElement&&e!==this.input.element&&!this.dropdown.element.contains(e)&&this.hideDropdown():this._isTextElement?document.activeElement!==this.input.element&&this.input.focus():(i.element.focus(),this.showDropdown()):(i.removeFocusState(),this.hideDropdown(!0),this.unhighlightAll())},t.prototype._onFocus=function(t){var e=t.target,i=this.containerOuter;if(e&&i.element.contains(e)){var n=e===this.input.element;this._isTextElement?n&&i.addFocusState():this._isSelectMultipleElement?n&&(this.showDropdown(!0),i.addFocusState()):(i.addFocusState(),n&&this.showDropdown(!0))}},t.prototype._onBlur=function(t){var e=t.target,i=this.containerOuter;e&&i.element.contains(e)&&!this._isScrollingOnIe?e===this.input.element?(i.removeFocusState(),this.hideDropdown(!0),(this._isTextElement||this._isSelectMultipleElement)&&this.unhighlightAll()):e===this.containerOuter.element&&(i.removeFocusState(),this.config.searchEnabled||this.hideDropdown(!0)):(this._isScrollingOnIe=!1,this.input.element.focus())},t.prototype._onFormReset=function(){var t=this;this._store.withTxn(function(){t.clearInput(),t.hideDropdown(),t.refresh(!1,!1,!0),t._initialItems.length&&t.setChoiceByValue(t._initialItems)})},t.prototype._onChange=function(t){t.target.checkValidity()&&this.containerOuter.removeInvalidState()},t.prototype._onInvalid=function(){this.containerOuter.addInvalidState()},t.prototype._removeHighlightedChoices=function(){var t=this.config.classNames.highlightedState;Array.from(this.dropdown.element.querySelectorAll(lx(t))).forEach(function(e){ux(e,t),e.setAttribute("aria-selected","false")})},t.prototype._highlightChoice=function(t){void 0===t&&(t=null);var e=Array.from(this.dropdown.element.querySelectorAll(CS));if(e.length){var i=t,n=this.config.classNames.highlightedState;this._removeHighlightedChoices(),i?this._highlightPosition=e.indexOf(i):(i=e.length>this._highlightPosition?e[this._highlightPosition]:e[e.length-1])||(i=e[0]),cx(i,n),i.setAttribute("aria-selected","true"),this.passedElement.triggerEvent("highlightChoice",{el:i}),this.dropdown.isActive&&(this.input.setActiveDescendant(i.id),this.containerOuter.setActiveDescendant(i.id))}},t.prototype._addItem=function(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=!1),!t.id)throw new TypeError("item.id must be set before _addItem is called for a choice/item");if((this.config.singleModeForMultiSelect||this._isSelectOneElement)&&this.removeActiveItems(t.id),this._store.dispatch(Kb(t)),e){var n=nx(t);this.passedElement.triggerEvent("addItem",n),i&&this.passedElement.triggerEvent("choice",n)}},t.prototype._removeItem=function(t){if(t.id){this._store.dispatch($b(t));var e=this._notice;e&&e.type===Lx&&this._clearNotice(),this.passedElement.triggerEvent(Bb,nx(t))}},t.prototype._addChoice=function(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=!1),t.id)throw new TypeError("Can not re-add a choice which has already been added");var n=this.config;if(n.duplicateItemsAllowed||!this._store.choices.find(function(e){return n.valueComparer(e.value,t.value)})){this._lastAddedChoiceId++,t.id=this._lastAddedChoiceId,t.elementId="".concat(this._baseId,"-").concat(this._idNames.itemChoice,"-").concat(t.id);var s=n.prependValue,r=n.appendValue;s&&(t.value=s+t.value),r&&(t.value+=r.toString()),(s||r)&&t.element&&(t.element.value=t.value),this._clearNotice(),this._store.dispatch(Hb(t)),t.selected&&this._addItem(t,e,i)}},t.prototype._addGroup=function(t,e){var i=this;if(void 0===e&&(e=!0),t.id)throw new TypeError("Can not re-add a group which has already been added");this._store.dispatch(function(t){return{type:Rb,group:t}}(t)),t.choices&&(this._lastAddedGroupId++,t.id=this._lastAddedGroupId,t.choices.forEach(function(n){n.group=t,t.disabled&&(n.disabled=!0),i._addChoice(n,e)}))},t.prototype._createTemplates=function(){var t=this,e=this.config.callbackOnCreateTemplates,i={};"function"==typeof e&&(i=e.call(this,Qb,rx,hx));var n={};Object.keys(this._templates).forEach(function(e){n[e]=e in i?i[e].bind(t):t._templates[e].bind(t)}),this._templates=n},t.prototype._createElements=function(){var t=this._templates,e=this.config,i=this._isSelectOneElement,n=e.position,s=e.classNames,r=this._elementType;this.containerOuter=new px({element:t.containerOuter(e,this._direction,this._isSelectElement,i,e.searchEnabled,r,e.labelId),classNames:s,type:r,position:n}),this.containerInner=new px({element:t.containerInner(e),classNames:s,type:r,position:n}),this.input=new gx({element:t.input(e,this._placeholderValue),classNames:s,type:r,preventPaste:!e.paste}),this.choiceList=new mx({element:t.choiceList(e,i)}),this.itemList=new mx({element:t.itemList(e,i)}),this.dropdown=new fx({element:t.dropdown(e,r),classNames:s,type:r})},t.prototype._createStructure=function(){var t=this,e=t.containerInner,i=t.containerOuter,n=t.passedElement,s=this.dropdown.element;n.conceal(),e.wrap(n.element),i.wrap(e.element),i.element.appendChild(e.element),i.element.appendChild(s),e.element.appendChild(this.itemList.element),s.appendChild(this.choiceList.element),this._isSelectOneElement?(this.input.placeholder=this.config.searchPlaceholderValue||"",this.config.searchEnabled&&s.insertBefore(this.input.element,s.firstChild)):(this._isSelectMultipleElement&&!this.config.searchEnabled||e.element.appendChild(this.input.element),this._placeholderValue&&(this.input.placeholder=this._placeholderValue),this.input.setWidth()),this._highlightPosition=0,this._isSearching=!1},t.prototype._initStore=function(){var t=this;this._store.subscribe(this._render).withTxn(function(){t._addPredefinedChoices(t._presetChoices,t._isSelectOneElement&&!t._hasNonChoicePlaceholder,!1)}),(!this._store.choices.length||this._isSelectOneElement&&this._hasNonChoicePlaceholder)&&this._render()}
2,t.prototype._addPredefinedChoices=function(t,e,i){var n=this;void 0===e&&(e=!1),void 0===i&&(i=!0),e&&-1===t.findIndex(function(t){return t.selected})&&t.some(function(t){return!t.disabled&&!("choices"in t)&&(t.selected=!0,!0)}),t.forEach(function(t){"choices"in t?n._isSelectElement&&n._addGroup(t,i):n._addChoice(t,i)})},t.prototype._findAndSelectChoiceByValue=function(t,e){var i=this;void 0===e&&(e=!1);var n=this._store.choices.find(function(e){return i.config.valueComparer(e.value,t)});return!(!n||n.disabled||n.selected||(this._addItem(n,!0,e),0))},t.prototype._generatePlaceholderValue=function(){var t=this.config;if(!t.placeholder)return null;if(this._hasNonChoicePlaceholder)return t.placeholderValue;if(this._isSelectElement){var e=this.passedElement.placeholderOption;return e?e.text:null}return null},t.prototype._warnChoicesInitFailed=function(t){if(!this.config.silent){if(!this.initialised)throw new TypeError("".concat(t," called on a non-initialised instance of Choices"));if(!this.initialisedOK)throw new TypeError("".concat(t," called for an element which has multiple instances of Choices initialised on it"))}},t.version="11.2.4",t}();let LS,PS,kS,NS,IS,TS,OS=null,RS=!1,FS={},DS={},jS=!1;const GS={0:window.legend_0||"",1:window.legend_1||"",2:window.legend_2||"",3:window.legend_3||"",4:window.legend_4||"",5:window.legend_5||"",30:window.legend_30||"",31:window.legend_31||"",32:window.legend_32||"",33:window.legend_33||"",34:window.legend_34||"",35:window.legend_35||"",50:window.legend_50||"",51:window.legend_51||"",52:window.legend_52||"",53:window.legend_53||"",54:window.legend_54||"",55:window.legend_55||""};let BS,zS,qS,US,WS,VS,HS,KS,$S,XS;document.addEventListener("DOMContentLoaded",()=>{BS=document.getElementById("popup"),zS=document.getElementById("expert-mode"),qS=document.getElementById("expertise-form"),US=document.querySelector(".input-doubt"),WS=document.querySelector(".input-intro"),VS=document.querySelector("#observers-list table"),HS=document.getElementById("expertise-unit-id"),KS=document.getElementById("expertise-unit-id-ws-original"),$S=document.getElementById("expertise-legend-text"),XS=document.createElement("div"),XS.className="modal-backdrop show"});const YS=()=>{BS&&(BS.contains(document.activeElement)&&document.activeElement.blur(),BS.classList.remove("show"),BS.style.display="none",BS.setAttribute("aria-hidden","true"),document.body.contains(XS)&&document.body.removeChild(XS),document.removeEventListener("click",ZS),document.removeEventListener("keydown",JS))},ZS=t=>{BS===t.target&&YS()},JS=t=>{"Escape"!==t.key&&"Esc"!==t.key||YS()},QS=()=>`${Eu.obsApiUrl}/rest/v5/communities/0/atlases/${bb()}/x/${LS}/y/${PS}/names/${gb()}/expertises.json`,tE=()=>{zS&&nE&&(RS=!0,sE(),nE.setVisible(!0),zS.addEventListener("click",()=>{RS=!RS,RS?(zS.classList.remove("btn-default"),zS.classList.add("btn-danger"),qS&&(qS.style.display="block"),nE.setVisible(!0)):(zS.classList.remove("btn-danger"),zS.classList.add("btn-default"),qS&&(qS.style.display="none"),nE.setVisible(!1))}),(()=>{const t=document.querySelector("button#expertise-ok");t&&t.addEventListener("click",()=>{((t,e,i)=>{if(null===t&&null===e&&null===i)fetch(QS(),{method:"DELETE",headers:{"Content-Type":"application/json",Authorization:"Bearer "+eE.getAccessToken()}}).finally(()=>{setTimeout(()=>{sE()},600)});else{const n={doubt:t??void 0,intro:e??void 0,frequency:i??void 0};fetch(QS(),{method:"PUT",headers:{"Content-Type":"application/json",Authorization:"Bearer "+eE.getAccessToken()},body:JSON.stringify(n)}).finally(()=>{setTimeout(()=>{sE()},600)})}})(kS,NS,OS),YS()});const e=document.querySelector("button#expertise-cancel");e&&e.addEventListener("click",()=>{YS()})})())},eE=new class{constructor(){this.redirectUri=Eu.oauth.redirectUri,this.clientId=Eu.oauth.clientId,this.clientSecret=Eu.oauth.clientSecret,this.authorizationEndpoint=Eu.oauth.authorizationEndpoint,this.tokenEndpoint=Eu.oauth.tokenEndpoint,this.accessCookie="if-atlas-access",this.refreshCookie="if-atlas-refresh",this.requestedRoleName="ROLE_INFOFLORA_ADMIN",this.isWaitingConnection=!1,this.isReconnecting=!1,this.isConnected=!1,this.timer=null,this.authorizationHeaderInitialized=!1}initOauth(){this.authorizationEndpoint=this.authorizationEndpoint.replace("{LANG}",window.LANG||"de"),this.setAuthorizationHeader();const t=this.catchCode();t?this.requestAccessToken(t):this.tryConnection()}catchCode(){const t=this.parseQueryString(window.location.search.substring(1));var e=new URL(document.location.href);return e.searchParams.delete("code"),window.history.replaceState({},null,e.toString()),t.code}
2setAuthorizationHeader(){if(this.authorizationHeaderInitialized)return;const t=window.fetch;window.fetch=async(...e)=>{let[i,n]=e;if(i instanceof Request?i=i.url:i instanceof URL&&(i=i.href),"string"==typeof i&&i.startsWith(Eu.obsApiUrl)&&-1===i.indexOf("/rest/public/")){const t=this.getAccessToken();t&&(n=n||{},n.headers=n.headers||{},n.headers.Authorization="Bearer "+t)}return t(i,n)},this.authorizationHeaderInitialized=!0}waitForConnection(t){this.isReconnecting?setTimeout(()=>this.waitForConnection(t),250):t()}requestAuthorization(){const t=this.generateRandomString();localStorage.setItem("pkce_code_verifier",t);const e=this.getChallengeFromVerifier(t),i=this.authorizationEndpoint+"?client_id="+encodeURIComponent(this.clientId)+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&code_challenge="+encodeURIComponent(e)+"&code_challenge_method=S256&response_type=code";window.location=i}parseQueryString(t){const e={};return t&&t.split("&").forEach(t=>{const[i,n]=t.split("=");e[i]=n}),e}async requestAccessToken(t){const e=new URLSearchParams({grant_type:"authorization_code",client_id:this.clientId,client_secret:this.clientSecret,redirect_uri:this.redirectUri,code_verifier:localStorage.getItem("pkce_code_verifier"),code:t});try{const t=await fetch(this.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e});if(t.ok){const e=await t.json();this.saveAccessToken(e.access_token),this.saveRefreshToken(e.refresh_token),localStorage.removeItem("pkce_code_verifier"),this.tryConnection()}else console.error("Failed to request access token")}catch(t){console.error("Failed to request access token:",t)}}async tryConnection(){const t=this.getAccessToken();if(t)try{const e=await fetch(Eu.obsApiUrl+"/rest/v5/user.json",{headers:{Authorization:"Bearer "+t}});if(e.ok){const t=await e.json();if(!this.isConnected){const e=t.data;this.checkUserRole(e,this.requestedRoleName)?(this.setLoginState(),this.setRefreshTimer(20),console.log("User role ok: "+this.requestedRoleName)):this.setLogoutState()}this.isReconnecting=!1}else this.clearAccessToken(),this.refreshAccessToken()}catch{this.clearAccessToken(),this.refreshAccessToken()}else this.getRefreshToken()?this.refreshAccessToken():(this.setLogoutState(),this.isReconnecting=!1)}async refreshAccessToken(){const t=this.getRefreshToken();if(t){const e=new URLSearchParams({grant_type:"refresh_token",client_id:this.clientId,client_secret:this.clientSecret,redirect_uri:this.redirectUri,refresh_token:t});try{const t=await fetch(this.tokenEndpoint,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:e});if(t.ok){const e=await t.json();this.saveAccessToken(e.access_token),this.saveRefreshToken(e.refresh_token),this.isConnected||this.tryConnection(),this.isReconnecting=!1}else this.logout(),this.isReconnecting=!1}catch{this.logout(),this.isReconnecting=!1}}else this.setLogoutState(),this.isReconnecting=!1}logout(){this.timer&&clearTimeout(this.timer),this.clearAccessToken(),this.clearRefreshToken(),document.location.href=document.location}checkUserRole(t,e){return t.roles&&t.roles.includes(e)}setLoginState(){this.isConnected=!0,document.getElementById("expert-mode").style.display="",document.getElementById("logout-staff").style.display="",document.getElementById("login-staff").style.display="none",wb("standalone-expertise"),console.log("mode: standalone-expertise"),tE()}setLogoutState(){this.isConnected=!1,document.getElementById("expert-mode").style.display="none",document.getElementById("logout-staff").style.display="none",document.getElementById("login-staff").style.display="",wb("standalone"),console.log("mode: standalone")}getChallengeFromVerifier(t){const e=(new TextEncoder).encode(t),i=this.sha256(e);return this.base64encode(i)}generateRandomString(){const t=new Uint32Array(28);return window.crypto.getRandomValues(t),Array.from(t,t=>("0"+t.toString(16)).substr(-2)).join("")}base64encode(t){return btoa(String.fromCharCode.apply(null,new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}setRefreshTimer(t){this.timer&&clearTimeout(this.timer),this.timer=setTimeout(()=>this.refreshAccessToken(),60*t*1e3)}saveAccessToken(t){this.setCookie(this.accessCookie,t,25),this.setRefreshTimer(20)}saveRefreshToken(t){this.setCookie(this.refreshCookie,t,60)}getAccessToken(){return this.getCookie(this.accessCookie)}getRefreshToken(){return this.getCookie(this.refreshCookie)}clearAccessToken(){this.deleteCookie(this.accessCookie)}clearRefreshToken(){this.deleteCookie(this.refreshCookie)}setCookie(t,e,i){const n="expires="+new Date((new Date).getTime()+60*i*1e3).toUTCString()+";",s=encodeURIComponent(t)+"="+encodeURIComponent(e)+";";document.cookie=s+n+"path=/;domain=;secure;sameSite='Lax';"}getCookie(t){const e=document.cookie.match("(^|;)\\s*"+t+"\\s*=\\s*([^;]+)");return e?e.pop():""}deleteCookie(t){document.cookie=t+"=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/"}sha256(t){const e=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
2734187,3204031479,3329325298]);function i(t,i,n){let s,r,o,a,h,l,c,u,d,f,p,g,m,_=0,v=n.length;for(;v>=64;){for(s=i[0],r=i[1],o=i[2],a=i[3],h=i[4],l=i[5],c=i[6],u=i[7],f=0;f<16;f++)p=_+4*f,t[f]=(255&n[p])<<24|(255&n[p+1])<<16|(255&n[p+2])<<8|255&n[p+3];for(f=16;f<64;f++)d=t[f-2],g=(d>>>17|d<<15)^(d>>>19|d<<13)^d>>>10,d=t[f-15],m=(d>>>7|d<<25)^(d>>>18|d<<14)^d>>>3,t[f]=(g+t[f-7]|0)+(m+t[f-16]|0);for(f=0;f<64;f++)g=(((h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7))+(h&l^~h&c)|0)+(u+(e[f]+t[f]|0)|0)|0,m=((s>>>2|s<<30)^(s>>>13|s<<19)^(s>>>22|s<<10))+(s&r^s&o^r&o)|0,u=c,c=l,l=h,h=a+g|0,a=o,o=r,r=s,s=g+m|0;i[0]+=s,i[1]+=r,i[2]+=o,i[3]+=a,i[4]+=h,i[5]+=l,i[6]+=c,i[7]+=u,_+=64,v-=64}}const n=new Int32Array(8),s=new Int32Array(64);n[0]=1779033703,n[1]=3144134277,n[2]=1013904242,n[3]=2773480762,n[4]=1359893119,n[5]=2600822924,n[6]=528734635,n[7]=1541459225;const r=new Uint8Array(t),o=function(t){const e=t.length,i=e%64,n=i<56?64:128,s=new Uint8Array(n),r=e/536870912|0,o=e<<3;return s.set(t.subarray(e-i)),s[i]=128,s[n-8]=r>>>24&255,s[n-7]=r>>>16&255,s[n-6]=r>>>8&255,s[n-5]=r>>>0&255,s[n-4]=o>>>24&255,s[n-3]=o>>>16&255,s[n-2]=o>>>8&255,s[n-1]=o>>>0&255,s}(r);i(s,n,r),i(s,n,o);const a=new Uint8Array(32);for(let t=0;t<8;t++)a[4*t+0]=n[t]>>>24&255,a[4*t+1]=n[t]>>>16&255,a[4*t+2]=n[t]>>>8&255,a[4*t+3]=n[t]>>>0&255;return a.buffer}},iE={},nE=new ew({source:new cw({format:new Pp}),style:(t,e)=>{const i=(t=>{let e=0;const i=t.get("doubt"),n=t.get("intro");return i>1426?e=130:1425==i?n?e=60==n?105:61==n?115:125:1425==i&&(e=140):n&&(e=60==n?106:61==n?116:126),e})(t);return iE[i]||(iE[i]={}),iE[i][e]||(iE[i][e]=new dg({image:new L_({scale:340/e,src:Eu.resourcesRouteUrl+"/resources/images/atlas/atlas-"+i+".svg",crossOrigin:"anonymous"})})),iE[i][e]},name:"expertise"}),sE=()=>{if("standalone-expertise"!==ab)return;const t=nE.getSource(),e=bb(),i=gb();console.log("load expertise");const n=`${Eu.obsApiUrl}/rest/v5/communities/0/atlases/${e}/names/${i}/expertises.geojson`;fetch(n,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+eE.getAccessToken()}}).then(e=>204===e.status?(t.clear(!0),t.dispatchEvent("change"),null):e.json()).then(e=>{if(e){const i=new Pp,n=e?i.readFeatures(e,{featureProjection:Mu}):[];t.clear(!0),t.addFeatures(n),t.dispatchEvent("change")}}).catch(t=>{console.error("Error fetching expertise data:",t)})},rE=[new dg({fill:new Vd({color:"rgba(0, 0, 0, 0)"}),stroke:new Jp({color:"black",width:1})})],oE=new ew({source:new cw({format:new Pp,url:Eu.resourcesRouteUrl+"/resources/json/ws.geojson",crossOrigin:"anonymous"}),style:t=>{var e=t.get("id");if(hE[e]>0&&hE[e]<9e4)return rE},opacity:.5,name:"ws",visible:!1}),aE={};let hE={};const lE=(t,e)=>{switch(t){case 1001:return new dg({image:new ag({radius:1400/e,fill:new Vd({color:[255,40,0,1]}),crossOrigin:"anonymous"})});case 1002:return new dg({image:new ag({radius:2e3/e,fill:new Vd({color:[255,0,0,1]}),crossOrigin:"anonymous"})});case 2700:case 2710:return new dg({text:new Py({font:"bold 12px Arial",text:"L",fill:new Vd({color:"#000000"})})});case 2701:case 2711:return new dg({text:new Py({font:"bold 12px Arial",text:"H",fill:new Vd({color:"#000000"})})});case 2702:return new dg({image:new ag({radius:1400/e,stroke:new Jp({color:[0,0,0,1]}),crossOrigin:"anonymous"})});case 2712:return new dg({image:new rg({radius:2e3/e,stroke:new Jp({color:[0,0,0,1]}),points:3,angle:0,crossOrigin:"anonymous"})});case 2703:return new dg({image:new ag({radius:1400/e,fill:new Vd({color:[0,0,0,1]}),crossOrigin:"anonymous"})});case 2713:return new dg({image:new rg({radius:2e3/e,fill:new Vd({color:[0,0,0,1]}),points:3,angle:0,crossOrigin:"anonymous"})});case 2704:return new dg({image:new ag({radius:1400/e,fill:new Vd({color:[0,156,255,1]}),crossOrigin:"anonymous"})});case 2714:return new dg({image:new rg({radius:2e3/e,fill:new Vd({color:[0,156,255,1]}),points:3,angle:0,crossOrigin:"anonymous"})});case 2705:return new dg({image:new ag({radius:1400/e,fill:new Vd({color:[56,168,0,1]}),crossOrigin:"anonymous"})});
2case 2715:return new dg({image:new rg({radius:1400/e,fill:new Vd({color:[56,168,0,1]}),points:3,angle:0,crossOrigin:"anonymous"})});default:return new dg({image:new L_({scale:310/e,src:Eu.resourcesRouteUrl+"/resources/images/atlas/atlas-"+t+".svg",crossOrigin:"anonymous"})})}},cE=new ew({source:new cw({format:new Pp,attributions:'&copy; <a href="https://www.infoflora.ch/">Distribution maps / InfoFlora</a>',crossOrigin:"anonymous"}),style:(t,e)=>{const i=(t=>{const e=bb(),i=Sb(),n=Eb();if(27==e){const e=t.getGeometry().getCoordinates(),i=Rw.getSource().getFeatures().filter(t=>t.getGeometry().intersectsCoordinate(e));return 2700+10*(i.length>0)+t.get("legend")%10}let s=0;const r=t.get("doubt"),o=t.get("intro"),a=t.get("year_min"),h=t.get("year_max"),l=t.get("obs_nb"),c=xb();return"count"===c?r<2&&l>0&&o<4?l<n?1001:1002:0:("simple"===c?r<1&&o<4&&(s=1):(s=1==r&&l>0?2:0===l?3:1,2==r?s+=30:4==o?s=0:o>=2?s+=20:1==o&&(s+=10),3==r&&(s=0)),s>0&&(a<i?h>=i&&(s+=200):h>=i&&(s+=100)),s)})(t),n=bb();if(12==n||27==n){const e=t.get("gis_id");e>0&&(hE[e]=i)}return aE[i]||(aE[i]={}),aE[i][e]||(aE[i][e]=[lE(i,e)]),aE[i][e]},name:"atlas"}),uE=t=>{const e=cE.getSource(),i=bb(),n=gb();console.log("load atlas");const s=`${Eu.obsApiUrl}/rest/v5/communities/0/public/atlases/${i}/names/${n}/units.geojson?with-legend=true`;fetch(s,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(t=>(yb(t.headers.get("Last-Modified")),204!==t.status&&t.ok?t.json():null)).then(n=>{if(hE={},e.clear(!0),n)try{const t=(new Pp).readFeatures(n,{featureProjection:Mu});e.addFeatures(t)}catch(t){console.error("Error parsing GeoJSON:",t),nE&&nE.getSource().clear(!0)}else nE&&nE.getSource().clear(!0);t&&oE&&t.getLayers().forEach(e=>{"ws"===e.get("name")&&("11"===i?e.setVisible(!1):e.setVisible(!0),setTimeout(()=>{cE.changed(),oE.changed(),t.render()},100))});const s=document.querySelector("#lastModified span");s&&vb()&&(s.textContent=Pu(vb()))}).catch(t=>{console.error("Error fetching atlas data:",t)})},dE=class extends Fd{constructor(t,e,i){super(t),this.map=e,this.frameState=void 0!==i?i:null}},fE=class extends dE{constructor(t,e,i,n,s,r){super(t,e,s),this.originalEvent=i,this.pixel_=null,this.coordinate_=null,this.dragging=void 0!==n&&n,this.activePointers=r}get pixel(){return this.pixel_||(this.pixel_=this.map.getEventPixel(this.originalEvent)),this.pixel_}set pixel(t){this.pixel_=t}get coordinate(){return this.coordinate_||(this.coordinate_=this.map.getCoordinateFromPixel(this.pixel)),this.coordinate_}set coordinate(t){this.coordinate_=t}preventDefault(){super.preventDefault(),"preventDefault"in this.originalEvent&&this.originalEvent.preventDefault()}stopPropagation(){super.stopPropagation(),"stopPropagation"in this.originalEvent&&this.originalEvent.stopPropagation()}},pE={SINGLECLICK:"singleclick",CLICK:wd,DBLCLICK:"dblclick",POINTERDRAG:"pointerdrag",POINTERMOVE:"pointermove",POINTERDOWN:"pointerdown",POINTERUP:"pointerup",POINTEROVER:"pointerover",POINTEROUT:"pointerout",POINTERENTER:"pointerenter",POINTERLEAVE:"pointerleave",POINTERCANCEL:"pointercancel"},gE="pointerdown",mE=class extends Dd{constructor(t,e){super(t),this.map_=t,this.clickTimeoutId_,this.emulateClicks_=!1,this.dragging_=!1,this.dragListenerKeys_=[],this.moveTolerance_=void 0===e?1:e,this.down_=null;const i=this.map_.getViewport();this.activePointers_=[],this.trackedTouches_={},this.element_=i,this.pointerdownListenerKey_=gd(i,gE,this.handlePointerDown_,this),this.originalPointerMoveEvent_,this.relayedListenerKey_=gd(i,"pointermove",this.relayMoveEvent_,this),this.boundHandleTouchMove_=this.handleTouchMove_.bind(this),this.element_.addEventListener(Sd,this.boundHandleTouchMove_,!!Fu&&{passive:!1})}emulateClick_(t){let e=new fE(pE.CLICK,this.map_,t);this.dispatchEvent(e),void 0!==this.clickTimeoutId_?(clearTimeout(this.clickTimeoutId_),this.clickTimeoutId_=void 0,e=new fE(pE.DBLCLICK,this.map_,t),this.dispatchEvent(e)):this.clickTimeoutId_=setTimeout(()=>{this.clickTimeoutId_=void 0;const e=new fE(pE.SINGLECLICK,this.map_,t);this.dispatchEvent(e)},250)}updateActivePointers_(t){const e=t,i=e.pointerId;if(e.type==pE.POINTERUP||e.type==pE.POINTERCANCEL){delete this.trackedTouches_[i];for(const t in this.trackedTouches_)if(this.trackedTouches_[t].target!==e.target){delete this.trackedTouches_[t];break}}else e.type!=pE.POINTERDOWN&&e.type!=pE.POINTERMOVE||(this.trackedTouches_[i]=e);this.activePointers_=Object.values(this.trackedTouches_)}handlePointerUp_(t){this.updateActivePointers_(t);const e=new fE(pE.POINTERUP,this.map_,t,void 0,void 0,this.activePointers_);this.dispatchEvent(e),this.emulateClicks_&&!e.defaultPrevented&&!this.dragging_&&this.isMouseActionButton_(t)&&this.emulateClick_(this.down_),0===this.activePointers_.length&&(this.dragListenerKeys_.forEach(_d),this.dragListenerKeys_.length=0,this.dragging_=!1,this.down_=null)}isMouseActionButton_(t){return 0===t.button}handlePointerDown_(t){this.emulateClicks_=0===this.activePointers_.length,this.updateActivePointers_(t);const e=new fE(pE.POINTERDOWN,this.map_,t,void 0,void 0,this.activePointers_);
vendor: 36,850 bytes, line 2
2if(this.dispatchEvent(e),this.down_=new PointerEvent(t.type,t),Object.defineProperty(this.down_,"target",{writable:!1,value:t.target}),0===this.dragListenerKeys_.length){const t=this.map_.getOwnerDocument();this.dragListenerKeys_.push(gd(t,pE.POINTERMOVE,this.handlePointerMove_,this),gd(t,pE.POINTERUP,this.handlePointerUp_,this),gd(this.element_,pE.POINTERCANCEL,this.handlePointerUp_,this)),this.element_.getRootNode&&this.element_.getRootNode()!==t&&this.dragListenerKeys_.push(gd(this.element_.getRootNode(),pE.POINTERUP,this.handlePointerUp_,this))}}handlePointerMove_(t){if(this.isMoving_(t)){this.updateActivePointers_(t),this.dragging_=!0;const e=new fE(pE.POINTERDRAG,this.map_,t,this.dragging_,void 0,this.activePointers_);this.dispatchEvent(e)}}relayMoveEvent_(t){this.originalPointerMoveEvent_=t;const e=!(!this.down_||!this.isMoving_(t));this.dispatchEvent(new fE(pE.POINTERMOVE,this.map_,t,e))}handleTouchMove_(t){const e=this.originalPointerMoveEvent_;e&&!e.defaultPrevented||"boolean"==typeof t.cancelable&&!0!==t.cancelable||t.preventDefault()}isMoving_(t){return this.dragging_||Math.abs(t.clientX-this.down_.clientX)>this.moveTolerance_||Math.abs(t.clientY-this.down_.clientY)>this.moveTolerance_}disposeInternal(){this.relayedListenerKey_&&(_d(this.relayedListenerKey_),this.relayedListenerKey_=null),this.element_.removeEventListener(Sd,this.boundHandleTouchMove_),this.pointerdownListenerKey_&&(_d(this.pointerdownListenerKey_),this.pointerdownListenerKey_=null),this.dragListenerKeys_.forEach(_d),this.dragListenerKeys_.length=0,this.element_=null,super.disposeInternal()}},_E=1/0,vE=class{constructor(t,e){this.priorityFunction_=t,this.keyFunction_=e,this.elements_=[],this.priorities_=[],this.queuedElements_={}}clear(){this.elements_.length=0,this.priorities_.length=0,fd(this.queuedElements_)}dequeue(){const t=this.elements_,e=this.priorities_,i=t[0];1==t.length?(t.length=0,e.length=0):(t[0]=t.pop(),e[0]=e.pop(),this.siftUp_(0));const n=this.keyFunction_(i);return delete this.queuedElements_[n],i}enqueue(t){Zd(!(this.keyFunction_(t)in this.queuedElements_),"Tried to enqueue an `element` that was already added to the queue");const e=this.priorityFunction_(t);return e!=_E&&(this.elements_.push(t),this.priorities_.push(e),this.queuedElements_[this.keyFunction_(t)]=!0,this.siftDown_(0,this.elements_.length-1),!0)}getCount(){return this.elements_.length}getLeftChildIndex_(t){return 2*t+1}getRightChildIndex_(t){return 2*t+2}getParentIndex_(t){return t-1>>1}heapify_(){let t;for(t=(this.elements_.length>>1)-1;t>=0;t--)this.siftUp_(t)}isEmpty(){return 0===this.elements_.length}isKeyQueued(t){return t in this.queuedElements_}isQueued(t){return this.isKeyQueued(this.keyFunction_(t))}siftUp_(t){const e=this.elements_,i=this.priorities_,n=e.length,s=e[t],r=i[t],o=t;for(;t<n>>1;){const s=this.getLeftChildIndex_(t),r=this.getRightChildIndex_(t),o=r<n&&i[r]<i[s]?r:s;e[t]=e[o],i[t]=i[o],t=o}e[t]=s,i[t]=r,this.siftDown_(o,t)}siftDown_(t,e){const i=this.elements_,n=this.priorities_,s=i[e],r=n[e];for(;e>t;){const t=this.getParentIndex_(e);if(!(n[t]>r))break;i[e]=i[t],n[e]=n[t],e=t}i[e]=s,n[e]=r}reprioritize(){const t=this.priorityFunction_,e=this.elements_,i=this.priorities_;let n=0;const s=e.length;let r,o,a;for(o=0;o<s;++o)r=e[o],a=t(r),a==_E?delete this.queuedElements_[this.keyFunction_(r)]:(i[n]=a,e[n++]=r);e.length=n,i.length=n,this.heapify_()}},yE=class extends vE{constructor(t,e){super(e=>t.apply(null,e),t=>t[0].getKey()),this.boundHandleTileChange_=this.handleTileChange.bind(this),this.tileChangeCallback_=e,this.tilesLoading_=0,this.tilesLoadingKeys_={}}enqueue(t){const e=super.enqueue(t);return e&&t[0].addEventListener(vd,this.boundHandleTileChange_),e}getTilesLoading(){return this.tilesLoading_}handleTileChange(t){const e=t.target,i=e.getState();if(2===i||3===i||4===i){3!==i&&e.removeEventListener(vd,this.boundHandleTileChange_);const t=e.getKey();t in this.tilesLoadingKeys_&&(delete this.tilesLoadingKeys_[t],--this.tilesLoading_),this.tileChangeCallback_()}}loadMoreTiles(t,e){let i=0;for(;this.tilesLoading_<t&&i<e&&this.getCount()>0;){const t=this.dequeue()[0],e=t.getKey();0!==t.getState()||e in this.tilesLoadingKeys_||(this.tilesLoadingKeys_[e]=!0,++this.tilesLoading_,++i,t.load())}}},wE=class{constructor(t,e,i){this.decay_=t,this.minVelocity_=e,this.delay_=i,this.points_=[],this.angle_=0,this.initialVelocity_=0}begin(){this.points_.length=0,this.angle_=0,this.initialVelocity_=0}update(t,e){this.points_.push(t,e,Date.now())}end(){if(this.points_.length<6)return!1;const t=Date.now()-this.delay_,e=this.points_.length-3;if(this.points_[e+2]<t)return!1;let i=e-3;for(;i>0&&this.points_[i+2]>t;)i-=3;const n=this.points_[e+2]-this.points_[i+2];if(n<1e3/60)return!1;const s=this.points_[e]-this.points_[i],r=this.points_[e+1]-this.points_[i+1];return this.angle_=Math.atan2(r,s),this.initialVelocity_=Math.sqrt(s*s+r*r)/n,this.initialVelocity_>this.minVelocity_}getDistance(){return(this.minVelocity_-this.initialVelocity_)/this.decay_}getAngle(){return this.angle_}},bE="active";function xE(t,e,i,n){const s=t.getZoom();if(void 0===s)return;const r=t.getConstrainedZoom(s+e),o=t.getResolutionForZoom(r);t.getAnimating()&&t.cancelAnimations(),t.animate({resolution:o,anchor:i,duration:void 0!==n?n:250,easing:xg})}const SE=class extends Yd{constructor(t){super(),this.on,this.once,this.un,t&&t.handleEvent&&(this.handleEvent=t.handleEvent),this.map_=null,this.setActive(!0)}getActive(){return this.get(bE)}getMap(){return this.map_}handleEvent(t){return!0}setActive(t){this.set(bE,t)}setMap(t){this.map_=t}},EE=class extends SE{constructor(t){super(),t=t||{},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:250}handleEvent(t){let e=!1;if(t.type==pE.DBLCLICK){const i=t.originalEvent,n=t.map,s=t.coordinate,r=i.shiftKey?-this.delta_:this.delta_;xE(n.getView(),r,s,this.duration_),i.preventDefault(),e=!0}return!e}};function AE(t){const e=arguments;return function(t){let i=!0;for(let n=0,s=e.length;n<s&&(i=i&&e[n](t),i);++n);return i}}const CE=function(t){const e=t.originalEvent;return e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},ME=function(t){const e=t.map.getTargetElement(),i=e.getRootNode();return!(i instanceof ShadowRoot?i.host:e).hasAttribute("tabindex")||function(t){const e=t.map.getTargetElement(),i=e.getRootNode(),n=t.map.getOwnerDocument().activeElement;return i instanceof ShadowRoot?i.host.contains(n):e.contains(n)}(t)},LE=Id,PE=function(t){const e=t.originalEvent;return"pointerId"in e&&0==e.button&&!(Nu&&Iu&&e.ctrlKey)},kE=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&!e.shiftKey},NE=function(t){const e=t.originalEvent;return!e.altKey&&!(e.metaKey||e.ctrlKey)&&e.shiftKey},IE=function(t){const e=t.originalEvent,i=e.target.tagName;return"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i&&!e.target.isContentEditable},TE=function(t){const e=t.originalEvent;return"pointerId"in e&&"mouse"==e.pointerType},OE=function(t){const e=t.originalEvent;return"pointerId"in e&&e.isPrimary&&0===e.button};function RE(t){const e=t.length;let i=0,n=0;for(let s=0;s<e;s++)i+=t[s].clientX,n+=t[s].clientY;return{clientX:i/e,clientY:n/e}}const FE=class extends SE{constructor(t){super(t=t||{}),t.handleDownEvent&&(this.handleDownEvent=t.handleDownEvent),t.handleDragEvent&&(this.handleDragEvent=t.handleDragEvent),t.handleMoveEvent&&(this.handleMoveEvent=t.handleMoveEvent),t.handleUpEvent&&(this.handleUpEvent=t.handleUpEvent),t.stopDown&&(this.stopDown=t.stopDown),this.handlingDownUpSequence=!1,this.targetPointers=[]}getPointerCount(){return this.targetPointers.length}handleDownEvent(t){return!1}handleDragEvent(t){}handleEvent(t){if(!t.originalEvent)return!0;let e=!1;if(this.updateTrackedPointers_(t),this.handlingDownUpSequence){if(t.type==pE.POINTERDRAG)this.handleDragEvent(t),t.originalEvent.preventDefault();else if(t.type==pE.POINTERUP){const e=this.handleUpEvent(t);this.handlingDownUpSequence=e&&this.targetPointers.length>0}}else if(t.type==pE.POINTERDOWN){const i=this.handleDownEvent(t);this.handlingDownUpSequence=i,e=this.stopDown(i)}else t.type==pE.POINTERMOVE&&this.handleMoveEvent(t);return!e}handleMoveEvent(t){}handleUpEvent(t){return!1}stopDown(t){return t}updateTrackedPointers_(t){t.activePointers&&(this.targetPointers=t.activePointers)}},DE=class extends FE{constructor(t){super({stopDown:Td}),t=t||{},this.kinetic_=t.kinetic,this.lastCentroid=null,this.lastPointersCount_,this.panning_=!1;const e=t.condition?t.condition:AE(kE,OE);this.condition_=t.onFocusOnly?AE(ME,e):e,this.noKinetic_=!1}handleDragEvent(t){const e=t.map;this.panning_||(this.panning_=!0,e.getView().beginInteraction());const i=this.targetPointers,n=e.getEventPixel(RE(i));if(i.length==this.lastPointersCount_){if(this.kinetic_&&this.kinetic_.update(n[0],n[1]),this.lastCentroid){const e=[this.lastCentroid[0]-n[0],n[1]-this.lastCentroid[1]],i=t.map.getView();s=e,r=i.getResolution(),s[0]*=r,s[1]*=r,go(e,i.getRotation()),i.adjustCenterInternal(e)}}else this.kinetic_&&this.kinetic_.begin();var s,r;this.lastCentroid=n,this.lastPointersCount_=i.length,t.originalEvent.preventDefault()}handleUpEvent(t){const e=t.map,i=e.getView();if(0===this.targetPointers.length){if(!this.noKinetic_&&this.kinetic_&&this.kinetic_.end()){const t=this.kinetic_.getDistance(),n=this.kinetic_.getAngle(),s=i.getCenterInternal(),r=e.getPixelFromCoordinateInternal(s),o=e.getCoordinateFromPixelInternal([r[0]-t*Math.cos(n),r[1]-t*Math.sin(n)]);i.animateInternal({center:i.getConstrainedCenter(o),duration:500,easing:xg})}return this.panning_&&(this.panning_=!1,i.endInteraction()),!1}return this.kinetic_&&this.kinetic_.begin(),this.lastCentroid=null,!0}handleDownEvent(t){if(this.targetPointers.length>0&&this.condition_(t)){const e=t.map.getView();return this.lastCentroid=null,e.getAnimating()&&e.cancelAnimations(),this.kinetic_&&this.kinetic_.begin(),this.noKinetic_=this.targetPointers.length>1,!0}return!1}},jE=class extends FE{constructor(t){t=t||{},super({stopDown:Td}),this.condition_=t.condition?t.condition:CE,this.lastAngle_=void 0,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){if(!TE(t))return;const e=t.map,i=e.getView();if(i.getConstraints().rotation===rm)return;const n=e.getSize(),s=t.pixel,r=Math.atan2(n[1]/2-s[1],s[0]-n[0]/2);if(void 0!==this.lastAngle_){const t=r-this.lastAngle_;i.adjustRotationInternal(-t)}this.lastAngle_=r}handleUpEvent(t){return!TE(t)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){return!!TE(t)&&(!(!PE(t)||!this.condition_(t))&&(t.map.getView().beginInteraction(),this.lastAngle_=void 0,!0))}},GE=class extends Ad{constructor(t){super(),this.geometry_=null,this.element_=document.createElement("div"),this.element_.style.position="absolute",this.element_.style.pointerEvents="auto",this.element_.className="ol-box "+t,this.map_=null,this.startPixel_=null,this.endPixel_=null}disposeInternal(){this.setMap(null)}render_(){const t=this.startPixel_,e=this.endPixel_,i="px",n=this.element_.style;n.left=Math.min(t[0],e[0])+i,n.top=Math.min(t[1],e[1])+i,n.width=Math.abs(e[0]-t[0])+i,n.height=Math.abs(e[1]-t[1])+i}setMap(t){if(this.map_){this.map_.getOverlayContainer().removeChild(this.element_);const t=this.element_.style;t.left="inherit",t.top="inherit",t.width="inherit",t.height="inherit"}this.map_=t,this.map_&&this.map_.getOverlayContainer().appendChild(this.element_)}setPixels(t,e){this.startPixel_=t,this.endPixel_=e,this.createOrUpdateGeometry(),this.render_()}createOrUpdateGeometry(){if(!this.map_)return;const t=this.startPixel_,e=this.endPixel_,i=[t,[t[0],e[1]],e,[e[0],t[1]]].map(this.map_.getCoordinateFromPixelInternal,this.map_);i[4]=i[0].slice(),this.geometry_?this.geometry_.setCoordinates([i]):this.geometry_=new mp([i])}getGeometry(){return this.geometry_}},BE="boxcancel";class zE extends Fd{constructor(t,e,i){super(t),this.coordinate=e,this.mapBrowserEvent=i}}const qE=class extends FE{constructor(t){super(),this.on,this.once,this.un,t=t??{},this.box_=new GE(t.className||"ol-dragbox"),this.minArea_=t.minArea??64,t.onBoxEnd&&(this.onBoxEnd=t.onBoxEnd),this.startPixel_=null,this.condition_=t.condition??PE,this.boxEndCondition_=t.boxEndCondition??this.defaultBoxEndCondition}defaultBoxEndCondition(t,e,i){const n=i[0]-e[0],s=i[1]-e[1];return n*n+s*s>=this.minArea_}getGeometry(){return this.box_.getGeometry()}handleDragEvent(t){this.startPixel_&&(this.box_.setPixels(this.startPixel_,t.pixel),this.dispatchEvent(new zE("boxdrag",t.coordinate,t)))}handleUpEvent(t){if(!this.startPixel_)return!1;const e=this.boxEndCondition_(t,this.startPixel_,t.pixel);return e&&this.onBoxEnd(t),this.dispatchEvent(new zE(e?"boxend":BE,t.coordinate,t)),this.box_.setMap(null),this.startPixel_=null,!1}handleDownEvent(t){return!!this.condition_(t)&&(this.startPixel_=t.pixel,this.box_.setMap(t.map),this.box_.setPixels(this.startPixel_,this.startPixel_),this.dispatchEvent(new zE("boxstart",t.coordinate,t)),!0)}onBoxEnd(t){}setActive(t){t||(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new zE(BE,this.startPixel_,null)),this.startPixel_=null)),super.setActive(t)}setMap(t){this.getMap()&&(this.box_.setMap(null),this.startPixel_&&(this.dispatchEvent(new zE(BE,this.startPixel_,null)),this.startPixel_=null)),super.setMap(t)}},UE=class extends qE{constructor(t){super({condition:(t=t||{}).condition?t.condition:NE,className:t.className||"ol-dragzoom",minArea:t.minArea}),this.duration_=void 0!==t.duration?t.duration:200,this.out_=void 0!==t.out&&t.out}onBoxEnd(t){const e=this.getMap().getView();let i=this.getGeometry();if(this.out_){const t=e.rotatedExtentForGeometry(i),n=e.getResolutionForExtentInternal(t),s=e.getResolution()/n;i=i.clone(),i.scale(s*s)}e.fitInternal(i,{duration:this.duration_,easing:xg})}},WE="ArrowLeft",VE="ArrowRight",HE="ArrowDown",KE=class extends SE{constructor(t){super(),t=t||{},this.defaultCondition_=function(t){return kE(t)&&IE(t)},this.condition_=void 0!==t.condition?t.condition:this.defaultCondition_,this.duration_=void 0!==t.duration?t.duration:100,this.pixelDelta_=void 0!==t.pixelDelta?t.pixelDelta:128}handleEvent(t){let e=!1;if(t.type==bd){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&(n==HE||n==WE||n==VE||"ArrowUp"==n)){const s=t.map.getView(),r=s.getResolution()*this.pixelDelta_;let o=0,a=0;n==HE?a=-r:n==WE?o=-r:n==VE?o=r:a=r;const h=[o,a];go(h,s.getRotation()),function(t,e,i){const n=t.getCenterInternal();if(n){const s=[n[0]+e[0],n[1]+e[1]];t.animateInternal({duration:void 0!==i?i:250,easing:Eg,center:t.getConstrainedCenter(s)})}}(s,h,this.duration_),i.preventDefault(),e=!0}}return!e}},$E=class extends SE{constructor(t){super(),t=t||{},this.condition_=t.condition?t.condition:function(t){return!function(t){const e=t.originalEvent;return Iu?e.metaKey:e.ctrlKey}(t)&&IE(t)},this.delta_=t.delta?t.delta:1,this.duration_=void 0!==t.duration?t.duration:100}handleEvent(t){let e=!1;if(t.type==bd||t.type==xd){const i=t.originalEvent,n=i.key;if(this.condition_(t)&&("+"===n||"-"===n)){const s=t.map,r="+"===n?this.delta_:-this.delta_;xE(s.getView(),r,void 0,this.duration_),i.preventDefault(),e=!0}}return!e}},XE=class extends SE{constructor(t){super(t=t||{}),this.totalDelta_=0,this.lastDelta_=0,this.maxDelta_=void 0!==t.maxDelta?t.maxDelta:1,this.duration_=void 0!==t.duration?t.duration:250,this.timeout_=void 0!==t.timeout?t.timeout:80,this.useAnchor_=void 0===t.useAnchor||t.useAnchor,this.constrainResolution_=void 0!==t.constrainResolution&&t.constrainResolution;const e=t.condition?t.condition:LE;this.condition_=t.onFocusOnly?AE(ME,e):e,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_,this.mode_=void 0,this.trackpadEventGap_=400,this.trackpadTimeoutId_,this.deltaPerZoom_=300,this.ctrlKeyPressed_=!1,this.ctrlKeyListenerKeys_=[]}setMap(t){if(this.ctrlKeyListenerKeys_.forEach(_d),this.ctrlKeyListenerKeys_.length=0,this.ctrlKeyPressed_=!1,super.setMap(t),t){const e=t.getOwnerDocument();this.ctrlKeyListenerKeys_.push(gd(e,"keydown",t=>{"Control"===t.key&&(this.ctrlKeyPressed_=!0)}),gd(e,"keyup",t=>{"Control"===t.key&&(this.ctrlKeyPressed_=!1)}))}}endInteraction_(){this.trackpadTimeoutId_=void 0;const t=this.getMap();if(!t)return;const e=t.getView(),i=this.lastDelta_?this.lastDelta_>0?1:-1:0;e.endInteraction(this.constrainResolution_||e.getConstrainResolution()?100:void 0,i,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null)}handleEvent(t){if(!this.condition_(t))return!0;if(t.type!==Ed)return!0;const e=t.map,i=t.originalEvent;i.preventDefault();const n=i.ctrlKey&&!this.ctrlKeyPressed_;i.ctrlKey||(this.ctrlKeyPressed_=!1),this.useAnchor_&&(this.lastAnchor_=t.pixel);let s=i.deltaY;switch(i.deltaMode){case WheelEvent.DOM_DELTA_LINE:s*=40;break;case WheelEvent.DOM_DELTA_PAGE:s*=300}if(0===s)return!1;this.lastDelta_=s;const r=Date.now();void 0===this.startTime_&&(this.startTime_=r),(!this.mode_||r-this.startTime_>this.trackpadEventGap_)&&(this.mode_=Math.abs(s)<4?"trackpad":"wheel");const o=e.getView();if("trackpad"===this.mode_)return this.trackpadTimeoutId_?clearTimeout(this.trackpadTimeoutId_):(o.getAnimating()&&o.cancelAnimations(),o.beginInteraction()),this.trackpadTimeoutId_=setTimeout(this.endInteraction_.bind(this),this.timeout_),n&&(s*=3),o.adjustZoom(-s/this.deltaPerZoom_,this.lastAnchor_?e.getCoordinateFromPixel(this.lastAnchor_):null),this.startTime_=r,!1;this.totalDelta_+=s;const a=Math.max(this.timeout_-(r-this.startTime_),0);return clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(this.handleWheelZoom_.bind(this,e),a),!1}handleWheelZoom_(t){const e=t.getView();e.getAnimating()&&e.cancelAnimations();let i=-io(this.totalDelta_,-this.maxDelta_*this.deltaPerZoom_,this.maxDelta_*this.deltaPerZoom_)/this.deltaPerZoom_;(e.getConstrainResolution()||this.constrainResolution_)&&(i=i?i>0?1:-1:0),xE(e,i,this.lastAnchor_?t.getCoordinateFromPixel(this.lastAnchor_):null,this.duration_),this.mode_=void 0,this.totalDelta_=0,this.lastAnchor_=null,this.startTime_=void 0,this.timeoutId_=void 0}setMouseAnchor(t){this.useAnchor_=t,t||(this.lastAnchor_=null)}},YE=class extends FE{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=Td),super(e),this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.threshold_=void 0!==t.threshold?t.threshold:.3,this.duration_=void 0!==t.duration?t.duration:250}handleDragEvent(t){let e=0;const i=this.targetPointers[0],n=this.targetPointers[1],s=Math.atan2(n.clientY-i.clientY,n.clientX-i.clientX);if(void 0!==this.lastAngle_){const t=s-this.lastAngle_;this.rotationDelta_+=t,!this.rotating_&&Math.abs(this.rotationDelta_)>this.threshold_&&(this.rotating_=!0),e=t}this.lastAngle_=s;const r=t.map,o=r.getView();o.getConstraints().rotation!==rm&&(this.anchor_=r.getCoordinateFromPixelInternal(r.getEventPixel(RE(this.targetPointers))),this.rotating_&&(r.render(),o.adjustRotationInternal(e,this.anchor_)))}handleUpEvent(t){return!(this.targetPointers.length<2)||(t.map.getView().endInteraction(this.duration_),!1)}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastAngle_=void 0,this.rotating_=!1,this.rotationDelta_=0,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}},ZE=class extends FE{constructor(t){const e=t=t||{};e.stopDown||(e.stopDown=Td),super(e),this.anchor_=null,this.duration_=void 0!==t.duration?t.duration:400,this.lastDistance_=void 0,this.lastScaleDelta_=1}handleDragEvent(t){let e=1;const i=this.targetPointers[0],n=this.targetPointers[1],s=i.clientX-n.clientX,r=i.clientY-n.clientY,o=Math.sqrt(s*s+r*r);void 0!==this.lastDistance_&&(e=this.lastDistance_/o),this.lastDistance_=o;const a=t.map,h=a.getView();1!=e&&(this.lastScaleDelta_=e),this.anchor_=a.getCoordinateFromPixelInternal(a.getEventPixel(RE(this.targetPointers))),a.render(),h.adjustResolutionInternal(e,this.anchor_)}handleUpEvent(t){if(this.targetPointers.length<2){const e=t.map.getView(),i=this.lastScaleDelta_>1?1:-1;return e.endInteraction(this.duration_,i),!1}return!0}handleDownEvent(t){if(this.targetPointers.length>=2){const e=t.map;return this.anchor_=null,this.lastDistance_=void 0,this.lastScaleDelta_=1,this.handlingDownUpSequence||e.getView().beginInteraction(),!0}return!1}};function JE(t){t=t||{};const e=new Op,i=new wE(-.005,.05,100);return(void 0===t.altShiftDragRotate||t.altShiftDragRotate)&&e.push(new jE),(void 0===t.doubleClickZoom||t.doubleClickZoom)&&e.push(new EE({delta:t.zoomDelta,duration:t.zoomDuration})),(void 0===t.dragPan||t.dragPan)&&e.push(new DE({onFocusOnly:t.onFocusOnly,kinetic:i})),(void 0===t.pinchRotate||t.pinchRotate)&&e.push(new YE),(void 0===t.pinchZoom||t.pinchZoom)&&e.push(new ZE({duration:t.zoomDuration})),(void 0===t.keyboard||t.keyboard)&&(e.push(new KE),e.push(new $E({delta:t.zoomDelta,duration:t.zoomDuration}))),(void 0===t.mouseWheelZoom||t.mouseWheelZoom)&&e.push(new XE({onFocusOnly:t.onFocusOnly,duration:t.zoomDuration})),(void 0===t.shiftDragZoom||t.shiftDragZoom)&&e.push(new UE({duration:t.zoomDuration})),e}function QE(t,e){Gd.expire()}const tA=class extends Ad{constructor(t){super(),this.map_=t}dispatchRenderEvent(t,e){cd()}calculateMatrices2D(t){const e=t.viewState,i=t.coordinateToPixelTransform,n=t.pixelToCoordinateTransform;ef(i,t.size[0]/2,t.size[1]/2,1/e.resolution,-1/e.resolution,-e.rotation,-e.center[0],-e.center[1]),nf(n,i)}forEachFeatureAtCoordinate(t,e,i,n,s,r,o,a){let h;const l=e.viewState;function c(t,e,i,n){return s.call(r,e,t?i:null,n)}const u=l.projection,d=mo(t.slice(),u),f=[[0,0]];if(u.canWrapX()&&n){const t=Yr(u.getExtent());f.push([-t,0],[t,0])}const p=e.layerStatesArray,g=p.length,m=[],_=[];for(let n=0;n<f.length;n++)for(let s=g-1;s>=0;--s){const r=p[s],u=r.layer;if(u.hasRenderer()&&um(r,l)&&o.call(a,u)){const s=u.getRenderer(),o=u.getSource();if(s&&o){const a=o.getWrapX()?d:t,l=c.bind(null,r.managed);_[0]=a[0]+f[n][0],_[1]=a[1]+f[n][1],h=s.forEachFeatureAtCoordinate(_,e,i,l,m)}if(h)return h}}if(0===m.length)return;const v=1/m.length;return m.forEach((t,e)=>t.distanceSq+=e*v),m.sort((t,e)=>t.distanceSq-e.distanceSq),m.some(t=>h=t.callback(t.feature,t.layer,t.geometry)),h}hasFeatureAtCoordinate(t,e,i,n,s,r){return void 0!==this.forEachFeatureAtCoordinate(t,e,i,n,Id,this,s,r)}getMap(){return this.map_}renderFrame(t){cd()}scheduleExpireIconCache(t){Gd.canExpireCache()&&t.postRenderFunctions.push(QE)}},eA=class extends tA{constructor(t){super(t),this.fontChangeListenerKey_=gd(km,Hd,t.redrawText,t),this.element_=Ou?qu():document.createElement("div");const e=this.element_.style;e.position="absolute",e.width="100%",e.height="100%",e.zIndex="0",this.element_.className=ym+" ol-layers";const i=t.getViewport();i&&i.insertBefore(this.element_,i.firstChild||null),this.children_=[],this.renderedVisible_=!0}dispatchRenderEvent(t,e){const i=this.getMap();if(i.hasListener(t)){const n=new Gg(t,void 0,e);i.dispatchEvent(n)}}disposeInternal(){_d(this.fontChangeListenerKey_),this.element_.remove(),super.disposeInternal()}renderFrame(t){if(!t)return void(this.renderedVisible_&&(this.element_.style.display="none",this.renderedVisible_=!1));this.calculateMatrices2D(t),this.dispatchRenderEvent(qg,t);const e=t.layerStatesArray.sort((t,e)=>t.zIndex-e.zIndex);e.some(t=>t.layer instanceof tw&&t.layer.getDeclutter())&&(t.declutter={});const i=t.viewState;this.children_.length=0;const n=this.getMap().getTargetElement();let s;Uu(n)&&(s=n.getContext("2d"),s.setTransform(1,0,0,1,0,0),s.clearRect(0,0,n.width,n.height));const r=[];let o=s?n:null;for(let n=0,s=e.length;n<s;++n){const s=e[n];t.layerIndex=n;const a=s.layer,h=a.getSourceState();if(!um(s,i)||"ready"!=h&&"undefined"!=h){a.unrender();continue}const l=a.render(t,o);l&&(l!==o&&(this.children_.push(l),o=l),r.push(s))}this.declutter(t,r),function(t,e){const i=t.childNodes;for(let n=0;;++n){const s=i[n],r=e[n];if(!s&&!r)break;s!==r&&(s?r?t.insertBefore(r,s):(t.removeChild(s),--n):t.appendChild(r))}}(this.element_,this.children_);for(const t of s?this.children_:[]){const e=t.firstElementChild||t,i=t.style.backgroundColor;if(i&&(!Uu(e)||e.width>0)&&(s.fillStyle=i,s.fillRect(0,0,s.canvas.width,s.canvas.height)),!Uu(e)||0===e.width)continue;s.save();const n=t.style.opacity||e.style.opacity;s.globalAlpha=""===n?1:Number(n);const r=e.style.transform;if(r)s.transform(...rf(r));else{const t=parseFloat(e.style.width)/e.width,i=parseFloat(e.style.height)/e.height;s.transform(t,0,0,i,0,0)}s.drawImage(e,0,0),s.restore()}this.dispatchRenderEvent("postcompose",t),this.renderedVisible_||(this.element_.style.display="",this.renderedVisible_=!0),this.scheduleExpireIconCache(t)}declutter(t,e){if(t.declutter){for(let i=e.length-1;i>=0;--i){const n=e[i],s=n.layer;s.getDeclutter()&&s.renderDeclutter(t,n)}e.forEach(e=>e.layer.renderDeferred(t))}}};function iA(t){t instanceof dm?t.setMapInternal(null):t instanceof Yp&&t.getLayers().forEach(iA)}function nA(t,e){if(t instanceof dm)t.setMapInternal(e);else if(t instanceof Yp){const i=t.getLayers().getArray();for(let t=0,n=i.length;t<n;++t)nA(i[t],e)}}const sA=class extends Yd{constructor(t){super(),t=t||{},this.on,this.once,this.un;const e=function(t){let e=null;void 0!==t.keyboardEventTarget&&(e="string"==typeof t.keyboardEventTarget?document.getElementById(t.keyboardEventTarget):t.keyboardEventTarget);const i={},n=t.layers&&"function"==typeof t.layers.getLayers?t.layers:new Yp({layers:t.layers});let s,r,o;return i[Zw]=n,i[Qw]=t.target,i[tb]=t.view instanceof cm?t.view:new cm,void 0!==t.controls&&(Array.isArray(t.controls)?s=new Op(t.controls.slice()):(Zd("function"==typeof t.controls.getArray,"Expected `controls` to be an array or an `ol/Collection.js`"),s=t.controls)),void 0!==t.interactions&&(Array.isArray(t.interactions)?r=new Op(t.interactions.slice()):(Zd("function"==typeof t.interactions.getArray,"Expected `interactions` to be an array or an `ol/Collection.js`"),r=t.interactions)),void 0!==t.overlays?Array.isArray(t.overlays)?o=new Op(t.overlays.slice()):(Zd("function"==typeof t.overlays.getArray,"Expected `overlays` to be an array or an `ol/Collection.js`"),o=t.overlays):o=new Op,{controls:s,interactions:r,keyboardEventTarget:e,overlays:o,values:i}}(t);this.renderComplete_=!1,this.loaded_=!0,this.boundHandleBrowserEvent_=this.handleBrowserEvent.bind(this),this.maxTilesLoading_=void 0!==t.maxTilesLoading?t.maxTilesLoading:16,this.pixelRatio_=void 0!==t.pixelRatio?t.pixelRatio:Tu,this.postRenderTimeoutHandle_,this.animationDelayKey_,this.animationDelay_=this.animationDelay_.bind(this),this.coordinateToPixelTransform_=Qd(),this.pixelToCoordinateTransform_=Qd(),this.frameIndex_=0,this.frameState_=null,this.previousExtent_=null,this.viewPropertyListenerKey_=null,this.viewChangeListenerKey_=null,this.layerGroupPropertyListenerKeys_=null,Ou||(this.viewport_=document.createElement("div"),this.viewport_.className="ol-viewport"+("ontouchstart"in window?" ol-touch":""),this.viewport_.style.position="relative",this.viewport_.style.overflow="hidden",this.viewport_.style.width="100%",this.viewport_.style.height="100%",this.overlayContainer_=document.createElement("div"),this.overlayContainer_.style.position="absolute",this.overlayContainer_.style.zIndex="0",this.overlayContainer_.style.width="100%",this.overlayContainer_.style.height="100%",this.overlayContainer_.style.pointerEvents="none",this.overlayContainer_.className="ol-overlaycontainer",this.viewport_.appendChild(this.overlayContainer_),this.overlayContainerStopEvent_=document.createElement("div"),this.overlayContainerStopEvent_.style.position="absolute",this.overlayContainerStopEvent_.style.zIndex="0",this.overlayContainerStopEvent_.style.width="100%",this.overlayContainerStopEvent_.style.height="100%",this.overlayContainerStopEvent_.style.pointerEvents="none",this.overlayContainerStopEvent_.className="ol-overlaycontainer-stopevent",this.viewport_.appendChild(this.overlayContainerStopEvent_)),this.mapBrowserEventHandler_=null,this.moveTolerance_=t.moveTolerance,this.keyboardEventTarget_=e.keyboardEventTarget,this.targetChangeHandlerKeys_=null,this.targetElement_=null,Ou||(this.resizeObserver_=new ResizeObserver(()=>this.updateSize())),this.controls=e.controls||(Ou?new Op:Hw()),this.interactions=e.interactions||(Ou?new Op:JE({onFocusOnly:!0})),this.overlays_=e.overlays,this.overlayIdIndex_={},this.renderer_=null,this.postRenderFunctions_=[],this.tileQueue_=new yE(this.getTilePriority.bind(this),this.handleTileChange_.bind(this)),this.addChangeListener(Zw,this.handleLayerGroupChanged_),this.addChangeListener(tb,this.handleViewChanged_),this.addChangeListener(Jw,this.handleSizeChanged_),this.addChangeListener(Qw,this.handleTargetChanged_),this.setProperties(e.values);const i=this;!t.view||t.view instanceof cm||t.view.then(function(t){i.setView(new cm(t))}),this.controls.addEventListener(kp,t=>{t.element.setMap(this)}),this.controls.addEventListener(Np,t=>{t.element.setMap(null)}),this.interactions.addEventListener(kp,t=>{t.element.setMap(this)}),this.interactions.addEventListener(Np,t=>{t.element.setMap(null)}),this.overlays_.addEventListener(kp,t=>{this.addOverlayInternal_(t.element)}),this.overlays_.addEventListener(Np,t=>{const e=t.element.getId();void 0!==e&&delete this.overlayIdIndex_[e.toString()],t.element.setMap(null)}),this.controls.forEach(t=>{t.setMap(this)}),this.interactions.forEach(t=>{t.setMap(this)}),this.overlays_.forEach(this.addOverlayInternal_.bind(this))}addControl(t){this.getControls().push(t)}addInteraction(t){this.getInteractions().push(t)}addLayer(t){this.getLayerGroup().getLayers().push(t)}handleLayerAdd_(t){nA(t.layer,this)}addOverlay(t){this.getOverlays().push(t)}addOverlayInternal_(t){const e=t.getId();void 0!==e&&(this.overlayIdIndex_[e.toString()]=t),t.setMap(this)}disposeInternal(){this.controls.clear(),this.interactions.clear(),this.overlays_.clear(),this.resizeObserver_?.disconnect(),this.setTarget(null),super.disposeInternal()}forEachFeatureAtPixel(t,e,i){if(!this.frameState_||!this.renderer_)return;const n=this.getCoordinateFromPixelInternal(t),s=void 0!==(i=void 0!==i?i:{}).hitTolerance?i.hitTolerance:0,r=void 0!==i.layerFilter?i.layerFilter:Id,o=!1!==i.checkWrapped;return this.renderer_.forEachFeatureAtCoordinate(n,this.frameState_,s,o,e,null,r,null)}getFeaturesAtPixel(t,e){const i=[];return this.forEachFeatureAtPixel(t,function(t){i.push(t)},e),i}getAllLayers(){const t=[];return function e(i){i.forEach(function(i){i instanceof Yp?e(i.getLayers()):t.push(i)})}(this.getLayers()),t}hasFeatureAtPixel(t,e){if(!this.frameState_||!this.renderer_)return!1;const i=this.getCoordinateFromPixelInternal(t),n=void 0!==(e=void 0!==e?e:{}).layerFilter?e.layerFilter:Id,s=void 0!==e.hitTolerance?e.hitTolerance:0,r=!1!==e.checkWrapped;return this.renderer_.hasFeatureAtCoordinate(i,this.frameState_,s,r,n,null)}getEventCoordinate(t){return this.getCoordinateFromPixel(this.getEventPixel(t))}getEventCoordinateInternal(t){return this.getCoordinateFromPixelInternal(this.getEventPixel(t))}getEventPixel(t){const e=this.viewport_.getBoundingClientRect(),i=this.getSize(),n=e.width/i[0],s=e.height/i[1],r="changedTouches"in t?t.changedTouches[0]:t;return[(r.clientX-e.left)/n,(r.clientY-e.top)/s]}getTarget(){return this.get(Qw)}getTargetElement(){return this.targetElement_}getCoordinateFromPixel(t){return Ca(this.getCoordinateFromPixelInternal(t),this.getView().getProjection())}getCoordinateFromPixelInternal(t){const e=this.frameState_;return e?tf(e.pixelToCoordinateTransform,t.slice()):null}getControls(){return this.controls}getOverlays(){return this.overlays_}getOverlayById(t){const e=this.overlayIdIndex_[t.toString()];return void 0!==e?e:null}getInteractions(){return this.interactions}getLayerGroup(){return this.get(Zw)}setLayers(t){const e=this.getLayerGroup();if(t instanceof Op)return void e.setLayers(t);const i=e.getLayers();i.clear(),i.extend(t)}getLayers(){return this.getLayerGroup().getLayers()}getLoadingOrNotReady(){const t=this.getLayerGroup().getLayerStatesArray();for(let e=0,i=t.length;e<i;++e){const i=t[e];if(!i.visible)continue;const n=i.layer.getRenderer();if(n&&!n.ready)return!0;const s=i.layer.getSource();if(s&&s.loading)return!0}return!1}getPixelFromCoordinate(t){const e=Ma(t,this.getView().getProjection());return this.getPixelFromCoordinateInternal(e)}getPixelFromCoordinateInternal(t){const e=this.frameState_;return e?tf(e.coordinateToPixelTransform,t.slice(0,2)):null}getPixelRatio(){return this.pixelRatio_}setPixelRatio(t){this.pixelRatio_!==t&&(this.pixelRatio_=t,this.render())}getRenderer(){return this.renderer_}getSize(){return this.get(Jw)}getView(){return this.get(tb)}getViewport(){return this.viewport_}getOverlayContainer(){return this.overlayContainer_}getOverlayContainerStopEvent(){return this.overlayContainerStopEvent_}getOwnerDocument(){const t=this.getTargetElement();return t?t.ownerDocument:document}getTilePriority(t,e,i,n){return function(t,e,i,n,s){if(!t||!(i in t.wantedTiles))return _E;if(!t.wantedTiles[i][e.getKey()])return _E;const r=t.viewState.center,o=n[0]-r[0],a=n[1]-r[1];return 65536*Math.log(s)+Math.sqrt(o*o+a*a)/s}(this.frameState_,t,e,i,n)}handleBrowserEvent(t,e){e=e||t.type;const i=new fE(e,this,t);this.handleMapBrowserEvent(i)}handleMapBrowserEvent(t){if(!this.frameState_)return;const e=t.originalEvent,i=e.type;if(i===gE||i===Ed||i===bd){const t=this.getOwnerDocument(),i=this.viewport_.getRootNode?this.viewport_.getRootNode():t,n=e.target,s=i instanceof ShadowRoot?i.host===n?i.host.ownerDocument:i:i===t?t.documentElement:i;if(this.overlayContainerStopEvent_.contains(n)||!s.contains(n))return}if(t.frameState=this.frameState_,!1!==this.dispatchEvent(t)){const e=this.getInteractions().getArray().slice();for(let i=e.length-1;i>=0;i--){const n=e[i];if(n.getMap()===this&&n.getActive()&&this.getTargetElement()&&(!n.handleEvent(t)||t.propagationStopped))break}}}handlePostRender(){const t=this.frameState_,e=this.tileQueue_;if(!e.isEmpty()){let i=this.maxTilesLoading_,n=i;const s=t?t.viewHints:void 0,r=!!s&&(s[0]||s[1]);if(r){const e=Date.now()-t.time>8;i=e?0:8,n=e?0:2}e.getTilesLoading()<i&&(r&&e.reprioritize(),e.loadMoreTiles(i,n))}t&&this.renderer_&&!t.animate&&(this.renderComplete_?(this.hasListener(Ug)&&this.renderer_.dispatchRenderEvent(Ug,t),!1===this.loaded_&&(this.loaded_=!0,this.dispatchEvent(new dE(zw,this,t)))):!0===this.loaded_&&(this.loaded_=!1,this.dispatchEvent(new dE(Bw,this,t))));const i=this.postRenderFunctions_;if(t)for(let e=0,n=i.length;e<n;++e)i[e](this,t);i.length=0}handleSizeChanged_(){this.getView()&&!this.getView().getAnimating()&&this.getView().resolveConstraints(0),this.render()}handleTargetChanged_(){if(this.mapBrowserEventHandler_){for(let t=0,e=this.targetChangeHandlerKeys_.length;t<e;++t)_d(this.targetChangeHandlerKeys_[t]);this.targetChangeHandlerKeys_=null,this.viewport_.removeEventListener(yd,this.boundHandleBrowserEvent_),this.viewport_.removeEventListener(Ed,this.boundHandleBrowserEvent_),this.mapBrowserEventHandler_.dispose(),this.mapBrowserEventHandler_=null,this.viewport_.remove()}if(this.targetElement_&&!Uu(this.targetElement_)){this.resizeObserver_?.unobserve(this.targetElement_);const t=this.targetElement_.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.unobserve(t.host),this.setSize(void 0)}const t=this.getTarget(),e="string"==typeof t?document.getElementById(t):t;if(this.targetElement_=e,e){if(Uu(e)||e.appendChild(this.viewport_),this.renderer_||(this.renderer_=new eA(this)),!Uu(e)){this.mapBrowserEventHandler_=new mE(this,this.moveTolerance_);for(const t in pE)this.mapBrowserEventHandler_.addEventListener(pE[t],this.handleMapBrowserEvent.bind(this));let t;if(this.viewport_.addEventListener(yd,this.boundHandleBrowserEvent_,!1),this.viewport_.addEventListener(Ed,this.boundHandleBrowserEvent_,!!Fu&&{passive:!1}),this.keyboardEventTarget_)t=this.keyboardEventTarget_;else{const i=e.getRootNode();t=i instanceof ShadowRoot?i.host:e}if(this.targetChangeHandlerKeys_=[gd(t,bd,this.handleBrowserEvent,this),gd(t,xd,this.handleBrowserEvent,this)],!Uu(e)){const t=e.getRootNode();t instanceof ShadowRoot&&this.resizeObserver_.observe(t.host),this.resizeObserver_?.observe(e)}}this.updateSize()}else this.renderer_&&(clearTimeout(this.postRenderTimeoutHandle_),this.postRenderTimeoutHandle_=void 0,this.postRenderFunctions_.length=0,this.renderer_.dispose(),this.renderer_=null),this.animationDelayKey_&&(cancelAnimationFrame(this.animationDelayKey_),this.animationDelayKey_=void 0)}handleTileChange_(){this.render()}handleViewPropertyChanged_(){this.render()}handleViewChanged_(){this.viewPropertyListenerKey_&&(_d(this.viewPropertyListenerKey_),this.viewPropertyListenerKey_=null),this.viewChangeListenerKey_&&(_d(this.viewChangeListenerKey_),this.viewChangeListenerKey_=null);const t=this.getView();t&&(this.updateViewportSize_(this.getSize()),this.viewPropertyListenerKey_=gd(t,Hd,this.handleViewPropertyChanged_,this),this.viewChangeListenerKey_=gd(t,vd,this.handleViewPropertyChanged_,this),t.resolve
2Constraints(0)),this.render()}handleLayerGroupChanged_(){this.layerGroupPropertyListenerKeys_&&(this.layerGroupPropertyListenerKeys_.forEach(_d),this.layerGroupPropertyListenerKeys_=null);const t=this.getLayerGroup();t&&(this.handleLayerAdd_(new Kp("addlayer",t)),this.layerGroupPropertyListenerKeys_=[gd(t,Hd,this.render,this),gd(t,vd,this.render,this),gd(t,"addlayer",this.handleLayerAdd_,this),gd(t,"removelayer",this.handleLayerRemove_,this)]),this.render()}isRendered(){return!!this.frameState_}animationDelay_(){this.animationDelayKey_=void 0,this.renderFrame_(Date.now())}renderSync(){this.animationDelayKey_&&cancelAnimationFrame(this.animationDelayKey_),this.animationDelay_()}redrawText(){if(!this.frameState_)return;const t=this.frameState_.layerStatesArray;for(let e=0,i=t.length;e<i;++e){const i=t[e].layer;i.hasRenderer()&&i.getRenderer().handleFontsChanged()}}render(){this.renderer_&&void 0===this.animationDelayKey_&&(this.animationDelayKey_=requestAnimationFrame(this.animationDelay_))}removeControl(t){return this.getControls().remove(t)}removeInteraction(t){return this.getInteractions().remove(t)}removeLayer(t){return this.getLayerGroup().getLayers().remove(t)}handleLayerRemove_(t){iA(t.layer)}removeOverlay(t){return this.getOverlays().remove(t)}renderFrame_(t){const e=this.getSize(),i=this.getView(),n=this.frameState_;let s=null;if(void 0!==e&&tg(e)&&i&&i.isDef()){const n=i.getHints(this.frameState_?this.frameState_.viewHints:void 0),r=i.getState();if(s={animate:!1,coordinateToPixelTransform:this.coordinateToPixelTransform_,declutter:null,extent:Ur(r.center,r.resolution,r.rotation,e),index:this.frameIndex_++,layerIndex:0,layerStatesArray:this.getLayerGroup().getLayerStatesArray(),pixelRatio:this.pixelRatio_,pixelToCoordinateTransform:this.pixelToCoordinateTransform_,postRenderFunctions:[],size:e,tileQueue:this.tileQueue_,time:t,usedTiles:{},viewState:r,viewHints:n,wantedTiles:{},mapId:dd(this),renderTargets:{}},r.nextCenter&&r.nextResolution){const t=isNaN(r.nextRotation)?r.rotation:r.nextRotation;s.nextExtent=Ur(r.nextCenter,r.nextResolution,t,e)}}this.frameState_=s,this.renderer_.renderFrame(s),s&&(s.animate&&this.render(),Array.prototype.push.apply(this.postRenderFunctions_,s.postRenderFunctions),n&&(!this.previousExtent_||!Jr(this.previousExtent_)&&!Ir(s.extent,this.previousExtent_))&&(this.dispatchEvent(new dE("movestart",this,n)),this.previousExtent_=Pr(this.previousExtent_)),this.previousExtent_&&!s.viewHints[0]&&!s.viewHints[1]&&!Ir(s.extent,this.previousExtent_)&&(this.dispatchEvent(new dE("moveend",this,s)),xr(s.extent,this.previousExtent_))),this.dispatchEvent(new dE(Gw,this,s)),this.renderComplete_=(this.hasListener(Bw)||this.hasListener(zw)||this.hasListener(Ug))&&!this.tileQueue_.getTilesLoading()&&!this.tileQueue_.getCount()&&!this.getLoadingOrNotReady(),this.postRenderTimeoutHandle_||(this.postRenderTimeoutHandle_=setTimeout(()=>{this.postRenderTimeoutHandle_=void 0,this.handlePostRender()},0))}setLayerGroup(t){const e=this.getLayerGroup();e&&this.handleLayerRemove_(new Kp("removelayer",e)),this.set(Zw,t)}setSize(t){this.set(Jw,t)}setTarget(t){this.set(Qw,t)}setView(t){if(!t||t instanceof cm)return void this.set(tb,t);this.set(tb,new cm);const e=this;t.then(function(t){e.setView(new cm(t))})}updateSize(){const t=this.getTargetElement();let e;if(t){let i,n;if(Uu(t)){const e=t.getContext("2d").getTransform();i=t.width/e.a,n=t.height/e.d}else{const e=getComputedStyle(t);i=t.offsetWidth-parseFloat(e.borderLeftWidth)-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)-parseFloat(e.borderRightWidth),n=t.offsetHeight-parseFloat(e.borderTopWidth)-parseFloat(e.paddingTop)-parseFloat(e.paddingBottom)-parseFloat(e.borderBottomWidth)}isNaN(i)||isNaN(n)||(e=[Math.max(0,i),Math.max(0,n)],!tg(e)&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)&&yr("No map visible because the map container's width or height are 0."))}const i=this.getSize();!e||i&&Nd(e,i)||(this.updateViewportSize_(e),this.setSize(e))}updateViewportSize_(t){const e=this.getView();e&&e.setViewportSize(t)}},rA={},oA=new ew({name:"highlight",source:new cw({features:new Op,useSpatialIndex:!1,wrapX:!1}),style:(t,e)=>{if(!rA[e]){const t=25*146.48/e;rA[e]=[new dg({fill:new Vd({color:"rgba(250,220,0,0.4)"}),stroke:new Jp({color:"rgba(255,210,0,1)",width:2}),image:new rg({fill:new Vd({color:"rgba(250,220,0,0.4)"}),stroke:new Jp({color:"rgba(255,210,0,1)",width:2}),points:4,radius:t,angle:Math.PI/4,crossOrigin:"anonymous"})})]}return rA[e]},updateWhileAnimating:!0,updateWhileInteracting:!0}),aA=(t={},e={})=>{const i={};return t.color&&(i.fill=new Vd({color:t.color})),e.color&&(i.stroke=new Jp({color:e.color,width:e.width||1})),new dg(i)},hA=(t="atlas",e=[Ow,Fw,Pw,kw,Dw,oE,cE,nE,oA])=>new sA({layers:e,renderer:"canvas",target:t,controls:Hw().extend([new Yw,new rb,new ob({label:"",extent:Au})]),interactions:JE({altShiftDragRotate:!1,pinchRotate:!1}),view:new cm({projection:Mu,center:[658e3,19e4],resolution:500,resolutions:Cu,padding:[20,20,20,20]})});var lA,cA;function uA(t){return"object"==typeof t&&"function"==typeof t.to}function dA(t){t.parentElement.removeChild(t)}function fA(t){return null!=t}function pA(t){t.preventDefault()}function gA(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}
2function mA(t,e,i){i>0&&(wA(t,e),setTimeout(function(){bA(t,e)},i))}function _A(t){return Math.max(Math.min(t,100),0)}function vA(t){return Array.isArray(t)?t:[t]}function yA(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function wA(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function bA(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function xA(t){var e=void 0!==window.pageXOffset,i="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:i?t.documentElement.scrollLeft:t.body.scrollLeft,y:e?window.pageYOffset:i?t.documentElement.scrollTop:t.body.scrollTop}}function SA(t,e){return 100/(e-t)}function EA(t,e,i){return 100*e/(t[i+1]-t[i])}function AA(t,e){for(var i=1;t>=e[i];)i+=1;return i}!function(t){t.Range="range",t.Steps="steps",t.Positions="positions",t.Count="count",t.Values="values"}(lA||(lA={})),function(t){t[t.None=-1]="None",t[t.NoValue=0]="NoValue",t[t.LargeValue=1]="LargeValue",t[t.SmallValue=2]="SmallValue"}(cA||(cA={}));var CA=function(){function t(t,e,i){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[i||!1],this.xNumSteps=[!1],this.snap=e;var s=[];for(Object.keys(t).forEach(function(e){s.push([vA(t[e]),e])}),s.sort(function(t,e){return t[0][0]-e[0][0]}),n=0;n<s.length;n++)this.handleEntryPoint(s[n][1],s[n][0]);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)this.handleStepPoint(n,this.xNumSteps[n])}return t.prototype.getDistance=function(t){for(var e=[],i=0;i<this.xNumSteps.length-1;i++)e[i]=EA(this.xVal,t,i);return e},t.prototype.getAbsoluteDistance=function(t,e,i){var n,s=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[s+1];)s++;else t===this.xPct[this.xPct.length-1]&&(s=this.xPct.length-2);i||t!==this.xPct[s+1]||s++,null===e&&(e=[]);var r=1,o=e[s],a=0,h=0,l=0,c=0;for(n=i?(t-this.xPct[s])/(this.xPct[s+1]-this.xPct[s]):(this.xPct[s+1]-t)/(this.xPct[s+1]-this.xPct[s]);o>0;)a=this.xPct[s+1+c]-this.xPct[s+c],e[s+c]*r+100-100*n>100?(h=a*n,r=(o-100*n)/e[s+c],n=1):(h=e[s+c]*a/100*r,r=0),i?(l-=h,this.xPct.length+c>=1&&c--):(l+=h,this.xPct.length-c>=1&&c++),o=e[s+c]*r;return t+l},t.prototype.toStepping=function(t){return function(t,e,i){if(i>=t.slice(-1)[0])return 100;var n=AA(i,t),s=t[n-1],r=t[n],o=e[n-1],a=e[n];return o+function(t,e){return EA(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}([s,r],i)/SA(o,a)}(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return function(t,e,i){if(i>=100)return t.slice(-1)[0];var n=AA(i,e),s=t[n-1],r=t[n],o=e[n-1];return function(t,e){return e*(t[1]-t[0])/100+t[0]}([s,r],(i-o)*SA(o,e[n]))}(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return function(t,e,i,n){if(100===n)return n;var s=AA(n,t),r=t[s-1],o=t[s];return i?n-r>(o-r)/2?o:r:e[s-1]?t[s-1]+function(t,e){return Math.round(t/e)*e}(n-t[s-1],e[s-1]):n}(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,i){var n=AA(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/i},t.prototype.getNearbySteps=function(t){var e=AA(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e],step:this.xNumSteps[e],highestStep:this.xHighestCompleteStep[e]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(yA);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){var i;if(!gA(i="min"===t?0:"max"===t?100:parseFloat(t))||!gA(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(i),this.xVal.push(e[0]);var n=Number(e[1]);i?this.xSteps.push(!isNaN(n)&&n):isNaN(n)||(this.xSteps[0]=n),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){if(e)if(this.xVal[t]!==this.xVal[t+1]){this.xSteps[t]=EA([this.xVal[t],this.xVal[t+1]],e,0)/SA(this.xPct[t],this.xPct[t+1]);var i=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],n=Math.ceil(Number(i.toFixed(3))-1),s=this.xVal[t]+this.xNumSteps[t]*n;this.xHighestCompleteStep[t]=s}else this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t]},t}(),MA={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},LA={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},PA=".__tooltips",kA=".__aria";function NA(t,e){if(!gA(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function IA(t,e){if(!gA(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function TA(t,e){if(!gA(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function OA(t,e){if(!gA(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function RA(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new CA(e,t.snap||!1,t.singleStep)}function FA(t,e){if(e=vA(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function DA(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function jA(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function GA(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function BA(t,e){var i,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(i=1;i<t.handles;i++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=e}t.connect=n}function zA(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invali
2d.")}}function qA(t,e){if(!gA(e))throw new Error("noUiSlider: 'margin' option must be numeric.");0!==e&&(t.margin=t.spectrum.getDistance(e))}function UA(t,e){if(!gA(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function WA(t,e){var i;if(!gA(e)&&!Array.isArray(e))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!gA(e[0])&&!gA(e[1]))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],i=0;i<t.spectrum.xNumSteps.length-1;i++)if(t.padding[0][i]<0||t.padding[1][i]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var n=e[0]+e[1],s=t.spectrum.xVal[0];if(n/(t.spectrum.xVal[t.spectrum.xVal.length-1]-s)>1)throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function VA(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function HA(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var i=e.indexOf("tap")>=0,n=e.indexOf("drag")>=0,s=e.indexOf("fixed")>=0,r=e.indexOf("snap")>=0,o=e.indexOf("hover")>=0,a=e.indexOf("unconstrained")>=0,h=e.indexOf("invert-connects")>=0,l=e.indexOf("drag-all")>=0,c=e.indexOf("smooth-steps")>=0;if(s){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");qA(t,t.start[1]-t.start[0])}if(h&&2!==t.handles)throw new Error("noUiSlider: 'invert-connects' behaviour must be used with 2 handles");if(a&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:i||r,drag:n,dragAll:l,smoothSteps:c,fixed:s,snap:r,hover:o,unconstrained:a,invertConnects:h}}function KA(t,e){if(!1!==e)if(!0===e||uA(e)){t.tooltips=[];for(var i=0;i<t.handles;i++)t.tooltips.push(e)}else{if((e=vA(e)).length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");e.forEach(function(t){if("boolean"!=typeof t&&!uA(t))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),t.tooltips=e}}function $A(t,e){if(e.length!==t.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");t.handleAttributes=e}function XA(t,e){if(!uA(e))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");t.ariaFormat=e}function YA(t,e){if(!function(t){return uA(t)&&"function"==typeof t.from}(e))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");t.format=e}function ZA(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");t.keyboardSupport=e}function JA(t,e){t.documentElement=e}function QA(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function tC(t,e){if("object"!=typeof e)throw new Error("noUiSlider: 'cssClasses' must be an object.");"string"==typeof t.cssPrefix?(t.cssClasses={},Object.keys(e).forEach(function(i){t.cssClasses[i]=t.cssPrefix+e[i]})):t.cssClasses=e}function eC(t){var e={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:MA,format:MA},i={step:{r:!1,t:NA},keyboardPageMultiplier:{r:!1,t:IA},keyboardMultiplier:{r:!1,t:TA},keyboardDefaultStep:{r:!1,t:OA},start:{r:!0,t:FA},connect:{r:!0,t:BA},direction:{r:!0,t:VA},snap:{r:!1,t:DA},animate:{r:!1,t:jA},animationDuration:{r:!1,t:GA},range:{r:!0,t:RA},orientation:{r:!1,t:zA},margin:{r:!1,t:qA},limit:{r:!1,t:UA},padding:{r:!1,t:WA},behaviour:{r:!0,t:HA},ariaFormat:{r:!1,t:XA},format:{r:!1,t:YA},tooltips:{r:!1,t:KA},keyboardSupport:{r:!0,t:ZA},documentElement:{r:!1,t:JA},cssPrefix:{r:!0,t:QA},cssClasses:{r:!0,t:tC},handleAttributes:{r:!1,t:$A}},n={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasse
2s:LA,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};t.format&&!t.ariaFormat&&(t.ariaFormat=t.format),Object.keys(i).forEach(function(s){if(fA(t[s])||void 0!==n[s])i[s].t(e,fA(t[s])?t[s]:n[s]);else if(i[s].r)throw new Error("noUiSlider: '"+s+"' is required.")}),e.pips=t.pips;var s=document.createElement("div"),r=void 0!==s.style.msTransform,o=void 0!==s.style.transform;return e.transformRule=o?"transform":r?"msTransform":"webkitTransform",e.style=[["left","top"],["right","bottom"]][e.dir][e.ort],e}function iC(t,e,i){var n,s,r,o,a,h,l,c=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},u=window.CSS&&CSS.supports&&CSS.supports("touch-action","none")&&function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}(),d=t,f=e.spectrum,p=[],g=[],m=[],_=0,v={},y=!1,w=t.ownerDocument,b=e.documentElement||w.documentElement,x=w.body,S="rtl"===w.dir||1===e.ort?0:100;function E(t,e){var i=w.createElement("div");return e&&wA(i,e),t.appendChild(i),i}function A(t,i){var n=E(t,e.cssClasses.origin),s=E(n,e.cssClasses.handle);if(E(s,e.cssClasses.touchArea),s.setAttribute("data-handle",String(i)),e.keyboardSupport&&(s.setAttribute("tabindex","0"),s.addEventListener("keydown",function(t){return function(t,i){if(L()||P(i))return!1;var n=["Left","Right"],s=["Down","Up"],r=["PageDown","PageUp"],o=["Home","End"];e.dir&&!e.ort?n.reverse():e.ort&&!e.dir&&(s.reverse(),r.reverse());var a,h=t.key.replace("Arrow",""),l=h===r[0],c=h===r[1],u=h===s[0]||h===n[0]||l,d=h===s[1]||h===n[1]||c,m=h===o[1];if(!(u||d||h===o[0]||m))return!0;if(t.preventDefault(),d||u){var _=u?0:1,v=st(i)[_];if(null===v)return!1;!1===v&&(v=f.getDefaultStep(g[i],u,e.keyboardDefaultStep)),v*=c||l?e.keyboardPageMultiplier:e.keyboardMultiplier,v=Math.max(v,1e-7),v*=u?-1:1,a=p[i]+v}else a=m?e.spectrum.xVal[e.spectrum.xVal.length-1]:e.spectrum.xVal[0];return Q(i,f.toStepping(a),!0,!0),K("slide",i),K("update",i),K("change",i),K("set",i),!1}(t,i)})),void 0!==e.handleAttributes){var r=e.handleAttributes[i];Object.keys(r).forEach(function(t){s.setAttribute(t,r[t])})}return s.setAttribute("role","slider"),s.setAttribute("aria-orientation",e.ort?"vertical":"horizontal"),0===i?wA(s,e.cssClasses.handleLower):i===e.handles-1&&wA(s,e.cssClasses.handleUpper),n.handle=s,n}function C(t,i){return!!i&&E(t,e.cssClasses.connect)}function M(t,i){return!(!e.tooltips||!e.tooltips[i])&&E(t.firstChild,e.cssClasses.tooltip)}function L(){return d.hasAttribute("disabled")}function P(t){return r[t].hasAttribute("disabled")}function k(){h&&(H("update"+PA),h.forEach(function(t){t&&dA(t)}),h=null)}function N(){k(),h=r.map(M),V("update"+PA,function(t,i,n){if(h&&e.tooltips&&!1!==h[i]){var s=t[i];!0!==e.tooltips[i]&&(s=e.tooltips[i].to(n[i])),h[i].innerHTML=s}})}function I(t,e){return t.map(function(t){return f.fromStepping(e?f.getStep(t):t)})}function T(){a&&(dA(a),a=null)}function O(t){T();var i=function(t){function e(t,e){return Number((t+e).toFixed(7))}var i,n=function(t){if(t.mode===lA.Range||t.mode===lA.Steps)return f.xVal;if(t.mode===lA.Count){if(t.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var e=t.values-1,i=100/e,n=[];e--;)n[e]=e*i;return n.push(100),I(n,t.stepped)}return t.mode===lA.Positions?I(t.values,t.stepped):t.mode===lA.Values?t.stepped?t.values.map(function(t){return f.fromStepping(f.getStep(f.toStepping(t)))}):t.values:[]}(t),s={},r=f.xVal[0],o=f.xVal[f.xVal.length-1],a=!1,h=!1,l=0;return i=n.slice().sort(function(t,e){return t-e}),n=i.filter(function(t){return!this[t]&&(this[t]=!0)},{}),n[0]!==r&&(n.unshift(r),a=!0),n[n.length-1]!==o&&(n.push(o),h=!0),n.forEach(function(i,r){var o,c,u,d,p,g,m,_,v,y,w=i,b=n[r+1],x=t.mode===lA.Steps;for(x&&(o=f.xNumSteps[r]),o||(o=b-w),void 0===b&&(b=w),o=Math.max(o,1e-7),c=w;c<=b;
2c=e(c,o)){for(_=(p=(d=f.toStepping(c))-l)/(t.density||1),y=p/(v=Math.round(_)),u=1;u<=v;u+=1)s[(g=l+u*y).toFixed(5)]=[f.fromStepping(g),0];m=n.indexOf(c)>-1?cA.LargeValue:x?cA.SmallValue:cA.NoValue,!r&&a&&c!==b&&(m=0),c===b&&h||(s[d.toFixed(5)]=[c,m]),l=d}}),s}(t),n=t.filter,s=t.format||{to:function(t){return String(Math.round(t))}};return a=d.appendChild(function(t,i,n){var s,r,o=w.createElement("div"),a=((s={})[cA.None]="",s[cA.NoValue]=e.cssClasses.valueNormal,s[cA.LargeValue]=e.cssClasses.valueLarge,s[cA.SmallValue]=e.cssClasses.valueSub,s),h=((r={})[cA.None]="",r[cA.NoValue]=e.cssClasses.markerNormal,r[cA.LargeValue]=e.cssClasses.markerLarge,r[cA.SmallValue]=e.cssClasses.markerSub,r),l=[e.cssClasses.valueHorizontal,e.cssClasses.valueVertical],c=[e.cssClasses.markerHorizontal,e.cssClasses.markerVertical];function u(t,i){var n=i===e.cssClasses.value,s=n?a:h;return i+" "+(n?l:c)[e.ort]+" "+s[t]}return wA(o,e.cssClasses.pips),wA(o,0===e.ort?e.cssClasses.pipsHorizontal:e.cssClasses.pipsVertical),Object.keys(t).forEach(function(s){!function(t,s,r){if((r=i?i(s,r):r)!==cA.None){var a=E(o,!1);a.className=u(r,e.cssClasses.marker),a.style[e.style]=t+"%",r>cA.NoValue&&((a=E(o,!1)).className=u(r,e.cssClasses.value),a.setAttribute("data-value",String(s)),a.style[e.style]=t+"%",a.innerHTML=String(n.to(s)))}}(s,t[s][0],t[s][1])}),o}(i,n,s))}function R(){var t=n.getBoundingClientRect(),i="offset"+["Width","Height"][e.ort];return 0===e.ort?t.width||n[i]:t.height||n[i]}function F(t,i,n,s){var r=function(r){var o,a,h=function(t,e,i){var n=0===t.type.indexOf("touch"),s=0===t.type.indexOf("mouse"),r=0===t.type.indexOf("pointer"),o=0,a=0;if(0===t.type.indexOf("MSPointer")&&(r=!0),"mousedown"===t.type&&!t.buttons&&!t.touches)return!1;if(n){var h=function(e){var n=e.target;return n===i||i.contains(n)||t.composed&&t.composedPath().shift()===i};if("touchstart"===t.type){var l=Array.prototype.filter.call(t.touches,h);if(l.length>1)return!1;o=l[0].pageX,a=l[0].pageY}else{var c=Array.prototype.find.call(t.changedTouches,h);if(!c)return!1;o=c.pageX,a=c.pageY}}return e=e||xA(w),(s||r)&&(o=t.clientX+e.x,a=t.clientY+e.y),t.pageOffset=e,t.points=[o,a],t.cursor=s||r,t}(r,s.pageOffset,s.target||i);return!!h&&!(L()&&!s.doNotReject)&&(o=d,a=e.cssClasses.tap,!((o.classList?o.classList.contains(a):new RegExp("\\b"+a+"\\b").test(o.className))&&!s.doNotReject)&&!(t===c.start&&void 0!==h.buttons&&h.buttons>1)&&(!s.hover||!h.buttons)&&(u||h.preventDefault(),h.calcPoint=h.points[e.ort],void n(h,s)))},o=[];return t.split(" ").forEach(function(t){i.addEventListener(t,r,!!u&&{passive:!0}),o.push([t,r])}),o}function D(t){var i,s,r,o,a,h,l=100*(t-(i=n,s=e.ort,r=i.getBoundingClientRect(),a=(o=i.ownerDocument).documentElement,h=xA(o),/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(h.x=0),s?r.top+h.y-a.clientTop:r.left+h.x-a.clientLeft))/R();return l=_A(l),e.dir?100-l:l}function j(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&B(t,e)}function G(t,i){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==i.buttonsProperty)return B(t,i);var n=(e.dir?-1:1)*(t.calcPoint-i.startCalcPoint);Y(n>0,100*n/i.baseSize,i.locations,i.handleNumbers,i.connect)}function B(t,i){i.handle&&(bA(i.handle,e.cssClasses.active),_-=1),i.listeners.forEach(function(t){b.removeEventListener(t[0],t[1])}),0===_&&(bA(d,e.cssClasses.drag),J(),t.cursor&&(x.style.cursor="",x.removeEventListener("selectstart",pA))),e.events.smoothSteps&&(i.handleNumbers.forEach(function(t){Q(t,g[t],!0,!0,!1,!1)}),i.handleNumbers.forEach(function(t){K("update",t)})),i.handleNumbers.forEach(function(t){K("change",t),K("set",t),K("end",t)})}function z(t,i){if(!i.handleNumbers.some(P)){var n;1===i.handleNumbers.length&&(n=r[i.handleNumbers[0]].children[0],_+=1,wA(n,e.cssClasses.active)),t.stopPropagation();var s=[],o=F(c.move,b,G,{target:t.target,handle:n,connect:i.connect,listeners:s,startCalcPoint:t.calcPoint,baseSize:R(),pageOffset:t.pageOffset,handleNumbers:i.handleNumbers,buttonsProperty:t.buttons,locations:g.slice()}),a=F(c.end,b,B,{target:t.target,handle:n,listeners:s,doNotReject:!0,handleNumbers:i.handleNumbers}),h=F("mouseout",b,j,{target:t.target,handle:n,listeners:s,doNotReject:!0,handleNumbers:i.handleNumbers});s.push.apply(s,o.concat(a,h)),t.cursor&&(x.style.cursor=getComputedStyle(t.target).cursor,r.length>
21&&wA(d,e.cssClasses.drag),x.addEventListener("selectstart",pA,!1)),i.handleNumbers.forEach(function(t){K("start",t)})}}function q(t){t.stopPropagation();var i=D(t.calcPoint),n=function(t){var e=100,i=!1;return r.forEach(function(n,s){if(!P(s)){var r=g[s],o=Math.abs(r-t);(o<e||o<=e&&t>r||100===o&&100===e)&&(i=s,e=o)}}),i}(i);!1!==n&&(e.events.snap||mA(d,e.cssClasses.tap,e.animationDuration),Q(n,i,!0,!0),J(),K("slide",n,!0),K("update",n,!0),e.events.snap?z(t,{handleNumbers:[n]}):(K("change",n,!0),K("set",n,!0)))}function U(t){var e=D(t.calcPoint),i=f.getStep(e),n=f.fromStepping(i);Object.keys(v).forEach(function(t){"hover"===t.split(".")[0]&&v[t].forEach(function(t){t.call(ot,n)})})}function W(t){t.fixed||r.forEach(function(t,e){F(c.start,t.children[0],z,{handleNumbers:[e]})}),t.tap&&F(c.start,n,q,{}),t.hover&&F(c.move,n,U,{hover:!0}),t.drag&&o.forEach(function(i,n){if(!1!==i&&0!==n&&n!==o.length-1){var s=r[n-1],a=r[n],h=[i],l=[s,a],u=[n-1,n];wA(i,e.cssClasses.draggable),t.fixed&&(h.push(s.children[0]),h.push(a.children[0])),t.dragAll&&(l=r,u=m),h.forEach(function(t){F(c.start,t,z,{handles:l,handleNumbers:u,connect:i})})}})}function V(t,e){v[t]=v[t]||[],v[t].push(e),"update"===t.split(".")[0]&&r.forEach(function(t,e){K("update",e)})}function H(t){var e=t&&t.split(".")[0],i=e?t.substring(e.length):t;Object.keys(v).forEach(function(t){var n=t.split(".")[0],s=t.substring(n.length);e&&e!==n||i&&i!==s||function(t){return t===kA||t===PA}(s)&&i!==s||delete v[t]})}function K(t,i,n){Object.keys(v).forEach(function(s){var r=s.split(".")[0];t===r&&v[s].forEach(function(t){t.call(ot,p.map(e.format.to),i,p.slice(),n||!1,g.slice(),ot)})})}function $(t,i,n,s,o,a,h){var l;return r.length>1&&!e.events.unconstrained&&(s&&i>0&&(l=f.getAbsoluteDistance(t[i-1],e.margin,!1),n=Math.max(n,l)),o&&i<r.length-1&&(l=f.getAbsoluteDistance(t[i+1],e.margin,!0),n=Math.min(n,l))),r.length>1&&e.limit&&(s&&i>0&&(l=f.getAbsoluteDistance(t[i-1],e.limit,!1),n=Math.min(n,l)),o&&i<r.length-1&&(l=f.getAbsoluteDistance(t[i+1],e.limit,!0),n=Math.max(n,l))),e.padding&&(0===i&&(l=f.getAbsoluteDistance(0,e.padding[0],!1),n=Math.max(n,l)),i===r.length-1&&(l=f.getAbsoluteDistance(100,e.padding[1],!0),n=Math.min(n,l))),h||(n=f.getStep(n)),!((n=_A(n))===t[i]&&!a)&&n}function X(t,i){var n=e.ort;return(n?i:t)+", "+(n?t:i)}function Y(t,i,n,s,r){var o=n.slice(),a=s[0],h=e.events.smoothSteps,l=[!t,t],c=[t,!t];s=s.slice(),t&&s.reverse(),s.length>1?s.forEach(function(t,e){var n=$(o,t,o[t]+i,l[e],c[e],!1,h);!1===n?i=0:(i=n-o[t],o[t]=n)}):l=c=[!0];var u=!1;s.forEach(function(t,e){u=Q(t,n[t]+i,l[e],c[e],!1,h)||u}),u&&(s.forEach(function(t){K("update",t),K("slide",t)}),null!=r&&K("drag",a))}function Z(t,i){return e.dir?100-t-i:t}function J(){m.forEach(function(t){var e=g[t]>50?-1:1,i=3+(r.length+e*t);r[t].style.zIndex=String(i)})}function Q(t,i,n,s,o,a){return o||(i=$(g,t,i,n,s,!1,a)),!1!==i&&(function(t,i){g[t]=i,p[t]=f.fromStepping(i);var n="translate("+X(Z(i,0)-S+"%","0")+")";if(r[t].style[e.transformRule]=n,e.events.invertConnects&&g.length>1){var s=g.every(function(t,e,i){return 0===e||t>=i[e-1]});if(y!==!s)return y=!y,BA(e,e.connect.map(function(t){return!t})),void rt()}tt(t),tt(t+1),y&&(tt(t-1),tt(t+2))}(t,i),!0)}function tt(t){if(o[t]){var i=g.slice();y&&i.sort(function(t,e){return t-e});var n=0,s=100;0!==t&&(n=i[t-1]),t!==o.length-1&&(s=i[t]);var r=s-n,a="translate("+X(Z(n,r)+"%","0")+")",h="scale("+X(r/100,"1")+")";o[t].style[e.transformRule]=a+" "+h}}function et(t,i){return null===t||!1===t||void 0===t?g[i]:("number"==typeof t&&(t=String(t)),!1!==(t=e.format.from(t))&&(t=f.toStepping(t)),!1===t||isNaN(t)?g[i]:t)}function it(t,i,n){var s=vA(t),r=void 0===g[0];i=void 0===i||i,e.animate&&!r&&mA(d,e.cssClasses.tap,e.animationDuration),m.forEach(function(t){Q(t,et(s[t],t),!0,!1,n)});var o=1===m.length?0:1;if(r&&f.hasNoSize()&&(n=!0,g[0]=0,m.length>1)){var a=100/(m.length-1);m.forEach(function(t){g[t]=t*a})}for(;o<m.length;++o)m.forEach(function(t){Q(t,g[t],!0,!0,n)});J(),m.forEach(function(t){K("update",t),null!==s[t]&&i&&K("set",t)})}function nt(t){if(void 0===t&&(t=!1),t)return 1===p.length?p[0]:p.slice(0);var i=p.map(e.format.to);return 1===i.length?i[0]:i}function st(t){var i=g[t],n=f.getNearbySteps(i),s=p[t],r=n.thisStep.step,o=null;if(e.snap)return[s-n.stepBefore.startValue||null,n.stepAfter.startValue-s||null];!1!==r&&s+r>n.stepAfter.startValue&&(r=n.stepAfter.startValue-s),o=s>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&s-n.stepBefore.highestStep,100===i?r=null:0===i&&(o=null);var a=f.countStepDecimals();return null!==r&&!1!==r&&(r=Number(r.toFixed(a))),null!==o&&!1!==o&&(o=Number(o.toFixed(a))),[o,r]}function rt(){for(;s.firstChild;)s.removeChild(s.firstChild);for(var t=0;t<=e.handles;t++)o[t]=C(s,e.connect[t]),tt(t);W({drag:e.events.drag,fixed:!0})}
2wA(l=d,e.cssClasses.target),0===e.dir?wA(l,e.cssClasses.ltr):wA(l,e.cssClasses.rtl),0===e.ort?wA(l,e.cssClasses.horizontal):wA(l,e.cssClasses.vertical),wA(l,"rtl"===getComputedStyle(l).direction?e.cssClasses.textDirectionRtl:e.cssClasses.textDirectionLtr),n=E(l,e.cssClasses.base),function(t,i){s=E(i,e.cssClasses.connects),r=[],(o=[]).push(C(s,t[0]));for(var n=0;n<e.handles;n++)r.push(A(i,n)),m[n]=n,o.push(C(s,t[n+1]))}(e.connect,n),W(e.events),it(e.start),e.pips&&O(e.pips),e.tooltips&&N(),H("update"+kA),V("update"+kA,function(t,i,n,s,o){m.forEach(function(t){var i=r[t],s=$(g,t,0,!0,!0,!0),a=$(g,t,100,!0,!0,!0),h=o[t],l=String(e.ariaFormat.to(n[t]));s=f.fromStepping(s).toFixed(1),a=f.fromStepping(a).toFixed(1),h=f.fromStepping(h).toFixed(1),i.children[0].setAttribute("aria-valuemin",s),i.children[0].setAttribute("aria-valuemax",a),i.children[0].setAttribute("aria-valuenow",h),i.children[0].setAttribute("aria-valuetext",l)})});var ot={destroy:function(){for(H(kA),H(PA),Object.keys(e.cssClasses).forEach(function(t){bA(d,e.cssClasses[t])});d.firstChild;)d.removeChild(d.firstChild);delete d.noUiSlider},steps:function(){return m.map(st)},on:V,off:H,get:nt,set:it,setHandle:function(t,e,i,n){if(!((t=Number(t))>=0&&t<m.length))throw new Error("noUiSlider: invalid handle number, got: "+t);Q(t,et(e,t),!0,!0,n),K("update",t),i&&K("set",t)},reset:function(t){it(e.start,t)},disable:function(t){null!=t?(r[t].setAttribute("disabled",""),r[t].handle.removeAttribute("tabindex")):(d.setAttribute("disabled",""),r.forEach(function(t){t.handle.removeAttribute("tabindex")}))},enable:function(t){null!=t?(r[t].removeAttribute("disabled"),r[t].handle.setAttribute("tabindex","0")):(d.removeAttribute("disabled"),r.forEach(function(t){t.removeAttribute("disabled"),t.handle.setAttribute("tabindex","0")}))},__moveHandles:function(t,e,i){Y(t,e,g,i)},options:i,updateOptions:function(t,n){var s=nt(),r=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips","connect"];r.forEach(function(e){void 0!==t[e]&&(i[e]=t[e])});var o=eC(i);r.forEach(function(i){void 0!==t[i]&&(e[i]=o[i])}),f=o.spectrum,e.margin=o.margin,e.limit=o.limit,e.padding=o.padding,e.pips?O(e.pips):T(),e.tooltips?N():k(),g=[],it(fA(t.start)?t.start:s,n),t.connect&&rt()},target:d,removePips:T,removeTooltips:k,getPositions:function(){return g.slice()},getTooltips:function(){return h},getOrigins:function(){return r},pips:O};return ot}const nC=function(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");var i=iC(t,eC(e),e);return t.noUiSlider=i,i},sC=document.getElementById("yearslider"),rC=document.getElementById("countslider"),oC=document.getElementById("opacityslider"),aC=t=>{(()=>{if(!sC)return;sC.noUiSlider&&sC.noUiSlider.destroy();const t=sC.getAttribute("data-label")||"Year";nC(sC,{start:[2016],range:{min:1930,max:(new Date).getFullYear()},step:1,connect:"lower",behaviour:"snap",handleAttributes:[{"aria-label":t}],tooltips:{to:function(e){return t+": "+e}},format:{from:function(t){return parseInt(t)},to:function(t){return parseInt(t)}}});var e=sC.noUiSlider.getTooltips()[0];sC.noUiSlider.on("update",(t,i,n,s,r)=>{const o=t[i];fb=o,cE.getSource().dispatchEvent("change");const a=sC.offsetWidth,h=e.offsetWidth,l=a*r[i]/100,c=a-l,u=h/2;e.style.left=l<u?u-l+8+"px":c<u?c-u+8+"px":""})})(),(()=>{if(!rC)return;rC.noUiSlider&&rC.noUiSlider.destroy();const t=rC.getAttribute("data-label")||"Count";nC(rC,{start:[Math.log10(10)],range:{min:0,max:4},step:.01,connect:"lower",behaviour:"snap",handleAttributes:[{"aria-label":t}],tooltips:{to:function(e){return t+": "+Math.round(Math.pow(10,e))}},format:{from:function(t){return parseFloat(t)},to:function(t){return Math.round(Math.pow(10,t))}}});var e=rC.noUiSlider.getTooltips()[0];rC.noUiSlider.on("update",(t,i,n,s,r)=>{const o=rC.noUiSlider.get();pb=o,cE.getSource().dispatchEvent("change");const a=rC.offsetWidth,h=e.offsetWidth,l=r[i]/100*a,c=a-l,u=h/2;e.style.left=l<u?u-l+8+"px":c<u?c-u+8+"px":""})})(),(t=>{oC&&(oC.noUiSlider&&oC.noUiSlider.destroy(),nC(oC,{start:[1],range:{min:0,max:1},step:.01,connect:"lower",behaviour:"snap",tooltips:{to:function(t){return Math.round(100*t)+"%"}}}),oC.noUiSlider.on("slide",(e,i)=>{const n=parseFloat(e[i]);t&&uC(t,n)}))})(t)},hC=()=>{sC&&rC&&("count"===xb()?(sC.style.display="none",rC.style.display=""):(sC.style.display="",rC.style.display="none"))}
vendor: 8,876 bytes, line 2
2,lC=["simple","relief","pktlm3d","pkcolor"],cC=()=>{const t=document.getElementById("atlasSymbolisationClassic"),e=document.getElementById("atlasSymbolisationWSOriginal");t&&e&&(27==bb()?(t.style.display="none",e.style.display=""):(t.style.display="",e.style.display="none"))},uC=(t,e)=>{const i=(t=>t.getLayers().getArray().find(t=>{const e=t.get("name");return lC.includes(e)&&t.getVisible()})||null)(t);i&&i.setOpacity(e)},dC=(t,e)=>{t.getLayers().forEach(t=>{const i=t.get("name");lC.includes(i)&&(i===e?(t.setVisible(!0),oC.noUiSlider.set(t.getOpacity())):t.setVisible(!1))})};var fC=i(774),pC=Uint8Array,gC=Uint16Array,mC=Int32Array,_C=new pC([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),vC=new pC([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),yC=new pC([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wC=function(t,e){for(var i=new gC(31),n=0;n<31;++n)i[n]=e+=1<<t[n-1];var s=new mC(i[30]);for(n=1;n<30;++n)for(var r=i[n];r<i[n+1];++r)s[r]=r-i[n]<<5|n;return{b:i,r:s}},bC=wC(_C,2),xC=bC.b,SC=bC.r;xC[28]=258,SC[258]=28;for(var EC=wC(vC,0),AC=(EC.b,EC.r),CC=new gC(32768),MC=0;MC<32768;++MC){var LC=(43690&MC)>>1|(21845&MC)<<1;LC=(61680&(LC=(52428&LC)>>2|(13107&LC)<<2))>>4|(3855&LC)<<4,CC[MC]=((65280&LC)>>8|(255&LC)<<8)>>1}var PC=function(t,e,i){for(var n=t.length,s=0,r=new gC(e);s<n;++s)t[s]&&++r[t[s]-1];var o,a=new gC(e);for(s=1;s<e;++s)a[s]=a[s-1]+r[s-1]<<1;if(i){o=new gC(1<<e);var h=15-e;for(s=0;s<n;++s)if(t[s])for(var l=s<<4|t[s],c=e-t[s],u=a[t[s]-1]++<<c,d=u|(1<<c)-1;u<=d;++u)o[CC[u]>>h]=l}else for(o=new gC(n),s=0;s<n;++s)t[s]&&(o[s]=CC[a[t[s]-1]++]>>15-t[s]);return o},kC=new pC(288);for(MC=0;MC<144;++MC)kC[MC]=8;for(MC=144;MC<256;++MC)kC[MC]=9;for(MC=256;MC<280;++MC)kC[MC]=7;for(MC=280;MC<288;++MC)kC[MC]=8;var NC=new pC(32);for(MC=0;MC<32;++MC)NC[MC]=5;var IC=PC(kC,9,0),TC=PC(NC,5,0),OC=function(t){return(t+7)/8|0},RC=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>8},FC=function(t,e,i){i<<=7&e;var n=e/8|0;t[n]|=i,t[n+1]|=i>>8,t[n+2]|=i>>16},DC=function(t,e){for(var i=[],n=0;n<t.length;++n)t[n]&&i.push({s:n,f:t[n]});var s=i.length,r=i.slice();if(!s)return{t:WC,l:0};if(1==s){var o=new pC(i[0].s+1);return o[i[0].s]=1,{t:o,l:1}}i.sort(function(t,e){return t.f-e.f}),i.push({s:-1,f:25001});var a=i[0],h=i[1],l=0,c=1,u=2;for(i[0]={s:-1,f:a.f+h.f,l:a,r:h};c!=s-1;)a=i[i[l].f<i[u].f?l++:u++],h=i[l!=c&&i[l].f<i[u].f?l++:u++],i[c++]={s:-1,f:a.f+h.f,l:a,r:h};var d=r[0].s;for(n=1;n<s;++n)r[n].s>d&&(d=r[n].s);var f=new gC(d+1),p=jC(i[c-1],f,0);if(p>e){n=0;var g=0,m=p-e,_=1<<m;for(r.sort(function(t,e){return f[e.s]-f[t.s]||t.f-e.f});n<s;++n){var v=r[n].s;if(!(f[v]>e))break;g+=_-(1<<p-f[v]),f[v]=e}for(g>>=m;g>0;){var y=r[n].s;f[y]<e?g-=1<<e-f[y]++-1:++n}for(;n>=0&&g;--n){var w=r[n].s;f[w]==e&&(--f[w],++g)}p=e}return{t:new pC(f),l:p}},jC=function(t,e,i){return-1==t.s?Math.max(jC(t.l,e,i+1),jC(t.r,e,i+1)):e[t.s]=i},GC=function(t){for(var e=t.length;e&&!t[--e];);for(var i=new gC(++e),n=0,s=t[0],r=1,o=function(t){i[n++]=t},a=1;a<=e;++a)if(t[a]==s&&a!=e)++r;else{if(!s&&r>2){for(;r>138;r-=138)o(32754);r>2&&(o(r>10?r-11<<5|28690:r-3<<5|12305),r=0)}else if(r>3){for(o(s),--r;r>6;r-=6)o(8304);r>2&&(o(r-3<<5|8208),r=0)}for(;r--;)o(s);r=1,s=t[a]}return{c:i.subarray(0,n),n:e}},BC=function(t,e){for(var i=0,n=0;n<e.length;++n)i+=t[n]*e[n];return i},zC=function(t,e,i){var n=i.length,s=OC(e+2);t[s]=255&n,t[s+1]=n>>8,t[s+2]=255^t[s],t[s+3]=255^t[s+1];for(var r=0;r<n;++r)t[s+r+4]=i[r];return 8*(s+4+n)},qC=function(t,e,i,n,s,r,o,a,h,l,c){RC(e,c++,i),++s[256];for(var u=DC(s,15),d=u.t,f=u.l,p=DC(r,15),g=p.t,m=p.l,_=GC(d),v=_.c,y=_.n,w=GC(g),b=w.c,x=w.n,S=new gC(19),E=0;E<v.length;++E)++S[31&v[E]];for(E=0;E<b.length;++E)++S[31&b[E]];for(var A=DC(S,7),C=A.t,M=A.l,L=19;L>4&&!C[yC[L-1]];--L);var P,k,N,I,T=l+5<<3,O=BC(s,kC)+BC(r,NC)+o,R=BC(s,d)+BC(r,g)+o+14+3*L+BC(S,C)+2*S[16]+3*S[17]+7*S[18];if(h>=0&&T<=O&&T<=R)return zC(e,c,t.subarray(h,h+l));if(RC(e,c,1+(R<O)),c+=2,R<O){P=PC(d,f,0),k=d,N=PC(g,m,0),I=g;var F=PC(C,M,0);for(RC(e,c,y-257),RC(e,c+5,x-1),RC(e,c+10,L-4),c+=14,E=0;E<L;++E)RC(e,c+3*E,C[yC[E]]);c+=3*L;for(var D=[v,b],j=0;j<2;++j){var G=D[j];for(E=0;E<G.length;++E){var B=31&G[E];RC(e,c,F[B]),c+=C[B],B>15&&(RC(e,c,G[E]>>5&127),c+=G[E]>>12)}}}else P=IC,k=kC,N=TC,I=NC;for(E=0;E<a;++E){var z=n[E];if(z>255){FC(e,c,P[257+(B=z>>18&31)]),c+=k[B+257],B>7&&(RC(e,c,z>>23&31),c+=_C[B]);var q=31&z;FC(e,c,N[q]),c+=I[q],q>3&&(FC(e,c,z>>5&8191),c+=vC[q])}else FC(e,c,P[z]),c+=k[z]}return FC(e,c,P[256]),c+k[256]},UC=new mC([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),WC=new pC(0),VC=function(t,e,i,n,s,r){var o=r.z||t.length,a=new pC(n+o+5*(1+Math.ceil(o/7e3))+s),h=a.subarray(n,a.length-s),l=r.l,c=7&(r.r||0);if(e){c&&(h[0]=r.r>>3);for(var u=UC[e-1],d=u>>13,f=8191&u,p=(1<<i)-1,g=r.p||new gC(32768),m=r.h||new gC(p+1),_=Math.ceil(i/3),v=2*_,y=function(e){return(t[e]^t[e+1]<<_^t[e+2]<<v)&p},w=new mC(25e3),b=new gC(288),x=new gC(32),S=0,E=0,A=r.i||0,C=0,M=r.w||0,L=0;A+2<o;++A){var P=y(A),k=32767&A,N=m[P];if(g[k]=N,m[P]=k,M<=A){var I=o-A;if((S>7e3||C>24576)&&(I>423||!l)){c=qC(t,h,0,w,b,x,E,C,L,A-L,c),C=S=E=0,L=A;for(var T=0;T<286;++T)b[T]=0;for(T=0;T<30;++T)x[T]=0}var O=2,R=0,F=f,D=k-N&32767;if(I>2&&P==y(A-D))for(var j=Math.min(d,I)-1,G=Math.min(32767,A),B=Math.min(258,I);D<=G&&--F&&k!=N;){if(t[A+O]==t[A+O-D]){for(var z=0;z<B&&t[A+z]==t[A+z-D];++z);if(z>O){if(O=z,R=D,z>j)break;var q=Math.min(D,z-2),U=0;for(T=0;T<q;++T){var W=A-D+T&32767,V=W-g[W]&32767;V>U&&(U=V,N=W)}}}D+=(k=N)-(N=g[k])&32767}if(R){w[C++]=268435456|SC[O]<<18|AC[R];var H=31&SC[O],K=31&AC[R];E+=_C[H]+vC[K],++b[257+H],++x[K],M=A+O,++S}else w[C++]=t[A],++b[t[A]]}}for(A=Math.max(A,M);A<o;++A)w[C++]=t[A],++b[t[A]];c=qC(t,h,l,w,b,x,E,C,L,A-L,c),l||(r.r=7&c|h[c/8|0]<<3,c-=7,r.h=m,r.p=g,r.i=A,r.w=M)}else{for(A=r.w||0;A<o+l;A+=65535){var $=A+65535;$>=o&&(h[c/8|0]=l,$=o),c=zC(h,c+1,t.subarray(A,$))}r.i=o}return function(t,e,i){return(null==e||e<0)&&(e=0),(null==i||i>t.length)&&(i=t.length),new pC(t.subarray(e,i))}(a,0,n+OC(c)+s)},HC=function(){var t=1,e=0;return{p:function(i){for(var n=t,s=e,r=0|i.length,o=0;o!=r;){for(var a=Math.min(o+2655,r);o<a;++o)s+=n+=i[o];n=(65535&n)+15*(n>>16),s=(65535&s)+15*(s>>16)}t=n,e=s},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(e%=65521))<<8|e>>8}}},KC=function(t,e,i){for(;i;++e)t[e]=i,i>>>=8};function $C(t,e){e||(e={});var i=HC();i.p(t);var n=function(t,e,i,n,s){if(!s&&(s={l:1},e.dictionary)){var r=e.dictionary.subarray(-32768),o=new pC(r.length+t.length);o.set(r),o.set(t,r.length),t=o,s.w=r.length}return VC(t,null==e.level?6:e.level,null==e.mem?s.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):20:12+e.mem,i,n,s)}(t,e,e.dictionary?6:2,4);return function(t,e){var i=e.level,n=0==i?0:i<6?1:9==i?3:2;if(t[0]=120,t[1]=n<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var s=HC();s.p(e.dictionary),KC(t,2,s.d())}}(n,e),KC(n,n.length-4,i.d()),n}var XC="undefined"!=typeof TextDecoder&&new TextDecoder;try{XC.decode(WC,{stream:!0})}catch(bI){}function YC(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=Array(e);i<e;i++)n[i]=t[i];return n}function ZC(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,s,r,o,a=[],h=!0,l=!1;try{if(r=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;h=!1}else for(;!(h=(n=r.call(i)).done)&&(a.push(n.value),a.length!==e);h=!0);}catch(t){l=!0,s=t}finally{try{if(!h&&null!=i.return&&(o=i.return(),Object(o)!==o))return}finally{if(l)throw s}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return YC(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?YC(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function JC(t,e="utf8"){return new TextDecoder(e).decode(t)}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;const QC=new TextEncoder,tM=(()=>{const t=new Uint8Array(4);return!((new Uint32Array(t.buffer)[0]=1)&t[0])})(),eM={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class iM{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=8192,e={}){let i=!1;"number"==typeof t?t=new ArrayBuffer(t):(i=!0,this.lastWrittenByte=t.byteLength);const n=e.offset?e.offset>>>0:0,s=t.byteLength-n;let r=n;
vendor: 10,082 bytes, line 2
2(ArrayBuffer.isView(t)||t instanceof iM)&&(t.byteLength!==t.buffer.byteLength&&(r=t.byteOffset+n),t=t.buffer),this.lastWrittenByte=i?s:0,this.buffer=t,this.length=s,this.byteLength=s,this.byteOffset=r,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,r,s),this._mark=0,this._marks=[]}available(t=1){return this.offset+t<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(t=1){return this.offset+=t,this}back(t=1){return this.offset-=t,this}seek(t){return this.offset=t,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const t=this._marks.pop();if(void 0===t)throw new Error("Mark stack empty");return this.seek(t),this}rewind(){return this.offset=0,this}ensureAvailable(t=1){if(!this.available(t)){const e=2*(this.offset+t),i=new Uint8Array(e);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=e,this.byteLength=e,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(t=1){return this.readArray(t,"uint8")}readArray(t,e){const i=eM[e].BYTES_PER_ELEMENT*t,n=this.byteOffset+this.offset,s=this.buffer.slice(n,n+i);if(this.littleEndian===tM&&"uint8"!==e&&"int8"!==e){const t=new Uint8Array(this.buffer.slice(n,n+i));t.reverse();const s=new eM[e](t.buffer);return this.offset+=i,s.reverse(),s}const r=new eM[e](s);return this.offset+=i,r}readInt16(){const t=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,t}readUint16(){const t=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,t}readInt32(){const t=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,t}readUint32(){const t=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat32(){const t=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,t}readFloat64(){const t=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,t}readBigInt64(){const t=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,t}readBigUint64(){const t=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,t}readChar(){return String.fromCharCode(this.readInt8())}readChars(t=1){let e="";for(let i=0;i<t;i++)e+=this.readChar();return e}readUtf8(t=1){return JC(this.readBytes(t))}decodeText(t=1,e="utf8"){return JC(this.readBytes(t),e)}writeBoolean(t){return this.writeUint8(t?255:0),this}writeInt8(t){return this.ensureAvailable(1),this._data.setInt8(this.offset++,t),this._updateLastWrittenByte(),this}writeUint8(t){return this.ensureAvailable(1),this._data.setUint8(this.offset++,t),this._updateLastWrittenByte(),this}writeByte(t){return this.writeUint8(t)}writeBytes(t){this.ensureAvailable(t.length);for(let e=0;e<t.length;e++)this._data.setUint8(this.offset++,t[e]);return this._updateLastWrittenByte(),this}writeInt16(t){return this.ensureAvailable(2),this._data.setInt16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(t){return this.ensureAvailable(2),this._data.setUint16(this.offset,t,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(t){return this.ensureAvailable(4),this._data.setInt32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(t){return this.ensureAvailable(4),this._data.setUint32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(t){return this.ensureAvailable(4),this._data.setFloat32(this.offset,t,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(t){return this.ensureAvailable(8),this._data.setFloat64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(t){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(t){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,t,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(t){return this.writeUint8(t.charCodeAt(0))}writeChars(t){for(let e=0;e<t.length;e++)this.writeUint8(t.charCodeAt(e));return this}writeUtf8(t){return this.writeBytes(function(t){return QC.encode(t)}(t))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function nM(t){let e=t.length;for(;--e>=0;)t[e]=0}const sM=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),rM=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),oM=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),aM=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hM=new Array(576);nM(hM);const lM=new Array(60);nM(lM);const cM=new Array(512);nM(cM);const uM=new Array(256);nM(uM);const dM=new Array(29);nM(dM);const fM=new Array(30);function pM(t,e,i,n,s){this.static_tree=t,this.extra_bits=e,this.extra_base=i,this.elems=n,this.max_length=s,this.has_stree=t&&t.length}let gM,mM,_M;function vM(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}nM(fM);const yM=t=>t<256?cM[t]:cM[256+(t>>>7)],wM=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},bM=(t,e,i)=>{t.bi_valid>16-i?(t.bi_buf|=e<<t.bi_valid&65535,wM(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=i-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=i)},xM=(t,e,i)=>{bM(t,i[2*e],i[2*e+1])},SM=(t,e)=>{let i=0;do{i|=1&t,t>>>=1,i<<=1}while(--e>0);return i>>>1},EM=(t,e,i)=>{const n=new Array(16);let s,r,o=0;for(s=1;s<=15;s++)o=o+i[s-1]<<1,n[s]=o;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=SM(n[e]++,e))}},AM=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},CM=t=>{t.bi_valid>8?wM(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},MM=(t,e,i,n)=>{const s=2*e,r=2*i;return t[s]<t[r]||t[s]===t[r]&&n[e]<=n[i]},LM=(t,e,i)=>{const n=t.heap[i];let s=i<<1;for(;s<=t.heap_len&&(s<t.heap_len&&MM(e,t.heap[s+1],t.heap[s],t.depth)&&s++,!MM(e,n,t.heap[s],t.depth));)t.heap[i]=t.heap[s],i=s,s<<=1;t.heap[i]=n},PM=(t,e,i)=>{let n,s,r,o,a=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+a++],n+=(255&t.pending_buf[t.sym_buf+a++])<<8,s=t.pending_buf[t.sym_buf+a++],0===n?xM(t,s,e):(r=uM[s],xM(t,r+256+1,e),o=sM[r],0!==o&&(s-=dM[r],bM(t,s,o)),n--,r=yM(n),xM(t,r,i),o=rM[r],0!==o&&(n-=fM[r],bM(t,n,o)))}while(a<t.sym_next);xM(t,256,e)},kM=(t,e)=>{const i=e.dyn_tree,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.elems;let o,a,h,l=-1;for(t.heap_len=0,t.heap_max=573,o=0;o<r;o++)0!==i[2*o]?(t.heap[++t.heap_len]=l=o,t.depth[o]=0):i[2*o+1]=0;for(;t.heap_len<2;)h=t.heap[++t.heap_len]=l<2?++l:0,i[2*h]=1,t.depth[h]=0,t.opt_len--,s&&(t.static_len-=n[2*h+1]);for(e.max_code=l,o=t.heap_len>>1;o>=1;o--)LM(t,i,o);h=r;do{o=t.heap[1],t.heap[1]=t.heap[t.heap_len--],LM(t,i,1),a=t.heap[1],t.heap[--t.heap_max]=o,t.heap[--t.heap_max]=a,i[2*h]=i[2*o]+i[2*a],t.depth[h]=(t.depth[o]>=t.depth[a]?t.depth[o]:t.depth[a])+1,i[2*o+1]=i[2*a+1]=h,t.heap[1]=h++,LM(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const i=e.dyn_tree,n=e.max_code,s=e.stat_desc.static_tree,r=e.stat_desc.has_stree,o=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,h=e.stat_desc.max_length;let l,c,u,d,f,p,g=0;for(d=0;d<=15;d++)t.bl_count[d]=0;for(i[2*t.heap[t.heap_max]+1]=0,l=t.heap_max+1;l<573;l++)c=t.heap[l],d=i[2*i[2*c+1]+1]+1,d>h&&(d=h,g++),i[2*c+1]=d,c>n||(t.bl_count[d]++,f=0,c>=a&&(f=o[c-a]),p=i[2*c],t.opt_len+=p*(d+f),r&&(t.static_len+=p*(s[2*c+1]+f)));if(0!==g){do{for(d=h-1;0===t.bl_count[d];)d--;t.bl_count[d]--,t.bl_count[d+1]+=2,t.bl_count[h]--,g-=2}while(g>0);for(d=h;0!==d;d--)for(c=t.bl_count[d];0!==c;)u=t.heap[--l],u>n||(i[2*u+1]!==d&&(t.opt_len+=(d-i[2*u+1])*i[2*u],i[2*u+1]=d),c--)}})(t,e),EM(i,l,t.bl_count)},NM=(t,e,i)=>{let n,s,r=-1,o=e[1],a=0,h=7,l=4;for(0===o&&(h=138,l=3),e[2*(i+1)+1]=65535,n=0;n<=i;n++)s=o,o=e[2*(n+1)+1],++a<h&&s===o||(a<l?t.bl_tree[2*s]+=a:0!==s?(s!==r&&t.bl_tree[2*s]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,r=s,0===o?(h=138,l=3):s===o?(h=6,l=3):(h=7,l=4))},IM=(t,e,i)=>{let n,s,r=-1,o=e[1],a=0,h=7,l=4;for(0===o&&(h=138,l=3),n=0;n<=i;n++)if(s=o,o=e[2*(n+1)+1],!(++a<h&&s===o)){if(a<l)do{xM(t,s,t.bl_tree)}while(0!==--a);else 0!==s?(s!==r&&(xM(t,s,t.bl_tree),a--),xM(t,16,t.bl_tree),bM(t,a-3,2)):a<=10?(xM(t,17,t.bl_tree),bM(t,a-3,3)):(xM(t,18,t.bl_tree),bM(t,a-11,7));a=0,r=s,0===o?(h=138,l=3):s===o?(h=6,l=3):(h=7,l=4)}};let TM=!1;const OM=(t,e,i,n)=>{bM(t,0+(n?1:0),3),CM(t),wM(t,i),wM(t,~i),i&&t.pending_buf.set(t.window.subarray(e,e+i),t.pending),t.pending+=i};var RM={_tr_init:t=>{TM||((()=>{let t,e,i,n,s;const r=new Array(16);for(i=0,n=0;n<28;n++)for(dM[n]=i,t=0;t<1<<sM[n];t++)uM[i++]=n;for(uM[i-1]=n,s=0,n=0;n<16;n++)for(fM[n]=s,t=0;t<1<<rM[n];t++)cM[s++]=n;for(s>>=7;n<30;n++)for(fM[n]=s<<7,t=0;t<1<<rM[n]-7;t++)cM[256+s++]=n;for(e=0;e<=15;e++)r[e]=0;for(t=0;t<=143;)hM[2*t+1]=8,t++,r[8]++;for(;t<=255;)hM[2*t+1]=9,t++,r[9]++;for(;t<=279;)hM[2*t+1]=7,t++,r[7]++;for(;t<=287;)hM[2*t+1]=8,t++,r[8]++;for(EM(hM,287,r),t=0;t<30;t++)lM[2*t+1]=5,lM[2*t]=SM(t,5);gM=new pM(hM,sM,257,286,15),mM=new pM(lM,rM,0,30,15),_M=new pM(new Array(0),oM,0,19,7)})(),TM=!0),t.l_desc=new vM(t.dyn_ltree,gM),t.d_desc=new vM(t.dyn_dtree,mM),t.bl_desc=new vM(t.bl_tree,_M),t.bi_buf=0,t.bi_valid=0,AM(t)},_tr_stored_block:OM,_tr_flush_block:(t,e,i,n)=>{let s,r,o=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>
vendor: 34,124 bytes, line 2
2{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),kM(t,t.l_desc),kM(t,t.d_desc),o=(t=>{let e;for(NM(t,t.dyn_ltree,t.l_desc.max_code),NM(t,t.dyn_dtree,t.d_desc.max_code),kM(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*aM[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),s=t.opt_len+3+7>>>3,r=t.static_len+3+7>>>3,r<=s&&(s=r)):s=r=i+5,i+4<=s&&-1!==e?OM(t,e,i,n):4===t.strategy||r===s?(bM(t,2+(n?1:0),3),PM(t,hM,lM)):(bM(t,4+(n?1:0),3),((t,e,i,n)=>{let s;for(bM(t,e-257,5),bM(t,i-1,5),bM(t,n-4,4),s=0;s<n;s++)bM(t,t.bl_tree[2*aM[s]+1],3);IM(t,t.dyn_ltree,e-1),IM(t,t.dyn_dtree,i-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,o+1),PM(t,t.dyn_ltree,t.dyn_dtree)),AM(t),n&&CM(t)},_tr_tally:(t,e,i)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=i,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(uM[i]+256+1)]++,t.dyn_dtree[2*yM(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{bM(t,2,3),xM(t,256,hM),(t=>{16===t.bi_valid?(wM(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}},FM=(t,e,i,n)=>{let s=65535&t,r=t>>>16&65535,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{s=s+e[n++]|0,r=r+s|0}while(--o);s%=65521,r%=65521}return s|r<<16};const DM=new Uint32Array((()=>{let t,e=[];for(var i=0;i<256;i++){t=i;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[i]=t}return e})());var jM=(t,e,i,n)=>{const s=DM,r=n+i;t^=-1;for(let i=n;i<r;i++)t=t>>>8^s[255&(t^e[i])];return-1^t},GM={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},BM={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:zM,_tr_stored_block:qM,_tr_flush_block:UM,_tr_tally:WM,_tr_align:VM}=RM,{Z_NO_FLUSH:HM,Z_PARTIAL_FLUSH:KM,Z_FULL_FLUSH:$M,Z_FINISH:XM,Z_BLOCK:YM,Z_OK:ZM,Z_STREAM_END:JM,Z_STREAM_ERROR:QM,Z_DATA_ERROR:tL,Z_BUF_ERROR:eL,Z_DEFAULT_COMPRESSION:iL,Z_FILTERED:nL,Z_HUFFMAN_ONLY:sL,Z_RLE:rL,Z_FIXED:oL,Z_DEFAULT_STRATEGY:aL,Z_UNKNOWN:hL,Z_DEFLATED:lL}=BM,cL=258,uL=262,dL=42,fL=113,pL=666,gL=(t,e)=>(t.msg=GM[e],e),mL=t=>2*t-(t>4?9:0),_L=t=>{let e=t.length;for(;--e>=0;)t[e]=0},vL=t=>{let e,i,n,s=t.w_size;e=t.hash_size,n=e;do{i=t.head[--n],t.head[n]=i>=s?i-s:0}while(--e);e=s,n=e;do{i=t.prev[--n],t.prev[n]=i>=s?i-s:0}while(--e)};let yL=(t,e,i)=>(e<<t.hash_shift^i)&t.hash_mask;const wL=(t,e)=>{let i;if(t.legacy_hash)i=t.ins_h=yL(t,t.ins_h,t.window[e+3-1]);else{const n=t.window,s=n[e]|n[e+1]<<8|n[e+2]<<16|n[e+3]<<24;i=t.ins_h=Math.imul(s,66521)+66521>>>16&t.hash_mask}const n=t.prev[e&t.w_mask]=t.head[i];return t.head[i]=e,n},bL=t=>{const e=t.state;let i=e.pending;i>t.avail_out&&(i=t.avail_out),0!==i&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+i),t.next_out),t.next_out+=i,e.pending_out+=i,t.total_out+=i,t.avail_out-=i,e.pending-=i,0===e.pending&&(e.pending_out=0))},xL=(t,e)=>{UM(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,bL(t.strm)},SL=(t,e)=>{t.pending_buf[t.pending++]=e},EL=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},AL=(t,e,i,n)=>{let s=t.avail_in;return s>n&&(s=n),0===s?0:(t.avail_in-=s,e.set(t.input.subarray(t.next_in,t.next_in+s),i),1===t.state.wrap?t.adler=FM(t.adler,e,s,i):2===t.state.wrap&&(t.adler=jM(t.adler,e,s,i)),t.next_in+=s,t.total_in+=s,s)},CL=(t,e)=>{let i,n,s=t.max_chain_length,r=t.strstart,o=t.prev_length,a=t.nice_match;const h=t.strstart>t.w_size-uL?t.strstart-(t.w_size-uL):0,l=t.window,c=t.w_mask,u=t.prev,d=t.strstart+cL;let f=l[r+o-1],p=l[r+o];t.prev_length>=t.good_match&&(s>>=2),a>t.lookahead&&(a=t.lookahead);do{if(i=e,l[i+o]===p&&l[i+o-1]===f&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do{}while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<d);if(n=cL-(d-r),r=d-cL,n>o){if(t.match_start=e,o=n,n>=a)break;f=l[r+o-1],p=l[r+o]}}}while((e=u[e&c])>h&&0!==--s);return o<=t.lookahead?o:t.lookahead},ML=t=>{const e=t.w_size;let i,n,s;do{if(n=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-uL)&&(t.window.set(t.window.subarray(e,e+e-n),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),vL(t),n+=e),0===t.strm.avail_in)break;if(i=AL(t.strm,t.window,t.strstart+t.lookahead,n),t.lookahead+=i,t.legacy_hash){if(t.lookahead+t.insert>=3)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=yL(t,t.ins_h,t.window[s+1]);t.insert&&(wL(t,s),s++,t.insert--,!(t.lookahead+t.insert<3)););}else if(t.lookahead+t.insert>3)for(s=t.strstart-t.insert;t.insert&&(wL(t,s),s++,t.insert--,!(t.lookahead+t.insert<=3)););}while(t.lookahead<uL&&0!==t.strm.avail_in)},LL=(t,e)=>{let i,n,s,r=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,o=0,a=t.strm.avail_in;do{if(i=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s)break;if(s=t.strm.avail_out-s,n=t.strstart-t.block_start,i>n+t.strm.avail_in&&(i=n+t.strm.avail_in),i>s&&(i=s),i<r&&(0===i&&e!==XM||e===HM||i!==n+t.strm.avail_in))break;o=e===XM&&i===n+t.strm.avail_in?1:0,qM(t,0,0,o),t.pending_buf[t.pending-4]=i,t.pending_buf[t.pending-3]=i>>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,bL(t.strm),n&&(n>i&&(n=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+n),t.strm.next_out),t.strm.next_out+=n,t.strm.avail_out-=n,t.strm.total_out+=n,t.block_start+=n,i-=n),i&&(AL(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(0===o);return a-=t.strm.avail_in,a&&(a>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=a&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-a,t.strm.next_in),t.strstart),t.strstart+=a,t.insert+=a>t.w_size-t.insert?t.w_size-t.insert:a),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),o?4:e!==HM&&e!==XM&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(s=t.window_size-t.strstart,t.strm.avail_in>s&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&(AL(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,r=s>t.w_size?t.w_size:s,n=t.strstart-t.block_start,(n>=r||(n||e===XM)&&e!==HM&&0===t.strm.avail_in&&n<=s)&&(i=n>s?s:n,o=e===XM&&0===t.strm.avail_in&&i===n?1:0,qM(t,t.block_start,i,o),t.block_start+=i,bL(t.strm)),o?3:1)},PL=(t,e)=>{let i,n;for(;;){if(t.lookahead<uL){if(ML(t),t.lookahead<uL&&e===HM)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(i=wL(t,t.strstart)),0!==i&&t.strstart-i<=t.w_size-uL&&(t.match_length=CL(t,i)),t.match_length>=3)if(n=WM(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,i=wL(t,t.strstart)}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.legacy_hash&&(t.ins_h=t.window[t.strstart],t.ins_h=yL(t,t.ins_h,t.window[t.strstart+1]));else n=WM(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(xL(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===XM?(xL(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(xL(t,!1),0===t.strm.avail_out)?1:2},kL=(t,e)=>{let i,n,s;for(;;){if(t.lookahead<uL){if(ML(t),t.lookahead<uL&&e===HM)return 1;if(0===t.lookahead)break}if(i=0,t.lookahead>=3&&(i=wL(t,t.strstart)),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==i&&t.prev_length<t.max_lazy_match&&t.strstart-i<=t.w_size-uL&&(t.match_length=CL(t,i),t.match_length<=5&&(t.strategy===nL||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){s=t.strstart+t.lookahead-3,n=WM(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=s&&(i=wL(t,t.strstart))}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(xL(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(n=WM(t,0,t.window[t.strstart-1]),n&&xL(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=WM(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===XM?(xL(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(xL(t,!1),0===t.strm.avail_out)?1:2};function NL(t,e,i,n,s){this.good_length=t,this.max_lazy=e,this.nice_length=i,this.max_chain=n,this.func=s}const IL=[new NL(0,0,0,0,LL),new NL(4,4,8,4,PL),new NL(4,5,16,8,PL),new NL(4,6,32,32,PL),new NL(4,4,16,16,kL),new NL(8,16,32,32,kL),new NL(8,16,128,128,kL),new NL(8,32,128,256,kL),new NL(32,128,258,1024,kL),new NL(32,258,258,4096,kL)];function TL(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=lL,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),_L(this.dyn_ltree),_L(this.dyn_dtree),_L(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),_L(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_L(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const OL=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==dL&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&e.status!==fL&&e.status!==pL?1:0},RL=t=>{if(OL(t))return gL(t,QM);t.total_in=t.total_out=0,t.data_type=hL;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?dL:fL,t.adler=2===e.wrap?0:1,e.last_flush=-2,zM(e),ZM},FL=t=>{const e=RL(t);return e===ZM&&(t=>{t.window_size=2*t.w_size,_L(t.head),t.max_lazy_match=IL[t.level].max_lazy,t.good_match=IL[t.level].good_length,t.nice_match=IL[t.level].nice_length,t.max_chain_length=IL[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),e},DL=(t,e,i,n,s,r,o)=>{if(!t)return QM;let a=1;if(e===iL&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),s<1||s>9||i!==lL||n<8||n>15||e<0||e>9||r<0||r>oL||8===n&&1!==a)return gL(t,QM);8===n&&(n=9);const h=new TL;return t.state=h,h.strm=t,h.status=dL,h.wrap=a,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.legacy_hash=o?1:0,h.hash_bits=s+7,!h.legacy_hash&&h.hash_bits<15&&(h.hash_bits=15),h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<s+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.sym_buf=h.lit_bufsize,h.sym_end=3*(h.lit_bufsize-1),h.level=e,h.strategy=r,h.method=i,FL(t)};var jL=DL,GL=(t,e)=>OL(t)||2!==t.state.wrap?QM:(t.state.gzhead=e,ZM),BL=(t,e)=>{if(OL(t)||e>YM||e<0)return t?gL(t,QM):QM;const i=t.state;if(!t.output||0!==t.avail_in&&!t.input||i.status===pL&&e!==XM)return gL(t,0===t.avail_out?eL:QM);const n=i.last_flush;if(i.last_flush=e,0!==i.pending){if(bL(t),0===t.avail_out)return i.last_flush=-1,ZM}else if(0===t.avail_in&&mL(e)<=mL(n)&&e!==XM)return gL(t,eL);if(i.status===pL&&0!==t.avail_in)return gL(t,eL);if(i.status===dL&&0===i.wrap&&(i.status=fL),i.status===dL){let e=lL+(i.w_bits-8<<4)<<8,n=-1;if(n=i.strategy>=sL||i.level<2?0:i.level<6?1:6===i.level?2:3,e|=n<<6,0!==i.strstart&&(e|=32),e+=31-e%31,EL(i,e),0!==i.strstart&&(EL(i,t.adler>>>16),EL(i,65535&t.adler)),t.adler=1,i.status=fL,bL(t),0!==i.pending)return i.last_flush=-1,ZM}if(57===i.status)if(t.adler=0,SL(i,31),SL(i,139),SL(i,8),i.gzhead)SL(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),SL(i,255&i.gzhead.time),SL(i,i.gzhead.time>>8&255),SL(i,i.gzhead.time>>16&255),SL(i,i.gzhead.time>>24&255),SL(i,9===i.level?2:i.strategy>=sL||i.level<2?4:0),SL(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(SL(i,255&i.gzhead.extra.length),SL(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=jM(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69;else if(SL(i,0),SL(i,0),SL(i,0),SL(i,0),SL(i,0),SL(i,9===i.level?2:i.strategy>=sL||i.level<2?4:0),SL(i,3),i.status=fL,bL(t),0!==i.pending)return i.last_flush=-1,ZM;if(69===i.status){if(i.gzhead.extra){let e=i.pending,n=(65535&i.gzhead.extra.length)-i.gzindex;for(;i.pending+n>i.pending_buf_size;){let s=i.pending_buf_size-i.pending;if(i.pending_buf.set(i.gzhead.extra.subarray(i.gzindex,i.gzindex+s),i.pending),i.pending=i.pending_buf_size,i.gzhead.hcrc&&i.pending>e&&(t.adler=jM(t.adler,i.pending_buf,i.pending-e,e)),i.gzindex+=s,bL(t),0!==i.pending)return i.last_flush=-1,ZM;e=0,n-=s}let s=new Uint8Array(i.gzhead.extra);i.pending_buf.set(s.subarray(i.gzindex,i.gzindex+n),i.pending),i.pending+=n,i.gzhead.hcrc&&i.pending>e&&(t.adler=jM(t.adler,i.pending_buf,i.pending-e,e)),i.gzindex=0}i.status=73}if(73===i.status){if(i.gzhead.name){let e,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(t.adler=jM(t.adler,i.pending_buf,i.pending-n,n)),bL(t),0!==i.pending)return i.last_flush=-1,ZM;n=0}e=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,SL(i,e)}while(0!==e);i.gzhead.hcrc&&i.pending>n&&(t.adler=jM(t.adler,i.pending_buf,i.pending-n,n)),i.gzindex=0}i.status=91}if(91===i.status){if(i.gzhead.comment){let e,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(t.adler=jM(t.adler,i.pending_buf,i.pending-n,n)),bL(t),0!==i.pending)return i.last_flush=-1,ZM;n=0}e=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,SL(i,e)}while(0!==e);i.gzhead.hcrc&&i.pending>n&&(t.adler=jM(t.adler,i.pending_buf,i.pending-n,n))}i.status=103}if(103===i.status){if(i.gzhead.hcrc){if(i.pending+2>i.pending_buf_size&&(bL(t),0!==i.pending))return i.last_flush=-1,ZM;SL(i,255&t.adler),SL(i,t.adler>>8&255),t.adler=0}if(i.status=fL,bL(t),0!==i.pending)return i.last_flush=-1,ZM}if(0!==t.avail_in||0!==i.lookahead||e!==HM&&i.status!==pL){let n=0===i.level?LL(i,e):i.strategy===sL?((t,e)=>{let i;for(;;){if(0===t.lookahead&&(ML(t),0===t.lookahead)){if(e===HM)return 1;break}if(t.match_length=0,i=WM(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,i&&(xL(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===XM?(xL(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(xL(t,!1),0===t.strm.avail_out)?1:2})(i,e):i.strategy===rL?((t,e)=>{let i,n,s,r;const o=t.window;for(;;){if(t.lookahead<=cL){if(ML(t),t.lookahead<=cL&&e===HM)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(s=t.strstart-1,n=o[s],n===o[++s]&&n===o[++s]&&n===o[++s])){r=t.strstart+cL;do{}while(n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&n===o[++s]&&s<r);t.match_length=cL-(r-s),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(i=WM(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(i=WM(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),i&&(xL(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===XM?(xL(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(xL(t,!1),0===t.strm.avail_out)?1:2})(i,e):IL[i.level].func(i,e);if(3!==n&&4!==n||(i.status=pL),1===n||3===n)return 0===t.avail_out&&(i.last_flush=-1),ZM;if(2===n&&(e===KM?VM(i):e!==YM&&(qM(i,0,0,!1),e===$M&&(_L(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),bL(t),0===t.avail_out))return i.last_flush=-1,ZM}return e!==XM?ZM:i.wrap<=0?JM:(2===i.wrap?(SL(i,255&t.adler),SL(i,t.adler>>8&255),SL(i,t.adler>>16&255),SL(i,t.adler>>24&255),SL(i,255&t.total_in),SL(i,t.total_in>>8&255),SL(i,t.total_in>>16&255),SL(i,t.total_in>>24&255)):(EL(i,t.adler>>>16),EL(i,65535&t.adler)),bL(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?ZM:JM)},zL=t=>{if(OL(t))return QM;const e=t.state.status;return t.state=null,e===fL?gL(t,tL):ZM},qL=(t,e)=>{let i=e.length;if(OL(t))return QM;const n=t.state,s=n.wrap;if(2===s||1===s&&n.status!==dL||n.lookahead)return QM;if(1===s&&(t.adler=FM(t.adler,e,i,0)),n.wrap=0,i>=n.w_size){0===s&&(_L(n.head),n.strstart=0,n.block_start=0,n.insert=0);let t=new Uint8Array(n.w_size);t.set(e.subarray(i-n.w_size,i),0),e=t,i=n.w_size}const r=t.avail_in,o=t.next_in,a=t.input;for(t.avail_in=i,t.next_in=0,t.input=e,ML(n);n.lookahead>=3;){let t=n.strstart,e=n.lookahead-2;do{wL(n,t),t++}while(--e);n.strstart=t,n.lookahead=2,ML(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=o,t.input=a,t.avail_in=r,n.wrap=s,ZM};const UL=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var WL=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const i=e.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const e in i)UL(i,e)&&(t[e]=i[e])}}return t},VL=t=>{let e=0;for(let i=0,n=t.length;i<n;i++)e+=t[i].length;const i=new Uint8Array(e);for(let e=0,n=0,s=t.length;e<s;e++){let s=t[e];i.set(s,n),n+=s.length}return i};let HL=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){HL=!1}const KL=new Uint8Array(256);for(let t=0;t<256;t++)KL[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;KL[254]=KL[255]=1;var $L=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,i,n,s,r,o=t.length,a=0;for(s=0;s<o;s++)i=t.charCodeAt(s),55296==(64512&i)&&s+1<o&&(n=t.charCodeAt(s+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),s++)),a+=i<128?1:i<2048?2:i<65536?3:4;for(e=new Uint8Array(a),r=0,s=0;r<a;s++)i=t.charCodeAt(s),55296==(64512&i)&&s+1<o&&(n=t.charCodeAt(s+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),s++)),i<128?e[r++]=i:i<2048?(e[r++]=192|i>>>6,e[r++]=128|63&i):i<65536?(e[r++]=224|i>>>12,e[r++]=128|i>>>6&63,e[r++]=128|63&i):(e[r++]=240|i>>>18,e[r++]=128|i>>>12&63,e[r++]=128|i>>>6&63,e[r++]=128|63&i);return e},XL=(t,e)=>{const i=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let n,s;const r=new Array(2*i);for(s=0,n=0;n<i;){let e=t[n++];if(e<128){r[s++]=e;continue}let o=KL[e];if(o>4)r[s++]=65533,n+=o-1;else{for(e&=2===o?31:3===o?15:7;o>1&&n<i;)e=e<<6|63&t[n++],o--;o>1?r[s++]=65533:e<65536?r[s++]=e:(e-=65536,r[s++]=55296|e>>10&1023,r[s++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&HL)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let i="";for(let n=0;n<e;n++)i+=String.fromCharCode(t[n]);return i})(r,s)},YL=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let i=e-1;for(;i>=0&&128==(192&t[i]);)i--;return i<0||0===i?e:i+KL[t[i]]>e?i:e},ZL=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const JL=Object.prototype.toString,{Z_NO_FLUSH:QL,Z_SYNC_FLUSH:tP,Z_FULL_FLUSH:eP,Z_FINISH:iP,Z_OK:nP,Z_STREAM_END:sP,Z_DEFAULT_COMPRESSION:rP,Z_DEFAULT_STRATEGY:oP,Z_DEFLATED:aP}=BM,hP={level:rP,method:aP,chunkSize:16384,windowBits:15,memLevel:8,strategy:oP,legacyHash:!0};function lP(t){this.options=WL({},hP,t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZL,this.strm.avail_out=0;let i=jL(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash);if(i!==nP)throw new Error(GM[i]);if(e.header&&GL(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?$L(e.dictionary):"[object ArrayBuffer]"===JL.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,i=qL(this.strm,t),i!==nP)throw new Error(GM[i]);this._dict_set=!0}}function cP(t,e){const i=new lP(e);if(i.push(t,!0),i.err)throw i.msg||GM[i.err];return i.result}lP.prototype.push=function(t,e){const i=this.strm,n=this.options.chunkSize;let s,r;if(this.ended)return!1;for(r=e===~~e?e:!0===e?iP:QL,"string"==typeof t?i.input=$L(t):"[object ArrayBuffer]"===JL.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(r===tP||r===eP)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(s=BL(i,r),s===sP)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),s=zL(this.strm),this.onEnd(s),this.ended=!0,s===nP;if(0!==i.avail_out){if(r>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},lP.prototype.onData=function(t){this.chunks.push(t)},lP.prototype.onEnd=function(t){t===nP&&(this.result=VL(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var uP={Deflate:lP,deflate:cP,deflateRaw:function(t,e){return(e=e||{}).raw=!0,cP(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,cP(t,e)},constants:BM};const dP=16209;var fP=function(t,e){let i,n,s,r,o,a,h,l,c,u,d,f,p,g,m,_,v,y,w,b,x,S,E,A;const C=t.state;i=t.next_in,E=t.input,n=i+(t.avail_in-5),s=t.next_out,A=t.output,r=s-(e-t.avail_out),o=s+(t.avail_out-257),a=C.dmax,h=C.wsize,l=C.whave,c=C.wnext,u=C.window,d=C.hold,f=C.bits,p=C.lencode,g=C.distcode,m=(1<<C.lenbits)-1,_=(1<<C.distbits)-1;t:do{f<15&&(d+=E[i++]<<f,f+=8,d+=E[i++]<<f,f+=8),v=p[d&m];e:for(;;){if(y=v>>>24,d>>>=y,f-=y,y=v>>>16&255,0===y)A[s++]=65535&v;else{if(!(16&y)){if(64&y){if(32&y){C.mode=16191;break t}t.msg="invalid literal/length code",C.mode=dP;break t}v=p[(65535&v)+(d&(1<<y)-1)];continue e}for(w=65535&v,y&=15,y&&(f<y&&(d+=E[i++]<<f,f+=8),w+=d&(1<<y)-1,d>>>=y,f-=y),f<15&&(d+=E[i++]<<f,f+=8,d+=E[i++]<<f,f+=8),v=g[d&_];;){if(y=v>>>24,d>>>=y,f-=y,y=v>>>16&255,16&y){if(b=65535&v,y&=15,f<y&&(d+=E[i++]<<f,f+=8,f<y&&(d+=E[i++]<<f,f+=8)),b+=d&(1<<y)-1,b>a){t.msg="invalid distance too far back",C.mode=dP;break t}if(d>>>=y,f-=y,y=s-r,b>y){if(y=b-y,y>l&&C.sane){t.msg="invalid distance too far back",C.mode=dP;break t}if(x=0,S=u,0===c){if(x+=h-y,y<w){w-=y;do{A[s++]=u[x++]}while(--y);x=s-b,S=A}}else if(c<y){if(x+=h+c-y,y-=c,y<w){w-=y;do{A[s++]=u[x++]}while(--y);if(x=0,c<w){y=c,w-=y;do{A[s++]=u[x++]}while(--y);x=s-b,S=A}}}else if(x+=c-y,y<w){w-=y;do{A[s++]=u[x++]}while(--y);x=s-b,S=A}for(;w>2;)A[s++]=S[x++],A[s++]=S[x++],A[s++]=S[x++],w-=3;w&&(A[s++]=S[x++],w>1&&(A[s++]=S[x++]))}else{x=s-b;do{A[s++]=A[x++],A[s++]=A[x++],A[s++]=A[x++],w-=3}while(w>2);w&&(A[s++]=A[x++],w>1&&(A[s++]=A[x++]))}break}if(64&y){t.msg="invalid distance code",C.mode=dP;break t}v=g[(65535&v)+(d&(1<<y)-1)]}}break}}while(i<n&&s<o);w=f>>3,i-=w,f-=w<<3,d&=(1<<f)-1,t.next_in=i,t.next_out=s,t.avail_in=i<n?n-i+5:5-(i-n),t.avail_out=s<o?o-s+257:257-(s-o),C.hold=d,C.bits=f};const pP=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),gP=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),mP=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),_P=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var vP=(t,e,i,n,s,r,o,a)=>{const h=a.bits;let l,c,u,d,f,p,g=0,m=0,_=0,v=0,y=0,w=0,b=0,x=0,S=0,E=0,A=null;const C=new Uint16Array(16),M=new Uint16Array(16);let L,P,k,N=null;for(g=0;g<=15;g++)C[g]=0;for(m=0;m<n;m++)C[e[i+m]]++;for(y=h,v=15;v>=1&&0===C[v];v--);if(y>v&&(y=v),0===v)return s[r++]=20971520,s[r++]=20971520,a.bits=1,0;for(_=1;_<v&&0===C[_];_++);for(y<_&&(y=_),x=1,g=1;g<=15;g++)if(x<<=1,x-=C[g],x<0)return-1;if(x>0&&(0===t||1!==v))return-1;for(M[1]=0,g=1;g<15;g++)M[g+1]=M[g]+C[g];for(m=0;m<n;m++)0!==e[i+m]&&(o[M[e[i+m]]++]=m);if(0===t?(A=N=o,p=20):1===t?(A=pP,N=gP,p=257):(A=mP,N=_P,p=0),E=0,m=0,g=_,f=r,w=y,b=0,u=-1,S=1<<y,d=S-1,1===t&&S>852||2===t&&S>592)return 1;for(;;){L=g-b,o[m]+1<p?(P=0,k=o[m]):o[m]>=p?(P=N[o[m]-p],k=A[o[m]-p]):(P=96,k=0),l=1<<g-b,c=1<<w,_=c;do{c-=l,s[f+(E>>b)+c]=L<<24|P<<16|k}while(0!==c);for(l=1<<g-1;E&l;)l>>=1;if(0!==l?(E&=l-1,E+=l):E=0,m++,0===--C[g]){if(g===v)break;g=e[i+o[m]]}if(g>y&&(E&d)!==u){for(0===b&&(b=y),f+=_,w=g-b,x=1<<w;w+b<v&&(x-=C[w+b],!(x<=0));)w++,x<<=1;if(S+=1<<w,1===t&&S>852||2===t&&S>592)return 1;u=E&d,s[u]=y<<24|w<<16|f-r}}return 0!==E&&(s[f+E]=g-b<<24|64<<16),a.bits=y,0};const{Z_FINISH:yP,Z_BLOCK:wP,Z_TREES:bP,Z_OK:xP,Z_STREAM_END:SP,Z_NEED_DICT:EP,Z_STREAM_ERROR:AP,Z_DATA_ERROR:CP,Z_MEM_ERROR:MP,Z_BUF_ERROR:LP,Z_DEFLATED:PP}=BM,kP=16180,NP=16190,IP=16191,TP=16192,OP=16194,RP=16199,FP=16200,DP=16206,jP=16209,GP=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function BP(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const zP=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<kP||e.mode>16211?1:0},qP=t=>{if(zP(t))return AP;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=kP,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,xP},UP=t=>{if(zP(t))return AP;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,qP(t)},WP=(t,e)=>{let i;if(zP(t))return AP;const n=t.state;return e<0?(i=0,e=-e):(i=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?AP:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=i,n.wbits=e,UP(t))},VP=(t,e)=>{if(!t)return AP;const i=new BP;t.state=i,i.strm=t,i.window=null,i.mode=kP;const n=WP(t,e);return n!==xP&&(t.state=null),n};let HP,KP,$P=!0;const XP=t=>{if($P){HP=new Int32Array(512),KP=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(vP(1,t.lens,0,288,HP,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;vP(2,t.lens,0,32,KP,0,t.work,{bits:5}),$P=!1}t.lencode=HP,t.lenbits=9,t.distcode=KP,t.distbits=5},YP=(t,e,i,n)=>{let s;const r=t.state;return null===r.window&&(r.window=new Uint8Array(1<<r.wbits)),0===r.wsize&&(r.wsize=1<<r.wbits,r.wnext=0,r.whave=0),n>=r.wsize?(r.window.set(e.subarray(i-r.wsize,i),0),r.wnext=0,r.whave=r.wsize):(s=r.wsize-r.wnext,s>n&&(s=n),r.window.set(e.subarray(i-n,i-n+s),r.wnext),(n-=s)?(r.window.set(e.subarray(i-n,i),0),r.wnext=n,r.whave=r.wsize):(r.wnext+=s,r.wnext===r.wsize&&(r.wnext=0),r.whave<r.wsize&&(r.whave+=s))),0};var ZP=UP,JP=VP,QP=(t,e)=>{let i,n,s,r,o,a,h,l,c,u,d,f,p,g,m,_,v,y,w,b,x,S,E=0;const A=new Uint8Array(4);let C,M;const L=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(zP(t)||!t.output||!t.input&&0!==t.avail_in)return AP;i=t.state,i.mode===IP&&(i.mode=TP),o=t.next_out,s=t.output,h=t.avail_out,r=t.next_in,n=t.input,a=t.avail_in,l=i.hold,c=i.bits,u=a,d=h,S=xP;t:for(;;)switch(i.mode){case kP:if(0===i.wrap){i.mode=TP;break}for(;c<16;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(2&i.wrap&&35615===l){0===i.wbits&&(i.wbits=15),i.check=0,A[0]=255&l,A[1]=l>>>8&255,i.check=jM(i.check,A,2,0),l=0,c=0,i.mode=16181;break}if(i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){t.msg="incorrect header check",i.mode=jP;break}if((15&l)!==PP){t.msg="unknown compression method",i.mode=jP;break}if(l>>>=4,c-=4,x=8+(15&l),0===i.wbits&&(i.wbits=x),x>15||x>i.wbits){t.msg="invalid window size",i.mode=jP;break}i.dmax=1<<i.wbits,i.flags=0,t.adler=i.check=1,i.mode=512&l?16189:IP,l=0,c=0;break;case 16181:for(;c<16;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(i.flags=l,(255&i.flags)!==PP){t.msg="unknown compression method",i.mode=jP;break}if(57344&i.flags){t.msg="unknown header flags set",i.mode=jP;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,i.check=jM(i.check,A,2,0)),l=0,c=0,i.mode=16182;case 16182:for(;c<32;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}i.head&&(i.head.time=l),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,i.check=jM(i.check,A,4,0)),l=0,c=0,i.mode=16183;case 16183:for(;c<16;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,i.check=jM(i.check,A,2,0)),l=0,c=0,i.mode=16184;case 16184:if(1024&i.flags){for(;c<16;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,i.check=jM(i.check,A,2,0)),l=0,c=0}else i.head&&(i.head.extra=null);i.mode=16185;case 16185:if(1024&i.flags&&(f=i.length,f>a&&(f=a),f&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(n.subarray(r,r+f),x)),512&i.flags&&4&i.wrap&&(i.check=jM(i.check,n,f,r)),a-=f,r+=f,i.length-=f),i.length))break t;i.length=0,i.mode=16186;case 16186:if(2048&i.flags){if(0===a)break t;f=0;do{x=n[r+f++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x))}while(x&&f<a);if(512&i.flags&&4&i.wrap&&(i.check=jM(i.check,n,f,r)),a-=f,r+=f,x)break t}else i.head&&(i.head.name=null);i.length=0,i.mode=16187;case 16187:if(4096&i.flags){if(0===a)break t;f=0;do{x=n[r+f++],i.head&&x&&i.length<65536&&(i.head.comment+=String.fromCharCode(x))}while(x&&f<a);if(512&i.flags&&4&i.wrap&&(i.check=jM(i.check,n,f,r)),a-=f,r+=f,x)break t}else i.head&&(i.head.comment=null);i.mode=16188;case 16188:if(512&i.flags){for(;c<16;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(4&i.wrap&&l!==(65535&i.check)){t.msg="header crc mismatch",i.mode=jP;break}l=0,c=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),t.adler=i.check=0,i.mode=IP;break;case 16189:for(;c<32;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}t.adler=i.check=GP(l),l=0,c=0,i.mode=NP;case NP:if(0===i.havedict)return t.next_out=o,t.avail_out=h,t.next_in=r,t.avail_in=a,i.hold=l,i.bits=c,EP;t.adler=i.check=1,i.mode=IP;case IP:if(e===wP||e===bP)break t;case TP:if(i.last){l>>>=7&c,c-=7&c,i.mode=DP;break}for(;c<3;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}switch(i.last=1&l,l>>>=1,c-=1,3&l){case 0:i.mode=16193;break;case 1:if(XP(i),i.mode=RP,e===bP){l>>>=2,c-=2;break t}break;case 2:i.mode=16196;break;case 3:t.msg="invalid block type",i.mode=jP}l>>>=2,c-=2;break;case 16193:for(l>>>=7&c,c-=7&c;c<32;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if((65535&l)!=(l>>>16^65535)){t.msg="invalid stored block lengths",i.mode=jP;break}if(i.length=65535&l,l=0,c=0,i.mode=OP,e===bP)break t;case OP:i.mode=16195;case 16195:if(f=i.length,f){if(f>a&&(f=a),f>h&&(f=h),0===f)break t;s.set(n.subarray(r,r+f),o),a-=f,r+=f,h-=f,o+=f,i.length-=f;break}i.mode=IP;break;case 16196:for(;c<14;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(i.nlen=257+(31&l),l>>>=5,c-=5,i.ndist=1+(31&l),l>>>=5,c-=5,i.ncode=4+(15&l),l>>>=4,c-=4,i.nlen>286||i.ndist>30){t.msg="too many length or distance symbols",i.mode=jP;break}i.have=0,i.mode=16197;case 16197:for(;i.have<i.ncode;){for(;c<3;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}i.lens[L[i.have++]]=7&l,l>>>=3,c-=3}for(;i.have<19;)i.lens[L[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,C={bits:i.lenbits},S=vP(0,i.lens,0,19,i.lencode,0,i.work,C),i.lenbits=C.bits,S){t.msg="invalid code lengths set",i.mode=jP;break}i.have=0,i.mode=16198;case 16198:for(;i.have<i.nlen+i.ndist;){for(;E=i.lencode[l&(1<<i.lenbits)-1],m=E>>>24,_=E>>>16&255,v=65535&E,!(m<=c);){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(v<16)l>>>=m,c-=m,i.lens[i.have++]=v;else{if(16===v){for(M=m+2;c<M;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(l>>>=m,c-=m,0===i.have){t.msg="invalid bit length repeat",i.mode=jP;break}x=i.lens[i.have-1],f=3+(3&l),l>>>=2,c-=2}else if(17===v){for(M=m+3;c<M;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}l>>>=m,c-=m,x=0,f=3+(7&l),l>>>=3,c-=3}else{for(M=m+7;c<M;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}l>>>=m,c-=m,x=0,f=11+(127&l),l>>>=7,c-=7}if(i.have+f>i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=jP;break}for(;f--;)i.lens[i.have++]=x}}if(i.mode===jP)break;
vendor: 4,115 bytes, line 2
2if(0===i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=jP;break}if(i.lenbits=9,C={bits:i.lenbits},S=vP(1,i.lens,0,i.nlen,i.lencode,0,i.work,C),i.lenbits=C.bits,S){t.msg="invalid literal/lengths set",i.mode=jP;break}if(i.distbits=6,i.distcode=i.distdyn,C={bits:i.distbits},S=vP(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,C),i.distbits=C.bits,S){t.msg="invalid distances set",i.mode=jP;break}if(i.mode=RP,e===bP)break t;case RP:i.mode=FP;case FP:if(a>=6&&h>=258){t.next_out=o,t.avail_out=h,t.next_in=r,t.avail_in=a,i.hold=l,i.bits=c,fP(t,d),o=t.next_out,s=t.output,h=t.avail_out,r=t.next_in,n=t.input,a=t.avail_in,l=i.hold,c=i.bits,i.mode===IP&&(i.back=-1);break}for(i.back=0;E=i.lencode[l&(1<<i.lenbits)-1],m=E>>>24,_=E>>>16&255,v=65535&E,!(m<=c);){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(_&&!(240&_)){for(y=m,w=_,b=v;E=i.lencode[b+((l&(1<<y+w)-1)>>y)],m=E>>>24,_=E>>>16&255,v=65535&E,!(y+m<=c);){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}l>>>=y,c-=y,i.back+=y}if(l>>>=m,c-=m,i.back+=m,i.length=v,0===_){i.mode=16205;break}if(32&_){i.back=-1,i.mode=IP;break}if(64&_){t.msg="invalid literal/length code",i.mode=jP;break}i.extra=15&_,i.mode=16201;case 16201:if(i.extra){for(M=i.extra;c<M;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,c-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=16202;case 16202:for(;E=i.distcode[l&(1<<i.distbits)-1],m=E>>>24,_=E>>>16&255,v=65535&E,!(m<=c);){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(!(240&_)){for(y=m,w=_,b=v;E=i.distcode[b+((l&(1<<y+w)-1)>>y)],m=E>>>24,_=E>>>16&255,v=65535&E,!(y+m<=c);){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}l>>>=y,c-=y,i.back+=y}if(l>>>=m,c-=m,i.back+=m,64&_){t.msg="invalid distance code",i.mode=jP;break}i.offset=v,i.extra=15&_,i.mode=16203;case 16203:if(i.extra){for(M=i.extra;c<M;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,c-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){t.msg="invalid distance too far back",i.mode=jP;break}i.mode=16204;case 16204:if(0===h)break t;if(f=d-h,i.offset>f){if(f=i.offset-f,f>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=jP;break}f>i.wnext?(f-=i.wnext,p=i.wsize-f):p=i.wnext-f,f>i.length&&(f=i.length),g=i.window}else g=s,p=o-i.offset,f=i.length;f>h&&(f=h),h-=f,i.length-=f;do{s[o++]=g[p++]}while(--f);0===i.length&&(i.mode=FP);break;case 16205:if(0===h)break t;s[o++]=i.length,h--,i.mode=FP;break;case DP:if(i.wrap){for(;c<32;){if(0===a)break t;a--,l|=n[r++]<<c,c+=8}if(d-=h,t.total_out+=d,i.total+=d,4&i.wrap&&d&&(t.adler=i.check=i.flags?jM(i.check,s,d,o-d):FM(i.check,s,d,o-d)),d=h,4&i.wrap&&(i.flags?l:GP(l))!==i.check){t.msg="incorrect data check",i.mode=jP;break}l=0,c=0}i.mode=16207;case 16207:if(i.wrap&&i.flags){for(;c<32;){if(0===a)break t;a--,l+=n[r++]<<c,c+=8}if(4&i.wrap&&l!==(4294967295&i.total)){t.msg="incorrect length check",i.mode=jP;break}l=0,c=0}i.mode=16208;case 16208:S=SP;break t;case jP:S=CP;break t;case 16210:return MP;default:return AP}return t.next_out=o,t.avail_out=h,t.next_in=r,t.avail_in=a,i.hold=l,i.bits=c,(i.wsize||d!==t.avail_out&&i.mode<jP&&(i.mode<DP||e!==yP))&&YP(t,t.output,t.next_out,d-t.avail_out),u-=t.avail_in,d-=t.avail_out,t.total_in+=u,t.total_out+=d,i.total+=d,4&i.wrap&&d&&(t.adler=i.check=i.flags?jM(i.check,s,d,t.next_out-d):FM(i.check,s,d,t.next_out-d)),t.data_type=i.bits+(i.last?64:0)+(i.mode===IP?128:0)+(i.mode===RP||i.mode===OP?256:0),(0===u&&0===d||e===yP)&&S===xP&&(S=LP),S},tk=t=>{if(zP(t))return AP;let e=t.state;return e.window&&(e.window=null),t.state=null,xP},ek=(t,e)=>{if(zP(t))return AP;const i=t.state;return 2&i.wrap?(i.head=e,e.done=!1,xP):AP},ik=(t,e)=>{const i=e.length;let n,s,r;return zP(t)?AP:(n=t.state,0!==n.wrap&&n.mode!==NP?AP:n.mode===NP&&(s=1,s=FM(s,e,i,0),s!==n.check)?CP:(r=YP(t,e,i,i),r?(n.mode=16210,MP):(n.havedict=1,xP)))},nk=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const sk=Object.prototype.toString,{Z_NO_FLUSH:rk,Z_FINISH:ok,Z_OK:ak,Z_STREAM_END:hk,Z_NEED_DICT:lk,Z_STREAM_ERROR:ck,Z_DATA_ERROR:uk,Z_MEM_ERROR:dk,Z_BUF_ER
vendor: 8,470 bytes, line 2
2ROR:fk}=BM,pk={chunkSize:65536,windowBits:15,to:""};function gk(t){this.options=WL({},pk,t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ZL,this.strm.avail_out=0;let i=JP(this.strm,e.windowBits);if(i!==ak)throw new Error(GM[i]);if(this.header=new nk,ek(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=$L(e.dictionary):"[object ArrayBuffer]"===sk.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(i=ik(this.strm,e.dictionary),i!==ak)))throw new Error(GM[i])}function mk(t,e){const i=new gk(e);if(i.push(t,!0),i.err)throw i.msg||GM[i.err];return i.result}gk.prototype.push=function(t,e){const i=this.strm,n=this.options.chunkSize,s=this.options.dictionary;let r,o,a;if(this.ended)return!1;for(o=e===~~e?e:!0===e?ok:rk,"[object ArrayBuffer]"===sk.call(t)?i.input=new Uint8Array(t):i.input=t,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),r=QP(i,o),r===lk&&s&&(r=ik(i,s),r===ak?r=QP(i,o):r===uk&&(r=lk));i.avail_in>0&&r===hk&&2&i.state.wrap&&0!==i.state.flags&&0!==i.input[i.next_in];)ZP(i),r=QP(i,o);switch(r){case ck:case uk:case lk:case dk:return this.onEnd(r),this.ended=!0,!1}if(a=i.avail_out,i.next_out&&(0===i.avail_out||r===hk||o>0))if("string"===this.options.to){let t=YL(i.output,i.next_out),e=i.next_out-t,s=XL(i.output,t);i.next_out=e,i.avail_out=n-e,e&&i.output.set(i.output.subarray(t,t+e),0),this.onData(s)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out)),i.avail_out=0,i.next_out=0;if(r!==ak&&r!==fk||0!==a){if(r===hk)return r=tk(this.strm),this.onEnd(r),this.ended=!0,!0;if(0===i.avail_in){if(o===ok)return r=tk(this.strm),this.onEnd(r===ak?fk:r),this.ended=!0,!1;break}}}return!0},gk.prototype.onData=function(t){this.chunks.push(t)},gk.prototype.onEnd=function(t){t===ak&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=VL(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var _k={Inflate:gk,inflate:mk,inflateRaw:function(t,e){return(e=e||{}).raw=!0,mk(t,e)},ungzip:mk,constants:BM};const{Deflate:vk,deflate:yk,deflateRaw:wk,gzip:bk}=uP,{Inflate:xk,inflate:Sk,inflateRaw:Ek,ungzip:Ak}=_k;var Ck=xk,Mk=Sk;const Lk=[];for(let t=0;t<256;t++){let e=t;for(let t=0;t<8;t++)1&e?e=3988292384^e>>>1:e>>>=1;Lk[t]=e}const Pk=4294967295;function kk(t,e,i){const n=t.readUint32(),s=(r=new Uint8Array(t.buffer,t.byteOffset+t.offset-e-4,e),(function(t,e,i){let n=t;for(let t=0;t<i;t++)n=Lk[255&(n^e[t])]^n>>>8;return n}(Pk,r,e)^Pk)>>>0);var r;if(s!==n)throw new Error(`CRC mismatch for chunk ${i}. Expected ${n}, found ${s}`)}function Nk(t,e,i){for(let n=0;n<i;n++)e[n]=t[n]}function Ik(t,e,i,n){let s=0;for(;s<n;s++)e[s]=t[s];for(;s<i;s++)e[s]=t[s]+e[s-n]&255}function Tk(t,e,i,n){let s=0;if(0===i.length)for(;s<n;s++)e[s]=t[s];else for(;s<n;s++)e[s]=t[s]+i[s]&255}function Ok(t,e,i,n,s){let r=0;if(0===i.length){for(;r<s;r++)e[r]=t[r];for(;r<n;r++)e[r]=t[r]+(e[r-s]>>1)&255}else{for(;r<s;r++)e[r]=t[r]+(i[r]>>1)&255;for(;r<n;r++)e[r]=t[r]+(e[r-s]+i[r]>>1)&255}}function Rk(t,e,i,n,s){let r=0;if(0===i.length){for(;r<s;r++)e[r]=t[r];for(;r<n;r++)e[r]=t[r]+e[r-s]&255}else{for(;r<s;r++)e[r]=t[r]+i[r]&255;for(;r<n;r++)e[r]=t[r]+Fk(e[r-s],i[r],i[r-s])&255}}function Fk(t,e,i){const n=t+e-i,s=Math.abs(n-t),r=Math.abs(n-e),o=Math.abs(n-i);return s<=r&&s<=o?t:r<=o?e:i}function Dk(t,e,i,n,s,r){switch(t){case 0:Nk(e,i,s);break;case 1:Ik(e,i,s,r);break;case 2:Tk(e,i,n,s);break;case 3:Ok(e,i,n,s,r);break;case 4:Rk(e,i,n,s,r);break;default:throw new Error(`Unsupported filter: ${t}`)}}const jk=new Uint16Array([255]),Gk=255===new Uint8Array(jk.buffer)[0];function Bk(t){return(255&t)<<8|t>>8&255}const zk=new Uint16Array([255]),qk=255===new Uint8Array(zk.buffer)[0],Uk=new Uint8Array(0);function Wk(t){const{data:e,width:i,height:n,channels:s,depth:r}=t,o=Math.ceil(r/8)*s,a=Math.ceil(r/8*s*i),h=new Uint8Array(n*a);let l,c,u=Uk,d=0;for(let t=0;t<n;t++){switch(l=e.subarray(d+1,d+1+a),c=h.subarray(t*a,(t+1)*a),e[d]){case 0:Nk(l,c,a);break;case 1:Ik(l,c,a,o);break;case 2:Tk(l,c,u,a);break;case 3:Ok(l,c,u,a,o);break;case 4:Rk(l,c,u,a,o);break;default:throw new Error(`Unsupported filter: ${e[d]}`)}u=c,d+=a+1}if(16===r){const t=new Uint16Array(h.buffer);if(qk)for(let e=0;e<t.length;e++)t[e]=Vk(t[e]);return t}return h}function Vk(t){return(255&t)<<8|t>>8&255}const Hk=Uint8Array.of(137,80,78,71,13,10,26,10);function Kk(t){if(!function(t){if(t.length<Hk.length)return!1;for(let e=0;e<Hk.length;e++)if(t[e]!==Hk[e])return!1;return!0}(t.readBytes(Hk.length)))throw new Error("wrong PNG signature")}const $k=new TextDecoder("latin1");function Xk(t){if(function(t){if(!Yk.test(t))throw new Error("invalid latin1 text")}(t),0===t.length||t.length>79)throw new Error("keyword length must be between 1 and 79")}const Yk=/^[\u0000-\u00FF]*$/;function Zk(t){for(t.mark();0!==t.readByte(););const e=t.offset;t.reset();const i=$k.decode(t.readBytes(e-t.offset-1));return t.skip(1),Xk(i),i}class Jk extends iM{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(t,e={}){super(t);const{checkCrc:i=!1}=e;this._checkCrc=i,this._inflator=new Ck,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=-1,this._filterMethod=-1,this._interlaceMethod=-1,this._colorType=-1,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Kk(this);!this._end;){const t=this.readUint32(),e=this.readChars(4);this.decodeChunk(t,e)}return this.decodeImage(),this._png}decodeApng(){for(Kk(this);!this._end;){const t=this.readUint32(),e=this.readChars(4);this.decodeApngChunk(t,e)}return this.decodeApngImage(),this._apng}decodeChunk(t,e){const i=this.offset;switch(e){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case"tEXt":!function(t,e,i){const n=Zk(e);t[n]=function(t,e){return $k.decode(t.readBytes(e))}(e,i-n.length-1)}(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t)}if(this.offset-i!==t)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?kk(this,t+4,e):this.skip(4)}decodeApngChunk(t,e){const i=this.offset;switch("fdAT"!==e&&"IDAT"!==e&&this._writingDataChunks&&this.pushDataToFrame(),e){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,e),this.offset=i+t}if(this.offset-i!==t)throw new Error(`Length mismatch while decoding chunk ${e}`);this._checkCrc?kk(this,t+4,e):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=function(t){if(1!==t&&2!==t&&4!==t&&8!==t&&16!==t)throw new Error(`invalid bit depth: ${t}`);return t}(this.readUint8());const e=this.readUint8();let i;switch(this._colorType=e,e){case 0:case 3:i=1;break;case 2:i=3;break;case 4:i=2;break;case 6:i=4;break;default:throw new Error(`Unknown color type: ${e}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),0!==this._compressionMethod)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}
vendor: 1,258 bytes, line 2
2decodePLTE(t){if(t%3!=0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const e=t/3;this._hasPalette=!0;const i=[];this._palette=i;for(let t=0;t<e;t++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(t){this._writingDataChunks=!0;const e=t,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodeFDAT(t){this._writingDataChunks=!0;let e=t,i=this.offset+this.byteOffset;if(i+=4,e-=4,this._inflator.push(new Uint8Array(this.buffer,i,e)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(t)}decodetRNS(t){switch(this._colorType){case 0:case 2:if(t%2!=0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${t}`);if(t/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let e=0;e<t/2;e++)this._transparency[e]=this.readUint16();break;case 3:{if(t>this._palette.length)throw new Error(`tRNS chunk contains more alph
2a values than there are palette colors (${t} vs ${this._palette.length})`);let e=0;for(;e<t;e++){const t=this.readByte();this._palette[e].push(t)}for(;e<this._palette.length;e++)this._palette[e].push(255);break}default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(t){const e=Zk(this),i=this.readUint8();if(0!==i)throw new Error(`Unsupported iCCP compression method: ${i}`);const n=this.readBytes(t-e.length-2);this._png.iccEmbeddedProfile={name:e,profile:Mk(n)}}decodepHYs(){const t=this.readUint32(),e=this.readUint32(),i=this.readByte();this._png.resolution={x:t,y:e,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let t=0;t<this._numberOfFrames;t++){const e={sequenceNumber:this._frames[t].sequenceNumber,delayNumber:this._frames[t].delayNumber,delayDenominator:this._frames[t].delayDenominator,data:8===this._apng.depth?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(t);if(i){if(i.data=Wk({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),0===t||0===i.xOffset&&0===i.yOffset&&i.width===this._png.width&&i.height===this._png.height)e.data=i.data;else{const n=this._apng.frames.at(t-1);this.disposeFrame(i,n,e),this.addFrameDataToCanvas(e,i)}this._apng.frames.push(e)}}return this._apng}disposeFrame(t,e,i){switch(t.disposeOp){case 0:break;case 1:for(let e=0;e<this._png.height;e++)for(let n=0;n<this._png.width;n++){const s=(e*t.width+n)*this._png.channels;for(let t=0;t<this._png.channels;t++)i.data[s+t]=0}break;case 2:i.data.set(e.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(t,e){const i=1<<this._png.depth,n=(t,i)=>({index:((t+e.yOffset)*this._png.width+e.xOffset+i)*this._png.channels,frameIndex:(t*e.width+i)*this._png.channels});switch(e.blendOp){case 0:for(let i=0;i<e.height;i++)for(let s=0;s<e.width;s++){const{index:r,frameIndex:o}=n(i,s);for(let i=0;i<this._png.channels;i++)t.data[r+i]=e.data[o+i]}break;case 1:for(let s=0;s<e.height;s++)for(let r=0;r<e.width;r++){const{index:o,frameIndex:a}=n(s,r);for(let n=0;n<this._png.channels;n++){const s=e.data[a+this._png.channels-1]/i,r=n%(this._png.channels-1)==0?1:e.data[a+n],h=Math.floor(s*r+(1-s)*t.data[o+n]);t.data[o+n]+=h}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const t=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(0!==this._filterMethod)throw new Error(`Filter method ${this._filterMethod} not supported`);if(0===this._interlaceMethod)this._png.data=Wk({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else{if(1!==this._interlaceMethod)throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._png.data=function(t){const{data:e,width:i,height:n,channels:s,depth:r}=t,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],a=Math.ceil(r/8)*s,h=new Uint8Array(n*i*a);let l=0;for(let t=0;t<7;t++){const s=o[t],r=Math.ceil((i-s.x)/s.xStep),c=Math.ceil((n-s.y)/s.yStep);if(r<=0||c<=0)continue;const u=r*a,d=new Uint8Array(u);for(let t=0;t<c;t++){const o=e[l++],c=e.subarray(l,l+u);l+=u;const f=new Uint8Array(u);Dk(o,c,f,d,u,a),d.set(f);for(let e=0;e<r;e++){const r=s.x+e*s.xStep,o=s.y+t*s.yStep;if(!(r>=i||o>=n))for(let t=0;t<a;t++)h[(o*i+r)*a+t]=f[e*a+t]}}}if(16===r){const t=new Uint16Array(h.buffer);if(Gk)for(let e=0;e<t.length;e++)t[e]=Bk(t[e]);return t}return h}({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const t=this._inflator.result,e=this._frames.at(-1);e?e.data=t:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:0,blendOp:0,data:t}),this._inflator=new Ck,this._writingDataChunks=!1}}var Qk;!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"}(Qk||(Qk={}));var tN=function(){return"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:this}();function eN(){tN.console&&"function"==typeof tN.console.log&&tN.console.log.apply(tN.console,arguments)}var iN={log:eN,warn:function(t){tN.console&&("function"==typeof tN.console.warn?tN.console.warn.apply(tN.console,arguments):eN.call(null,arguments))},error:function(t){tN.console&&("function"==typeof tN.console.error?t
vendor: 3,756 bytes, line 2
2N.console.error.apply(tN.console,arguments):eN(t))}};function nN(t,e,i){var n=new XMLHttpRequest;n.open("GET",t),n.responseType="blob",n.onload=function(){oN(n.response,e,i)},n.onerror=function(){iN.error("could not download file")},n.send()}function sN(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return e.status>=200&&e.status<=299}function rN(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(i){var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var oN=tN.saveAs||("object"!==("undefined"==typeof window?"undefined":(0,fC.A)(window))||window!==tN?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(t,e,i){var n=tN.URL||tN.webkitURL,s=document.createElement("a");e=e||t.name||"download",s.download=e,s.rel="noopener","string"==typeof t?(s.href=t,s.origin!==location.origin?sN(s.href)?nN(t,e,i):rN(s,s.target="_blank"):rN(s)):(s.href=n.createObjectURL(t),setTimeout(function(){n.revokeObjectURL(s.href)},4e4),setTimeout(function(){rN(s)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,i){if(e=e||t.name||"download","string"==typeof t)if(sN(t))nN(t,e,i);else{var n=document.createElement("a");n.href=t,n.target="_blank",setTimeout(function(){rN(n)})}else navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!==(0,fC.A)(e)&&(iN.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob([String.fromCharCode(65279),t],{type:t.type}):t}(t,i),e)}:function(t,e,i,n){if((n=n||open("","_blank"))&&(n.document.title=n.document.body.innerText="downloading..."),"string"==typeof t)return nN(t,e,i);var s="application/octet-stream"===t.type,r=/constructor/i.test(tN.HTMLElement)||tN.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||s&&r)&&"object"===("undefined"==typeof FileReader?"undefined":(0,fC.A)(FileReader))){var a=new FileReader;a.onloadend=function(){var t=a.result;t=o?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),n?n.location.href=t:location=t,n=null},a.readAsDataURL(t)}else{var h=tN.URL||tN.webkitURL,l=h.createObjectURL(t);n?n.location=l:location.href=l,n=null,setTimeout(function(){h.revokeObjectURL(l)},4e4)}});function aN(t){var e;t=t||"",this.ok=!1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
20",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var i=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],n=0;n<i.length;n++){var s=i[n].re,r=i[n].process,o=s.exec(t);o&&(e=r(o),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==i.length&&(i="0"+i),"#"+t+e+i}}var hN=tN.atob.bind(tN),lN=tN.btoa.bind(tN);function cN(t,e){var i=t[0],n=t[1],s=t[2],r=t[3];i=dN(i,n,s,r,e[0],7,-680876936),r=dN(r,i,n,s,e[1],12,-389564586),s=dN(s,r,i,n,e[2],17,606105819),n=dN(n,s,r,i,e[3],22,-1044525330),i=dN(i,n,s,r,e[4],7,-176418897),r=dN(r,i,n,s,e[5],12,1200080426),s=dN(s,r,i,n,e[6],17,-1473231341),n=dN(n,s,r,i,e[7],22,-45705983),i=dN(i,n,s,r,e[8],7,1770035416),r=dN(r,i,n,s,e[9],12,-1958414417),s=dN(s,r,i,n,e[10],17,-42063),n=dN(n,s,r,i,e[11],22,-1990404162),i=dN(i,n,s,r,e[12],7,1804603682),r=dN(r,i,n,s,e[13],12,-40341101),s=dN(s,r,i,n,e[14],17,-1502002290),i=fN(i,n=dN(n,s,r,i,e[15],22,1236535329),s,r,e[1],5,-165796510),r=fN(r,i,n,s,e[6],9,-1069501632),s=fN(s,r,i,n,e[11],14,643717713),n=fN(n,s,r,i,e[0],20,-373897302),i=fN(i,n,s,r,e[5],5,-701558691),r=fN(r,i,n,s,e[10],9,38016083),s=fN(s,r,i,n,e[15],14,-660478335),n=fN(n,s,r,i,e[4],20,-405537848),i=fN(i,n,s,r,e[9],5,568446438),r=fN(r,i,n,s,e[14],9,-1019803690),s=fN(s,r,i,n,e[3],14,-187363961),n=fN(n,s,r,i,e[8],20,1163531501),i=fN(i,n,s,r,e[13],5,-1444681467),r
vendor: 8,471 bytes, line 2
2=fN(r,i,n,s,e[2],9,-51403784),s=fN(s,r,i,n,e[7],14,1735328473),i=pN(i,n=fN(n,s,r,i,e[12],20,-1926607734),s,r,e[5],4,-378558),r=pN(r,i,n,s,e[8],11,-2022574463),s=pN(s,r,i,n,e[11],16,1839030562),n=pN(n,s,r,i,e[14],23,-35309556),i=pN(i,n,s,r,e[1],4,-1530992060),r=pN(r,i,n,s,e[4],11,1272893353),s=pN(s,r,i,n,e[7],16,-155497632),n=pN(n,s,r,i,e[10],23,-1094730640),i=pN(i,n,s,r,e[13],4,681279174),r=pN(r,i,n,s,e[0],11,-358537222),s=pN(s,r,i,n,e[3],16,-722521979),n=pN(n,s,r,i,e[6],23,76029189),i=pN(i,n,s,r,e[9],4,-640364487),r=pN(r,i,n,s,e[12],11,-421815835),s=pN(s,r,i,n,e[15],16,530742520),i=gN(i,n=pN(n,s,r,i,e[2],23,-995338651),s,r,e[0],6,-198630844),r=gN(r,i,n,s,e[7],10,1126891415),s=gN(s,r,i,n,e[14],15,-1416354905),n=gN(n,s,r,i,e[5],21,-57434055),i=gN(i,n,s,r,e[12],6,1700485571),r=gN(r,i,n,s,e[3],10,-1894986606),s=gN(s,r,i,n,e[10],15,-1051523),n=gN(n,s,r,i,e[1],21,-2054922799),i=gN(i,n,s,r,e[8],6,1873313359),r=gN(r,i,n,s,e[15],10,-30611744),s=gN(s,r,i,n,e[6],15,-1560198380),n=gN(n,s,r,i,e[13],21,1309151649),i=gN(i,n,s,r,e[4],6,-145523070),r=gN(r,i,n,s,e[11],10,-1120210379),s=gN(s,r,i,n,e[2],15,718787259),n=gN(n,s,r,i,e[9],21,-343485551),t[0]=SN(i,t[0]),t[1]=SN(n,t[1]),t[2]=SN(s,t[2]),t[3]=SN(r,t[3])}function uN(t,e,i,n,s,r){return e=SN(SN(e,t),SN(n,r)),SN(e<<s|e>>>32-s,i)}function dN(t,e,i,n,s,r,o){return uN(e&i|~e&n,t,e,s,r,o)}function fN(t,e,i,n,s,r,o){return uN(e&n|i&~n,t,e,s,r,o)}function pN(t,e,i,n,s,r,o){return uN(e^i^n,t,e,s,r,o)}function gN(t,e,i,n,s,r,o){return uN(i^(e|~n),t,e,s,r,o)}function mN(t){var e,i=t.length,n=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)cN(n,_N(t.substring(e-64,e)));t=t.substring(e-64);var s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)s[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(s[e>>2]|=128<<(e%4<<3),e>55)for(cN(n,s),e=0;e<16;e++)s[e]=0;return s[14]=8*i,cN(n,s),n}function _N(t){var e,i=[];for(e=0;e<64;e+=4)i[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return i}var vN="0123456789abcdef".split("");function yN(t){for(var e="",i=0;i<4;i++)e+=vN[t>>8*i+4&15]+vN[t>>8*i&15];return e}function wN(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function bN(t){return mN(t).map(wN).join("")}var xN="5d41402abc4b2a76b9719d911017c592"!=function(t){for(var e=0;e<t.length;e++)t[e]=yN(t[e]);return t.join("")}(mN("hello"));function SN(t,e){if(xN){var i=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(i>>16)<<16|65535&i}return t+e&4294967295}function EN(t,e){var i,n,s,r;if(t!==i){for(var o=(s=t,r=1+(256/t.length|0),new Array(r+1).join(s)),a=[],h=0;h<256;h++)a[h]=h;var l=0;for(h=0;h<256;h++){var c=a[h];l=(l+c+o.charCodeAt(h))%256,a[h]=a[l],a[l]=c}i=t,n=a}else a=n;var u=e.length,d=0,f=0,p="";for(h=0;h<u;h++)f=(f+(c=a[d=(d+1)%256]))%256,a[d]=a[f],a[f]=c,o=a[(a[d]+a[f])%256],p+=String.fromCharCode(e.charCodeAt(h)^o);return p}var AN={print:4,modify:8,copy:16,"annot-forms":32};function CN(t,e,i,n){this.v=1,this.r=2;var s=192;t.forEach(function(t){if(void 0!==AN.perm)throw new Error("Invalid permission: "+t);s+=AN[t]}),this.padding="(¿N^NuŠAd\0NVÿú�\b..\0¶Ðh>€/\f©þdSiz";var r=(e+this.padding).substr(0,32),o=(i+this.padding).substr(0,32);this.O=this.processOwnerPassword(r,o),this.P=-(1+(255^s)),this.encryptionKey=bN(r+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(n)).substr(0,5),this.U=EN(this.encryptionKey,this.padding)}function MN(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",i=t.length,n=0;n<i;n++){var s=t.charCodeAt(n);e+=s<33||35===s||37===s||40===s||41===s||47===s||60===s||62===s||91===s||93===s||123===s||125===s||s>126?"#"+("0"+s.toString(16)).slice(-2):t[n]}return e}function LN(t){if("object"!==(0,fC.A)(t))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(t,i,n){if(n=n||!1,"string"!=typeof t||"function"!=typeof i||"boolean"!=typeof n)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(t)||(e[t]={});var s=Math.random().toString(35);return e[t][s]=[i,!!n],s},this.unsubscribe=function(t){for(var i in e)if(e[i][t])return delete e[i][t],0===Object.keys(e[i]).length&&delete e[i],!0;return!1},this.publish=function(i){if(e.hasOwnProperty(i)){var n=Array.prototype.slice.call(arguments,1),s=[];for(var r in e[i]){var o=e[i][r];try{o[0].apply(t,n)}catch(t){tN.console&&iN.error("jsPDF PubSub Error",t.message,t)}o[1]&&s.push(r)}s.length&&s.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function PN(t){if(!(this instanceof PN))return new PN(t);var e="opacity,stroke-opacity".split(",");for(var i in t)t.hasOwnProperty(i)&&e.indexOf(i)>=0&&(this[i]=t[i]);this.id="",this.objectNumber=-1}function kN(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function NN(t,e,i,n,s){if(!(this instanceof NN))return new NN(t,e,i,n,s);this.type="axial"===t?2:3,this.coords=e,this.colors=i,kN.call(this,n,s)}function IN(t,e,i,n,s){if(!(this instanceof IN))return new IN(t,e,i,n,s);this.boundingBox=t,this.xStep=e,this.yStep=i,this.stream="",this.cloneIndex=0,kN.call(this,n,s)}function TN(t){var e,i="string"==typeof arguments[0]?arguments[0]:"p",n=arguments[1],s=arguments[2],r=arguments[3],o=[],a=1,h=16,l="S",c=null;"object"===(0,fC.A)(t=t||{})&&(i=t.orientation,n=t.unit||n,s=t.format||s,r=t.compress||t.compressPdf||r,null!==(c=t.encryption||null)&&(c.userPassword=c.userPassword||"",c.ownerPassword=c.ownerPassword||"",c.userPermissions=c.userPermissions||[]),a="number"==typeof t.userUnit?Math.abs(t.userUnit):1,void 0!==t.precision&&(e=t.precision),void 0!==t.floatPrecision&&(h=t.floatPrecision),l=t.defaultPathOperation||"S"),o=t.filters||(!0===r?["FlateEncode"]:o),n=n||"mm",i=(""+(i||"P")).toLowerCase();var u=t.putOnlyUsedFonts||!1,d={},f={internal:{},__private__:{}};f.__private__.PubSub=LN;var p="1.3",g=f.__private__.getPdfVersion=function(){return p};f.__private__.setPdfVersion=function(t){p=t};var m={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};f.__private__.getPageFormats=function(){return m};var _=f.__private__.getPageFormat=function(t){return m[t]};s=s||"a4";var v="compat",y="advanced",w=v;function b(){this.saveGraphicsState(),Z(new Nt(dt,0,0,-dt,0,pi()*dt).toString()+" cm"),this.setFontSize(this.getFontSize()/dt),l="n",w=y}function x(){this.restoreGraphicsState(),l="S",w=v}var S=f.__private__.combineFontStyleAndFontWeight=function(t,e){if("bold"==t&&"normal"==e||"bold"==t&&400==e||"normal"==t&&"italic"==e||"bold"==t&&"italic"==e)throw new Error("Invalid Combination of fontweight and fontstyle");return e&&(t=400==e||"normal"===e?"italic"===t?"italic":"normal":700!=e&&"bold"!==e||"normal"!==t?(700==e?"bold":e)+""+t:"bold"),t};f.advancedAPI=function(t){var e=w===v;return e&&b.call(this),"function"!=typeof t||(t(this),e&&x.call(this)),this},f.compatAPI=function(t){var e=w===y;return e&&x.call(this),"function"!=typeof t||(t(this),e&&b.call(this)),this},f.isAdvancedAPI=function(){return w===y};var E,A=function(t){if(w!==y)throw new Error(t+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},C=f.roundToPrecision=f.__private__.roundToPrecision=function(t,i){var n=e||i;if(isNaN(t)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return t.toFixed(n).replace(/0+$/,"")};E=f.hpf=f.__private__.hpf="number"==typeof h?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return C(t,h)}:"smart"===h?function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.hpf");return C(t,t>-1&&t<1?16:5)}:function(t){if(isNaN(t))throw new Error("Invalid argument passed to 
2jsPDF.hpf");return C(t,16)};var M=f.f2=f.__private__.f2=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f2");return C(t,2)},L=f.__private__.f3=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.f3");return C(t,3)},P=f.scale=f.__private__.scale=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.scale");return w===v?t*dt:w===y?t:void 0},k=function(t){return P(function(t){return w===v?pi()-t:w===y?t:void 0}(t))};f.__private__.setPrecision=f.setPrecision=function(t){"number"==typeof parseInt(t,10)&&(e=parseInt(t,10))};var N,I="00000000000000000000000000000000",T=f.__private__.getFileId=function(){return I},O=f.__private__.setFileId=function(t){return I=void 0!==t&&/^[a-fA-F0-9]{32}$/.test(t)?t.toUpperCase():I.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==c&&(we=new CN(c.userPermissions,c.userPassword,c.ownerPassword,I)),I};f.setFileId=function(t){return O(t),this},f.getFileId=function(){return T()};var R=f.__private__.convertDateToPDFDate=function(t){var e=t.getTimezoneOffset(),i=e<0?"+":"-",n=Math.floor(Math.abs(e/60)),s=Math.abs(e%60),r=[i,B(n),"'",B(s),"'"].join("");return["D:",t.getFullYear(),B(t.getMonth()+1),B(t.getDate()),B(t.getHours()),B(t.getMinutes()),B(t.getSeconds()),r].join("")},F=f.__private__.convertPDFDateToDate=function(t){var e=parseInt(t.substr(2,4),10),i=parseInt(t.substr(6,2),10)-1,n=parseInt(t.substr(8,2),10),s=parseInt(t.substr(10,2),10),r=parseInt(t.substr(12,2),10),o=parseInt(t.substr(14,2),10);return new Date(e,i,n,s,r,o,0)},D=f.__private__.setCreationDate=function(t){var e;if(void 0===t&&(t=new Date),t instanceof Date)e=R(t);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(t))throw new Error("Invalid argument passed to jsPDF.setCreationDate");e=t}return N=e},j=f.__private__.getCreationDate=function(t){var e=N;return"jsDate"===t&&(e=F(N)),e};f.setCreationDate=function(t){return D(t),this},f.getCreationDate=function(t){return j(t)};var G,B=f.__private__.padd2=function(t){return("0"+parseInt(t)).slice(-2)},z=f.__private__.padd2Hex=function(t){return("00"+(t=t.toString())).substr(t.length)},q=0,U=[],W=[],V=0,H=[],K=[],$=!1,X=W;f.__private__.setCustomOutputDestination=function(t){$=!0,X=t};var Y=function(t){$||(X=t)};f.__private__.resetCustomOutputDestination=function(){$=!1,X=W};var Z=f.__private__.out=function(t){return t=t.toString(),V+=t.length+1,X.push(t),X},J=f.__private__.write=function(t){return Z(1===arguments.length?t.toString():Array.prototype.join.call(arguments," "))},Q=f.__private__.getArrayBuffer=function(t){for(var e=t.length,i=new ArrayBuffer(e),n=new Uint8Array(i);e--;)n[e]=t.charCodeAt(e);return i},tt=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];f.__private__.getStandardFonts=function(){return tt};var et=t.fontSize||16;f.__private__.setFontSize=f.setFontSize=function(t){return et=w===y?t/dt:t,this};var it,nt=f.__private__.getFontSize=f.getFontSize=function(){return w===v?et:et*dt},st=t.R2L||!1;f.__private__.setR2L=f.setR2L=function(t){return st=t,this},f.__private__.getR2L=f.getR2L=function(){return st};var rt,ot=f.__private__.setZoomMode=function(t){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(t))it=t;else if(isNaN(t)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(t))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+t+'" is not recognized.');it=t}else it=parseInt(t,10)};f.__private__.getZoomMode=function(){return it};var at,ht=f.__private__.setPageMode=function(t){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(t))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+t+'" is not recognized.');rt=t};f.__private__.getPageMode=function(){return rt};var lt=f.__private__.setLayoutMode=function(t){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(t))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+t+'" is not recognized.');at=t};f.__private__.getLayoutMode=function(){return at}
vendor: 4,214 bytes, line 2
2,f.__private__.setDisplayMode=f.setDisplayMode=function(t,e,i){return ot(t),lt(e),ht(i),this};var ct={title:"",subject:"",author:"",keywords:"",creator:""};f.__private__.getDocumentProperty=function(t){if(-1===Object.keys(ct).indexOf(t))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ct[t]},f.__private__.getDocumentProperties=function(){return ct},f.__private__.setDocumentProperties=f.setProperties=f.setDocumentProperties=function(t){for(var e in ct)ct.hasOwnProperty(e)&&t[e]&&(ct[e]=t[e]);return this},f.__private__.setDocumentProperty=function(t,e){if(-1===Object.keys(ct).indexOf(t))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ct[t]=e};var ut,dt,ft,pt,gt,mt={},_t={},vt=[],yt={},wt={},bt={},xt={},St=null,Et=0,At=[],Ct=new LN(f),Mt=t.hotfixes||[],Lt={},Pt={},kt=[],Nt=function t(e,i,n,s,r,o){if(!(this instanceof t))return new t(e,i,n,s,r,o);isNaN(e)&&(e=1),isNaN(i)&&(i=0),isNaN(n)&&(n=0),isNaN(s)&&(s=1),isNaN(r)&&(r=0),isNaN(o)&&(o=0),this._matrix=[e,i,n,s,r,o]};Object.defineProperty(Nt.prototype,"sx",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Nt.prototype,"shy",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Nt.prototype,"shx",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Nt.prototype,"sy",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Nt.prototype,"tx",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Nt.prototype,"ty",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Nt.prototype,"a",{get:function(){return this._matrix[0]},set:function(t){this._matrix[0]=t}}),Object.defineProperty(Nt.prototype,"b",{get:function(){return this._matrix[1]},set:function(t){this._matrix[1]=t}}),Object.defineProperty(Nt.prototype,"c",{get:function(){return this._matrix[2]},set:function(t){this._matrix[2]=t}}),Object.defineProperty(Nt.prototype,"d",{get:function(){return this._matrix[3]},set:function(t){this._matrix[3]=t}}),Object.defineProperty(Nt.prototype,"e",{get:function(){return this._matrix[4]},set:function(t){this._matrix[4]=t}}),Object.defineProperty(Nt.prototype,"f",{get:function(){return this._matrix[5]},set:function(t){this._matrix[5]=t}}),Object.defineProperty(Nt.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Nt.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Nt.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Nt.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Nt.prototype.join=function(t){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(E).join(t)},Nt.prototype.multiply=function(t){var e=t.sx*this.sx+t.shy*this.shx,i=t.sx*this.shy+t.shy*this.sy,n=t.shx*this.sx+t.sy*this.shx,s=t.shx*this.shy+t.sy*this.sy,r=t.tx*this.sx+t.ty*this.shx+this.tx,o=t.tx*this.shy+t.ty*this.sy+this.ty;return new Nt(e,i,n,s,r,o)},Nt.prototype.decompose=function(){var t=this.sx,e=this.shy,i=this.shx,n=this.sy,s=this.tx,r=this.ty,o=Math.sqrt(t*t+e*e),a=(t/=o)*i+(e/=o)*n;i-=t*a,n-=e*a;var h=Math.sqrt(i*i+n*n);return a/=h,t*(n/=h)<e*(i/=h)&&(t=-t,e=-e,a=-a,o=-o),{scale:new Nt(o,0,0,h,0,0),translate:new Nt(1,0,0,1,s,r),rotate:new Nt(t,e,-e,t,0,0),skew:new Nt(1,0,a,1,0,0)}},Nt.prototype.toString=function(t){return this.join(" ")},Nt.prototype.inversed=function(){var t=this.sx,e=this.shy,i=this.shx,n=this.sy,s=this.tx,r=this.ty,o=1/(t*n-e*i),a=n*o,h=-e*o,l=-i*o,c=t*o;return new Nt(a,h,l,c,-a*s-l*r,-h*s-c*r)},Nt.prototype.applyToPoint=function(t){var e=t.x*this.sx+t.y*this.shx+this.tx,i=t.x*this.shy+t.y*this.sy+this.ty;return new ni(e,i)},Nt.prototype.applyToRectangle=function(t){var e=this.applyToPoint(t),i=this.applyToPoint(new ni(t.x+t.w,t.y+t.h));return new si(e.x,e.y,i.x-e.x,i.y-e.y)},Nt.prototype.clone=function(){var t=this.sx,e=this.shy,i=this.shx,n=this.sy,s=this.tx,r=this.t
vendor: 4,979 bytes, line 2
2y;return new Nt(t,e,i,n,s,r)},f.Matrix=Nt;var It=f.matrixMult=function(t,e){return e.multiply(t)},Tt=new Nt(1,0,0,1,0,0);f.unitMatrix=f.identityMatrix=Tt;var Ot=function(t,e){if(!wt[t]){var i=(e instanceof NN?"Sh":"P")+(Object.keys(yt).length+1).toString(10);e.id=i,wt[t]=i,yt[i]=e,Ct.publish("addPattern",e)}};f.ShadingPattern=NN,f.TilingPattern=IN,f.addShadingPattern=function(t,e){return A("addShadingPattern()"),Ot(t,e),this},f.beginTilingPattern=function(t){A("beginTilingPattern()"),oi(t.boundingBox[0],t.boundingBox[1],t.boundingBox[2]-t.boundingBox[0],t.boundingBox[3]-t.boundingBox[1],t.matrix)},f.endTilingPattern=function(t,e){A("endTilingPattern()"),e.stream=K[G].join("\n"),Ot(t,e),Ct.publish("endTilingPattern",e),kt.pop().restore()};var Rt,Ft=f.__private__.newObject=function(){var t=Dt();return jt(t,!0),t},Dt=f.__private__.newObjectDeferred=function(){return q++,U[q]=function(){return V},q},jt=function(t,e){return e="boolean"==typeof e&&e,U[t]=V,e&&Z(t+" 0 obj"),t},Gt=f.__private__.newAdditionalObject=function(){var t={objId:Dt(),content:""};return H.push(t),t},Bt=Dt(),zt=Dt(),qt=f.__private__.decodeColorString=function(t){var e=t.split(" ");if(2!==e.length||"g"!==e[1]&&"G"!==e[1])5!==e.length||"k"!==e[4]&&"K"!==e[4]||(e=[(1-e[0])*(1-e[3]),(1-e[1])*(1-e[3]),(1-e[2])*(1-e[3]),"r"]);else{var i=parseFloat(e[0]);e=[i,i,i,"r"]}for(var n="#",s=0;s<3;s++)n+=("0"+Math.floor(255*parseFloat(e[s])).toString(16)).slice(-2);return n},Ut=f.__private__.encodeColorString=function(t){var e;"string"==typeof t&&(t={ch1:t});var i=t.ch1,n=t.ch2,s=t.ch3,r=t.ch4,o="draw"===t.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof i&&"#"!==i.charAt(0)){var a=new aN(i);if(a.ok)i=a.toHex();else if(!/^\d*\.?\d*$/.test(i))throw new Error('Invalid color "'+i+'" passed to jsPDF.encodeColorString.')}if("string"==typeof i&&/^#[0-9A-Fa-f]{3}$/.test(i)&&(i="#"+i[1]+i[1]+i[2]+i[2]+i[3]+i[3]),"string"==typeof i&&/^#[0-9A-Fa-f]{6}$/.test(i)){var h=parseInt(i.substr(1),16);i=h>>16&255,n=h>>8&255,s=255&h}if(void 0===n||void 0===r&&i===n&&n===s)e="string"==typeof i?i+" "+o[0]:2===t.precision?M(i/255)+" "+o[0]:L(i/255)+" "+o[0];else if(void 0===r||"object"===(0,fC.A)(r)){if(r&&!isNaN(r.a)&&0===r.a)return["1.","1.","1.",o[1]].join(" ");e="string"==typeof i?[i,n,s,o[1]].join(" "):2===t.precision?[M(i/255),M(n/255),M(s/255),o[1]].join(" "):[L(i/255),L(n/255),L(s/255),o[1]].join(" ")}else e="string"==typeof i?[i,n,s,r,o[2]].join(" "):2===t.precision?[M(i),M(n),M(s),M(r),o[2]].join(" "):[L(i),L(n),L(s),L(r),o[2]].join(" ");return e},Wt=f.__private__.getFilters=function(){return o},Vt=f.__private__.putStream=function(t){var e=(t=t||{}).data||"",i=t.filters||Wt(),n=t.alreadyAppliedFilters||[],s=t.addLength1||!1,r=e.length,o=t.objectId,a=function(t){return t};if(null!==c&&void 0===o)throw new Error("ObjectId must be passed to putStream for file encryption");null!==c&&(a=we.encryptor(o,0));var h={};!0===i&&(i=["FlateEncode"]);var l=t.additionalKeyValues||[],u=(h=void 0!==TN.API.processDataByFilters?TN.API.processDataByFilters(e,i):{data:e,reverseChain:[]}).reverseChain+(Array.isArray(n)?n.join(" "):n.toString());if(0!==h.data.length&&(l.push({key:"Length",value:h.data.length}),!0===s&&l.push({key:"Length1",value:r})),0!=u.length)if(u.split("/").length-1==1)l.push({key:"Filter",value:u});else{l.push({key:"Filter",value:"["+u+"]"});for(var d=0;d<l.length;d+=1)if("DecodeParms"===l[d].key){for(var f=[],p=0;p<h.reverseChain.split("/").length-1;p+=1)f.push("null");f.push(l[d].value),l[d].value="["+f.join(" ")+"]"}}Z("<<");for(var g=0;g<l.length;g++)Z("/"+l[g].key+" "+l[g].value);Z(">>"),0!==h.data.length&&(Z("stream"),Z(a(h.data)),Z("endstream"))},Ht=f.__private__.putPage=function(t){var e=t.number,i=t.data,n=t.objId,s=t.contentsObjId;jt(n,!0),Z("<</Type /Page"),Z("/Parent "+t.rootDictionaryObjId+" 0 R"),Z("/Resources "+t.resourceDictionaryObjId+" 0 R"),Z("/MediaBox ["+parseFloat(E(t.mediaBox.bottomLeftX))+" "+parseFloat(E(t.mediaBox.bottomLeftY))+" "+E(t.mediaBox.topRightX)+" "+E(t.mediaBox.topRightY)+"]"),null!==t.cropBox&&Z("/CropBox ["+E(t.cropBox.bottomLeftX)+" "+E(t.cropBox.bottomLeftY)+" "+E(t.cropBox.topRightX)+" "+E(t.cropBox.topRightY)+"]"),null!==t.bleedBox&&Z("/BleedBox ["+E(t.bleedBox.bottomLeftX)+" "+E(t.bleedBox.bottomLeftY)+" "+E(t.bleedBox.topRightX)+" "+E(t.bleedBox.topRightY)+"]"),null!==t.trimBox&&Z("/TrimBox ["+E(t.trimBox.bottomLeftX)+" "+E(t.trimBox.bottomLeftY)+" "+E(t.trimBox.topRightX)+" "+E(t.trimBox.topRightY)+"]"),null!==t.artBox&&Z("/ArtBox ["+E(t.artBox.bottomLeftX)+" "+E(t.artBox.bottomLeftY)+" "+E(t.artBox.topRightX)+" "+E(t.artBox.topRightY)+"]"),"number"==typeof t.userUnit&&1!==t.userUnit&&Z("/UserUnit "+t.userUnit),Ct.publish("putPage",{objId:n,pageContext:At[e],pageNumber:e,page:i}),Z("/Contents "+s+" 0 R"),Z(">>"),Z("endobj");var r=i.join("\n");return w===y&&(r+="\nQ"),jt(s,!0),Vt({data:r,filters:Wt(),objectId:s}),Z("endobj"),n},Kt=f.__private__.putPages=function(){var t,e,i=[];for(t=1;t<=Et;
vendor: 12,954 bytes, line 2
2t++)At[t].objId=Dt(),At[t].contentsObjId=Dt();for(t=1;t<=Et;t++)i.push(Ht({number:t,data:K[t],objId:At[t].objId,contentsObjId:At[t].contentsObjId,mediaBox:At[t].mediaBox,cropBox:At[t].cropBox,bleedBox:At[t].bleedBox,trimBox:At[t].trimBox,artBox:At[t].artBox,userUnit:At[t].userUnit,rootDictionaryObjId:Bt,resourceDictionaryObjId:zt}));jt(Bt,!0),Z("<</Type /Pages");var n="/Kids [";for(e=0;e<Et;e++)n+=i[e]+" 0 R ";Z(n+"]"),Z("/Count "+Et),Z(">>"),Z("endobj"),Ct.publish("postPutPages")},$t=function(t){Ct.publish("putFont",{font:t,out:Z,newObject:Ft,putStream:Vt}),!0!==t.isAlreadyPutted&&(t.objectNumber=Ft(),Z("<<"),Z("/Type /Font"),Z("/BaseFont /"+MN(t.postScriptName)),Z("/Subtype /Type1"),"string"==typeof t.encoding&&Z("/Encoding /"+t.encoding),Z("/FirstChar 32"),Z("/LastChar 255"),Z(">>"),Z("endobj"))},Xt=function(t){t.objectNumber=Ft();var e=[];e.push({key:"Type",value:"/XObject"}),e.push({key:"Subtype",value:"/Form"}),e.push({key:"BBox",value:"["+[E(t.x),E(t.y),E(t.x+t.width),E(t.y+t.height)].join(" ")+"]"}),e.push({key:"Matrix",value:"["+t.matrix.toString()+"]"});var i=t.pages[1].join("\n");Vt({data:i,additionalKeyValues:e,objectId:t.objectNumber}),Z("endobj")},Yt=function(t,e){e||(e=21);var i=Ft(),n=function(t,e){var i,n=[],s=1/(e-1);for(i=0;i<1;i+=s)n.push(i);if(n.push(1),0!=t[0].offset){var r={offset:0,color:t[0].color};t.unshift(r)}if(1!=t[t.length-1].offset){var o={offset:1,color:t[t.length-1].color};t.push(o)}for(var a="",h=0,l=0;l<n.length;l++){for(i=n[l];i>t[h+1].offset;)h++;var c=t[h].offset,u=(i-c)/(t[h+1].offset-c),d=t[h].color,f=t[h+1].color;a+=z(Math.round((1-u)*d[0]+u*f[0]).toString(16))+z(Math.round((1-u)*d[1]+u*f[1]).toString(16))+z(Math.round((1-u)*d[2]+u*f[2]).toString(16))}return a.trim()}(t.colors,e),s=[];s.push({key:"FunctionType",value:"0"}),s.push({key:"Domain",value:"[0.0 1.0]"}),s.push({key:"Size",value:"["+e+"]"}),s.push({key:"BitsPerSample",value:"8"}),s.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),s.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Vt({data:n,additionalKeyValues:s,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:i}),Z("endobj"),t.objectNumber=Ft(),Z("<< /ShadingType "+t.type),Z("/ColorSpace /DeviceRGB");var r="/Coords ["+E(parseFloat(t.coords[0]))+" "+E(parseFloat(t.coords[1]))+" ";2===t.type?r+=E(parseFloat(t.coords[2]))+" "+E(parseFloat(t.coords[3])):r+=E(parseFloat(t.coords[2]))+" "+E(parseFloat(t.coords[3]))+" "+E(parseFloat(t.coords[4]))+" "+E(parseFloat(t.coords[5])),Z(r+="]"),t.matrix&&Z("/Matrix ["+t.matrix.toString()+"]"),Z("/Function "+i+" 0 R"),Z("/Extend [true true]"),Z(">>"),Z("endobj")},Zt=function(t,e){var i=Dt(),n=Ft();e.push({resourcesOid:i,objectOid:n}),t.objectNumber=n;var s=[];s.push({key:"Type",value:"/Pattern"}),s.push({key:"PatternType",value:"1"}),s.push({key:"PaintType",value:"1"}),s.push({key:"TilingType",value:"1"}),s.push({key:"BBox",value:"["+t.boundingBox.map(E).join(" ")+"]"}),s.push({key:"XStep",value:E(t.xStep)}),s.push({key:"YStep",value:E(t.yStep)}),s.push({key:"Resources",value:i+" 0 R"}),t.matrix&&s.push({key:"Matrix",value:"["+t.matrix.toString()+"]"}),Vt({data:t.stream,additionalKeyValues:s,objectId:t.objectNumber}),Z("endobj")},Jt=function(t){for(var e in t.objectNumber=Ft(),Z("<<"),t)switch(e){case"opacity":Z("/ca "+M(t[e]));break;case"stroke-opacity":Z("/CA "+M(t[e]))}Z(">>"),Z("endobj")},Qt=function(t){jt(t.resourcesOid,!0),Z("<<"),Z("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var t in Z("/Font <<"),mt)mt.hasOwnProperty(t)&&(!1===u||!0===u&&d.hasOwnProperty(t))&&Z("/"+t+" "+mt[t].objectNumber+" 0 R");Z(">>")}(),function(){if(Object.keys(yt).length>0){for(var t in Z("/Shading <<"),yt)yt.hasOwnProperty(t)&&yt[t]instanceof NN&&yt[t].objectNumber>=0&&Z("/"+t+" "+yt[t].objectNumber+" 0 R");Ct.publish("putShadingPatternDict"),Z(">>")}}(),function(t){if(Object.keys(yt).length>0){for(var e in Z("/Pattern <<"),yt)yt.hasOwnProperty(e)&&yt[e]instanceof f.TilingPattern&&yt[e].objectNumber>=0&&yt[e].objectNumber<t&&Z("/"+e+" "+yt[e].objectNumber+" 0 R");Ct.publish("putTilingPatternDict"),Z(">>")}}(t.objectOid),function(){if(Object.keys(bt).length>0){var t;for(t in Z("/ExtGState <<"),bt)bt.hasOwnProperty(t)&&bt[t].objectNumber>=0&&Z("/"+t+" "+bt[t].objectNumber+" 0 R");Ct.publish("putGStateDict"),Z(">>")}}(),function(){for(var t in Z("/XObject <<"),Lt)Lt.hasOwnProperty(t)&&Lt[t].objectNumber>=0&&Z("/"+t+" "+Lt[t].objectNumber+" 0 R");Ct.publish("putXobjectDict"),Z(">>")}(),Z(">>"),Z("endobj")},te=function(t){_t[t.fontName]=_t[t.fontName]||{},_t[t.fontName][t.fontStyle]=t.id},ee=function(t,e,i,n,s){var r={id:"F"+(Object.keys(mt).length+1).toString(10),postScriptName:t,fontName:e,fontStyle:i,encoding:n,isStandardFont:s||!1,metadata:{}};return Ct.publish("addFont",{font:r,instance:this}),mt[r.id]=r,te(r),r.id},ie=f.__private__.pdfEscape=f.pdfEscape=function(t,e){return function(t,e){var i,n,s,r,o,a,h,l,c;if(s=(e=e||{}).sourceEncoding||"Unicode",o=e.outputEncoding,(e.autoencode||o)&&mt[ut].metadata&&mt[ut].metadata[s]&&mt[ut].metadata[s].encoding&&(r=mt[ut].metadata[s].encoding,!o&&mt[ut].encoding&&(o=mt[ut].encoding),!o&&r.codePages&&(o=r.codePages[0]),"string"==typeof o&&(o=r[o]),o)){for(h=!1,a=[],i=0,n=t.length;i<n;i++)(l=o[t.charCodeAt(i)])?a.push(String.fromCharCode(l)):a.push(t[i]),a[i].charCodeAt(0)>>8&&(h=!0);t=a.join("")}for(i=t.length;void 0===h&&0!==i;)t.charCodeAt(i-1)>>8&&(h=!0),i--;if(!h)return t;for(a=e.noBOM?[]:[254,255],i=0,n=t.length;i<n;i++){if((c=(l=t.charCodeAt(i))>>8)>>8)throw new Error("Character at position "+i+" of string '"+t+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");a.push(c),a.push(l-(c<<8))}return String.fromCharCode.apply(void 0,a)}(t,e).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ne=f.__private__.beginPage=function(t){K[++Et]=[],At[Et]={objId:0,contentsObjId:0,userUnit:Number(a),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(t[0]),topRightY:Number(t[1])}},oe(Et),Y(K[G])},se=function(t,e){var n,r,o;switch(i=e||i,"string"==typeof t&&(n=_(t.toLowerCase()),Array.isArray(n)&&(r=n[0],o=n[1])),Array.isArray(t)&&(r=t[0]*dt,o=t[1]*dt),isNaN(r)&&(r=s[0],o=s[1]),(r>14400||o>14400)&&(iN.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),r=Math.min(14400,r),o=Math.min(14400,o)),s=[r,o],i.substr(0,1)){case"l":o>r&&(s=[o,r]);break;case"p":r>o&&(s=[o,r])}ne(s),Be(je),Z($e),0!==ti&&Z(ti+" J"),0!==ei&&Z(ei+" j"),Ct.publish("addPage",{pageNumber:Et})},re=function(t){t>0&&t<=Et&&(K.splice(t,1),At.splice(t,1),Et--,G>Et&&(G=Et),this.setPage(G))},oe=function(t){t>0&&t<=Et&&(G=t)},ae=f.__private__.getNumberOfPages=f.getNumberOfPages=function(){return K.length-1},he=function(t,e,i){var n,s=void 0;return i=i||{},t=void 0!==t?t:mt[ut].fontName,e=void 0!==e?e:mt[ut].fontStyle,n=t.toLowerCase(),void 0!==_t[n]&&void 0!==_t[n][e]?s=_t[n][e]:void 0!==_t[t]&&void 0!==_t[t][e]?s=_t[t][e]:!1===i.disableWarning&&iN.warn("Unable to look up font label for font '"+t+"', '"+e+"'. Refer to getFontList() for available fonts."),s||i.noFallback||null==(s=_t.times[e])&&(s=_t.times.normal),s},le=f.__private__.putInfo=function(){var t=Ft(),e=function(t){return t};for(var i in null!==c&&(e=we.encryptor(t,0)),Z("<<"),Z("/Producer ("+ie(e("jsPDF "+TN.version))+")"),ct)ct.hasOwnProperty(i)&&ct[i]&&Z("/"+i.substr(0,1).toUpperCase()+i.substr(1)+" ("+ie(e(ct[i]))+")");Z("/CreationDate ("+ie(e(N))+")"),Z(">>"),Z("endobj")},ce=f.__private__.putCatalog=function(t){var e=(t=t||{}).rootDictionaryObjId||Bt;switch(Ft(),Z("<<"),Z("/Type /Catalog"),Z("/Pages "+e+" 0 R"),it||(it="fullwidth"),it){case"fullwidth":Z("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Z("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Z("/OpenAction [3 0 R /Fit]");break;case"original":Z("/OpenAction [3 0 R /XYZ null null 1]");break;default:var i=""+it;"%"===i.substr(i.length-1)&&(it=parseInt(it)/100),"number"==typeof it&&Z("/OpenAction [3 0 R /XYZ null null "+M(it)+"]")}switch(at||(at="continuous"),at){case"continuous":Z("/PageLayout /OneColumn");break;case"single":Z("/PageLayout /SinglePage");break;case"two":case"twoleft":Z("/PageLayout /TwoColumnLeft");break;case"tworight":Z("/PageLayout /TwoColumnRight")}rt&&Z("/PageMode /"+rt),Ct.publish("putCatalog"),Z(">>"),Z("endobj")},ue=f.__private__.putTrailer=function(){Z("trailer"),Z("<<"),Z("/Size "+(q+1)),Z("/Root "+q+" 0 R"),Z("/Info "+(q-1)+" 0 R"),null!==c&&Z("/Encrypt "+we.oid+" 0 R"),Z("/ID [ <"+I+"> <"+I+"> ]"),Z(">>")},de=f.__private__.putHeader=function(){Z("%PDF-"+p),Z("%ºß¬à")},fe=f.__private__.putXRef=function(){var t="0000000000";Z("xref"),Z("0 "+(q+1)),Z("0000000000 65535 f ");for(var e=1;e<=q;e++)"function"==typeof U[e]?Z((t+U[e]()).slice(-10)+" 00000 n "):void 0!==U[e]?Z((t+U[e]).slice(-10)+" 00000 n "):Z("0000000000 00000 n ")},pe=f.__private__.buildDocument=function(){var t;q=0,V=0,W=[],U=[],H=[],Bt=Dt(),zt=Dt(),Y(W),Ct.publish("buildDocument"),de(),Kt(),function(){Ct.publish("putAdditionalObjects");for(var t=0;t<H.length;t++){var e=H[t];jt(e.objId,!0),Z(e.content),Z("endobj")}Ct.publish("postPutAdditionalObjects")}(),t=[],function(){for(var t in mt)mt.hasOwnProperty(t)&&(!1===u||!0===u&&d.hasOwnProperty(t))&&$t(mt[t])}(),function(){var t;for(t in bt)bt.hasOwnProperty(t)&&Jt(bt[t])}(),function(){for(var t in Lt)Lt.hasOwnProperty(t)&&Xt(Lt[t])}(),function(t){var e;for(e in yt)yt.hasOwnProperty(e)&&(yt[e]instanceof NN?Yt(yt[e]):yt[e]instanceof IN&&Zt(yt[e],t))}(t),Ct.publish("putResources"),t.forEach(Qt),Qt({resourcesOid:zt,objectOid:Number.MAX_SAFE_INTEGER}),Ct.publish("postPutResources"),null!==c&&(we.oid=Ft(),Z("<<"),Z("/Filter /Standard"),Z("/V "+we.v),Z("/R "+we.r),Z("/U <"+we.toHexString(we.U)+">"),Z("/O <"+we.toHexString(we.O)+">"),Z("/P "+we.P),Z(">>"),Z("endobj")),le(),ce();var e=V;return fe(),ue(),Z("startxref"),Z(""+e),Z("%%EOF"),Y(K[G]),W.join("\n")},ge=f.__private__.getBlob=function(t){return new Blob([Q(t)],{type:"application/pdf"})},me=function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},_e=function(t){var e,i=t.document,n=i.documentElement,s=i.head,r=i.body;return s||(s=i.createElement("head"),n.appendChild(s)),r||(r=i.createElement("body"),n.appendChild(r)),me(s),me(r),(e=i.createElement("style")).appendChild(i.createTextNode("html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}")),s.appendChild(e),{document:i,body:r}},ve=f.output=f.__private__.output=(Rt=function(t,e){switch("string"==typeof(e=e||{})?e={filename:e}:e.filename=e.filename||"generated.pdf",t){case void 0:return pe();case"save":f.save(e.filename);break;case"arraybuffer":return Q(pe());case"blob":return ge(pe());case"bloburi":case"bloburl":if(void 0!==tN.URL&&"function"==typeof tN.URL.createObjectURL)return tN.URL&&tN.URL.createObjectURL(ge(pe()))||void 0;iN.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var i="",n=pe();try{i=lN(n)}catch(t){i=lN(unescape(encodeURIComponent(n)))}return"data:application/pdf;filename="+encodeURIComponent(e.filename)+";base64,"+i;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(tN)){var s="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",r=!e.pdfObjectUrl;r||(s=e.pdfObjectUrl);var o=tN.open();if(null!==o){var a=_e(o),h=a.document.createElement("script"),l=this;h.src=s,r&&(h.integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==",h.crossOrigin="anonymous"),h.onload=function(){o.PDFObject.embed(l.output("dataurlstring"),e)},a.body.appendChild(h)}return o}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(tN)){var c=e.pdfJsUrl||"examples/PDF.js/web/viewer.html",u=tN.open();if(null!==u){var d=_e(u),p=d.document.createElement("iframe"),g=-1===c.indexOf("?")?"?":"&";l=this,p.id="pdfViewer",p.width="500px",p.height="400px",p.src=c+g+"file=&downloadName="+encodeURIComponent(e.filename),p.onload=function(){u.document.title=e.filename,p.contentWindow.PDFViewerApplication.open(l.output("bloburl"))},d.body.appendChild(p)}return u}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(tN))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var m=tN.open();if(null!==m){var _=_e(m),v=_.document.createElement("iframe");v.src=this.output("datauristring",e),_.body.appendChild(v),m.document.title=e.filename}if(m||"undefined"==typeof safari)return m;break;case"datauri":case"dataurl":return tN.document.location.href=this.output("datauristring",e);default:return null}},Rt.foo=function(){try{return Rt.apply(this,arguments)}catch(i){var t=i.stack||"";
vendor: 9,221 bytes, line 2
2~t.indexOf(" at ")&&(t=t.split(" at ")[1]);var e="Error in function "+t.split("\n")[0].split("<")[0]+": "+i.message;if(!tN.console)throw new Error(e);tN.console.error(e,i),tN.alert&&alert(e)}},Rt.foo.bar=Rt,Rt.foo),ye=function(t){return!0===Array.isArray(Mt)&&Mt.indexOf(t)>-1};switch(n){case"pt":dt=1;break;case"mm":dt=72/25.4;break;case"cm":dt=72/2.54;break;case"in":dt=72;break;case"px":dt=1==ye("px_scaling")?.75:96/72;break;case"pc":case"em":dt=12;break;case"ex":dt=6;break;default:if("number"!=typeof n)throw new Error("Invalid unit: "+n);dt=n}var we=null;D(),O();var be=f.__private__.getPageInfo=f.getPageInfo=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:At[t].objId,pageNumber:t,pageContext:At[t]}},xe=f.__private__.getPageInfoByObjId=function(t){if(isNaN(t)||t%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var e in At)if(At[e].objId===t)break;return be(e)},Se=f.__private__.getCurrentPageInfo=f.getCurrentPageInfo=function(){return{objId:At[G].objId,pageNumber:G,pageContext:At[G]}};f.addPage=function(){return se.apply(this,arguments),this},f.setPage=function(){return oe.apply(this,arguments),Y.call(this,K[G]),this},f.insertPage=function(t){return this.addPage(),this.movePage(G,t),this},f.movePage=function(t,e){var i,n;if(t>e){i=K[t],n=At[t];for(var s=t;s>e;s--)K[s]=K[s-1],At[s]=At[s-1];K[e]=i,At[e]=n,this.setPage(e)}else if(t<e){i=K[t],n=At[t];for(var r=t;r<e;r++)K[r]=K[r+1],At[r]=At[r+1];K[e]=i,At[e]=n,this.setPage(e)}return this},f.deletePage=function(){return re.apply(this,arguments),this},f.__private__.text=f.text=function(t,e,i,n,s){var r,o,a,h,l,c,u,f,p,g=(n=n||{}).scope||this;if("number"==typeof t&&"number"==typeof e&&("string"==typeof i||Array.isArray(i))){var m=i;i=e,e=t,t=m}if(arguments[3]instanceof Nt==0?(a=arguments[4],h=arguments[5],"object"===(0,fC.A)(u=arguments[3])&&null!==u||("string"==typeof a&&(h=a,a=null),"string"==typeof u&&(h=u,u=null),"number"==typeof u&&(a=u,u=null),n={flags:u,angle:a,align:h})):(A("The transform parameter of text() with a Matrix value"),p=s),isNaN(e)||isNaN(i)||null==t)throw new Error("Invalid arguments passed to jsPDF.text");if(0===t.length)return g;var _,v="",b="number"==typeof n.lineHeightFactor?n.lineHeightFactor:De,x=g.internal.scaleFactor;function S(t){return t=t.split("\t").join(Array(n.TabLen||9).join(" ")),ie(t,u)}function C(t){for(var e,i=t.concat(),n=[],s=i.length;s--;)"string"==typeof(e=i.shift())?n.push(e):Array.isArray(t)&&(1===e.length||void 0===e[1]&&void 0===e[2])?n.push(e[0]):n.push([e[0],e[1],e[2]]);return n}function M(t,e){var i;if("string"==typeof t)i=e(t)[0];else if(Array.isArray(t)){for(var n,s,r=t.concat(),o=[],a=r.length;a--;)"string"==typeof(n=r.shift())?o.push(e(n)[0]):Array.isArray(n)&&"string"==typeof n[0]&&(s=e(n[0],n[1],n[2]),o.push([s[0],s[1],s[2]]));i=o}return i}var L=!1,k=!0;if("string"==typeof t)L=!0;else if(Array.isArray(t)){var N=t.concat();o=[];for(var I,T=N.length;T--;)("string"!=typeof(I=N.shift())||Array.isArray(I)&&"string"!=typeof I[0])&&(k=!1);L=k}if(!1===L)throw new Error('Type of text must be string or Array. "'+t+'" is not recognized.');"string"==typeof t&&(t=t.match(/[\r?\n]/)?t.split(/\r\n|\r|\n/g):[t]);var O=et/g.internal.scaleFactor,R=O*(b-1);switch(n.baseline){case"bottom":i-=R;break;case"top":i+=O-R;break;case"hanging":i+=O-2*R;break;case"middle":i+=O/2-R}if((c=n.maxWidth||0)>0&&("string"==typeof t?t=g.splitTextToSize(t,c):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,e){return t.concat(g.splitTextToSize(e,c))},[]))),r={text:t,x:e,y:i,options:n,mutex:{pdfEscape:ie,activeFontKey:ut,fonts:mt,activeFontSize:et}},Ct.publish("preProcessText",r),t=r.text,a=(n=r.options).angle,p instanceof Nt==0&&a&&"number"==typeof a){a*=Math.PI/180,0===n.rotationDirection&&(a=-a),w===y&&(a=-a);var F=Math.cos(a),D=Math.sin(a);p=new Nt(F,D,-D,F,0,0)}else a&&a instanceof Nt&&(p=a);w!==y||p||(p=Tt),void 0!==(l=n.charSpace||Je)&&(v+=E(P(l))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(f=n.horizontalScale)&&(v+=E(100*f)+" Tz\n"),n.lang;var j=-1,G=void 0!==n.renderingMode?n.renderingMode:n.stroke,B=g.internal.getCurrentPageInfo().pageContext;switch(G){case 0:case!1:case"fill":j=0;break;case 1:case!0:case"stroke":j=1;break;case 2:case"fillThenStroke":j=2;break;case 3:case"invisible":j=3;break;case 4:case"fillAndAddForClipping":j=4;break;case 5:case"strokeAndAddPathForClipping":j=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":j=6;break;case 7:case"addToPathForClipping":j=7}var z=void 0!==B.usedRenderingMode?B.usedRenderingMode:-1;-1!==j?v+=j+" Tr\n":-1!==z&&(v+="0 Tr\n"),-1!==j&&(B.usedRenderingMode=j),h=n.align||"left";var q,U=et*b,W=g.internal.pageSize.getWidth(),V=mt[ut];l=n.charSpace||Je,c=n.maxWidth||0,u=Object.assign({autoencode:!0,noBOM:!0},n.flags);var H=[],K=function(t){return g.getStringUnitWidth(t,{font:V,charSpace:l,fontSize:et,doKerning:!1})*et/x};if("[object Array]"===Object.prototype.toString.call(t)){var $;o=C(t),"left"!==h&&(q=o.map(K));var X,Y=0;if("right"===h){e-=q[0],t=[],T=o.length;for(var J=0;J<T;J++)0===J?(X=We(e),$=Ve(i)):(X=P(Y-q[J]),$=-U),t.push([o[J],X,$]),Y=q[J]}else if("center"===h){e-=q[0]/2,t=[],T=o.length;for(var Q=0;Q<T;Q++)0===Q?(X=We(e),$=Ve(i)):(X=P((Y-q[Q])/2),$=-U),t.push([o[Q],X,$]),Y=q[Q]}else if("left"===h){t=[],T=o.length;for(var tt=0;tt<T;tt++)t.push(o[tt])}else if("justify"===h&&"Identity-H"===V.encoding){t=[],T=o.length,c=0!==c?c:W;for(var it=0,nt=0;nt<T;nt++)if($=0===nt?Ve(i):-U,X=0===nt?We(e):it,nt<T-1){var rt=P((c-q[nt])/(o[nt].split(" ").length-1)),ot=o[nt].split(" ");t.push([ot[0]+" ",X,$]),it=0;for(var at=1;at<ot.length;at++){var ht=(K(ot[at-1]+" "+ot[at])-K(ot[at]))*x+rt;at==ot.length-1?t.push([ot[at],ht,0]):t.push([ot[at]+" ",ht,0]),it-=ht}}else t.push([o[nt],X,$]);t.push(["",it,0])}else{if("justify"!==h)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(t=[],T=o.length,c=0!==c?c:W,nt=0;nt<T;nt++){$=0===nt?Ve(i):-U,X=0===nt?We(e):0;var lt=o[nt].split(" ").length-1,ct=lt>0?(c-q[nt])/lt:0;nt<T-1?H.push(E(P(ct))):H.push(0),t.push([o[nt],X,$])}}}!0===("boolean"==typeof n.R2L?n.R2L:st)&&(t=M(t,function(t,e,i){return[t.split("").reverse().join(""),e,i]})),r={text:t,x:e,y:i,options:n,mutex:{pdfEscape:ie,activeFontKey:ut,fonts:mt,activeFontSize:et}},Ct.publish("postProcessText",r),t=r.text,_=r.mutex.isHex||!1;var dt=mt[ut].encoding;"WinAnsiEncoding"!==dt&&"StandardEncoding"!==dt||(t=M(t,function(t,e,i){return[S(t),e,i]})),o=C(t),t=[];for(var ft,pt,gt,_t=Array.isArray(o[0])?1:0,vt="",yt=function(t,e,i){var s="";return i instanceof Nt?(i="number"==typeof n.angle?It(i,new Nt(1,0,0,1,t,e)):It(new Nt(1,0,0,1,t,e),i),w===y&&(i=It(new Nt(1,0,0,-1,0,0),i)),s=i.join(" ")+" Tm\n"):s=E(t)+" "+E(e)+" Td\n",s},wt=0;wt<o.length;wt++){switch(vt="",_t){case 1:gt=(_?"<":"(")+o[wt][0]+(_?">":")"),ft=parseFloat(o[wt][1]),pt=parseFloat(o[wt][2]);break;case 0:gt=(_?"<":"(")+o[wt]+(_?">":")"),ft=We(e),pt=Ve(i)}void 0!==H&&void 0!==H[wt]&&(vt=H[wt]+" Tw\n"),0===wt?t.push(vt+yt(ft,pt,p)+gt):0===_t?t.push(vt+gt):1===_t&&t.push(vt+yt(ft,pt,p)+gt)}t=0===_t?t.join(" Tj\nT* "):t.join(" Tj\n"),t+=" Tj\n";var bt="BT\n/";return bt+=ut+" "+et+" Tf\n",bt+=E(et*b)+" TL\n",bt+=Ye+"\n",bt+=v,bt+=t,Z(bt+="ET"),d[ut]=!0,g};var Ee=f.__private__.clip=f.clip=function(t){return Z("evenodd"===t?"W*":"W"),this};f.clipEvenOdd=function(){return Ee("evenodd")},f.__private__.discardPath=f.discardPath=function(){return Z("n"),this};var Ae=f.__private__.isValidStyle=function(t){var e=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(t)&&(e=!0),e};f.__private__.setDefaultPathOperation=f.setDefaultPathOperation=function(t){return Ae(t)&&(l=t),this};var Ce=f.__private__.getStyle=f.getStyle=function(t){var e=l;switch(t){case"D":case"S":e="S";break;case"F":e="f";break;case"FD":case"DF":e="B";break;case"f":case"f*":case"B":case"B*":e=t}return e},Me=f.close=function(){return Z("h"),this};f.stroke=function(){return Z("S"),this},f.fill=function(t){return Le("f",t),this},f.fillEvenOdd=function(t){return Le("f*",t),this},f.fillStroke=function(t){return Le("B",t),this},f.fillStrokeEvenOdd=function(t){return Le("B*",t),this};var Le=function(t,e){"object"===(0,fC.A)(e)?Ne(e,t):Z(t)},Pe=function(t){null===t||w===y&&void 0===t||(t=Ce(t),Z(t))};function ke(t,e,i,n,s){var r=new IN(e||this.boundingBox,i||this.xStep,n||this.yStep,this.gState,s||this.matrix);r.stream=this.stream;var o=t+"$$"+this.cloneIndex+++"$$";return Ot(o,r),r}var Ne=function(t,e){var i=wt[t.key],n=yt[i];if(n instanceof NN)Z("q"),Z(Ie(e)),n.gState&&f.setGState(n.gState),Z(t.matrix.toString()+" cm"),Z("/"+i+" sh"),Z("Q");else if(n instanceof IN){var s=new Nt(1,0,0,-1,0,pi());t.matrix&&(s=s.multiply(t.matrix||Tt),i=ke.call(n,t.key,t.boundingBox,t.xStep,t.yStep,s).id),Z("q"),Z("/Pattern cs"),Z("/"+i+" scn"),n.gState&&f.setGState(n.gState),Z(e),Z("Q")}},Ie=function(t){switch(t){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Te=f.moveTo=function(t,e){return Z(E(P(t))+" "+E(k(e))+" m"),this},Oe=f.lineTo=function(t,e){return Z(E(P(t))+" "+E(k(e))+" l"),this}
vendor: 6,116 bytes, line 2
2,Re=f.curveTo=function(t,e,i,n,s,r){return Z([E(P(t)),E(k(e)),E(P(i)),E(k(n)),E(P(s)),E(k(r)),"c"].join(" ")),this};f.__private__.line=f.line=function(t,e,i,n,s){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||!Ae(s))throw new Error("Invalid arguments passed to jsPDF.line");return w===v?this.lines([[i-t,n-e]],t,e,[1,1],s||"S"):this.lines([[i-t,n-e]],t,e,[1,1]).stroke()},f.__private__.lines=f.lines=function(t,e,i,n,s,r){var o,a,h,l,c,u,d,f,p,g,m,_;if("number"==typeof t&&(_=i,i=e,e=t,t=_),n=n||[1,1],r=r||!1,isNaN(e)||isNaN(i)||!Array.isArray(t)||!Array.isArray(n)||!Ae(s)||"boolean"!=typeof r)throw new Error("Invalid arguments passed to jsPDF.lines");for(Te(e,i),o=n[0],a=n[1],l=t.length,g=e,m=i,h=0;h<l;h++)2===(c=t[h]).length?(g=c[0]*o+g,m=c[1]*a+m,Oe(g,m)):(u=c[0]*o+g,d=c[1]*a+m,f=c[2]*o+g,p=c[3]*a+m,g=c[4]*o+g,m=c[5]*a+m,Re(u,d,f,p,g,m));return r&&Me(),Pe(s),this},f.path=function(t){for(var e=0;e<t.length;e++){var i=t[e],n=i.c;switch(i.op){case"m":Te(n[0],n[1]);break;case"l":Oe(n[0],n[1]);break;case"c":Re.apply(this,n);break;case"h":Me()}}return this},f.__private__.rect=f.rect=function(t,e,i,n,s){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||!Ae(s))throw new Error("Invalid arguments passed to jsPDF.rect");return w===v&&(n=-n),Z([E(P(t)),E(k(e)),E(P(i)),E(P(n)),"re"].join(" ")),Pe(s),this},f.__private__.triangle=f.triangle=function(t,e,i,n,s,r,o){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(s)||isNaN(r)||!Ae(o))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[i-t,n-e],[s-i,r-n],[t-s,e-r]],t,e,[1,1],o,!0),this},f.__private__.roundedRect=f.roundedRect=function(t,e,i,n,s,r,o){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(s)||isNaN(r)||!Ae(o))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var a=4/3*(Math.SQRT2-1);return s=Math.min(s,.5*i),r=Math.min(r,.5*n),this.lines([[i-2*s,0],[s*a,0,s,r-r*a,s,r],[0,n-2*r],[0,r*a,-s*a,r,-s,r],[2*s-i,0],[-s*a,0,-s,-r*a,-s,-r],[0,2*r-n],[0,-r*a,s*a,-r,s,-r]],t+s,e,[1,1],o,!0),this},f.__private__.ellipse=f.ellipse=function(t,e,i,n,s){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||!Ae(s))throw new Error("Invalid arguments passed to jsPDF.ellipse");var r=4/3*(Math.SQRT2-1)*i,o=4/3*(Math.SQRT2-1)*n;return Te(t+i,e),Re(t+i,e-o,t+r,e-n,t,e-n),Re(t-r,e-n,t-i,e-o,t-i,e),Re(t-i,e+o,t-r,e+n,t,e+n),Re(t+r,e+n,t+i,e+o,t+i,e),Pe(s),this},f.__private__.circle=f.circle=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||!Ae(n))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(t,e,i,i,n)},f.setFont=function(t,e,i){return i&&(e=S(e,i)),ut=he(t,e,{disableWarning:!1}),this};var Fe=f.__private__.getFont=f.getFont=function(){return mt[he.apply(f,arguments)]};f.__private__.getFontList=f.getFontList=function(){var t,e,i={};for(t in _t)if(_t.hasOwnProperty(t))for(e in i[t]=[],_t[t])_t[t].hasOwnProperty(e)&&i[t].push(e);return i},f.addFont=function(t,e,i,n,s){var r=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==r.indexOf(arguments[3])?s=arguments[3]:arguments[3]&&-1==r.indexOf(arguments[3])&&(i=S(i,n)),ee.call(this,t,e,i,s=s||"Identity-H")};var De,je=t.lineWidth||.200025,Ge=f.__private__.getLineWidth=f.getLineWidth=function(){return je},Be=f.__private__.setLineWidth=f.setLineWidth=function(t){return je=t,Z(E(P(t))+" w"),this};f.__private__.setLineDash=TN.API.setLineDash=TN.API.setLineDashPattern=function(t,e){if(t=t||[],e=e||0,isNaN(e)||!Array.isArray(t))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return t=t.map(function(t){return E(P(t))}).join(" "),e=E(P(e)),Z("["+t+"] "+e+" d"),this};var ze=f.__private__.getLineHeight=f.getLineHeight=function(){return et*De};f.__private__.getLineHeight=f.getLineHeight=function(){return et*De};var qe=f.__private__.setLineHeightFactor=f.setLineHeightFactor=function(t){return"number"==typeof(t=t||1.15)&&(De=t),this},Ue=f.__private__.getLineHeightFactor=f.getLineHeightFactor=function(){return De};qe(t.lineHeight);var We=f.__private__.getHorizontalCoordinate=function(t){return P(t)},Ve=f.__private__.getVerticalCoordinate=function(t){return w===y?t:At[G].mediaBox.topRightY-At[G].mediaBox.bottomLeftY-P(t)},He=f.__private__.getHorizontalCoordinateString=f.getHorizontalCoordinateString=function(t){return E(We(t))},Ke=f.__private__.getVerticalCoordinateString=f.getVerticalCoordinateString=function(t){return E(Ve(t))},$e=t.strokeColor||"0 G";f.__private__.getStrokeColor=f.getDrawColor=function(){return qt($e)},f.__private__.setStrokeColor=f.setDrawColor=function(t,e,i,n){return $e=Ut({ch1:t,ch2:e,ch3:i,ch4:n,pdfColorType:"draw",precision:2}),Z($e),this};var Xe=t.fillColor||"0 g";f.__private__.getFillColor=f.getFillColor=function(){return qt(Xe)},f.__private__.setFillColor=f.setFillColor=function(t,e,i,n){return Xe=Ut({ch1:t,ch2:e,ch3:i,ch4:n,pdfColorType:"fill",precision:2}),Z(Xe),this};var Ye=t.textColor||"0 g",Ze=f.__private__.getTextColor=f.getTextColor=function(){return qt(Ye)};f.__private__.setTextColor=f.setTextColor=function(t,e,i,n){return Ye=Ut({ch1:t,ch2:e,ch3:i,ch4:n,pdfColorType:"text",precision:3}),this};var Je=t.charSpace,Qe=f.__private__.getCharSpace=f.getCharSpace=function(){return parseFloat(Je||0)};f.__private__.setCharSpace=f.setCharSpace=function(t){if(isNaN(t))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Je=t,this};var ti=0;f.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},f.__private__.setLineCap=f.setLineCap=function(t){var e=f.CapJoinStyles[t];if(void 0===e)throw new Error("Line cap style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ti=e,Z(e+" J"),this};var ei=0;f.__private__.setLineJoin=f.setLineJoin=function(t){var e=f.CapJoinStyles[t];if(void 0===e)throw new Error("Line join style of '"+t+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return ei=e,Z(e+" j"),this},f.__private__.setLineMiterLimit=f.__private__.setMiterLimit=f.setLineMiterLimit=f.setMiterLimit=function(t){if(t=t||0,isNaN(t))throw new Error("Invalid argument passed to 
2jsPDF.setLineMiterLimit");return Z(E(P(t))+" M"),this},f.GState=PN,f.setGState=function(t){(t="string"==typeof t?bt[xt[t]]:ii(null,t)).equals(St)||(Z("/"+t.id+" gs"),St=t)};var ii=function(t,e){if(!t||!xt[t]){var i=!1;for(var n in bt)if(bt.hasOwnProperty(n)&&bt[n].equals(e)){i=!0;break}if(i)e=bt[n];else{var s="GS"+(Object.keys(bt).length+1).toString(10);bt[s]=e,e.id=s}return t&&(xt[t]=e.id),Ct.publish("addGState",e),e}};f.addGState=function(t,e){return ii(t,e),this},f.saveGraphicsState=function(){return Z("q"),vt.push({key:ut,size:et,color:Ye}),this},f.restoreGraphicsState=function(){Z("Q");var t=vt.pop();return ut=t.key,et=t.size,Ye=t.color,St=null,this},f.setCurrentTransformationMatrix=function(t){return Z(t.toString()+" cm"),this},f.comment=function(t){return Z("#"+t),this};var ni=function(t,e){var i=t||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return i},set:function(t){isNaN(t)||(i=parseFloat(t))}});var n=e||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return n},set:function(t){isNaN(t)||(n=parseFloat(t))}});var s="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return s},set:function(t){s=t.toString()}}),this},si=function(t,e,i,n){ni.call(this,t,e),this.type="rect";var s=i||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return s},set:function(t){isNaN(t)||(s=parseFloat(t))}});var r=n||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return r},set:function(t){isNaN(t)||(r=parseFloat(t))}}),this},ri=function(){this.page=Et,this.currentPage=G,this.pages=K.slice(0),this.pagesContext=At.slice(0),this.x=ft,this.y=pt,this.matrix=gt,this.width=hi(G),this.height=ci(G),this.outputDestination=X,this.id="",this.objectNumber=-1};ri.prototype.restore=function(){Et=this.page,G=this.currentPage,At=this.pagesContext,K=this.pages,ft=this.x,pt=this.y,gt=this.matrix,li(G,this.width),ui(G,this.height),X=this.outputDestination};var oi=function(t,e,i,n,s){kt.push(new ri),Et=G=0,K=[],ft=t,pt=e,gt=s,ne([i,n])};for(var ai in f.beginFormObject=function(t,e,i,n,s){return oi(t,e,i,n,s),this},f.endFormObject=function(t){return function(t){if(Pt[t])kt.pop().restore();else{var e=new ri,i="Xo"+(Object.keys(Lt).length+1).toString(10);e.id=i,Pt[t]=i,Lt[i]=e,Ct.publish("addFormObject",e),kt.pop().restore()}}(t),this},f.doFormObject=function(t,e){var i=Lt[Pt[t]];return Z("q"),Z(e.toString()+" cm"),Z("/"+i.id+" Do"),Z("Q"),this},f.getFormObject=function(t){var e=Lt[Pt[t]];return{x:e.x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},f.save=function(t,e){return t=t||"generated.pdf",(e=e||{}).returnPromise=e.returnPromise||!1,!1===e.returnPromise?(oN(ge(pe()),t),"function"==typeof oN.unload&&tN.setTimeout&&setTimeout(oN.unload,911),this):new Promise(function(e,i){try{var n=oN(ge(pe()),t);"function"==typeof oN.unload&&tN.setTimeout&&setTimeout(oN.unload,911),e(n)}catch(t){i(t.message)}})},TN.API)TN.API.hasOwnProperty(ai)&&("events"===ai&&TN.API.events.length?function(t,e){var i,n,s;for(s=e.length-1;-1!==s;s--)i=e[s][0],n=e[s][1],t.subscribe.apply(t,[i].concat("function"==typeof n?[n]:n))}(Ct,TN.API.events):f[ai]=TN.API[ai]);function hi(t){return At[t].mediaBox.topRightX-At[t].mediaBox.bottomLeftX}function li(t,e){At[t].mediaBox.topRightX=e+At[t].mediaBox.bottomLeftX}function ci(t){return At[t].mediaBox.topRightY-At[t].mediaBox.bottomLeftY}function ui(t,e){At[t].mediaBox.topRightY=e+At[t].mediaBox.bottomLeftY}var di=f.getPageWidth=function(t){return hi(t=t||G)/dt},fi=f.setPageWidth=function(t,e){li(t,e*dt)},pi=f.getPageHeight=function(t){return ci(t=t||G)/dt},gi=f.setPageHeight=function(t,e){ui(t,e*dt)};return f.internal={pdfEscape:ie,getStyle:Ce,getFont:Fe,getFontSize:nt,getCharSpace:Qe,getTextColor:Ze,getLineHeight:ze,getLineHeightFactor:Ue,getLineWidth:Ge,write:J,getHorizontalCoordinate:We,getVerticalCoordinate:Ve,getCoordinateString:He,getVerticalCoordinateString:Ke,collections:{},newObject:Ft,newAdditionalObject:Gt,newObjectDeferred:Dt,newObjectDeferredBegin:jt,getFilters:Wt,putStream:Vt,events:Ct,scaleFactor:dt,pageSize:{getWidth:function(){return di(G)}
vendor: 9,273 bytes, line 2
2,setWidth:function(t){fi(G,t)},getHeight:function(){return pi(G)},setHeight:function(t){gi(G,t)}},encryptionOptions:c,encryption:we,getEncryptor:function(t){return null!==c?we.encryptor(t,0):function(t){return t}},output:ve,getNumberOfPages:ae,get pages(){return K},out:Z,f2:M,f3:L,getPageInfo:be,getPageInfoByObjId:xe,getCurrentPageInfo:Se,getPDFVersion:g,Point:ni,Rectangle:si,Matrix:Nt,hasHotfix:ye},Object.defineProperty(f.internal.pageSize,"width",{get:function(){return di(G)},set:function(t){fi(G,t)},enumerable:!0,configurable:!0}),Object.defineProperty(f.internal.pageSize,"height",{get:function(){return pi(G)},set:function(t){gi(G,t)},enumerable:!0,configurable:!0}),function(t){for(var e=0,i=tt.length;e<i;e++){var n=ee.call(this,t[e][0],t[e][1],t[e][2],tt[e][3],!0);!1===u&&(d[n]=!0);var s=t[e][0].split("-");te({id:n,fontName:s[0],fontStyle:s[1]||""})}Ct.publish("addFonts",{fonts:mt,dictionary:_t})}.call(f,tt),ut="F1",se(s,i),Ct.publish("initialized"),f}CN.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},CN.prototype.toHexString=function(t){return t.split("").map(function(t){return("0"+(255&t.charCodeAt(0)).toString(16)).slice(-2)}).join("")},CN.prototype.hexToBytes=function(t){for(var e=[],i=0;i<t.length;i+=2)e.push(String.fromCharCode(parseInt(t.substr(i,2),16)));return e.join("")},CN.prototype.processOwnerPassword=function(t,e){return EN(bN(e).substr(0,5),t)},CN.prototype.encryptor=function(t,e){var i=bN(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(t){return EN(i,t)}},PN.prototype.equals=function(t){var e,i="id,objectNumber,equals";if(!t||(0,fC.A)(t)!==(0,fC.A)(this))return!1;var n=0;for(e in this)if(!(i.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e))return!1;if(this[e]!==t[e])return!1;n++}for(e in t)t.hasOwnProperty(e)&&i.indexOf(e)<0&&n--;return 0===n},TN.API={events:[]},TN.version="4.2.1";var ON=TN.API,RN=1,FN=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},DN=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},jN=function(t){return t.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(t){var e=t.charCodeAt(0).toString(16).toUpperCase();return"#"+(1===e.length?"0"+e:e)})},GN=function(t){return t.toFixed(2)},BN=function(t){return t.toFixed(5)};ON.__acroform__={};var zN=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},qN=function(t){return t*RN},UN=function(t){var e=new rI,i=yI.internal.getHeight(t)||0,n=yI.internal.getWidth(t)||0;return e.BBox=[0,0,Number(GN(n)),Number(GN(i))],e},WN=ON.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},VN=ON.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},HN=ON.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},KN=ON.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return HN(t,e-1)},$N=ON.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return WN(t,e-1)},XN=ON.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return VN(t,e-1)},YN=ON.__acroform__.calculateCoordinates=function(t,e){var i=e.internal.getHorizontalCoordinate,n=e.internal.getVerticalCoordinate,s=t[0],r=t[1],o=t[2],a=t[3],h={};return h.lowerLeft_X=i(s)||0,h.lowerLeft_Y=n(r+a)||0,h.upperRight_X=i(s+o)||0,h.upperRight_Y=n(r)||0,[Number(GN(h.lowerLeft_X)),Number(GN(h.lowerLeft_Y)),Number(GN(h.upperRight_X)),Number(GN(h.upperRight_Y))]},ZN=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],i=t._V||t.DV,n=JN(t,i),s=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+s+" "+GN(n.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(n.text),e.push("ET"),e.push("Q"),e.push("EMC");var r=UN(t);return r.scope=t.scope,r.stream=e.join("\n"),r}},JN=function(t,e){var i=0===t.fontSize?t.maxFontSize:t.fontSize,n={text:"",fontSize:""},s=(e=")"==(e="("==e.substr(0,1)?e.substr(1):e).substr(e.length-1)?e.substr(0,e.length-1):e).split(" ");s=t.multiline?s.map(function(t){return t.split("\n")}):s.map(function(t){return[t]});var r=i,o=yI.internal.getHeight(t)||0;o=o<0?-o:o;var a=yI.internal.getWidth(t)||0;a=a<0?-a:a;var h=function(e,i,n){if(e+1<s.length){var r=i+" "+s[e+1][0];return QN(r,t,n).width<=a-4}return!1};r++;t:for(;r>0;){e="",r--;var l,c,u=QN("3",t,r).height,d=t.multiline?o-r:(o-u)/2,f=d+=2,p=0,g=0,m=0;if(r<=0){e="(...) Tj\n",e+="% Width of Text: "+QN(e,t,r=12).width+", FieldWidth:"+a+"\n";break}for(var _="",v=0,y=0;y<s.length;y++)if(s.hasOwnProperty(y)){var w=!1;if(1!==s[y].length&&m!==s[y].length-1){if((u+2)*(v+2)+2>o)continue t;_+=s[y][m],w=!0,g=y,y--}else{_=" "==(_+=s[y][m]+" ").substr(_.length-1)?_.substr(0,_.length-1):_;var b=parseInt(y),x=h(b,_,r),S=y>=s.length-1;if(x&&!S){_+=" ",m=0;continue}if(x||S){if(S)g=b;else if(t.multiline&&(u+2)*(v+2)+2>o)continue t}else{if(!t.multiline)continue t;if((u+2)*(v+2)+2>o)continue t;g=b}}for(var E="",A=p;A<=g;A++){var C=s[A];if(t.multiline){if(A===g){E+=C[m]+" ",m=(m+1)%C.length;continue}if(A===p){E+=C[C.length-1]+" ";continue}}E+=C[0]+" "}switch(E=" "==E.substr(E.length-1)?E.substr(0,E.length-1):E,c=QN(E,t,r).width,t.textAlign){case"right":l=a-c-2;break;case"center":l=(a-c)/2;break;default:l=2}e+=GN(l)+" "+GN(f)+" Td\n",e+="("+FN(E)+") Tj\n",e+=-GN(l)+" 0 Td\n",f=-(r+2),c=0,p=w?g:g+1,v++,_=""}break}return n.text=e,n.fontSize=r,n},QN=function(t,e,i){var n=e.scope.internal.getFont(e.fontName,e.fontStyle),s=e.scope.getStringUnitWidth(t,{font:n,fontSize:parseFloat(i),charSpace:0})*parseFloat(i);return{height:e.scope.getStringUnitWidth("3",{font:n,fontSize:parseFloat(i),charSpace:0})*parseFloat(i)*1.5,width:s}},tI={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},eI=function(t,e){var i={type:"reference",object:t};void 0===e.internal.getPageInfo(t.page).pageContext.annotations.find(function(t){return t.type===i.type&&t.object===i.object})&&e.internal.getPageInfo(t.page).pageContext.annotations.push(i)},iI=ON.__acroform__.arrayToPdfArray=function(t,e,i){var n=function(t){return t};if(Array.isArray(t)){for(var s="[",r=0;r<t.length;r++)switch(0!==r&&(s+=" "),(0,fC.A)(t[r])){case"boolean":case"number":case"object":s+=t[r].toString();break;case"string":"/"===t[r].substr(0,1)?s+="/"+jN(t[r].substr(1)):(void 0!==e&&i&&(n=i.internal.getEncryptor(e)),s+="("+FN(n(t[r].toString()))+")")}return s+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},nI=function(t,e,i){var n=function(t){return t};return void 0!==e&&i&&(n=i.internal.getEncryptor(e)),(t=t||"").toString(),"("+FN(n(t))+")"},sI=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};sI.prototype.toString=function(){return this.objId+" 0 R"},sI.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},sI.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter(function(t){return"content"!=t&&"appearanceStreamContent"!=t&&"scope"!=t&&"objId"!=t&&"_"!=t.substring(0,1)});for(var i in e)if(!1===Object.getOwnPropertyDescriptor(this,e[i]).configurable){var n=e[i],s=this[n];s&&(Array.isArray(s)?t.push({key:n,value:iI(s,this.objId,this.scope)}):s instanceof sI?(s.scope=this.scope,t.push({key:n,value:s.objId+" 0 R"})):"function"!=typeof s&&t.push({key:n,value:s}))}return t};var rI=function(){sI.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(e){t=e.trim()},get:function(){return t||null}})};zN(rI,sI);var oI=function(){sI.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}
vendor: 9,138 bytes, line 2
2),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+FN(e(t))+")"}},set:function(e){t=e}})};zN(oI,sI);var aI=function t(){sI.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(e,3))},set:function(t){!0===Boolean(t)?this.F=$N(e,3):this.F=XN(e,3)}});var i=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute Ff supplied.');i=t}});var n=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(t){n=void 0!==t?t:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(t){n[0]=t}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(t){n[1]=t}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(t){n[2]=t}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(t){n[3]=t}});var s="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return s},set:function(t){switch(t){case"/Btn":case"/Tx":case"/Ch":case"/Sig":s=t;break;default:throw new Error('Invalid value "'+t+'" for attribute FT supplied.')}}});var r=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!r||r.length<1){if(this instanceof gI)return;r="FieldObject"+t.FieldNum++}var e=function(t){return t};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+FN(e(r))+")"},set:function(t){r=t.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return r},set:function(t){r=t}});var o="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(t){o=t}});var a="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(t){a=t}});var h=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return h},set:function(t){h=t}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===l?50/RN:l},set:function(t){l=t}});var c="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(t){c=t}});var u="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!u||this instanceof gI||this instanceof _I))return nI(u,this.objId,this.scope)},set:function(t){t=t.toString(),u=t}});var d=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(d)return this instanceof dI==0?nI(d,this.objId,this.scope):d},set:function(t){t=t.toString(),d=this instanceof dI==0?"("===t.substr(0,1)?DN(t.substr(1,t.length-2)):DN(t):t}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof dI==1?DN(d.substr(1,d.length-1)):d},set:function(t){t=t.toString(),d=this instanceof dI==1?"/"+jN(t):t}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(t){this.V=t}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof dI==0?nI(f,this.objId,this.scope):f},set:function(t){t=t.toString(),f=this instanceof dI==0?"("===t.substr(0,1)?DN(t.substr(1,t.length-2)):DN(t):t}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof dI==1?DN(f.substr(1,f.length-1)):f},set:function(t){t=t.toString(),f=this instanceof dI==1?"/"+jN(t):t}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,g=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return g},set:function(t){t=Boolean(t),g=t}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(t){p=t}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,1))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,1):this.Ff=XN(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,2))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,2):this.Ff=XN(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,3))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,3):this.Ff=XN(this.Ff,3)}});var m=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==m)return m},set:function(t){if(-1===[0,1,2].indexOf(t))throw new Error('Invalid value "'+t+'" for attribute Q supplied.');m=t}}),Object.defineProperty(this,"textAlign",{get:function(){var t;switch(m){case 0:default:t="left";break;case 1:t="center";break;case 2:t="right"}return t},configurable:!0,enumerable:!0,set:function(t){switch(t){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})};zN(aI,sI);var hI=function(){aI.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){t=e}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return iI(e,this.objId,this.scope)},set:function(t){var i,n;n=[],"string"==typeof(i=t)&&(n=function(t,e,i){i||(i=1);for(var n,s=[];n=e.exec(t);)s.push(n[i]);return s}(i,/\((.*?)\)/g)),e=n}}),this.getOptions=function(){return e},this.setOptions=function(t){e=t,this.sort&&e.sort()},this.addOption=function(t){t=(t=t||"").toString(),e.push(t),this.sort&&e.sort()},this.removeOption=function(t,i){for(i=i||!1,t=(t=t||"").toString();-1!==e.indexOf(t)&&(e.splice(e.indexOf(t),1),!1!==i););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,18))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,18):this.Ff=XN(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,19))},set:function(t){!0===this.combo&&(!0===Boolean(t)?this.Ff=$N(this.Ff,19):this.Ff=XN(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,20))},set:function(t){!0===Boolean(t)?(this.Ff=$N(this.Ff,20),e.sort()):this.Ff=XN(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,22))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,22):this.Ff=XN(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,23):this.Ff=XN(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,27))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,27):this.Ff=XN(this.Ff,27)}}),this.hasAppearanceStream=!1};zN(hI,aI);var lI=function(){hI.call(this),this.fontName="helvetica",this.combo=!1};zN(lI,hI);var cI=function(){lI.call(this),this.combo=!0};zN(cI,lI);var uI=function(){cI.call(this),this.edit=!0};zN(uI,cI);var dI=function(){aI.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,15))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,15):this.Ff=XN(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,16))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,16):this.Ff=XN(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,17))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,17):this.Ff=XN(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,26):this.Ff=XN(this.Ff,26)}});var t,e={};
vendor: 4,794 bytes, line 2
2Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};if(this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(e).length){var i,n=[];for(i in n.push("<<"),e)n.push("/"+i+" ("+FN(t(e[i]))+")");return n.push(">>"),n.join("\n")}},set:function(t){"object"===(0,fC.A)(t)&&(e=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(t){"string"==typeof t&&(e.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){var i=null==e?"":e.toString();"/"===i.substr(0,1)&&(i=i.substr(1)),t="/"+jN(i)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(e){t="/"+jN(e)}})};zN(dI,aI);var fI=function(){dI.call(this),this.pushButton=!0};zN(fI,dI);var pI=function(){dI.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=void 0!==e?e:[]}})};zN(pI,dI);var gI=function(){var t,e;aI.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(t){e=t}});var i,n={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var t=function(t){return t};this.scope&&(t=this.scope.internal.getEncryptor(this.objId));var e,i=[];for(e in i.push("<<"),n)i.push("/"+e+" ("+FN(t(n[e]))+")");return i.push(">>"),i.join("\n")},set:function(t){"object"===(0,fC.A)(t)&&(n=t)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return n.CA||""},set:function(t){"string"==typeof t&&(n.CA=t)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return i},set:function(t){var e=null==t?"":t.toString();"/"===e.substr(0,1)&&(e=e.substr(1)),i="/"+jN(e)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return i.substr(1,i.length-1)},set:function(t){var e=null==t?"":t.toString();"/"===e.substr(0,1)&&(e=e.substr(1)),i="/"+jN(e)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=yI.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};zN(gI,aI),pI.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var i=this.Kids[e];i.appearanceStreamContent=t.createAppearanceStream(i.optionName),i.caption=t.getCA()}},pI.prototype.createOption=function(t){var e=new gI;return e.Parent=this,e.optionName=t,this.Kids.push(e),xI.call(this.scope,e),e};var mI=function(){dI.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=yI.CheckBox.createAppearanceStream()};zN(mI,dI);var _I=function(){aI.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,13))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,13):this.Ff=XN(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,21))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,21):this.Ff=XN(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,23))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,23):this.Ff=XN(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,24))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,24):this.Ff=XN(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,25))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,25):this.Ff=XN(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,26))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,26):this.Ff=XN(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};zN(_I,aI);
vendor: 4,234 bytes, line 2
2var vI=function(){_I.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(KN(this.Ff,14))},set:function(t){!0===Boolean(t)?this.Ff=$N(this.Ff,14):this.Ff=XN(this.Ff,14)}}),this.password=!0};zN(vI,_I);var yI={CheckBox:{createAppearanceStream:function(){return{N:{On:yI.CheckBox.YesNormal},D:{On:yI.CheckBox.YesPushDown,Off:yI.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=UN(t);e.scope=t.scope;var i=[],n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,s=t.scope.__private__.encodeColorString(t.color),r=JN(t,t.caption);return i.push("0.749023 g"),i.push("0 0 "+GN(yI.internal.getWidth(t))+" "+GN(yI.internal.getHeight(t))+" re"),i.push("f"),i.push("BMC"),i.push("q"),i.push("0 0 1 rg"),i.push("/"+n+" "+GN(r.fontSize)+" Tf "+s),i.push("BT"),i.push(r.text),i.push("ET"),i.push("Q"),i.push("EMC"),e.stream=i.join("\n"),e},YesNormal:function(t){var e=UN(t);e.scope=t.scope;var i=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color),s=[],r=yI.internal.getHeight(t),o=yI.internal.getWidth(t),a=JN(t,t.caption);return s.push("1 g"),s.push("0 0 "+GN(o)+" "+GN(r)+" re"),s.push("f"),s.push("q"),s.push("0 0 1 rg"),s.push("0 0 "+GN(o-1)+" "+GN(r-1)+" re"),s.push("W"),s.push("n"),s.push("0 g"),s.push("BT"),s.push("/"+i+" "+GN(a.fontSize)+" Tf "+n),s.push(a.text),s.push("ET"),s.push("Q"),e.stream=s.join("\n"),e},OffPushDown:function(t){var e=UN(t);e.scope=t.scope;var i=[];return i.push("0.749023 g"),i.push("0 0 "+GN(yI.internal.getWidth(t))+" "+GN(yI.internal.getHeight(t))+" re"),i.push("f"),e.stream=i.join("\n"),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:yI.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=yI.RadioButton.Circle.YesNormal,e.D[t]=yI.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=UN(t);e.scope=t.scope;var i=[],n=yI.internal.getWidth(t)<=yI.internal.getHeight(t)?yI.internal.getWidth(t)/4:yI.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var s=yI.internal.Bezier_C,r=Number((n*s).toFixed(5));return i.push("q"),i.push("1 0 0 1 "+BN(yI.internal.getWidth(t)/2)+" "+BN(yI.internal.getHeight(t)/2)+" cm"),i.push(n+" 0 m"),i.push(n+" "+r+" "+r+" "+n+" 0 "+n+" c"),i.push("-"+r+" "+n+" -"+n+" "+r+" -"+n+" 0 c"),i.push("-"+n+" -"+r+" -"+r+" -"+n+" 0 -"+n+" c"),i.push(r+" -"+n+" "+n+" -"+r+" "+n+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e},YesPushDown:function(t){var e=UN(t);e.scope=t.scope;var i=[],n=yI.internal.getWidth(t)<=yI.internal.getHeight(t)?yI.internal.getWidth(t)/4:yI.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var s=Number((2*n).toFixed(5)),r=Number((s*yI.internal.Bezier_C).toFixed(5)),o=Number((n*yI.internal.Bezier_C).toFixed(5));return i.push("0.749023 g"),i.push("q"),i.push("1 0 0 1 "+BN(yI.internal.getWidth(t)/2)+" "+BN(yI.internal.getHeight(t)/2)+" cm"),i.push(s+" 0 m"),i.push(s+" "+r+" "+r+" "+s+" 0 "+s+" c"),i.push("-"+r+" "+s+" -"+s+" "+r+" -"+s+" 0 c"),i.push("-"+s+" -"+r+" -"+r+" -"+s+" 0 -"+s+" c"),i.push(r+" -"+s+" "+s+" -"+r+" "+s+" 0 c"),i.push("f"),i.push("Q"),i.push("0 g"),i.push("q"),i.push("1 0 0 1 "+BN(yI.internal.getWidth(t)/2)+" "+BN(yI.internal.getHeight(t)/2)+" cm"),i.push(n+" 0 m"),i.push(n+" "+o+" "+o+" "+n+" 0 "+n+" c"),i.push("-"+o+" "+n+" -"+n+" "+o+" -"+n+" 0 c"),i.push("-"+n+" -"+o+" -"+o+" -"+n+" 0 -"+n+" c"),i.push(o+" -"+n+" "+n+" -"+o+" "+n+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e},OffPushDown:function(t){var e=UN(t);e.scope=t.scope;var i=[],n=yI.internal.getWidth(t)<=yI.internal.getHeight(t)?yI.internal.getWidth(t)/4:yI.internal.getHeight(t)/4;n=Number((.9*n).toFixed(5));var s=Number((2*n).toFixed(5)),r=Number((s*yI.internal.Bezier_C).toFixed(5));return i.push("0.749023 g"),i.push("q"),i.push("1 0 0 1 "+BN(yI.internal.getWidth(t)/2)+" "+BN(yI.internal.getHeight(t)/2)+" cm"),i.push(s+" 0 m"),i.push(s+" "+r+" "+r+" "+s+" 0 "+s+" c"),i.push("-"+r+" "+s+" -"+s+" "+r+" -"+s+" 0 c"),i.push("-"+s+" -"+r+" -"+r+" -"+s+" 0 -"+s+" c"),i.push(r+" -"+s+" "+s+" -"+r+" "+s+" 0 c"),i.push("f"),i.push("Q"),e.stream=i.join("\n"),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:yI.RadioButton.Cross.OffPushDown},N:{}}
vendor: 13,792 bytes, line 2
2;return e.N[t]=yI.RadioButton.Cross.YesNormal,e.D[t]=yI.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=UN(t);e.scope=t.scope;var i=[],n=yI.internal.calculateCross(t);return i.push("q"),i.push("1 1 "+GN(yI.internal.getWidth(t)-2)+" "+GN(yI.internal.getHeight(t)-2)+" re"),i.push("W"),i.push("n"),i.push(GN(n.x1.x)+" "+GN(n.x1.y)+" m"),i.push(GN(n.x2.x)+" "+GN(n.x2.y)+" l"),i.push(GN(n.x4.x)+" "+GN(n.x4.y)+" m"),i.push(GN(n.x3.x)+" "+GN(n.x3.y)+" l"),i.push("s"),i.push("Q"),e.stream=i.join("\n"),e},YesPushDown:function(t){var e=UN(t);e.scope=t.scope;var i=yI.internal.calculateCross(t),n=[];return n.push("0.749023 g"),n.push("0 0 "+GN(yI.internal.getWidth(t))+" "+GN(yI.internal.getHeight(t))+" re"),n.push("f"),n.push("q"),n.push("1 1 "+GN(yI.internal.getWidth(t)-2)+" "+GN(yI.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(GN(i.x1.x)+" "+GN(i.x1.y)+" m"),n.push(GN(i.x2.x)+" "+GN(i.x2.y)+" l"),n.push(GN(i.x4.x)+" "+GN(i.x4.y)+" m"),n.push(GN(i.x3.x)+" "+GN(i.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join("\n"),e},OffPushDown:function(t){var e=UN(t);e.scope=t.scope;var i=[];return i.push("0.749023 g"),i.push("0 0 "+GN(yI.internal.getWidth(t))+" "+GN(yI.internal.getHeight(t))+" re"),i.push("f"),e.stream=i.join("\n"),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+i}};yI.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=yI.internal.getWidth(t),i=yI.internal.getHeight(t),n=Math.min(e,i);return{x1:{x:(e-n)/2,y:(i-n)/2+n},x2:{x:(e-n)/2+n,y:(i-n)/2},x3:{x:(e-n)/2,y:(i-n)/2},x4:{x:(e-n)/2+n,y:(i-n)/2+n}}}},yI.internal.getWidth=function(t){var e=0;return"object"===(0,fC.A)(t)&&(e=qN(t.Rect[2])),e},yI.internal.getHeight=function(t){var e=0;return"object"===(0,fC.A)(t)&&(e=qN(t.Rect[3])),e};var wI,bI,xI=ON.addField=function(t){if(function(t,e){if(e.scope=t,void 0!==t.internal&&(void 0===t.internal.acroformPlugin||!1===t.internal.acroformPlugin.isInitialized)){if(aI.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(tI)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");RN=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new oI,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){var e;(e=t).internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0}),t.internal.events.subscribe("buildDocument",function(){!function(t){t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var e=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in e)if(e.hasOwnProperty(i)){var n=e[i];n.objId=void 0,n.hasAnnotation&&eI(n,t)}}(t)}),t.internal.events.subscribe("putCatalog",function(){!function(t){if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(t)}),t.internal.events.subscribe("postPutPages",function(e){!function(t,e){var i=!t;for(var n in t||(e.internal.newObjectDeferredBegin(e.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),e.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),t=t||e.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(t.hasOwnProperty(n)){var s=t[n],r=[],o=s.Rect;if(s.Rect&&(s.Rect=YN(s.Rect,e)),e.internal.newObjectDeferredBegin(s.objId,!0),s.DA=yI.createDefaultAppearanceStream(s),"object"===(0,fC.A)(s)&&"function"==typeof s.getKeyValueListForStream&&(r=s.getKeyValueListForStream()),s.Rect=o,s.hasAppearanceStream&&!s.appearanceStreamContent){var a=ZN(s);r.push({key:"AP",value:"<</N "+a+">>"}),e.internal.acroformPlugin.xForms.push(a)}if(s.appearanceStreamContent){var h="";for(var l in s.appearanceStreamContent)if(s.appearanceStreamContent.hasOwnProperty(l)){var c=s.appearanceStreamContent[l];if(h+="/"+l+" ",h+="<<",Object.keys(c).length>=1||Array.isArray(c)){for(var n in c)if(c.hasOwnProperty(n)){var u=c[n];"function"==typeof u&&(u=u.call(e,s)),h+="/"+n+" "+u+" ",e.internal.acroformPlugin.xForms.indexOf(u)>=0||e.internal.acroformPlugin.xForms.push(u)}}else"function"==typeof(u=c)&&(u=u.call(e,s)),h+="/"+n+" "+u,e.internal.acroformPlugin.xForms.indexOf(u)>=0||e.internal.acroformPlugin.xForms.push(u);h+=">>"}r.push({key:"AP",value:"<<\n"+h+">>"})}e.internal.putStream({additionalKeyValues:r,objectId:s.objId}),e.internal.out("endobj")}i&&function(t,e){for(var i in t)if(t.hasOwnProperty(i)){var n=i,s=t[i];e.internal.newObjectDeferredBegin(s.objId,!0),"object"===(0,fC.A)(s)&&"function"==typeof s.putStream&&s.putStream(),delete t[n]}}(e.internal.acroformPlugin.xForms,e)}(e,t)}),t.internal.acroformPlugin.isInitialized=!0}}(this,t),!(t instanceof aI))throw new Error("Invalid argument passed to jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};function SI(t){return t.reduce(function(t,e,i){return t[e]=i,t},{})}ON.AcroFormChoiceField=hI,ON.AcroFormListBox=lI,ON.AcroFormComboBox=cI,ON.AcroFormEditBox=uI,ON.AcroFormButton=dI,ON.AcroFormPushButton=fI,ON.AcroFormRadioButton=pI,ON.AcroFormCheckBox=mI,ON.AcroFormTextField=_I,ON.AcroFormPasswordField=vI,ON.AcroFormAppearance=yI,ON.AcroForm={ChoiceField:hI,ListBox:lI,ComboBox:cI,EditBox:uI,Button:dI,PushButton:fI,RadioButton:pI,CheckBox:mI,TextField:_I,PasswordField:vI,Appearance:yI},TN.AcroForm={ChoiceField:hI,ListBox:lI,ComboBox:cI,EditBox:uI,Button:dI,PushButton:fI,RadioButton:pI,CheckBox:mI,TextField:_I,PasswordField:vI,Appearance:yI},TN.AcroForm,function(t){var e="addImage_";t.__addimage__={};var i="UNKNOWN",n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},s=t.__addimage__.getImageFileTypeByImageData=function(t,e){var s,r,o,a,h,l=i;if("RGBA"===(e=e||i)||void 0!==t.data&&t.data instanceof Uint8ClampedArray&&"height"in t&&"width"in t)return"RGBA";if(x(t))for(h in n)for(o=n[h],s=0;s<o.length;s+=1){for(a=!0,r=0;r<o[s].length;r+=1)if(void 0!==o[s][r]&&o[s][r]!==t[r]){a=!1;break}if(!0===a){l=h;break}}else for(h in n)for(o=n[h],s=0;s<o.length;s+=1){for(a=!0,r=0;r<o[s].length;r+=1)if(void 0!==o[s][r]&&o[s][r]!==t.charCodeAt(r)){a=!1;break}if(!0===a){l=h;break}}return l===i&&e!==i&&(l=e),l},r=function t(e){for(var i=this.internal.write,n=this.internal.putStream,s=(0,this.internal.getFilters)();-1!==s.indexOf("FlateEncode");)s.splice(s.indexOf("FlateEncode"),1);e.objectId=this.internal.newObject();var r=[];if(r.push({key:"Type",value:"/XObject"}),r.push({key:"Subtype",value:"/Image"}),r.push({key:"Width",value:e.width}),r.push({key:"Height",value:e.height}),e.colorSpace===_.INDEXED?r.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(e.palette.length/3-1)+" "+("sMask"in e&&void 0!==e.sMask?e.objectId+2:e.objectId+1)+" 0 R]"}):(r.push({key:"ColorSpace",value:"/"+e.colorSpace}),e.colorSpace===_.DEVICE_CMYK&&r.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),r.push({key:"BitsPerComponent",value:e.bitsPerComponent}),"decodeParameters"in e&&void 0!==e.decodeParameters&&r.push({key:"DecodeParms",value:"<<"+e.decodeParameters+">>"}),"transparency"in e&&Array.isArray(e.transparency)&&e.transparency.length>0){for(var o="",a=0,h=e.transparency.length;a<h;a++)o+=e.transparency[a]+" "+e.transparency[a]+" ";r.push({key:"Mask",value:"["+o+"]"})}void 0!==e.sMask&&r.push({key:"SMask",value:e.objectId+1+" 0 R"});var l=void 0!==e.filter?["/"+e.filter]:void 0;if(n({data:e.data,additionalKeyValues:r,alreadyAppliedFilters:l,objectId:e.objectId}),i("endobj"),"sMask"in e&&void 0!==e.sMask){var c,u=null!==(c=e.sMaskBitsPerComponent)&&void 0!==c?c:e.bitsPerComponent,d={width:e.width,height:e.height,colorSpace:"DeviceGray",bitsPerComponent:u,data:e.sMask};"filter"in e&&(d.decodeParameters="/Predictor ".concat(e.predictor," /Colors 1 /BitsPerComponent ").concat(u," /Columns ").concat(e.width),d.filter=e.filter),t.call(this,d)}if(e.colorSpace===_.INDEXED){var f=this.internal.newObject();n({data:E(new Uint8Array(e.palette)),objectId:f}),i("endobj")}},o=function(){var t=this.internal.collections[e+"images"];for(var i in t)r.call(this,t[i])},a=function(){var t,i=this.internal.collections[e+"images"],n=this.internal.write;for(var s in i)n("/I"+(t=i[s]).index,t.objectId,"0","R")},h=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",a))},l=function(){var t=this.internal.collections[e+"images"];return h.call(this),t},c=function(){return Object.keys(this.internal.collections[e+"images"]).length},u=function(e){return"function"==typeof t["process"+e.toUpperCase()]},d=function(t){return"object"===(0,fC.A)(t)&&1===t.nodeType},f=function(e,i){if("IMG"===e.nodeName&&e.hasAttribute("src")){var n=""+e.getAttribute("src");if(0===n.indexOf("data:image/"))return hN(unescape(n).split("base64,").pop());var s=t.loadFile(n,!0);if(void 0!==s)return s}if("CANVAS"===e.nodeName){if(0===e.width||0===e.height)throw new Error("Given canvas must have data. Canvas width: "+e.width+", height: "+e.height);var r;switch(i){case"PNG":r="image/png";break;case"WEBP":r="image/webp";break;default:r="image/jpeg"}return hN(e.toDataURL(r,1).split("base64,").pop())}},p=function(t){var i=this.internal.collections[e+"images"];if(i)for(var n in i)if(t===i[n].alias)return i[n]},g=function(t,e,i){return t||e||(t=-96,e=-96),t<0&&(t=-1*i.width*72/t/this.internal.scaleFactor),e<0&&(e=-1*i.height*72/e/this.internal.scaleFactor),0===t&&(t=e*i.width/i.height),0===e&&(e=t*i.height/i.width),[t,e]},m=function(t,e,i,n,s,r){var o=g.call(this,i,n,s),a=this.internal.getCoordinateString,h=this.internal.getVerticalCoordinateString,c=l.call(this);if(i=o[0],n=o[1],c[s.index]=s,r){r*=Math.PI/180;var u=Math.cos(r),d=Math.sin(r),f=function(t){return t.toFixed(4)},p=[f(u),f(d),f(-1*d),f(u),0,0,"cm"]}this.internal.write("q"),r?(this.internal.write([1,"0","0",1,a(t),h(e+n),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([a(i),"0","0",a(n),"0","0","cm"].join(" "))):this.internal.write([a(i),"0","0",a(n),a(t),h(e+n),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+s.index+" Do"),this.internal.write("Q")},_=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var v=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},y=t.__addimage__.sHashCode=function(t){var e,i,n=0;if("string"==typeof t)for(i=t.length,e=0;e<i;e++)n=(n<<5)-n+t.charCodeAt(e),n|=0;else if(x(t))for(i=t.byteLength/2,e=0;e<i;e++)n=(n<<5)-n+t[e],n|=0;return n},w=t.__addimage__.validateStringAsBase64=function(t){(t=t||"").toString().trim();var e=!0;return 0===t.length&&(e=!1),t.length%4!=0&&(e=!1),!1===/^[A-Za-z0-9+/]+$/.test(t.substr(0,t.length-2))&&(e=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(t.substr(-2))&&(e=!1),e},b=t.__addimage__.extractImageFromDataUrl=function(t){if(null==t)return null;if(!(t=t.trim()).startsWith("data:"))return null;var e=t.indexOf(",");return e<0?null:t.substring(0,e).trim().endsWith("base64")?t.substring(e+1):null};t.__addimage__.isArrayBuffer=function(t){return t instanceof ArrayBuffer};var x=t.__addimage__.isArrayBufferView=function(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array},S=t.__addimage__.binaryStringToUint8Array=function(t){for(var e=t.length,i=new Uint8Array(e),n=0;n<e;n++)i[n]=t.charCodeAt(n);return i},E=t.__addimage__.arrayBufferToBinaryString=function(t){for(var e="",i=x(t)?t:new Uint8Array(t),n=0;n<i.length;n+=8192)e+=String.fromCharCode.apply(null,i.subarray(n,n+8192));return e};t.addImage=function(){var t,e,n,s,r,o,a,l,c;if("number"==typeof arguments[1]?(e=i,n=arguments[1],s=arguments[2],r=arguments[3],o=arguments[4],a=arguments[5],l=arguments[6],c=arguments[7]):(e=arguments[1],n=arguments[2],s=arguments[3],r=arguments[4],o=arguments[5],a=arguments[6],l=arguments[7],c=arguments[8]),"object"===(0,fC.A)(t=arguments[0])&&!d(t)&&"imageData"in t){var u=t;t=u.imageData,e=u.format||e||i,n=u.x||n||0,s=u.y||s||0,r=u.w||u.width||r,o=u.h||u.height||o,a=u.alias||a,l=u.compression||l,c=u.rotation||u.angle||c}var f=this.internal.getFilters();if(void 0===l&&-1!==f.indexOf("FlateEncode")&&(l="SLOW"),isNaN(n)||isNaN(s))throw new Error("Invalid coordinates passed to 
2jsPDF.addImage");h.call(this);var p=A.call(this,t,e,a,l);return m.call(this,n,s,r,o,p,c),this};var A=function(e,n,r,o){var a,h,l;if("string"==typeof e&&s(e)===i){e=unescape(e);var g=C(e,!1);(""!==g||void 0!==(g=t.loadFile(e,!0)))&&(e=g)}if(d(e)&&(e=f(e,n)),n=s(e,n),!u(n))throw new Error("addImage does not support files of type '"+n+"', please ensure that a plugin for '"+n+"' support is added.");if((null==(l=r)||0===l.length)&&(r=function(t){return"string"==typeof t||x(t)?y(t):x(t.data)?y(t.data):null}(e)),(a=p.call(this,r))||(e instanceof Uint8Array||"RGBA"===n||(h=e,e=S(e)),a=this["process"+n.toUpperCase()](e,c.call(this),r,function(e){return e&&"string"==typeof e&&(e=e.toUpperCase()),e in t.image_compression?e:v.NONE}(o),h)),!a)throw new Error("An unknown error occurred whilst processing the image.");return a},C=t.__addimage__.convertBase64ToBinaryString=function(t,e){e="boolean"!=typeof e||e;var i,n="";if("string"==typeof t){var s;i=null!==(s=b(t))&&void 0!==s?s:t;try{n=hN(i)}catch(t){if(e)throw w(i)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+t.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return n};t.getImageProperties=function(e){var n,r,o="";if(d(e)&&(e=f(e)),"string"==typeof e&&s(e)===i&&(""===(o=C(e,!1))&&(o=t.loadFile(e)||""),e=o),r=s(e),!u(r))throw new Error("addImage does not support files of type '"+r+"', please ensure that a plugin for '"+r+"' support is added.");if(e instanceof Uint8Array||(e=S(e)),!(n=this["process"+r.toUpperCase()](e)))throw new Error("An unknown error occurred whilst processing the image");return n.fileType=r,n}}(TN.API),wI=TN.API,bI=function(t){if(void 0!==t&&""!=t)return!0},TN.API.events.push(["addPage",function(t){this.internal.getPageInfo(t.pageNumber).pageContext.annotations=[]}]),wI.events.push(["putPage",function(t){for(var e,i,n,s=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(t.objId),a=t.pageContext.annotations,h=!1,l=0;l<a.length&&!h;l++)switch((e=a[l]).type){case"link":(bI(e.options.url)||bI(e.options.pageNumber))&&(h=!0);break;case"reference":case"text":case"freetext":h=!0}if(0!=h){this.internal.write("/Annots [");for(var c=0;c<a.length;c++){e=a[c];var u=this.internal.pdfEscape,d=this.internal.getEncryptor(t.objId);switch(e.type){case"reference":this.internal.write(" "+e.object.objId+" 0 R ");break;case"text":var f=this.internal.newAdditionalObject(),p=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(f.objId),m=e.title||"Note";n="<</Type /Annot /Subtype /Text "+(i="/Rect ["+s(e.bounds.x)+" "+r(e.bounds.y+e.bounds.h)+" "+s(e.bounds.x+e.bounds.w)+" "+r(e.bounds.y)+"] ")+"/Contents ("+u(g(e.contents))+")",n+=" /Popup "+p.objId+" 0 R",n+=" /P "+o.objId+" 0 R",n+=" /T ("+u(g(m))+") >>",f.content=n;var _=f.objId+" 0 R";n="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+s(e.bounds.x+30)+" "+r(e.bounds.y+e.bounds.h)+" "+s(e.bounds.x+e.bounds.w+30)+" "+r(e.bounds.y)+"] ")+" /Parent "+_,e.open&&(n+=" /Open true"),n+=" >>",p.content=n,this.internal.write(f.objId,"0 R",p.objId,"0 R");break;case"freetext":i="/Rect ["+s(e.bounds.x)+" "+r(e.bounds.y)+" "+s(e.bounds.x+e.bounds.w)+" "+r(e.bounds.y+e.bounds.h)+"] ";var v="font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+(e.color||"#000000");n="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+u(d(e.contents))+")",n+=" /DS("+u(d(v))+")",n+=" /Border [0 0 0]",n+=" >>",this.internal.write(n);break;case"link":if(e.options.name){var y=this.annotations._nameMap[e.options.name];e.options.pageNumber=y.page,e.options.top=y.y}else e.options.top||(e.options.top=0);if(i="/Rect ["+e.finalBounds.x+" "+e.finalBounds.y+" "+e.finalBounds.w+" "+e.finalBounds.h+"] ",n="",e.options.url)n="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+u(d(e.options.url))+") >>";else if(e.options.pageNumber)switch(n="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(e.options.pageNumber).objId+" 0 R",e.options.magFactor=e.options.magFactor||"XYZ",e.options.magFactor){case"Fit":n+=" /Fit]";break;case"FitH":n+=" /FitH "+e.options.top+"]";break;case"FitV":e.options.left=e.options.left||0,n+=" /FitV "+e.options.left+"]";break;default:var w=r(e.options.top);e.options.left=e.options.left||0,void 0===e.options.zoom&&(e.options.zoom=0),n+=" /XYZ "+e.options.left+" "+w+" "+e.options.zoom+"]"}""!=n&&(n+=" >>",this.internal.write(n))}}this.internal.write("]")}}]),wI.createAnnotation=function(t){var e=this.internal.getCurrentPageInfo();switch(t.type){case"link":this.link(t.bounds.x,t.bounds.y,t.bounds.w,t.bounds.h,t);break;case"text":case"freetext":e.pageContext.annotations.push(t)}}
vendor: 1,953 bytes, line 2
2,wI.link=function(t,e,i,n,s){var r=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString;r.pageContext.annotations.push({finalBounds:{x:o(t),y:a(e),w:o(t+i),h:a(e+n)},options:s,type:"link"})},wI.textWithLink=function(t,e,i,n){var s,r,o=this.getTextWidth(t),a=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==n.maxWidth){r=n.maxWidth;var h=this.splitTextToSize(t,r).length;s=Math.ceil(a*h)}else r=o,s=a;return this.text(t,e,i,n),i+=.2*a,"center"===n.align&&(e-=o/2),"right"===n.align&&(e-=o),this.link(e,i-a,r,s,n),o},wI.getTextWidth=function(t){var e=this.internal.getFontSize();return this.getStringUnitWidth(t)*e/this.internal.scaleFactor},function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,6437
vendor: 5,728 bytes, line 2
27],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},i={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},n={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},s=[1570,1571,1573,1575];t.__arabicParser__={};var r=t.__arabicParser__.isInArabicSubstitutionA=function(t){return void 0!==e[t.charCodeAt(0)]},o=t.__arabicParser__.isArabicLetter=function(t){return"string"==typeof t&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(t)},a=t.__arabicParser__.isArabicEndLetter=function(t){return o(t)&&r(t)&&e[t.charCodeAt(0)].length<=2},h=t.__arabicParser__.isArabicAlfLetter=function(t){return o(t)&&s.indexOf(t.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(t){return o(t)&&r(t)&&e[t.charCodeAt(0)].length>=1};var l=t.__arabicParser__.arabicLetterHasFinalForm=function(t){return o(t)&&r(t)&&e[t.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(t){return o(t)&&r(t)&&e[t.charCodeAt(0)].length>=3};var c=t.__arabicParser__.arabicLetterHasMedialForm=function(t){return o(t)&&r(t)&&4==e[t.charCodeAt(0)].length},u=t.__arabicParser__.resolveLigatures=function(t){var e=0,n=i,s="",r=0;for(e=0;e<t.length;e+=1)void 0!==n[t.charCodeAt(e)]?(r++,"number"==typeof(n=n[t.charCodeAt(e)])&&(s+=String.fromCharCode(n),n=i,r=0),e===t.length-1&&(n=i,s+=t.charAt(e-(r-1)),e-=r-1,r=0)):(n=i,s+=t.charAt(e-r),e-=r,r=0);return s};t.__arabicParser__.isArabicDiacritic=function(t){return void 0!==t&&void 0!==n[t.charCodeAt(0)]};var d=t.__arabicParser__.getCorrectForm=function(t,e,i){return o(t)?!1===r(t)?-1:!l(t)||!o(e)&&!o(i)||!o(i)&&a(e)||a(t)&&!o(e)||a(t)&&h(e)||a(t)&&a(e)?0:c(t)&&o(e)&&!a(e)&&o(i)&&l(i)?3:a(t)||!o(i)?1:2:-1},f=function(t){var i=0,n=0,s=0,r="",a="",h="",l=(t=t||"").split("\\s+"),c=[];for(i=0;i<l.length;i+=1){for(c.push(""),n=0;n<l[i].length;n+=1)r=l[i][n],a=l[i][n-1],h=l[i][n+1],o(r)?(s=d(r,a,h),c[i]+=-1!==s?String.fromCharCode(e[r.charCodeAt(0)][s]):r):c[i]+=r;c[i]=u(c[i])}return c.join(" ")},p=t.__arabicParser__.processArabic=t.processArabic=function(){var t,e="string"==typeof arguments[0]?arguments[0]:arguments[0].text,i=[];if(Array.isArray(e)){var n=0;for(i=[],n=0;n<e.length;n+=1)Array.isArray(e[n])?i.push([f(e[n][0]),e[n][1],e[n][2]]):i.push([f(e[n])]);t=i}else t=f(e);return"string"==typeof arguments[0]?t:(arguments[0].text=t,arguments[0])};t.events.push(["preProcessText",p])}(TN.API),TN.API.autoPrint=function(t){var e;return(t=t||{}).variant=t.variant||"non-conform","javascript"===t.variant?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(t){var e=function(){var t=void 0;Object.defineProperty(this,"pdf",{get:function(){return t},set:function(e){t=e}});var e=150;Object.defineProperty(this,"width",{get:function(){return e},set:function(t){e=isNaN(t)||!1===Number.isInteger(t)||t<0?150:t,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=e+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(t){i=isNaN(t)||!1===Number.isInteger(t)||t<0?300:t,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var n=[];Object.defineProperty(this,"childNodes",{get:function(){return n},set:function(t){n=t}});var s={};Object.defineProperty(this,"style",{get:function(){return s},set:function(t){s=t}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(t,e){var i;if("2d"!==(t=t||"2d"))return null;for(i in e)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=e[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(TN.API),function(t){var e={left:0,top:0,bottom:0,right:0},i=!1,n=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),s.call(this))},s=function(){this.internal.__cell__.lastCell=new r,this.internal.__cell__.pages=1},r=function(){var t=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var e=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var i=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return i},set:function(t){i=t}}
vendor: 4,418 bytes, line 2
2);var n=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return n},set:function(t){n=t}});var s=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return s},set:function(t){s=t}});var r=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return r},set:function(t){r=t}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(t){o=t}}),this};r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},r.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(t){return n.call(this),this.internal.__cell__.headerFunction="function"==typeof t?t:void 0,this},t.getTextDimensions=function(t,e){n.call(this);var i=(e=e||{}).fontSize||this.getFontSize(),s=e.font||this.getFont(),r=e.scaleFactor||this.internal.scaleFactor,o=0,a=0,h=0,l=this;if(!Array.isArray(t)&&"string"!=typeof t){if("number"!=typeof t)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");t=String(t)}var c=e.maxWidth;c>0?"string"==typeof t?t=this.splitTextToSize(t,c):"[object Array]"===Object.prototype.toString.call(t)&&(t=t.reduce(function(t,e){return t.concat(l.splitTextToSize(e,c))},[])):t=Array.isArray(t)?t:[t];for(var u=0;u<t.length;u++)o<(h=this.getStringUnitWidth(t[u],{font:s})*i)&&(o=h);return 0!==o&&(a=t.length),{w:o/=r,h:Math.max((a*i*this.getLineHeightFactor()-i*(this.getLineHeightFactor()-1))/r,0)}},t.cellAddPage=function(){n.call(this),this.addPage();var t=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new r(t.left,t.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=t.cell=function(){var t;t=arguments[0]instanceof r?arguments[0]:new r(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),n.call(this);var s=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,a=this.internal.__cell__.margins||e,h=this.internal.__cell__.tableHeaderRow,l=this.internal.__cell__.printHeaders;return void 0!==s.lineNumber&&(s.lineNumber===t.lineNumber?(t.x=(s.x||0)+(s.width||0),t.y=s.y||0):s.y+s.height+t.height+a.bottom>this.getPageHeight()?(this.cellAddPage(),t.y=a.top,l&&h&&(this.printHeaderRow(t.lineNumber,!0),t.y+=h[0].height)):t.y=s.y+s.height||t.y),void 0!==t.text[0]&&(this.rect(t.x,t.y,t.width,t.height,!0===i?"FD":void 0),"right"===t.align?this.text(t.text,t.x+t.width-o,t.y+o,{align:"right",baseline:"top"}):"center"===t.align?this.text(t.text,t.x+t.width/2,t.y+o,{align:"center",baseline:"top",maxWidth:t.width-o-o}):this.text(t.text,t.x+o,t.y+o,{align:"left",baseline:"top",maxWidth:t.width-o-o})),this.internal.__cell__.lastCell=t,this};t.table=function(t,i,h,l,c){if(n.call(this),!h)throw new Error("No data for PDF table.");var u,d,f,p,g=[],m=[],_=[],v={},y={},w=[],b=[],x=(c=c||{}).autoSize||!1,S=!1!==c.printHeaders,E=c.css&&void 0!==c.css["font-size"]?16*c.css["font-size"]:c.fontSize||12,A=c.margins||Object.assign({width:this.getPageWidth()},e),C="number"==typeof c.padding?c.padding:3,M=c.headerBackgroundColor||"#c8c8c8",L=c.headerTextColor||"#000";if(s.call(this),this.internal.__cell__.printHeaders=S,this.internal.__cell__.margins=A,this.internal.__cell__.table_font_size=E,this.internal.__cell__.padding=C,this.internal.__cell__.headerBackgroundColor=M,this.internal.__cell__.headerTextColor=L,this.setFontSize(E),null==l)m=g=Object.keys(h[0]),_=g.map(function(){return"left"});else if(Array.isArray(l)&&"object"===(0,fC.A)(l[0]))for(g=l.map(function(t){return t.name}),m=l.map(function(t){return t.prompt||t.name||""}),_=l.map(function(t){return t.align||"left"}),u=0;u<l.length;u+=1)y[l[u].name]=.7499990551181103*l[u].width;else Array.isArray(l)&&"string"==typeof l[0]&&(m=g=l,_=g.map(function(){return"left"}));if(x||Array.isArray(l)&&"string"==typeof l[0])for(u=0;u<g.length;u+=1){for(v[p=g[u]]=h.map(function(t){return t[p]}),this.setFont(void 0,"bold"),w.push(this.getTextDimensions(m[u],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),d=v[p],this.setFont(void 0,"normal"),f=0;f<d.length;f+=1)w.push(this.getTextDimensions(d[f],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);
vendor: 63,703 bytes, line 2
2y[p]=Math.max.apply(null,w)+C+C,w=[]}if(S){var P={};for(u=0;u<g.length;u+=1)P[g[u]]={},P[g[u]].text=m[u],P[g[u]].align=_[u];var k=a.call(this,P,y);b=g.map(function(e){return new r(t,i,y[e],k,P[e].text,void 0,P[e].align)}),this.setTableHeaderRow(b),this.printHeaderRow(1,!1)}var N=l.reduce(function(t,e){return t[e.name]=e.align,t},{});for(u=0;u<h.length;u+=1){"rowStart"in c&&c.rowStart instanceof Function&&c.rowStart({row:u,data:h[u]},this);var I=a.call(this,h[u],y);for(f=0;f<g.length;f+=1){var T=h[u][g[f]];"cellStart"in c&&c.cellStart instanceof Function&&c.cellStart({row:u,col:f,data:T},this),o.call(this,new r(t,i,y[g[f]],I,T,u+2,N[g[f]]))}}return this.internal.__cell__.table_x=t,this.internal.__cell__.table_y=i,this};var a=function(t,e){var i=this.internal.__cell__.padding,n=this.internal.__cell__.table_font_size,s=this.internal.scaleFactor;return Object.keys(t).map(function(n){var s=t[n];return this.splitTextToSize(s.hasOwnProperty("text")?s.text:s,e[n]-i-i)},this).map(function(t){return this.getLineHeightFactor()*t.length*n/s+i+i},this).reduce(function(t,e){return Math.max(t,e)},0)};t.setTableHeaderRow=function(t){n.call(this),this.internal.__cell__.tableHeaderRow=t},t.printHeaderRow=function(t,e){if(n.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var s;if(i=!0,"function"==typeof this.internal.__cell__.headerFunction){var a=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new r(a[0],a[1],a[2],a[3],void 0,-1)}this.setFont(void 0,"bold");for(var h=[],l=0;l<this.internal.__cell__.tableHeaderRow.length;l+=1){s=this.internal.__cell__.tableHeaderRow[l].clone(),e&&(s.y=this.internal.__cell__.margins.top||0,h.push(s)),s.lineNumber=t;var c=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,s),this.setTextColor(c)}h.length>0&&this.setTableHeaderRow(h),this.setFont(void 0,"normal"),i=!1}}(TN.API);var EI={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},AI=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],CI=SI(AI),MI=[100,200,300,400,500,600,700,800,900],LI=SI(MI);function PI(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),i=function(t){return EI[t=t||"normal"]?t:"normal"}(t.style),n=function(t){return t?"number"==typeof t?t>=100&&t<=900&&t%100==0?t:400:/^\d00$/.test(t)?parseInt(t):"bold"===t?700:400:400}(t.weight),s=function(t){return"number"==typeof CI[t=t||"normal"]?t:"normal"}(t.stretch);return{family:e,style:i,weight:n,stretch:s,src:t.src||[],ref:t.ref||{name:e,style:[s,i,n].join(" ")}}}function kI(t,e,i,n){var s;for(s=i;s>=0&&s<e.length;s+=n)if(t[e[s]])return t[e[s]];for(s=i;s>=0&&s<e.length;s-=n)if(t[e[s]])return t[e[s]]}var NI={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},II={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function TI(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function OI(t){return t.trimLeft()}function RI(t,e){for(var i=0;i<t.length;){if(t.charAt(i)===e)return[t.substring(0,i),t.substring(i+1)];i+=1}return null}function FI(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===e?null:[e[0],t.substring(e[0].length)]}var DI,jI,GI,BI,zI,qI=["times"];function UI(t,e,i,n,s){var r=4,o=HI;switch(s){case TN.API.image_compression.FAST:r=1,o=VI;break;case TN.API.image_compression.MEDIUM:r=6,o=KI;break;case TN.API.image_compression.SLOW:r=9,o=$I}t=function(t,e,i,n){for(var s,r=t.length/e,o=new Uint8Array(t.length+r),a=[WI,VI,HI,KI,$I],h=0;h<r;h+=1){var l=h*e,c=t.subarray(l,l+e);if(n)o.set(n(c,i,s),l+h);else{for(var u=a.length,d=[],f=0;f<u;f+=1)d[f]=a[f](c,i,s);var p=YI(d.concat());o.set(d[p],l+h)}s=c}return o}(t,e,Math.ceil(i*n/8),o);var a=$C(t,{level:r});return TN.API.__addimage__.arrayBufferToBinaryString(a)}function WI(t){var e=Array.apply([],t);return e.unshift(0),e}function VI(t,e){var i=t.length,n=[];n[0]=1;for(var s=0;s<i;s+=1){var r=t[s-e]||0;n[s+1]=t[s]-r+256&255}return n}function HI(t,e,i){var n=t.length,s=[];s[0]=2;for(var r=0;r<n;r+=1){var o=i&&i[r]||0;s[r+1]=t[r]-o+256&255}return s}function KI(t,e,i){var n=t.length,s=[];s[0]=3;for(var r=0;r<n;r+=1){var o=t[r-e]||0,a=i&&i[r]||0;s[r+1]=t[r]+256-(o+a>>>1)&255}return s}function $I(t,e,i){var n=t.length,s=[];s[0]=4;for(var r=0;r<n;r+=1){var o=XI(t[r-e]||0,i&&i[r]||0,i&&i[r-e]||0);s[r+1]=t[r]-o+256&255}return s}function XI(t,e,i){if(t===e&&e===i)return t;var n=Math.abs(e-i),s=Math.abs(t-i),r=Math.abs(t+e-i-i);return n<=s&&n<=r?t:s<=r?e:i}function YI(t){var e=t.map(function(t){return t.reduce(function(t,e){return t+Math.abs(e)},0)});return e.indexOf(Math.min.apply(null,e))}function ZI(t,e,i){var n=e*i,s=Math.floor(n/8),r=16-(n-8*s+i),o=(1<<i)-1;return QI(t,s)>>r&o}function JI(t,e,i,n){var s=i*n,r=Math.floor(s/8),o=16-(s-8*r+n),a=(1<<n)-1,h=(e&a)<<o;!function(t,e,i){if(e+1<t.byteLength)t.setUint16(e,i,!1);else{var n=i>>8&255;t.setUint8(e,n)}}(t,r,QI(t,r)&~(a<<o)&65535|h)}function QI(t,e){return e+1<t.byteLength?t.getUint16(e,!1):t.getUint8(e)<<8}function tT(t){var e=0;if(71!==t[e++]||73!==t[e++]||70!==t[e++]||56!==t[e++]||56!=(t[e++]+1&253)||97!==t[e++])throw new Error("Invalid GIF 87a/89a header.");var i=t[e++]|t[e++]<<8,n=t[e++]|t[e++]<<8,s=t[e++],r=s>>7,o=1<<1+(7&s);t[e++],t[e++];var a=null,h=null;r&&(a=e,h=o,e+=3*o);var l=!0,c=[],u=0,d=null,f=0,p=null;for(this.width=i,this.height=n;l&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(11!==t[e]||78==t[e+1]&&69==t[e+2]&&84==t[e+3]&&83==t[e+4]&&67==t[e+5]&&65==t[e+6]&&80==t[e+7]&&69==t[e+8]&&50==t[e+9]&&46==t[e+10]&&48==t[e+11]&&3==t[e+12]&&1==t[e+13]&&0==t[e+16])e+=14,p=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((M=t[e++])>=0))throw Error("Invalid block size");if(0===M)break;e+=M}break;case 249:if(4!==t[e++]||0!==t[e+4])throw new Error("Invalid graphics extension block.");var g=t[e++];u=t[e++]|t[e++]<<8,d=t[e++],1&g||(d=null),f=g>>2&7,e++;break;case 254:for(;;){if(!((M=t[e++])>=0))throw Error("Invalid block size");if(0===M)break;e+=M}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var m=t[e++]|t[e++]<<8,_=t[e++]|t[e++]<<8,v=t[e++]|t[e++]<<8,y=t[e++]|t[e++]<<8,w=t[e++],b=w>>6&1,x=1<<1+(7&w),S=a,E=h,A=!1;w>>7&&(A=!0,S=e,E=x,e+=3*x);var C=e;for(e++;;){var M;if(!((M=t[e++])>=0))throw Error("Invalid block size");if(0===M)break;e+=M}c.push({x:m,y:_,width:v,height:y,has_local_palette:A,palette_offset:S,palette_size:E,data_offset:C,data_length:e-C,transparent_index:d,interlaced:!!b,delay:u,disposal:f});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return p},this.frameInfo=function(t){if(t<0||t>=c.length)throw new Error("Frame index out of range.");return c[t]},this.decodeAndBlitFrameBGRA=function(e,n){var s=this.frameInfo(e),r=s.width*s.height;if(r>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var o=new Uint8Array(r);eT(t,s.data_offset,o,r);var a=s.palette_offset,h=s.transparent_index;null===h&&(h=256);var l=s.width,c=i-l,u=l,d=4*(s.y*i+s.x),f=4*((s.y+s.height)*i+s.x),p=d,g=4*c;!0===s.interlaced&&(g+=4*i*7);for(var m=8,_=0,v=o.length;_<v;++_){var y=o[_];if(0===u&&(u=l,(p+=g)>=f&&(g=4*c+4*i*(m-1),p=d+(l+c)*(m<<1),m>>=1)),y===h)p+=4;else{var w=t[a+3*y],b=t[a+3*y+1],x=t[a+3*y+2];n[p++]=x,n[p++]=b,n[p++]=w,n[p++]=255}--u}},this.decodeAndBlitFrameRGBA=function(e,n){var s=this.frameInfo(e),r=s.width*s.height;if(r>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var o=new Uint8Array(r);eT(t,s.data_offset,o,r);var a=s.palette_offset,h=s.transparent_index;null===h&&(h=256);var l=s.width,c=i-l,u=l,d=4*(s.y*i+s.x),f=4*((s.y+s.height)*i+s.x),p=d,g=4*c;!0===s.interlaced&&(g+=4*i*7);for(var m=8,_=0,v=o.length;_<v;++_){var y=o[_];if(0===u&&(u=l,(p+=g)>=f&&(g=4*c+4*i*(m-1),p=d+(l+c)*(m<<1),m>>=1)),y===h)p+=4;else{var w=t[a+3*y],b=t[a+3*y+1],x=t[a+3*y+2];n[p++]=w,n[p++]=b,n[p++]=x,n[p++]=255}--u}}}function eT(t,e,i,n){for(var s=t[e++],r=1<<s,o=r+1,a=o+1,h=s+1,l=(1<<h)-1,c=0,u=0,d=0,f=t[e++],p=new Int32Array(4096),g=null;;){for(;c<16&&0!==f;)u|=t[e++]<<c,c+=8,1===f?f=t[e++]:--f;if(c<h)break;var m=u&l;if(u>>=h,c-=h,m!==r){if(m===o)break;for(var _=m<a?m:g,v=0,y=_;y>r;)y=p[y]>>8,++v;var w=y;if(d+v+(_!==m?1:0)>n)return void iN.log("Warning, gif stream longer than expected.");i[d++]=w;var b=d+=v;for(_!==m&&(i[d++]=w),y=_;v--;)y=p[y],i[--b]=255&y,y>>=8;null!==g&&a<4096&&(p[a++]=g<<8|w,a>=l+1&&h<12&&(++h,l=l<<1|1)),g=m}else a=o+1,l=(1<<(h=s+1))-1,g=null}return d!==n&&iN.log("Warning, gif stream shorter than expected."),i}function iT(t){var e,i,n,s,r,o=Math.floor,a=new Array(64),h=new Array(64),l=new Array(64),c=new Array(64),u=new Array(65535),d=new Array(65535),f=new Array(64),p=new Array(64),g=[],m=0,_=7,v=new Array(64),y=new Array(64),w=new Array(64),b=new Array(256),x=new Array(2048),S=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],E=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],A=[0,1,2,3,4,5,6,7,8,9,10,11],C=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],M=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],L=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],P=[0,1,2,3,4,5,6,7,8,9,10,11],k=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],N=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function I(t,e){for(var i=0,n=0,s=new Array,r=1;r<=16;r++){for(var o=1;o<=t[r];o++)s[e[n]]=[],s[e[n]][0]=i,s[e[n]][1]=r,n++,i++;i*=2}return s}function T(t){for(var e=t[0],i=t[1]-1;i>=0;)e&1<<i&&(m|=1<<_),i--,--_<0&&(255==m?(O(255),O(0)):O(m),_=7,m=0)}function O(t){g.push(t)}function R(t){O(t>>8&255),O(255&t)}function F(t,e,i,n,s){for(var r,o=s[0],a=s[240],h=function(t,e){var i,n,s,r,o,a,h,l,c,u,d=0;for(c=0;c<8;++c){i=t[d],n=t[d+1],s=t[d+2],r=t[d+3],o=t[d+4],a=t[d+5],h=t[d+6];var p=i+(l=t[d+7]),g=i-l,m=n+h,_=n-h,v=s+a,y=s-a,w=r+o,b=r-o,x=p+w,S=p-w,E=m+v,A=m-v;t[d]=x+E,t[d+4]=x-E;var C=.707106781*(A+S);t[d+2]=S+C,t[d+6]=S-C;var M=.382683433*((x=b+y)-(A=_+g)),L=.5411961*x+M,P=1.306562965*A+M,k=.707106781*(E=y+_),N=g+k,I=g-k;t[d+5]=I+L,t[d+3]=I-L,t[d+1]=N+P,t[d+7]=N-P,d+=8}for(d=0,c=0;c<8;++c){i=t[d],n=t[d+8],s=t[d+16],r=t[d+24],o=t[d+32],a=t[d+40],h=t[d+48];var T=i+(l=t[d+56]),O=i-l,R=n+h,F=n-h,D=s+a,j=s-a,G=r+o,B=r-o,z=T+G,q=T-G,U=R+D,W=R-D;t[d]=z+U,t[d+32]=z-U;var V=.707106781*(W+q);t[d+16]=q+V,t[d+48]=q-V;var H=.382683433*((z=B+j)-(W=F+O)),K=.5411961*z+H,$=1.306562965*W+H,X=.707106781*(U=j+F),Y=O+X,Z=O-X;t[d+40]=Z+K,t[d+24]=Z-K,t[d+8]=Y+$,t[d+56]=Y-$,d++}for(c=0;c<64;++c)u=t[c]*e[c],f[c]=u>0?u+.5|0:u-.5|0;return f}(t,e),l=0;l<64;++l)p[S[l]]=h[l];var c=p[0]-i;i=p[0],0==c?T(n[0]):(T(n[d[r=32767+c]]),T(u[r]));for(var g=63;g>0&&0==p[g];)g--;if(0==g)return T(o),i;for(var m,_=1;_<=g;){for(var v=_;0==p[_]&&_<=g;)++_;var y=_-v;if(y>=16){m=y>>4;for(var w=1;w<=m;++w)T(a);y&=15}r=32767+p[_],T(s[(y<<4)+d[r]]),T(u[r]),_++}return 63!=g&&T(o),i}function D(t){t=Math.min(Math.max(t,1),100),r!=t&&(function(t){for(var e=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],i=0;i<64;i++){var n=o((e[i]*t+50)/100);n=Math.min(Math.max(n,1),255),a[S[i]]=n}for(var s=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],r=0;r<64;r++){var u=o((s[r]*t+50)/100);u=Math.min(Math.max(u,1),255),h[S[r]]=u}for(var d=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,p=0;p<8;p++)for(var g=0;g<8;g++)l[f]=1/(a[S[f]]*d[p]*d[g]*8),c[f]=1/(h[S[f]]*d[p]*d[g]*8),f++}(t<50?Math.floor(5e3/t):Math.floor(200-2*t)),r=t)}this.encode=function(t,r){r&&D(r),g=new Array,m=0,_=7,R(65496),R(65504),R(16),O(74),O(70),O(73),O(70),O(0),O(1),O(1),O(0),R(1),R(1),O(0),O(0),function(){R(65499),R(132),O(0);for(var t=0;t<64;t++)O(a[t]);O(1);for(var e=0;e<64;e++)O(h[e])}(),function(t,e){R(65472),R(17),O(8),R(e),R(t),O(3),O(1),O(17),O(0),O(2),O(17),O(1),O(3),O(17),O(1)}(t.width,t.height),function(){R(65476),R(418),O(0);for(var t=0;t<16;t++)O(E[t+1]);for(var e=0;e<=11;e++)O(A[e]);O(16);for(var i=0;i<16;i++)O(C[i+1]);for(var n=0;n<=161;n++)O(M[n]);O(1);for(var s=0;s<16;s++)O(L[s+1]);for(var r=0;r<=11;r++)O(P[r]);O(17);for(var o=0;o<16;o++)O(k[o+1]);for(var a=0;a<=161;a++)O(N[a])}(),R(65498),R(12),O(3),O(1),O(0),O(2),O(17),O(3),O(17),O(0),O(63),O(0);var o=0,u=0,d=0;m=0,_=7,this.encode.displayName="_encode_";for(var f,p,b,S,I,j,G,B,z,q=t.data,U=t.width,W=t.height,V=4*U,H=0;H<W;){for(f=0;f<V;){for(I=V*H+f,G=-1,B=0,z=0;z<64;z++)j=I+(B=z>>3)*V+(G=4*(7&z)),H+B>=W&&(j-=V*(H+1+B-W)),f+G>=V&&(j-=f+G-V+4),p=q[j++],b=q[j++],S=q[j++],v[z]=(x[p]+x[b+256|0]+x[S+512|0]>>16)-128,y[z]=(x[p+768|0]+x[b+1024|0]+x[S+1280|0]>>16)-128,w[z]=(x[p+1280|0]+x[b+1536|0]+x[S+1792|0]>>16)-128;o=F(v,l,o,e,n),u=F(y,c,u,i,s),d=F(w,c,d,i,s),f+=32}H+=8}if(_>=0){var K=[];K[1]=_+1,K[0]=(1<<_+1)-1,T(K)}return R(65497),new Uint8Array(g)},t=t||50,function(){for(var t=String.fromCharCode,e=0;e<256;e++)b[e]=t(e)}(),e=I(E,A),i=I(L,P),n=I(C,M),s=I(k,N),function(){for(var t=1,e=2,i=1;i<=15;i++){for(var n=t;n<e;n++)d[32767+n]=i,u[32767+n]=[],u[32767+n][1]=i,u[32767+n][0]=n;for(var s=-(e-1);s<=-t;s++)d[32767+s]=i,u[32767+s]=[],u[32767+s][1]=i,u[32767+s][0]=e-1+s;t<<=1,e<<=1}}(),function(){for(var t=0;t<256;t++)x[t]=19595*t,x[t+256|0]=38470*t,x[t+512|0]=7471*t+32768,x[t+768|0]=-11059*t,x[t+1024|0]=-21709*t,x[t+1280|0]=32768*t+8421375,x[t+1536|0]=-27439*t,x[t+1792|0]=-5329*t}(),D(t)}function nT(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function sT(t){function e(t){if(!t)throw Error("assert :P")}function i(t,e,i){for(var n=0;4>n;n++)if(t[e+n]!=i.charCodeAt(n))return!0;return!1}function n(t,e,i,n,s){for(var r=0;r<s;r++)t[e+r]=i[n+r]}function s(t,e,i,n){for(var s=0;s<n;s++)t[e+s]=i}function r(t){return new Int32Array(t)}function o(t,e){for(var i=[],n=0;n<t;n++)i.push(new e);return i}function a(t,e){var i=[];return function t(i,n,s){for(var r=s[n],o=0;o<r&&(i.push(s.length>n+1?[]:new e),!(s.length<n+1));o++)t(i[o],n+1,s)}(i,0,t),i}var h=function(){var t=this;function h(t,e){for(var i=1<<e-1>>>0;t&i;)i>>>=1;return i?(t&i-1)+i:t}function l(t,i,n,s,r){e(!(s%n));do{t[i+(s-=n)]=r}while(0<s)}function c(t,i,n,s,o){if(e(2328>=o),512>=o)var a=r(512);else if(null==(a=r(o)))return 0;return function(t,i,n,s,o,a){var c,d,f=i,p=1<<n,g=r(16),m=r(16);for(e(0!=o),e(null!=s),e(null!=t),e(0<n),d=0;d<o;++d){if(15<s[d])return 0;++g[s[d]]}if(g[0]==o)return 0;for(m[1]=0,c=1;15>c;++c){if(g[c]>1<<c)return 0;m[c+1]=m[c]+g[c]}for(d=0;d<o;++d)c=s[d],0<s[d]&&(a[m[c]++]=d);if(1==m[15])return(s=new u).g=0,s.value=a[0],l(t,f,1,p,s),p;var _,v=-1,y=p-1,w=0,b=1,x=1,S=1<<n;for(d=0,c=1,o=2;c<=n;++c,o<<=1){if(b+=x<<=1,0>(x-=g[c]))return 0;for(;0<g[c];--g[c])(s=new u).g=c,s.value=a[d++],l(t,f+w,o,S,s),w=h(w,c)}for(c=n+1,o=2;15>=c;++c,o<<=1){if(b+=x<<=1,0>(x-=g[c]))return 0;for(;0<g[c];--g[c]){if(s=new u,(w&y)!=v){for(f+=S,_=1<<(v=c)-n;15>v&&!(0>=(_-=g[v]));)++v,_<<=1;p+=S=1<<(_=v-n),t[i+(v=w&y)].g=_+n,t[i+v].value=f-i-v}s.g=c-n,s.value=a[d++],l(t,f+(w>>n),o,S,s),w=h(w,c)}}return b!=2*m[15]-1?0:p}(t,i,n,s,o,a)}function u(){this.value=this.g=0}function d(){this.value=this.g=0}function f(){this.G=o(5,u),this.H=r(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(Di,d)}function p(t,i,n,s){e(null!=t),e(null!=i),e(2147483648>s),t.Ca=254,t.I=0,t.b=-8,t.Ka=0,t.oa=i,t.pa=n,t.Jd=i,t.Yc=n+s,t.Zc=4<=s?n+s-4+1:n,C(t)}function g(t,e){for(var i=0;0<e--;)i|=L(t,128)<<e;return i}function m(t,e){var i=g(t,e);return M(t)?-i:i}function _(t,i,n,s){var r,o=0;for(e(null!=t),e(null!=i),e(4294967288>s),t.Sb=s,t.Ra=0,t.u=0,t.h=0,4<s&&(s=4),r=0;r<s;++r)o+=i[n+r]<<8*r;t.Ra=o,t.bb=s,t.oa=i,t.pa=n}function v(t){for(;8<=t.u&&t.bb<t.Sb;)t.Ra>>>=8,t.Ra+=t.oa[t.pa+t.bb]<<Bi-8>>>0,++t.bb,t.u-=8;S(t)&&(t.h=1,t.u=0)}function y(t,i){if(e(0<=i),!t.h&&i<=Gi){var n=x(t)&ji[i];return t.u+=i,v(t),n}return t.h=1,t.u=0}function w(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function b(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function x(t){return t.Ra>>>(t.u&Bi-1)>>>0}function S(t){return e(t.bb<=t.Sb),t.h||t.bb==t.Sb&&t.u>Bi}function E(t,e){t.u=e,t.h=S(t)}function A(t){t.u>=zi&&(e(t.u>=zi),v(t))}function C(t){e(null!=t&&null!=t.oa),t.pa<t.Zc?(t.I=(t.oa[t.pa++]|t.I<<8)>>>0,t.b+=8):(e(null!=t&&null!=t.oa),t.pa<t.Yc?(t.b+=8,t.I=t.oa[t.pa++]|t.I<<8):t.Ka?t.b=0:(t.I<<=8,t.b+=8,t.Ka=1))}function M(t){return g(t,1)}function L(t,e){var i=t.Ca;0>t.b&&C(t);var n=t.b,s=i*e>>>8,r=(t.I>>>n>s)+0;for(r?(i-=s,t.I-=s+1<<n>>>0):i=s+1,n=i,s=0;256<=n;)s+=8,n>>=8;return n=7^s+qi[n],t.b-=n,t.Ca=(i<<n)-1,r}function P(t,e,i){t[e+0]=i>>24&255,t[e+1]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i}function k(t,e){return t[e+0]|t[e+1]<<8}function N(t,e){return k(t,e)|t[e+2]<<16}function I(t,e){return k(t,e)|k(t,e+2)<<16}function T(t,i){var n=1<<i;return e(null!=t),e(0<i),t.X=r(n),null==t.X?0:(t.Mb=32-i,t.Xa=i,1)}function O(t,i){e(null!=t),e(null!=i),e(t.Xa==i.Xa),n(i.X,0,t.X,0,1<<i.Xa)}function R(){this.X=[],this.Xa=this.Mb=0}function F(t,i,n,s){e(null!=n),e(null!=s);var r=n[0],o=s[0];return 0==r&&(r=(t*o+i/2)/i),0==o&&(o=(i*r+t/2)/t),0>=r||0>=o?0:(n[0]=r,s[0]=o,1)}function D(t,e){return t+(1<<e)-1>>>e}function j(t,e){return((4278255360&t)+(4278255360&e)>>>0&4278255360)+((16711935&t)+(16711935&e)>>>0&16711935)>>>0}function G(e,i){t[i]=function(i,n,s,r,o,a,h){var l;for(l=0;l<o;++l){var c=t[e](a[h+l-1],s,r+l);a[h+l]=j(i[n+l],c)}}}function B(){this.ud=this.hd=this.jd=0}function z(t,e){return((4278124286&(t^e))>>>1)+(t&e)>>>0}function q(t){return 0<=t&&256>t?t:0>t?0:255<t?255:void 0}function U(t,e){return q(t+(t-e+.5>>1))}function W(t,e,i){return Math.abs(e-i)-Math.abs(t-i)}function V(t,e,i,n,s,r,o){for(n=r[o-1],i=0;i<s;++i)r[o+i]=n=j(t[e+i],n)}function H(t,e,i,n,s){var r;for(r=0;r<i;++r){var o=t[e+r],a=o>>8&255,h=16711935&(h=(h=16711935&o)+((a<<16)+a));n[s+r]=(4278255360&o)+h>>>0}}function K(t,e){e.jd=255&t,e.hd=t>>8&255,e.ud=t>>16&255}function $(t,e,i,n,s,r){var o;for(o=0;o<n;++o){var a=e[i+o],h=a>>>8,l=a,c=255&(c=(c=a>>>16)+((t.jd<<24>>24)*(h<<24>>24)>>>5));l=255&(l=(l+=(t.hd<<24>>24)*(h<<24>>24)>>>5)+((t.ud<<24>>24)*(c<<24>>24)>>>5)),s[r+o]=(4278255360&a)+(c<<16)+l}}function X(e,i,n,s,r){t[i]=function(t,e,i,n,o,a,h,l,c){for(n=h;n<l;++n)for(h=0;h<c;++h)o[a++]=r(i[s(t[e++])])},t[e]=function(e,i,o,a,h,l,c){var u=8>>e.b,d=e.Ea,f=e.K[0],p=e.w;if(8>u)for(e=(1<<e.b)-1,p=(1<<u)-1;i<o;++i){var g,m=0;for(g=0;g<d;++g)g&e||(m=s(a[h++])),l[c++]=r(f[m&p]),m>>=u}else t["VP8LMapColor"+n](a,h,f,p,l,c,i,o,d)}}function Y(t,e,i,n,s){for(i=e+i;e<i;){var r=t[e++];n[s++]=r>>16&255,n[s++]=r>>8&255,n[s++]=255&r}}function Z(t,e,i,n,s){for(i=e+i;e<i;){var r=t[e++];n[s++]=r>>16&255,n[s++]=r>>8&255,n[s++]=255&r,n[s++]=r>>24&255}}function J(t,e,i,n,s){for(i=e+i;e<i;){var r=(o=t[e++])>>16&240|o>>12&15,o=240&o|o>>28&15;n[s++]=r,n[s++]=o}}function Q(t,e,i,n,s){for(i=e+i;e<i;){var r=(o=t[e++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;n[s++]=r,n[s++]=o}}function tt(t,e,i,n,s){for(i=e+i;e<i;){var r=t[e++];n[s++]=255&r,n[s++]=r>>8&255,n[s++]=r>>16&255}}function et(t,e,i,s,r,o){if(0==o)for(i=e+i;e<i;)P(s,((o=t[e++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),r+=32;else n(s,r,t,e,i)}function it(e,i){t[i][0]=t[e+"0"],t[i][1]=t[e+"1"],t[i][2]=t[e+"2"],t[i][3]=t[e+"3"],t[i][4]=t[e+"4"],t[i][5]=t[e+"5"],t[i][6]=t[e+"6"],t[i][7]=t[e+"7"],t[i][8]=t[e+"8"],t[i][9]=t[e+"9"],t[i][10]=t[e+"10"],t[i][11]=t[e+"11"],t[i][12]=t[e+"12"],t[i][13]=t[e+"13"],t[i][14]=t[e+"0"],t[i][15]=t[e+"0"]}function nt(t){return t==qn||t==Un||t==Wn||t==Vn}function st(){this.eb=[],this.size=this.A=this.fb=0}function rt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ot(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new st,this.f.kb=new rt,this.sd=null}function at(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ht(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function lt(t){return alert("todo:WebPSamplerProcessPlane"),t.T}function ct(t,e){var i=t.T,s=e.ba.f.RGBA,r=s.eb,o=s.fb+t.ka*s.A,a=ms[e.ba.S],h=t.y,l=t.O,c=t.f,u=t.N,d=t.ea,f=t.W,p=e.cc,g=e.dc,m=e.Mc,_=e.Nc,v=t.ka,y=t.ka+t.T,w=t.U,b=w+1>>1;for(0==v?a(h,l,null,null,c,u,d,f,c,u,d,f,r,o,null,null,w):(a(e.ec,e.fc,h,l,p,g,m,_,c,u,d,f,r,o-s.A,r,o,w),++i);v+2<y;v+=2)p=c,g=u,m=d,_=f,u+=t.Rc,f+=t.Rc,o+=2*s.A,a(h,(l+=2*t.fa)-t.fa,h,l,p,g,m,_,c,u,d,f,r,o-s.A,r,o,w);return l+=t.fa,t.j+y<t.o?(n(e.ec,e.fc,h,l,w),n(e.cc,e.dc,c,u,b),n(e.Mc,e.Nc,d,f,b),i--):1&y||a(h,l,null,null,c,u,d,f,c,u,d,f,r,o+s.A,null,null,w),i}function ut(t,i,n){var s=t.F,r=[t.J];if(null!=s){var o=t.U,a=i.ba.S,h=a==Gn||a==Wn;i=i.ba.f.RGBA;var l=[0],c=t.ka;l[0]=t.T,t.Kb&&(0==c?--l[0]:(--c,r[0]-=t.width),t.j+t.ka+t.T==t.o&&(l[0]=t.o-t.j-c));var u=i.eb;c=i.fb+c*i.A,t=En(s,r[0],t.width,o,l,u,c+(h?0:3),i.A),e(n==l),t&&nt(a)&&xn(u,c,h,o,l,i.A)}return 0}function dt(t){var e=t.ma,i=e.ba.S,n=11>i,s=i==Fn||i==jn||i==Gn||i==Bn||12==i||nt(i);if(e.memory=null,e.Ib=null,e.Jb=null,e.Nd=null,!Oi(e.Oa,t,s?11:12))return 0;if(s&&nt(i)&&_i(),t.da)alert("todo:use_scaling");else{if(n){if(e.Ib=lt,t.Kb){if(i=t.U+1>>1,e.memory=r(t.U+2*i),null==e.memory)return 0;e.ec=e.memory,e.fc=0,e.cc=e.ec,e.dc=e.fc+t.U,e.Mc=e.cc,e.Nc=e.dc+i,e.Ib=ct,_i()}}else alert("todo:EmitYUV");s&&(e.Jb=ut,n&&gi())}if(n&&!ks){for(t=0;256>t;++t)Ns[t]=89858*(t-128)+As>>Es,Os[t]=-22014*(t-128)+As,Ts[t]=-45773*(t-128),Is[t]=113618*(t-128)+As>>Es;for(t=Cs;t<Ms;++t)e=76283*(t-16)+As>>Es,Rs[t-Cs]=Vt(e,255),Fs[t-Cs]=Vt(e+8>>4,15);ks=1}return 1}function ft(t){var i=t.ma,n=t.U,s=t.T;return e(!(1&t.ka)),0>=n||0>=s?0:(n=i.Ib(t,i),null!=i.Jb&&i.Jb(t,i,n),i.Dc+=n,1)}function pt(t){t.ma.memory=null}function gt(t,e,i,n){return 47!=y(t,8)?0:(e[0]=y(t,14)+1,i[0]=y(t,14)+1,n[0]=y(t,1),0!=y(t,3)?0:!t.h)}function mt(t,e){if(4>t)return t+1;var i=t-2>>1;return(2+(1&t)<<i)+y(e,i)+1}function _t(t,e){return 120<e?e-120:1<=(i=((i=Zn[e-1])>>4)*t+(8-(15&i)))?i:1;var i}function vt(t,e,i){var n=x(i),s=t[e+=255&n].g-8;return 0<s&&(E(i,i.u+8),n=x(i),e+=t[e].value,e+=n&(1<<s)-1),E(i,i.u+t[e].g),t[e].value}function yt(t,i,n){return n.g+=t.g,n.value+=t.value<<i>>>0,e(8>=n.g),t.g}function wt(t,i,n){var s=t.xc;return e((i=0==s?0:t.vc[t.md*(n>>s)+(i>>s)])<t.Wb),t.Ya[i]}function bt(t,i,s,r){var o=t.ab,a=t.c*i,h=t.C;i=h+i;var l=s,c=r;for(r=t.Ta,s=t.Ua;0<o--;){var u=t.gc[o],d=h,f=i,p=l,g=c,m=(c=r,l=s,u.Ea);switch(e(d<f),e(f<=u.nc),u.hc){case 2:Vi(p,g,(f-d)*m,c,l);break;case 0:var _=d,v=f,y=c,w=l,b=(C=u).Ea;0==_&&(Ui(p,g,null,null,1,y,w),V(p,g+1,0,0,b-1,y,w+1),g+=b,w+=b,++_);for(var x=1<<C.b,S=x-1,E=D(b,C.b),A=C.K,C=C.w+(_>>C.b)*E;_<v;){var M=A,L=C,P=1;for(Wi(p,g,y,w-b,1,y,w);P<b;){var k=(P&~S)+x;k>b&&(k=b),(0,Yi[M[L++]>>8&15])(p,g+ +P,y,w+P-b,k-P,y,w+P),P=k}g+=b,w+=b,++_&S||(C+=E)}f!=u.nc&&n(c,l-m,c,l+(f-d-1)*m,m);break;case 1:for(m=p,v=g,b=(p=u.Ea)-(w=p&~(y=(g=1<<u.b)-1)),_=D(p,u.b),x=u.K,u=u.w+(d>>u.b)*_;d<f;){for(S=x,E=u,A=new B,C=v+w,M=v+p;v<C;)K(S[E++],A),Zi(A,m,v,g,c,l),v+=g,l+=g;v<M&&(K(S[E++],A),Zi(A,m,v,b,c,l),v+=b,l+=b),++d&y||(u+=_)}break;case 3:if(p==c&&g==l&&0<u.b){for(v=c,p=m=l+(f-d)*m-(w=(f-d)*D(u.Ea,u.b)),g=c,y=l,_=[],w=(b=w)-1;0<=w;--w)_[w]=g[y+w];for(w=b-1;0<=w;--w)v[p+w]=_[w];Hi(u,d,f,c,m,c,l)}else Hi(u,d,f,p,g,c,l)}l=r,c=s}c!=s&&n(r,s,l,c,a)}function xt(t,i){var n=t.V,s=t.Ba+t.c*t.C,r=i-t.C;if(e(i<=t.l.o),e(16>=r),0<r){var o=t.l,a=t.Ta,h=t.Ua,l=o.width;if(bt(t,r,n,s),r=h=[h],e((n=t.C)<(s=i)),e(o.v<o.va),s>o.o&&(s=o.o),n<o.j){var c=o.j-n;n=o.j,r[0]+=c*l}if(n>=s?n=0:(r[0]+=4*o.v,o.ka=n-o.j,o.U=o.va-o.v,o.T=s-n,n=1),n){if(h=h[0],11>(n=t.ca).S){var u=n.f.RGBA,d=(s=n.S,r=o.U,o=o.T,c=u.eb,u.A),f=o;for(u=u.fb+t.Ma*u.A;0<f--;){var p=a,g=h,m=r,_=c,v=u;switch(s){case Rn:Ji(p,g,m,_,v);break;case Fn:Qi(p,g,m,_,v);break;case qn:Qi(p,g,m,_,v),xn(_,v,0,m,1,0);break;case Dn:nn(p,g,m,_,v);break;case jn:et(p,g,m,_,v,1);break;case Un:et(p,g,m,_,v,1),xn(_,v,0,m,1,0);break;case Gn:et(p,g,m,_,v,0);break;case Wn:et(p,g,m,_,v,0),xn(_,v,1,m,1,0);break;case Bn:tn(p,g,m,_,v);break;case Vn:tn(p,g,m,_,v),Sn(_,v,m,1,0);break;case zn:en(p,g,m,_,v);break;default:e(0)}h+=l,u+=d}t.Ma+=o}else alert("todo:EmitRescaledRowsYUVA");e(t.Ma<=n.height)}}t.C=i,e(t.C<=t.i)}function St(t){var e;if(0<t.ua)return 0;for(e=0;e<t.Wb;++e){var i=t.Ya[e].G,n=t.Ya[e].H;if(0<i[1][n[1]+0].g||0<i[2][n[2]+0].g||0<i[3][n[3]+0].g)return 0}return 1}function Et(t,i,n,s,r,o){if(0!=t.Z){var a=t.qd,h=t.rd;for(e(null!=gs[t.Z]);i<n;++i)gs[t.Z](a,h,s,r,s,r,o),a=s,h=r,r+=o;t.qd=a,t.rd=h}}function At(t,i){var n=t.l.ma,s=0==n.Z||1==n.Z?t.l.j:t.C;if(s=t.C<s?s:t.C,e(i<=t.l.o),i>s){var r=t.l.width,o=n.ca,a=n.tb+r*s,h=t.V,l=t.Ba+t.c*s,c=t.gc;e(1==t.ab),e(3==c[0].hc),$i(c[0],s,i,h,l,o,a),Et(n,s,i,o,a,r)}t.C=t.Ma=i}function Ct(t,i,n,s,r,o,a){var h=t.$/s,l=t.$%s,c=t.m,u=t.s,d=n+t.$,f=d;r=n+s*r;var p=n+s*o,g=280+u.ua,m=t.Pb?h:16777216,_=0<u.ua?u.Wa:null,v=u.wc,y=d<p?wt(u,l,h):null;e(t.C<o),e(p<=r);var w=!1;t:for(;;){for(;w||d<p;){var b=0;if(h>=m){var C=d-n;e((m=t).Pb),m.wd=m.m,m.xd=C,0<m.s.ua&&O(m.s.Wa,m.s.vb),m=h+Qn}if(l&v||(y=wt(u,l,h)),e(null!=y),y.Qb&&(i[d]=y.qb,w=!0),!w)if(A(c),y.jc){b=c,C=i;var M=d,L=y.pd[x(b)&Di-1];e(y.jc),256>L.g?(E(b,b.u+L.g),C[M]=L.value,b=0):(E(b,b.u+L.g-256),e(256<=L.value),b=L.value),0==b&&(w=!0)}else b=vt(y.G[0],y.H[0],c);if(c.h)break;if(w||256>b){if(!w)if(y.nd)i[d]=(y.qb|b<<8)>>>0;else{if(A(c),w=vt(y.G[1],y.H[1],c),A(c),C=vt(y.G[2],y.H[2],c),M=vt(y.G[3],y.H[3],c),c.h)break;i[d]=(M<<24|w<<16|b<<8|C)>>>0}if(w=!1,++d,++l>=s&&(l=0,++h,null!=a&&h<=o&&!(h%16)&&a(t,h),null!=_))for(;f<d;)b=i[f++],_.X[(506832829*b&4294967295)>>>_.Mb]=b}else if(280>b){if(b=mt(b-256,c),C=vt(y.G[4],y.H[4],c),A(c),C=_t(s,C=mt(C,c)),c.h)break;if(d-n<C||r-d<b)break t;for(M=0;M<b;++M)i[d+M]=i[d+M-C];for(d+=b,l+=b;l>=s;)l-=s,++h,null!=a&&h<=o&&!(h%16)&&a(t,h);if(e(d<=r),l&v&&(y=wt(u,l,h)),null!=_)for(;f<d;)b=i[f++],_.X[(506832829*b&4294967295)>>>_.Mb]=b}else{if(!(b<g))break t;for(w=b-280,e(null!=_);f<d;)b=i[f++],_.X[(506832829*b&4294967295)>>>_.Mb]=b;b=d,e(!(w>>>(C=_).Xa)),i[b]=C.X[w],w=!0}w||e(c.h==S(c))}if(t.Pb&&c.h&&d<r)e(t.m.h),t.a=5,t.m=t.wd,t.$=t.xd,0<t.s.ua&&O(t.s.vb,t.s.Wa);else{if(c.h)break t;null!=a&&a(t,h>o?o:h),t.a=0,t.$=d-n}return 1}return t.a=3,0}function Mt(t){e(null!=t),t.vc=null,t.yc=null,t.Ya=null;var i=t.Wa;null!=i&&(i.X=null),t.vb=null,e(null!=t)}function Lt(){var e=new ri;return null==e?null:(e.a=0,e.xb=ps,it("Predictor","VP8LPredictors"),it("Predictor","VP8LPredictors_C"),it("PredictorAdd","VP8LPredictorsAdd"),it("PredictorAdd","VP8LPredictorsAdd_C"),Vi=H,Zi=$,Ji=Y,Qi=Z,tn=J,en=Q,nn=tt,t.VP8LMapColor32b=Ki,t.VP8LMapColor8b=Xi,e)}function Pt(t,i,n,a,h){var l=1,d=[t],p=[i],g=a.m,m=a.s,_=null,v=0;t:for(;;){if(n)for(;l&&y(g,1);){var w=d,b=p,S=a,C=1,M=S.m,L=S.gc[S.ab],P=y(M,2);if(S.Oc&1<<P)l=0;else{switch(S.Oc|=1<<P,L.hc=P,L.Ea=w[0],L.nc=b[0],L.K=[null],++S.ab,e(4>=S.ab),P){case 0:case 1:L.b=y(M,3)+2,C=Pt(D(L.Ea,L.b),D(L.nc,L.b),0,S,L.K),L.K=L.K[0];break;case 3:var k,N=y(M,8)+1,I=16<N?0:4<N?1:2<N?2:3;if(w[0]=D(L.Ea,I),L.b=I,k=C=Pt(N,1,0,S,L.K)){var O,R=N,F=L,G=1<<(8>>F.b),B=r(G);if(null==B)k=0;else{var z=F.K[0],q=F.w;for(B[0]=F.K[0][0],O=1;O<1*R;++O)B[O]=j(z[q+O],B[O-1]);for(;O<4*G;++O)B[O]=0;F.K[0]=null,F.K[0]=B,k=1}}C=k;break;case 2:break;default:e(0)}l=C}}if(d=d[0],p=p[0],l&&y(g,1)&&!(l=1<=(v=y(g,4))&&11>=v)){a.a=3;break t}var U;if(U=l)e:{var W,V,H,K=a,$=d,X=p,Y=v,Z=n,J=K.m,Q=K.s,tt=[null],et=1,it=0,nt=Jn[Y];i:for(;;){if(Z&&y(J,1)){var st=y(J,3)+2,rt=D($,st),ot=D(X,st),at=rt*ot;if(!Pt(rt,ot,0,K,tt))break i;for(tt=tt[0],Q.xc=st,W=0;W<at;++W){var ht=tt[W]>>8&65535;tt[W]=ht,ht>=et&&(et=ht+1)}}if(J.h)break i;for(V=0;5>V;++V){var lt=$n[V];!V&&0<Y&&(lt+=1<<Y),it<lt&&(it=lt)}var ct=o(et*nt,u),ut=et,dt=o(ut,f);if(null==dt)var ft=null;else e(65536>=ut),ft=dt;var pt=r(it);if(null==ft||null==pt||null==ct){K.a=1;break i}var gt=ct;for(W=H=0;W<et;++W){var mt=ft[W],_t=mt.G,vt=mt.H,wt=0,bt=1,xt=0;for(V=0;5>V;++V){lt=$n[V],_t[V]=gt,vt[V]=H,!V&&0<Y&&(lt+=1<<Y);n:{var St,Et=lt,At=K,Lt=pt,kt=gt,Nt=H,It=0,Tt=At.m,Ot=y(Tt,1);if(s(Lt,0,0,Et),Ot){var Rt=y(Tt,1)+1,Ft=y(Tt,1),Dt=y(Tt,0==Ft?1:8);Lt[Dt]=1,2==Rt&&(Lt[Dt=y(Tt,8)]=1);var jt=1}else{var Gt=r(19),Bt=y(Tt,4)+4;if(19<Bt){At.a=3;var zt=0;break n}for(St=0;St<Bt;++St)Gt[Yn[St]]=y(Tt,3);var qt=void 0,Ut=void 0,Wt=At,Vt=Gt,Ht=Et,Kt=Lt,$t=0,Xt=Wt.m,Yt=8,Zt=o(128,u);s:for(;c(Zt,0,7,Vt,19);){if(y(Xt,1)){var Jt=2+2*y(Xt,3);if((qt=2+y(Xt,Jt))>Ht)break s}else qt=Ht;for(Ut=0;Ut<Ht&&qt--;){A(Xt);var Qt=Zt[0+(127&x(Xt))];E(Xt,Xt.u+Qt.g);var te=Qt.value;if(16>te)Kt[Ut++]=te,0!=te&&(Yt=te);else{var ee=16==te,ie=te-16,ne=Kn[ie],se=y(Xt,Hn[ie])+ne;if(Ut+se>Ht)break s;for(var re=ee?Yt:0;0<se--;)Kt[Ut++]=re}}$t=1;break s}$t||(Wt.a=3),jt=$t}(jt=jt&&!Tt.h)&&(It=c(kt,Nt,8,Lt,Et)),jt&&0!=It?zt=It:(At.a=3,zt=0)}if(0==zt)break i;if(bt&&1==Xn[V]&&(bt=0==gt[H].g),wt+=gt[H].g,H+=zt,3>=V){var oe,ae=pt[0];for(oe=1;oe<lt;++oe)pt[oe]>ae&&(ae=pt[oe]);xt+=ae}}if(mt.nd=bt,mt.Qb=0,bt&&(mt.qb=(_t[3][vt[3]+0].value<<24|_t[1][vt[1]+0].value<<16|_t[2][vt[2]+0].value)>>>0,0==wt&&256>_t[0][vt[0]+0].value&&(mt.Qb=1,mt.qb+=_t[0][vt[0]+0].value<<8)),mt.jc=!mt.Qb&&6>xt,mt.jc){var he,le=mt;for(he=0;he<Di;++he){var ce=he,ue=le.pd[ce],de=le.G[0][le.H[0]+ce];256<=de.value?(ue.g=de.g+256,ue.value=de.value):(ue.g=0,ue.value=0,ce>>=yt(de,8,ue),ce>>=yt(le.G[1][le.H[1]+ce],16,ue),ce>>=yt(le.G[2][le.H[2]+ce],0,ue),yt(le.G[3][le.H[3]+ce],24,ue))}}}Q.vc=tt,Q.Wb=et,Q.Ya=ft,Q.yc=ct,U=1;break e}U=0}if(!(l=U)){a.a=3;break t}if(0<v){if(m.ua=1<<v,!T(m.Wa,v)){a.a=1,l=0;break t}}else m.ua=0;var fe=a,pe=d,ge=p,me=fe.s,_e=me.xc;if(fe.c=pe,fe.i=ge,me.md=D(pe,_e),me.wc=0==_e?-1:(1<<_e)-1,n){a.xb=fs;break t}if(null==(_=r(d*p))){a.a=1,l=0;break t}l=(l=Ct(a,_,0,d,p,p,null))&&!g.h;break t}return l?(null!=h?h[0]=_:(e(null==_),e(n)),a.$=0,n||Mt(m)):Mt(m),l}function kt(t,i){var n=t.c*t.i,s=n+i+16*i;return e(t.c<=i),t.V=r(s),null==t.V?(t.Ta=null,t.Ua=0,t.a=1,0):(t.Ta=t.V,t.Ua=t.Ba+n+i,1)}function Nt(t,i){var n=t.C,s=i-n,r=t.V,o=t.Ba+t.c*n;for(e(i<=t.l.o);0<s;){var a=16<s?16:s,h=t.l.ma,l=t.l.width,c=l*a,u=h.ca,d=h.tb+l*n,f=t.Ta,p=t.Ua;bt(t,a,r,o),An(f,p,u,d,c),Et(h,n,n+a,u,d,l),s-=a,r+=a*t.c,n+=a}e(n==i),t.C=t.Ma=i}function It(){this.ub=this.yd=this.td=this.Rb=0}function Tt(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Ot(){this.Fb=this.Bb=this.Cb=0,this.Zb=r(4),this.Lb=r(4)}function Rt(){this.Yb=function(){var t=[];return function t(e,i,n){for(var s=n[i],r=0;r<s&&(e.push(n.length>i+1?[]:0),!(n.length<i+1));r++)t(e[r],i+1,n)}(t,0,[3,11]),t}()}function Ft(){this.jb=r(3),this.Wc=a([4,8],Rt),this.Xc=a([4,17],Rt)}function Dt(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new r(4),this.od=new r(4)}function jt(){this.ld=this.La=this.dd=this.tc=0}function Gt(){this.Na=this.la=0}function Bt(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function zt(){this.ad=r(384),this.Za=0,this.Ob=r(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function qt(){this.uc=this.M=this.Nb=0,this.wa=Array(new jt),this.Y=0,this.ya=Array(new zt),this.aa=0,this.l=new Ht}function Ut(){this.y=r(16),this.f=r(8),this.ea=r(8)}function Wt(){this.cb=this.a=0,this.sc="",this.m=new w,this.Od=new It,this.Kc=new Tt,this.ed=new Dt,this.Qa=new Ot,this.Ic=this.$c=this.Aa=0,this.D=new qt,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,w),this.ia=0,this.pb=o(4,Bt),this.Pa=new Ft,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ut),this.Hd=0,this.rb=Array(new Gt),this.sb=0,this.wa=Array(new jt),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new zt),this.L=this.aa=0,this.gd=a([4,2],jt),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Vt(t,e){return 0>t?0:t>e?e:t}function Ht(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Kt(){var t=new Wt;return null!=t&&(t.a=0,t.sc="OK",t.cb=0,t.Xb=0,is||(is=Zt)),t}function $t(t,e,i){return 0==t.a&&(t.a=e,t.sc=i,t.cb=0),0}function Xt(t,e,i){return 3<=i&&157==t[e+0]&&1==t[e+1]&&42==t[e+2]}function Yt(t,i){if(null==t)return 0;if(t.a=0,t.sc="OK",null==i)return $t(t,2,"null VP8Io passed to VP8GetHeaders()");var n=i.data,r=i.w,o=i.ha;if(4>o)return $t(t,7,"Truncated header.");var a=n[r+0]|n[r+1]<<8|n[r+2]<<16,h=t.Od;if(h.Rb=!(1&a),h.td=a>>1&7,h.yd=a>>4&1,h.ub=a>>5,3<h.td)return $t(t,3,"Incorrect keyframe parameters.");if(!h.yd)return $t(t,4,"Frame not displayable.");r+=3,o-=3;var l=t.Kc;if(h.Rb){if(7>o)return $t(t,7,"cannot parse picture header");if(!Xt(n,r,o))return $t(t,3,"Bad code word");l.c=16383&(n[r+4]<<8|n[r+3]),l.Td=n[r+4]>>6,l.i=16383&(n[r+6]<<8|n[r+5]),l.Ud=n[r+6]>>6,r+=7,o-=7,t.za=l.c+15>>4,t.Ub=l.i+15>>4,i.width=l.c,i.height=l.i,i.Da=0,i.j=0,i.v=0,i.va=i.width,i.o=i.height,i.da=0,i.ib=i.width,i.hb=i.height,i.U=i.width,i.T=i.height,s((a=t.Pa).jb,0,255,a.jb.length),e(null!=(a=t.Qa)),a.Cb=0,a.Bb=0,a.Fb=1,s(a.Zb,0,0,a.Zb.length),s(a.Lb,0,0,a.Lb)}if(h.ub>o)return $t(t,7,"bad partition length");p(a=t.m,n,r,h.ub),r+=h.ub,o-=h.ub,h.Rb&&(l.Ld=M(a),l.Kd=M(a)),l=t.Qa;var c,u=t.Pa;if(e(null!=a),e(null!=l),l.Cb=M(a),l.Cb){if(l.Bb=M(a),M(a)){for(l.Fb=M(a),c=0;4>c;++c)l.Zb[c]=M(a)?m(a,7):0;for(c=0;4>c;++c)l.Lb[c]=M(a)?m(a,6):0}if(l.Bb)for(c=0;3>c;++c)u.jb[c]=M(a)?g(a,8):255}else l.Bb=0;if(a.Ka)return $t(t,3,"cannot parse segment header");if((l=t.ed).zd=M(a),l.Tb=g(a,6),l.wb=g(a,3),l.Pc=M(a),l.Pc&&M(a)){for(u=0;4>u;++u)M(a)&&(l.vd[u]=m(a,6));for(u=0;4>u;++u)M(a)&&(l.od[u]=m(a,6))}if(t.L=0==l.Tb?0:l.zd?1:2,a.Ka)return $t(t,3,"cannot parse filter header");var d=o;if(o=c=r,r=c+d,l=d,t.Xb=(1<<g(t.m,2))-1,d<3*(u=t.Xb))n=7;else{for(c+=3*u,l-=3*u,d=0;d<u;++d){var f=n[o+0]|n[o+1]<<8|n[o+2]<<16;f>l&&(f=l),p(t.Jc[+d],n,c,f),c+=f,l-=f,o+=3}p(t.Jc[+u],n,c,l),n=c<r?0:5}if(0!=n)return $t(t,n,"cannot parse partitions");for(n=g(c=t.m,7),o=M(c)?m(c,4):0,r=M(c)?m(c,4):0,l=M(c)?m(c,4):0,u=M(c)?m(c,4):0,c=M(c)?m(c,4):0,d=t.Qa,f=0;4>f;++f){if(d.Cb){var _=d.Zb[f];d.Fb||(_+=n)}else{if(0<f){t.pb[f]=t.pb[0];continue}_=n}var v=t.pb[f];v.Sc[0]=ts[Vt(_+o,127)],v.Sc[1]=es[Vt(_+0,127)],v.Eb[0]=2*ts[Vt(_+r,127)],v.Eb[1]=101581*es[Vt(_+l,127)]>>16,8>v.Eb[1]&&(v.Eb[1]=8),v.Qc[0]=ts[Vt(_+u,117)],v.Qc[1]=es[Vt(_+c,127)],v.lc=_+c}if(!h.Rb)return $t(t,4,"Not a key frame.");for(M(a),h=t.Pa,n=0;4>n;++n){for(o=0;8>o;++o)for(r=0;3>r;++r)for(l=0;11>l;++l)u=L(a,hs[n][o][r][l])?g(a,8):os[n][o][r][l],h.Wc[n][o].Yb[r][l]=u;for(o=0;17>o;++o)h.Xc[n][o]=h.Wc[n][ls[o]]}return t.kc=M(a),t.kc&&(t.Bd=g(a,8)),t.cb=1}function Zt(t,e,i,n,s,r,o){var a=e[s].Yb[i];for(i=0;16>s;++s){if(!L(t,a[i+0]))return s;for(;!L(t,a[i+1]);)if(a=e[++s].Yb[0],i=0,16==s)return 16;var h=e[s+1].Yb;if(L(t,a[i+2])){var l=t,c=0;if(L(l,(d=a)[(u=i)+3]))if(L(l,d[u+6])){for(a=0,u=2*(c=L(l,d[u+8]))+(d=L(l,d[u+9+c])),c=0,d=ns[u];d[a];++a)c+=c+L(l,d[a]);c+=3+(8<<u)}else L(l,d[u+7])?(c=7+2*L(l,165),c+=L(l,145)):c=5+L(l,159);else c=L(l,d[u+4])?3+L(l,d[u+5]):2;a=h[2]}else c=1,a=h[1];h=o+ss[s],0>(l=t).b&&C(l);var u,d=l.b,f=(u=l.Ca>>1)-(l.I>>d)>>31;--l.b,l.Ca+=f,l.Ca|=1,l.I-=(u+1&f)<<d,r[h]=((c^f)-f)*n[(0<s)+0]}return 16}function Jt(t){var e=t.rb[t.sb-1];e.la=0,e.Na=0,s(t.zc,0,0,t.zc.length),t.ja=0}function Qt(t,e,i,n,s){s=t[e+i+32*n]+(s>>3),t[e+i+32*n]=-256&s?0>s?0:255:s}function te(t,e,i,n,s,r){Qt(t,e,0,i,n+s),Qt(t,e,1,i,n+r),Qt(t,e,2,i,n-r),Qt(t,e,3,i,n-s)}function ee(t){return(20091*t>>16)+t}function ie(t,e,i,n){var s,o=0,a=r(16);for(s=0;4>s;++s){var h=t[e+0]+t[e+8],l=t[e+0]-t[e+8],c=(35468*t[e+4]>>16)-ee(t[e+12]),u=ee(t[e+4])+(35468*t[e+12]>>16);a[o+0]=h+u,a[o+1]=l+c,a[o+2]=l-c,a[o+3]=h-u,o+=4,e++}for(s=o=0;4>s;++s)h=(t=a[o+0]+4)+a[o+8],l=t-a[o+8],c=(35468*a[o+4]>>16)-ee(a[o+12]),Qt(i,n,0,0,h+(u=ee(a[o+4])+(35468*a[o+12]>>16))),Qt(i,n,1,0,l+c),Qt(i,n,2,0,l-c),Qt(i,n,3,0,h-u),o++,n+=32}function ne(t,e,i,n){var s=t[e+0]+4,r=35468*t[e+4]>>16,o=ee(t[e+4]),a=35468*t[e+1]>>16;te(i,n,0,s+o,t=ee(t[e+1]),a),te(i,n,1,s+r,t,a),te(i,n,2,s-r,t,a),te(i,n,3,s-o,t,a)}function se(t,e,i,n,s){ie(t,e,i,n),s&&ie(t,e+16,i,n+4)}function re(t,e,i,n){rn(t,e+0,i,n,1),rn(t,e+32,i,n+128,1)}function oe(t,e,i,n){var s;for(t=t[e+0]+4,s=0;4>s;++s)for(e=0;4>e;++e)Qt(i,n,e,s,t)}function ae(t,e,i,n){t[e+0]&&hn(t,e+0,i,n),t[e+16]&&hn(t,e+16,i,n+4),t[e+32]&&hn(t,e+32,i,n+128),t[e+48]&&hn(t,e+48,i,n+128+4)}function he(t,e,i,n){var s,o=r(16);for(s=0;4>s;++s){var a=t[e+0+s]+t[e+12+s],h=t[e+4+s]+t[e+8+s],l=t[e+4+s]-t[e+8+s],c=t[e+0+s]-t[e+12+s];o[0+s]=a+h,o[8+s]=a-h,o[4+s]=c+l,o[12+s]=c-l}for(s=0;4>s;++s)a=(t=o[0+4*s]+3)+o[3+4*s],h=o[1+4*s]+o[2+4*s],l=o[1+4*s]-o[2+4*s],c=t-o[3+4*s],i[n+0]=a+h>>3,i[n+16]=c+l>>3,i[n+32]=a-h>>3,i[n+48]=c-l>>3,n+=64}function le(t,e,i){var n,s=e-32,r=Tn,o=255-t[s-1];for(n=0;n<i;++n){var a,h=r,l=o+t[e-1];for(a=0;a<i;++a)t[e+a]=h[l+t[s+a]];e+=32}}function ce(t,e){le(t,e,4)}function ue(t,e){le(t,e,8)}function de(t,e){le(t,e,16)}function fe(t,e){var i;for(i=0;16>i;++i)n(t,e+32*i,t,e-32,16)}function pe(t,e){var i;for(i=16;0<i;--i)s(t,e,t[e-1],16),e+=32}function ge(t,e,i){var n;for(n=0;16>n;++n)s(e,i+32*n,t,16)}function me(t,e){var i,n=16;for(i=0;16>i;++i)n+=t[e-1+32*i]+t[e+i-32];ge(n>>5,t,e)}function _e(t,e){var i,n=8;for(i=0;16>i;++i)n+=t[e-1+32*i];ge(n>>4,t,e)}function ve(t,e){var i,n=8;for(i=0;16>i;++i)n+=t[e+i-32];ge(n>>4,t,e)}function ye(t,e){ge(128,t,e)}function we(t,e,i){return t+2*e+i+2>>2}function be(t,e){var i,s=e-32;for(s=new Uint8Array([we(t[s-1],t[s+0],t[s+1]),we(t[s+0],t[s+1],t[s+2]),we(t[s+1],t[s+2],t[s+3]),we(t[s+2],t[s+3],t[s+4])]),i=0;4>i;++i)n(t,e+32*i,s,0,s.length)}function xe(t,e){var i=t[e-1],n=t[e-1+32],s=t[e-1+64],r=t[e-1+96];P(t,e+0,16843009*we(t[e-1-32],i,n)),P(t,e+32,16843009*we(i,n,s)),P(t,e+64,16843009*we(n,s,r)),P(t,e+96,16843009*we(s,r,r))}function Se(t,e){var i,n=4;for(i=0;4>i;++i)n+=t[e+i-32]+t[e-1+32*i];for(n>>=3,i=0;4>i;++i)s(t,e+32*i,n,4)}function Ee(t,e){var i=t[e-1+0],n=t[e-1+32],s=t[e-1+64],r=t[e-1-32],o=t[e+0-32],a=t[e+1-32],h=t[e+2-32],l=t[e+3-32];t[e+0+96]=we(n,s,t[e-1+96]),t[e+1+96]=t[e+0+64]=we(i,n,s),t[e+2+96]=t[e+1+64]=t[e+0+32]=we(r,i,n),t[e+3+96]=t[e+2+64]=t[e+1+32]=t[e+0+0]=we(o,r,i),t[e+3+64]=t[e+2+32]=t[e+1+0]=we(a,o,r),t[e+3+32]=t[e+2+0]=we(h,a,o),t[e+3+0]=we(l,h,a)}function Ae(t,e){var i=t[e+1-32],n=t[e+2-32],s=t[e+3-32],r=t[e+4-32],o=t[e+5-32],a=t[e+6-32],h=t[e+7-32];t[e+0+0]=we(t[e+0-32],i,n),t[e+1+0]=t[e+0+32]=we(i,n,s),t[e+2+0]=t[e+1+32]=t[e+0+64]=we(n,s,r),t[e+3+0]=t[e+2+32]=t[e+1+64]=t[e+0+96]=we(s,r,o),t[e+3+32]=t[e+2+64]=t[e+1+96]=we(r,o,a),t[e+3+64]=t[e+2+96]=we(o,a,h),t[e+3+96]=we(a,h,h)}function Ce(t,e){var i=t[e-1+0],n=t[e-1+32],s=t[e-1+64],r=t[e-1-32],o=t[e+0-32],a=t[e+1-32],h=t[e+2-32],l=t[e+3-32];t[e+0+0]=t[e+1+64]=r+o+1>>1,t[e+1+0]=t[e+2+64]=o+a+1>>1,t[e+2+0]=t[e+3+64]=a+h+1>>1,t[e+3+0]=h+l+1>>1,t[e+0+96]=we(s,n,i),t[e+0+64]=we(n,i,r),t[e+0+32]=t[e+1+96]=we(i,r,o),t[e+1+32]=t[e+2+96]=we(r,o,a),t[e+2+32]=t[e+3+96]=we(o,a,h),t[e+3+32]=we(a,h,l)}function Me(t,e){var i=t[e+0-32],n=t[e+1-32],s=t[e+2-32],r=t[e+3-32],o=t[e+4-32],a=t[e+5-32],h=t[e+6-32],l=t[e+7-32];t[e+0+0]=i+n+1>>1,t[e+1+0]=t[e+0+64]=n+s+1>>1,t[e+2+0]=t[e+1+64]=s+r+1>>1,t[e+3+0]=t[e+2+64]=r+o+1>>1,t[e+0+32]=we(i,n,s),t[e+1+32]=t[e+0+96]=we(n,s,r),t[e+2+32]=t[e+1+96]=we(s,r,o),t[e+3+32]=t[e+2+96]=we(r,o,a),t[e+3+64]=we(o,a,h),t[e+3+96]=we(a,h,l)}function Le(t,e){var i=t[e-1+0],n=t[e-1+32],s=t[e-1+64],r=t[e-1+96];t[e+0+0]=i+n+1>>1,t[e+2+0]=t[e+0+32]=n+s+1>>1,t[e+2+32]=t[e+0+64]=s+r+1>>1,t[e+1+0]=we(i,n,s),t[e+3+0]=t[e+1+32]=we(n,s,r),t[e+3+32]=t[e+1+64]=we(s,r,r),t[e+3+64]=t[e+2+64]=t[e+0+96]=t[e+1+96]=t[e+2+96]=t[e+3+96]=r}function Pe(t,e){var i=t[e-1+0],n=t[e-1+32],s=t[e-1+64],r=t[e-1+96],o=t[e-1-32],a=t[e+0-32],h=t[e+1-32],l=t[e+2-32];t[e+0+0]=t[e+2+32]=i+o+1>>1,t[e+0+32]=t[e+2+64]=n+i+1>>1,t[e+0+64]=t[e+2+96]=s+n+1>>1,t[e+0+96]=r+s+1>>1,t[e+3+0]=we(a,h,l),t[e+2+0]=we(o,a,h),t[e+1+0]=t[e+3+32]=we(i,o,a),t[e+1+32]=t[e+3+64]=we(n,i,o),t[e+1+64]=t[e+3+96]=we(s,n,i),t[e+1+96]=we(r,s,n)}function ke(t,e){var i;for(i=0;8>i;++i)n(t,e+32*i,t,e-32,8)}function Ne(t,e){var i;for(i=0;8>i;++i)s(t,e,t[e-1],8),e+=32}function Ie(t,e,i){var n;for(n=0;8>n;++n)s(e,i+32*n,t,8)}function Te(t,e){var i,n=8;for(i=0;8>i;++i)n+=t[e+i-32]+t[e-1+32*i];Ie(n>>4,t,e)}function Oe(t,e){var i,n=4;for(i=0;8>i;++i)n+=t[e+i-32];Ie(n>>3,t,e)}function Re(t,e){var i,n=4;for(i=0;8>i;++i)n+=t[e-1+32*i];Ie(n>>3,t,e)}function Fe(t,e){Ie(128,t,e)}function De(t,e,i){var n=t[e-i],s=t[e+0],r=3*(s-n)+Nn[1020+t[e-2*i]-t[e+i]],o=In[112+(r+4>>3)];t[e-i]=Tn[255+n+In[112+(r+3>>3)]],t[e+0]=Tn[255+s-o]}function je(t,e,i,n){var s=t[e+0],r=t[e+i];return On[255+t[e-2*i]-t[e-i]]>n||On[255+r-s]>n}function Ge(t,e,i,n){return 4*On[255+t[e-i]-t[e+0]]+On[255+t[e-2*i]-t[e+i]]<=n}function Be(t,e,i,n,s){var r=t[e-3*i],o=t[e-2*i],a=t[e-i],h=t[e+0],l=t[e+i],c=t[e+2*i],u=t[e+3*i];return 4*On[255+a-h]+On[255+o-l]>n?0:On[255+t[e-4*i]-r]<=s&&On[255+r-o]<=s&&On[255+o-a]<=s&&On[255+u-c]<=s&&On[255+c-l]<=s&&On[255+l-h]<=s}function ze(t,e,i,n){var s=2*n+1;for(n=0;16>n;++n)Ge(t,e+n,i,s)&&De(t,e+n,i)}function qe(t,e,i,n){var s=2*n+1;for(n=0;16>n;++n)Ge(t,e+n*i,1,s)&&De(t,e+n*i,1)}function Ue(t,e,i,n){var s;for(s=3;0<s;--s)ze(t,e+=4*i,i,n)}function We(t,e,i,n){var s;for(s=3;0<s;--s)qe(t,e+=4,i,n)}function Ve(t,e,i,n,s,r,o,a){for(r=2*r+1;0<s--;){if(Be(t,e,i,r,o))if(je(t,e,i,a))De(t,e,i);else{var h=t,l=e,c=i,u=h[l-2*c],d=h[l-c],f=h[l+0],p=h[l+c],g=h[l+2*c],m=27*(v=Nn[1020+3*(f-d)+Nn[1020+u-p]])+63>>7,_=18*v+63>>7,v=9*v+63>>7;h[l-3*c]=Tn[255+h[l-3*c]+v],h[l-2*c]=Tn[255+u+_],h[l-c]=Tn[255+d+m],h[l+0]=Tn[255+f-m],h[l+c]=Tn[255+p-_],h[l+2*c]=Tn[255+g-v]}e+=n}}function He(t,e,i,n,s,r,o,a){for(r=2*r+1;0<s--;){if(Be(t,e,i,r,o))if(je(t,e,i,a))De(t,e,i);else{var h=t,l=e,c=i,u=h[l-c],d=h[l+0],f=h[l+c],p=In[112+(4+(g=3*(d-u))>>3)],g=In[112+(g+3>>3)],m=p+1>>1;h[l-2*c]=Tn[255+h[l-2*c]+m],h[l-c]=Tn[255+u+g],h[l+0]=Tn[255+d-p],h[l+c]=Tn[255+f-m]}e+=n}}function Ke(t,e,i,n,s,r){Ve(t,e,i,1,16,n,s,r)}function $e(t,e,i,n,s,r){Ve(t,e,1,i,16,n,s,r)}function Xe(t,e,i,n,s,r){var o;for(o=3;0<o;--o)He(t,e+=4*i,i,1,16,n,s,r)}function Ye(t,e,i,n,s,r){var o;for(o=3;0<o;--o)He(t,e+=4,1,i,16,n,s,r)}function Ze(t,e,i,n,s,r,o,a){Ve(t,e,s,1,8,r,o,a),Ve(i,n,s,1,8,r,o,a)}function Je(t,e,i,n,s,r,o,a){Ve(t,e,1,s,8,r,o,a),Ve(i,n,1,s,8,r,o,a)}function Qe(t,e,i,n,s,r,o,a){He(t,e+4*s,s,1,8,r,o,a),He(i,n+4*s,s,1,8,r,o,a)}function ti(t,e,i,n,s,r,o,a){He(t,e+4,1,s,8,r,o,a),He(i,n+4,1,s,8,r,o,a)}function ei(){this.ba=new ot,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ht,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ii(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function ni(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function si(){this.ua=0,this.Wa=new R,this.vb=new R,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new f,this.yc=new u}function ri(){this.xb=this.a=0,this.l=new Ht,this.ca=new ot,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new b,this.Pb=0,this.wd=new b,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new si,this.ab=0,this.gc=o(4,ni),this.Oc=0}function oi(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ht,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ai(t,e,i,n,s,r,o){for(t=null==t?0:t[e+0],e=0;e<o;++e)s[r+e]=t+i[n+e]&255,t=s[r+e]}function hi(t,e,i,n,s,r,o){var a;if(null==t)ai(null,null,i,n,s,r,o);else for(a=0;a<o;++a)s[r+a]=t[e+a]+i[n+a]&255}function li(t,e,i,n,s,r,o){if(null==t)ai(null,null,i,n,s,r,o);else{var a,h=t[e+0],l=h,c=h;for(a=0;a<o;++a)l=c+(h=t[e+a])-l,c=i[n+a]+(-256&l?0>l?0:255:l)&255,l=h,s[r+a]=c}}function ci(t,i,s,o){var a=i.width,h=i.o;if(e(null!=t&&null!=i),0>s||0>=o||s+o>h)return null;if(!t.Cc){if(null==t.ga){var l;if(t.ga=new oi,(l=null==t.ga)||(l=i.width*i.o,e(0==t.Gb.length),t.Gb=r(l),t.Uc=0,null==t.Gb?l=0:(t.mb=t.Gb,t.nb=t.Uc,t.rc=null,l=1),l=!l),!l){l=t.ga;var c=t.Fa,u=t.P,d=t.qc,f=t.mb,p=t.nb,g=u+1,m=d-1,v=l.l;if(e(null!=c&&null!=f&&null!=i),gs[0]=null,gs[1]=ai,gs[2]=hi,gs[3]=li,l.ca=f,l.tb=p,l.c=i.width,l.i=i.height,e(0<l.c&&0<l.i),1>=d)i=0;else if(l.$a=3&c[u+0],l.Z=c[u+0]>>2&3,l.Lc=c[u+0]>>4&3,u=c[u+0]>>6&3,0>l.$a||1<l.$a||4<=l.Z||1<l.Lc||u)i=0;else if(v.put=ft,v.ac=dt,v.bc=pt,v.ma=l,v.width=i.width,v.height=i.height,v.Da=i.Da,v.v=i.v,v.va=i.va,v.j=i.j,v.o=i.o,l.$a)t:{e(1==l.$a),i=Lt();e:for(;;){if(null==i){i=0;break t}if(e(null!=l),l.mc=i,i.c=l.c,i.i=l.i,i.l=l.l,i.l.ma=l,i.l.width=l.c,i.l.height=l.i,i.a=0,_(i.m,c,g,m),!Pt(l.c,l.i,1,i,null))break e;if(1==i.ab&&3==i.gc[0].hc&&St(i.s)?(l.ic=1,c=i.c*i.i,i.Ta=null,i.Ua=0,i.V=r(c),i.Ba=0,null==i.V?(i.a=1,i=0):i=1):(l.ic=0,i=kt(i,l.c)),!i)break e;i=1;break t}l.mc=null,i=0}else i=m>=l.c*l.i;l=!i}if(l)return null;1!=t.ga.Lc?t.Ga=0:o=h-s}e(null!=t.ga),e(s+o<=h);t:{if(i=(c=t.ga).c,h=c.l.o,0==c.$a){if(g=t.rc,m=t.Vc,v=t.Fa,u=t.P+1+s*i,d=t.mb,f=t.nb+s*i,e(u<=t.P+t.qc),0!=c.Z)for(e(null!=gs[c.Z]),l=0;l<o;++l)gs[c.Z](g,m,v,u,d,f,i),g=d,m=f,f+=i,u+=i;else for(l=0;l<o;++l)n(d,f,v,u,i),g=d,m=f,f+=i,u+=i;t.rc=g,t.Vc=m}else{if(e(null!=c.mc),i=s+o,e(null!=(l=c.mc)),e(i<=l.i),l.C>=i)i=1;else if(c.ic||gi(),c.ic){c=l.V,g=l.Ba,m=l.c;var y=l.i,w=(v=1,u=l.$/m,d=l.$%m,f=l.m,p=l.s,l.$),b=m*y,x=m*i,E=p.wc,C=w<x?wt(p,d,u):null;e(w<=b),e(i<=y),e(St(p));e:for(;;){for(;!f.h&&w<x;){if(d&E||(C=wt(p,d,u)),e(null!=C),A(f),256>(y=vt(C.G[0],C.H[0],f)))c[g+w]=y,++w,++d>=m&&(d=0,++u<=i&&!(u%16)&&At(l,u));else{if(!(280>y)){v=0;break e}y=mt(y-256,f);var M,L=vt(C.G[4],C.H[4],f);if(A(f),!(w>=(L=_t(m,L=mt(L,f)))&&b-w>=y)){v=0;break e}for(M=0;M<y;++M)c[g+w+M]=c[g+w+M-L];for(w+=y,d+=y;d>=m;)d-=m,++u<=i&&!(u%16)&&At(l,u);w<x&&d&E&&(C=wt(p,d,u))}e(f.h==S(f))}At(l,u>i?i:u);break e}!v||f.h&&w<b?(v=0,l.a=f.h?5:3):l.$=w,i=v}else i=Ct(l,l.V,l.Ba,l.c,l.i,i,Nt);if(!i){o=0;break t}}s+o>=h&&(t.Cc=1),o=1}if(!o)return null;if(t.Cc&&(null!=(o=t.ga)&&(o.mc=null),t.ga=null,0<t.Ga))return alert("todo:WebPDequantizeLevels"),null}return t.nb+s*a}function ui(t,e,i,n,s,r){for(;0<s--;){var o,a=t,h=e+(i?1:0),l=t,c=e+(i?0:3);for(o=0;o<n;++o){var u=l[c+4*o];255!=u&&(u*=32897,a[h+4*o+0]=a[h+4*o+0]*u>>23,a[h+4*o+1]=a[h+4*o+1]*u>>23,a[h+4*o+2]=a[h+4*o+2]*u>>23)}e+=r}}function di(t,e,i,n,s){for(;0<n--;){var r;for(r=0;r<i;++r){var o=t[e+2*r+0],a=15&(l=t[e+2*r+1]),h=4369*a,l=(240&l|l>>4)*h>>16;t[e+2*r+0]=(240&o|o>>4)*h>>16&240|(15&o|o<<4)*h>>16>>4&15,t[e+2*r+1]=240&l|a}e+=s}}function fi(t,e,i,n,s,r,o,a){var h,l,c=255;for(l=0;l<s;++l){for(h=0;h<n;++h){var u=t[e+h];r[o+4*h]=u,c&=u}e+=i,o+=a}return 255!=c}function pi(t,e,i,n,s){var r;for(r=0;r<s;++r)i[n+r]=t[e+r]>>8}function gi(){xn=ui,Sn=di,En=fi,An=pi}function mi(i,n,s){t[i]=function(t,i,r,o,a,h,l,c,u,d,f,p,g,m,_,v,y){var w,b=y-1>>1,x=a[h+0]|l[c+0]<<16,S=u[d+0]|f[p+0]<<16;e(null!=t);var E=3*x+S+131074>>2;for(n(t[i+0],255&E,E>>16,g,m),null!=r&&(E=3*S+x+131074>>2,n(r[o+0],255&E,E>>16,_,v)),w=1;w<=b;++w){var A=a[h+w]|l[c+w]<<16,C=u[d+w]|f[p+w]<<16,M=x+A+S+C+524296,L=M+2*(A+S)>>3;E=L+x>>1,x=(M=M+2*(x+C)>>3)+A>>1,n(t[i+2*w-1],255&E,E>>16,g,m+(2*w-1)*s),n(t[i+2*w-0],255&x,x>>16,g,m+(2*w-0)*s),null!=r&&(E=M+S>>1,x=L+C>>1,n(r[o+2*w-1],255&E,E>>16,_,v+(2*w-1)*s),n(r[o+2*w+0],255&x,x>>16,_,v+(2*w+0)*s)),x=A,S=C}1&y||(E=3*x+S+131074>>2,n(t[i+y-1],255&E,E>>16,g,m+(y-1)*s),null!=r&&(E=3*S+x+131074>>2,n(r[o+y-1],255&E,E>>16,_,v+(y-1)*s)))}}function _i(){ms[Rn]=_s,ms[Fn]=ys,ms[Dn]=vs,ms[jn]=ws,ms[Gn]=bs,ms[Bn]=xs,ms[zn]=Ss,ms[qn]=ys,ms[Un]=ws,ms[Wn]=bs,ms[Vn]=xs}function vi(t){return t&~Ps?0>t?0:255:t>>Ls}function yi(t,e){return vi((19077*t>>8)+(26149*e>>8)-14234)}function wi(t,e,i){return vi((19077*t>>8)-(6419*e>>8)-(13320*i>>8)+8708)}function bi(t,e){return vi((19077*t>>8)+(33050*e>>8)-17685)}function xi(t,e,i,n,s){n[s+0]=yi(t,i),n[s+1]=wi(t,e,i),n[s+2]=bi(t,e)}function Si(t,e,i,n,s){n[s+0]=bi(t,e),n[s+1]=wi(t,e,i),n[s+2]=yi(t,i)}function Ei(t,e,i,n,s){var r=wi(t,e,i);e=r<<3&224|bi(t,e)>>3,n[s+0]=248&yi(t,i)|r>>5,n[s+1]=e}function Ai(t,e,i,n,s){var r=240&bi(t,e)|15;n[s+0]=240&yi(t,i)|wi(t,e,i)>>4,n[s+1]=r}function Ci(t,e,i,n,s){n[s+0]=255,xi(t,e,i,n,s+1)}function Mi(t,e,i,n,s){Si(t,e,i,n,s),n[s+3]=255}function Li(t,e,i,n,s){xi(t,e,i,n,s),n[s+3]=255}function Pi(e,i,n){t[e]=function(t,e,s,r,o,a,h,l,c){for(var u=l+(-2&c)*n;l!=u;)i(t[e+0],s[r+0],o[a+0],h,l),i(t[e+1],s[r+0],o[a+0],h,l+n),e+=2,++r,++a,l+=2*n;1&c&&i(t[e+0],s[r+0],o[a+0],h,l)}}function ki(t,e,i){return 0==i?0==t?0==e?6:5:0==e?4:0:i}function Ni(t,e,i,n,s){switch(t>>>30){case 3:rn(e,i,n,s,0);break;case 2:on(e,i,n,s);break;case 1:hn(e,i,n,s)}}function Ii(t,e){var i,r,o=e.M,a=e.Nb,h=t.oc,l=t.pc+40,c=t.oc,u=t.pc+584,d=t.oc,f=t.pc+600;for(i=0;16>i;++i)h[l+32*i-1]=129;for(i=0;8>i;++i)c[u+32*i-1]=129,d[f+32*i-1]=129;for(0<o?h[l-1-32]=c[u-1-32]=d[f-1-32]=129:(s(h,l-32-1,127,21),s(c,u-32-1,127,9),s(d,f-32-1,127,9)),r=0;r<t.za;++r){var p=e.ya[e.aa+r];if(0<r){for(i=-1;16>i;++i)n(h,l+32*i-4,h,l+32*i+12,4);for(i=-1;8>i;++i)n(c,u+32*i-4,c,u+32*i+4,4),n(d,f+32*i-4,d,f+32*i+4,4)}var g=t.Gd,m=t.Hd+r,_=p.ad,v=p.Hc;if(0<o&&(n(h,l-32,g[m].y,0,16),n(c,u-32,g[m].f,0,8),n(d,f-32,g[m].ea,0,8)),p.Za){var y=h,w=l-32+16;for(0<o&&(r>=t.za-1?s(y,w,g[m].y[15],4):n(y,w,g[m+1].y,0,4)),i=0;4>i;i++)y[w+128+i]=y[w+256+i]=y[w+384+i]=y[w+0+i];for(i=0;16>i;++i,v<<=2)y=h,w=l+Ds[i],us[p.Ob[i]](y,w),Ni(v,_,16*+i,y,w)}else if(y=ki(r,o,p.Ob[0]),cs[y](h,l),0!=v)for(i=0;16>i;++i,v<<=2)Ni(v,_,16*+i,h,l+Ds[i]);for(i=p.Gc,y=ki(r,o,p.Dd),ds[y](c,u),ds[y](d,f),v=_,y=c,w=u,255&(p=0|i)&&(170&p?an(v,256,y,w):ln(v,256,y,w)),p=d,v=f,255&(i>>=8)&&(170&i?an(_,320,p,v):ln(_,320,p,v)),o<t.Ub-1&&(n(g[m].y,0,h,l+480,16),n(g[m].f,0,c,u+224,8),n(g[m].ea,0,d,f+224,8)),i=8*a*t.B,g=t.sa,m=t.ta+16*r+16*a*t.R,_=t.qa,p=t.ra+8*r+i,v=t.Ha,y=t.Ia+8*r+i,i=0;16>i;++i)n(g,m+i*t.R,h,l+32*i,16);for(i=0;8>i;++i)n(_,p+i*t.B,c,u+32*i,8),n(v,y+i*t.B,d,f+32*i,8)}}function Ti(t,n,s,r,o,a,h,l,c){var u=[0],d=[0],f=0,p=null!=c?c.kd:0,g=null!=c?c:new ii;if(null==t||12>s)return 7;g.data=t,g.w=n,g.ha=s,n=[n],s=[s],g.gb=[g.gb];t:{var m=n,v=s,y=g.gb;if(e(null!=t),e(null!=v),e(null!=y),y[0]=0,12<=v[0]&&!i(t,m[0],"RIFF")){if(i(t,m[0]+8,"WEBP")){y=3;break t}var w=I(t,m[0]+4);if(12>w||4294967286<w){y=3;break t}if(p&&w>v[0]-8){y=7;break t}y[0]=w,m[0]+=12,v[0]-=12}y=0}if(0!=y)return y;for(w=0<g.gb[0],s=s[0];;){t:{var x=t;v=n,y=s;var S=u,E=d,A=m=[0];if((L=f=[f])[0]=0,8>y[0])y=7;else{if(!i(x,v[0],"VP8X")){if(10!=I(x,v[0]+4)){y=3;break t}if(18>y[0]){y=7;break t}var C=I(x,v[0]+8),M=1+N(x,v[0]+12);if(2147483648<=M*(x=1+N(x,v[0]+15))){y=3;break t}null!=A&&(A[0]=C),null!=S&&(S[0]=M),null!=E&&(E[0]=x),v[0]+=18,y[0]-=18,L[0]=1}y=0}}if(f=f[0],m=m[0],0!=y)return y;if(v=!!(2&m),!w&&f)return 3;if(null!=a&&(a[0]=!!(16&m)),null!=h&&(h[0]=v),null!=l&&(l[0]=0),h=u[0],m=d[0],f&&v&&null==c){y=0;break}if(4>s){y=7;break}if(w&&f||!w&&!f&&!i(t,n[0],"ALPH")){s=[s],g.na=[g.na],g.P=[g.P],g.Sa=[g.Sa];t:{C=t,y=n,w=s;var L=g.gb;S=g.na,E=g.P,A=g.Sa,M=22,e(null!=C),e(null!=w),x=y[0];var P=w[0];for(e(null!=S),e(null!=A),S[0]=null,E[0]=null,A[0]=0;;){if(y[0]=x,w[0]=P,8>P){y=7;break t}var k=I(C,x+4);if(4294967286<k){y=3;break t}var T=8+k+1&-2;if(M+=T,0<L&&M>L){y=3;break t}if(!i(C,x,"VP8 ")||!i(C,x,"VP8L")){y=0;break t}if(P[0]<T){y=7;break t}i(C,x,"ALPH")||(S[0]=C,E[0]=x+8,A[0]=k),x+=T,P-=T}}if(s=s[0],g.na=g.na[0],g.P=g.P[0],g.Sa=g.Sa[0],0!=y)break}s=[s],g.Ja=[g.Ja],g.xa=[g.xa];t:if(L=t,y=n,w=s,S=g.gb[0],E=g.Ja,A=g.xa,C=y[0],x=!i(L,C,"VP8 "),M=!i(L,C,"VP8L"),e(null!=L),e(null!=w),e(null!=E),e(null!=A),8>w[0])y=7;else{if(x||M){if(L=I(L,C+4),12<=S&&L>S-12){y=3;break t}if(p&&L>w[0]-8){y=7;break t}E[0]=L,y[0]+=8,w[0]-=8,A[0]=M}else A[0]=5<=w[0]&&47==L[C+0]&&!(L[C+4]>>5),E[0]=w[0];y=0}if(s=s[0],g.Ja=g.Ja[0],g.xa=g.xa[0],n=n[0],0!=y)break;if(4294967286<g.Ja)return 3;if(null==l||v||(l[0]=g.xa?2:1),h=[h],m=[m],g.xa){if(5>s){y=7;break}l=h,p=m,v=a,null==t||5>s?t=0:5<=s&&47==t[n+0]&&!(t[n+4]>>5)?(w=[0],L=[0],S=[0],_(E=new b,t,n,s),gt(E,w,L,S)?(null!=l&&(l[0]=w[0]),null!=p&&(p[0]=L[0]),null!=v&&(v[0]=S[0]),t=1):t=0):t=0}else{if(10>s){y=7;break}l=m,null==t||10>s||!Xt(t,n+3,s-3)?t=0:(p=t[n+0]|t[n+1]<<8|t[n+2]<<16,v=16383&(t[n+7]<<8|t[n+6]),t=16383&(t[n+9]<<8|t[n+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=g.Ja||!v||!t?t=0:(h&&(h[0]=v),l&&(l[0]=t),t=1))}if(!t)return 3;if(h=h[0],m=m[0],f&&(u[0]!=h||d[0]!=m))return 3;null!=c&&(c[0]=g,c.offset=n-c.w,e(4294967286>n-c.w),e(c.offset==c.ha-s));break}return 0==y||7==y&&f&&null==c?(null!=a&&(a[0]|=null!=g.na&&0<g.na.length),null!=r&&(r[0]=h),null!=o&&(o[0]=m),0):y}function Oi(t,e,i){var n=e.width,s=e.height,r=0,o=0,a=n,h=s;if(e.Da=null!=t&&0<t.Da,e.Da&&(a=t.cd,h=t.bd,r=t.v,o=t.j,11>i||(r&=-2,o&=-2),0>r||0>o||0>=a||0>=h||r+a>n||o+h>s))return 0;if(e.v=r,e.j=o,e.va=r+a,e.o=o+h,e.U=a,e.T=h,e.da=null!=t&&0<t.da,e.da){if(!F(a,h,i=[t.ib],r=[t.hb]))return 0;e.ib=i[0],e.hb=r[0]}return e.ob=null!=t&&t.ob,e.Kb=null==t||!t.Sd,e.da&&(e.ob=e.ib<3*n/4&&e.hb<3*s/4,e.Kb=0),1}function Ri(t){if(null==t)return 2;if(11>t.S){var e=t.f.RGBA;e.fb+=(t.height-1)*e.A,e.A=-e.A}else e=t.f.kb,t=t.height,e.O+=(t-1)*e.fa,e.fa=-e.fa,e.N+=(t-1>>1)*e.Ab,e.Ab=-e.Ab,e.W+=(t-1>>1)*e.Db,e.Db=-e.Db,null!=e.F&&(e.J+=(t-1)*e.lb,e.lb=-e.lb);return 0}function Fi(t,e,i,n){if(null==n||0>=t||0>=e)return 2;if(null!=i){if(i.Da){var s=i.cd,o=i.bd,a=-2&i.v,h=-2&i.j;if(0>a||0>h||0>=s||0>=o||a+s>t||h+o>e)return 2;t=s,e=o}if(i.da){if(!F(t,e,s=[i.ib],o=[i.hb]))return 2;t=s[0],e=o[0]}}n.width=t,n.height=e;t:{var l=n.width,c=n.height;if(t=n.S,0>=l||0>=c||!(t>=Rn&&13>t))t=2;else{if(0>=n.Rd&&null==n.sd){a=o=s=e=0;var u=(h=l*Bs[t])*c;if(11>t||(o=(c+1)/2*(e=(l+1)/2),12==t&&(a=(s=l)*c)),null==(c=r(u+2*o+a))){t=1;break t}n.sd=c,11>t?((l=n.f.RGBA).eb=c,l.fb=0,l.A=h,l.size=u):((l=n.f.kb).y=c,l.O=0,l.fa=h,l.Fd=u,l.f=c,l.N=0+u,l.Ab=e,l.Cd=o,l.ea=c,l.W=0+u+o,l.Db=e,l.Ed=o,12==t&&(l.F=c,l.J=0+u+2*o),l.Tc=a,l.lb=s)}if(e=1,s=n.S,o=n.width,a=n.height,s>=Rn&&13>s)if(11>s)t=n.f.RGBA,e&=(h=Math.abs(t.A))*(a-1)+o<=t.size,e&=h>=o*Bs[s],e&=null!=t.eb;else{t=n.f.kb,h=(o+1)/2,u=(a+1)/2,l=Math.abs(t.fa),c=Math.abs(t.Ab);var d=Math.abs(t.Db),f=Math.abs(t.lb),p=f*(a-1)+o;e&=l*(a-1)+o<=t.Fd,e&=c*(u-1)+h<=t.Cd,e=(e&=d*(u-1)+h<=t.Ed)&l>=o&c>=h&d>=h,e&=null!=t.y,e&=null!=t.f,e&=null!=t.ea,12==s&&(e&=f>=o,e&=p<=t.Tc,e&=null!=t.F)}else e=0;t=e?0:2}}return 0!=t||null!=i&&i.fd&&(t=Ri(n)),t}var Di=64,ji=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Gi=24,Bi=32,zi=8,qi=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];G("Predictor0","PredictorAdd0"),t.Predictor0=function(){return 4278190080},t.Predictor1=function(t){return t},t.Predictor2=function(t,e,i){return e[i+0]},t.Predictor3=function(t,e,i){return e[i+1]},t.Predictor4=function(t,e,i){return e[i-1]},t.Predictor5=function(t,e,i){return z(z(t,e[i+1]),e[i+0])},t.Predictor6=function(t,e,i){return z(t,e[i-1])},t.Predictor7=function(t,e,i){return z(t,e[i+0])},t.Predictor8=function(t,e,i){return z(e[i-1],e[i+0])},t.Predictor9=function(t,e,i){return z(e[i+0],e[i+1])},t.Predictor10=function(t,e,i){return z(z(t,e[i-1]),z(e[i+0],e[i+1]))},t.Predictor11=function(t,e,i){var n=e[i+0];return 0>=W(n>>24&255,t>>24&255,(e=e[i-1])>>24&255)+W(n>>16&255,t>>16&255,e>>16&255)+W(n>>8&255,t>>8&255,e>>8&255)+W(255&n,255&t,255&e)?n:t},t.Predictor12=function(t,e,i){var n=e[i+0];return(q((t>>24&255)+(n>>24&255)-((e=e[i-1])>>24&255))<<24|q((t>>16&255)+(n>>16&255)-(e>>16&255))<<16|q((t>>8&255)+(n>>8&255)-(e>>8&255))<<8|q((255&t)+(255&n)-(255&e)))>>>0},t.Predictor13=function(t,e,i){var n=e[i-1];return(U((t=z(t,e[i+0]))>>24&255,n>>24&255)<<24|U(t>>16&255,n>>16&255)<<16|U(t>>8&255,n>>8&255)<<8|U(255&t,255&n))>>>0};var Ui=t.PredictorAdd0;t.PredictorAdd1=V,G("Predictor2","PredictorAdd2"),G("Predictor3","PredictorAdd3"),G("Predictor4","PredictorAdd4"),G("Predictor5","PredictorAdd5"),G("Predictor6","PredictorAdd6"),G("Predictor7","PredictorAdd7"),G("Predictor8","PredictorAdd8"),G("Predictor9","PredictorAdd9"),G("Predictor10","PredictorAdd10"),G("Predictor11","PredictorAdd11"),G("Predictor12","PredictorAdd12"),G("Predictor13","PredictorAdd13");var Wi=t.PredictorAdd2;X("ColorIndexInverseTransform","MapARGB","32b",function(t){return t>>8&255},function(t){return t}),X("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(t){return t},function(t){return t>>8&255});var Vi,Hi=t.ColorIndexInverseTransform,Ki=t.MapARGB,$i=t.VP8LColorIndexInverseTransformAlpha,Xi=t.MapAlpha,Yi=t.VP8LPredictorsAdd=[];Yi.length=16,(t.VP8LPredictors=[]).length=16,(t.VP8LPredictorsAdd_C=[]).length=16,(t.VP8LPredictors_C=[]).length=16;var Zi,Ji,Qi,tn,en,nn,sn,rn,on,an,hn,ln,cn,un,dn,fn,pn,gn,mn,_n,vn,yn,wn,bn,xn,Sn,En,An,Cn=r(511),Mn=r(2041),Ln=r(225),Pn=r(767),kn=0,Nn=Mn,In=Ln,Tn=Pn,On=Cn,Rn=0,Fn=1,Dn=2,jn=3,Gn=4,Bn=5,zn=6,qn=7,Un=8,Wn=9,Vn=10,Hn=[2,3,7],Kn=[3,3,11],$n=[280,256,256,256,40],Xn=[0,1,1,1,0],Yn=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zn=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Jn=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qn=8,ts=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],es=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],is=null,ns=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],ss=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],rs=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],os=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,25
25,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],as=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,
21,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],hs=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 6,730 bytes, line 2
25,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ls=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],cs=[],us=[],ds=[],fs=1,ps=2,gs=[],ms=[];mi("UpsampleRgbLinePair",xi,3),mi("UpsampleBgrLinePair",Si,3),mi("UpsampleRgbaLinePair",Li,4),mi("UpsampleBgraLinePair",Mi,4),mi("UpsampleArgbLinePair",Ci,4),mi("UpsampleRgba4444LinePair",Ai,2),mi("UpsampleRgb565LinePair",Ei,2);var _s=t.UpsampleRgbLinePair,vs=t.UpsampleBgrLinePair,ys=t.UpsampleRgbaLinePair,ws=t.UpsampleBgraLinePair,bs=t.UpsampleArgbLinePair,xs=t.UpsampleRgba4444LinePair,Ss=t.UpsampleRgb565LinePair,Es=16,As=1<<Es-1,Cs=-227,Ms=482,Ls=6,Ps=(256<<Ls)-1,ks=0,Ns=r(256),Is=r(256),Ts=r(256),Os=r(256),Rs=r(Ms-Cs),Fs=r(Ms-Cs);Pi("YuvToRgbRow",xi,3),Pi("YuvToBgrRow",Si,3),Pi("YuvToRgbaRow",Li,4),Pi("YuvToBgraRow",Mi,4),Pi("YuvToArgbRow",Ci,4),Pi("YuvToRgba4444Row",Ai,2),Pi("YuvToRgb565Row",Ei,2);var Ds=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],js=[0,2,8],Gs=[8,7,6,4,4,2,2,2,1,1,1,1];this.WebPDecodeRGBA=function(t,i,a,h,l){var c=Fn,u=new ei,d=new ot;u.ba=d,d.S=c,d.width=[d.width],d.height=[d.height];var f=d.width,p=d.height,g=new at;if(null==g||null==t)var m=2;else e(null!=g),m=Ti(t,i,a,g.width,g.height,g.Pd,g.Qd,g.format,null);if(0!=m?f=0:(null!=f&&(f[0]=g.width[0]),null!=p&&(p[0]=g.height[0]),f=1),f){d.width=d.width[0],d.height=d.height[0],null!=h&&(h[0]=d.width),null!=l&&(l[0]=d.height);t:{if(h=new Ht,(l=new ii).data=t,l.w=i,l.ha=a,l.kd=1,i=[0],e(null!=l),(0==(t=Ti(l.data,l.w,l.ha,null,null,null,i,null,l))||7==t)&&i[0]&&(t=4),0==(i=t)){if(e(null!=u),h.data=l.data,h.w=l.w+l.offset,h.ha=l.ha-l.offset,h.put=ft,h.ac=dt,h.bc=pt,h.ma=u,l.xa){if(null==(t=Lt())){u=1;break t}if(function(t,i){var n=[0],s=[0],r=[0];e:for(;;){if(null==t)return 0;if(null==i)return t.a=2,0;if(t.l=i,t.a=0,_(t.m,i.data,i.w,i.ha),!gt(t.m,n,s,r)){t.a=3;break e}if(t.xb=ps,i.width=n[0],i.height=s[0],!Pt(n[0],s[0],1,t,null))break e;return 1}return e(0!=t.a),0}(t,h)){if(h=0==(i=Fi(h.width,h.height,u.Oa,u.ba))){e:{h=t;i:for(;;){if(null==h){h=0;break e}if(e(null!=h.s.yc),e(null!=h.s.Ya),e(0<h.s.Wb),e(null!=(a=h.l)),e(null!=(l=a.ma)),0!=h.xb){if(h.ca=l.ba,h.tb=l.tb,e(null!=h.ca),!Oi(l.Oa,a,jn)){h.a=2;break i}if(!kt(h,a.width))break i;if(a.da)break i;if((a.da||nt(h.ca.S))&&gi(),11>h.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=h.ca.f.kb.F&&gi()),h.Pb&&0<h.s.ua&&null==h.s.vb.X&&!T(h.s.vb,h.s.Wa.Xa)){h.a=1;break i}h.xb=0}if(!Ct(h,h.V,h.Ba,h.c,h.i,a.o,xt))break i;l.Dc=h.Ma,h=1;break e}e(0!=h.a),h=0}h=!h}h&&(i=t.a)}else i=t.a}else{if(null==(t=new Kt)){u=1;break t}if(t.Fa=l.na,t.P=l.P,t.qc=l.Sa,Yt(t,h)){if(0==(i=Fi(h.width,h.height,u.Oa,u.ba))){if(t.Aa=0,a=u.Oa,e(null!=(l=t)),null!=a){if(0<(f=0>(f=a.Md)?0:100<f?255:255*f/100)){for(p=g=0;4>p;++p)12>(m=l.pb[p]).lc&&(m.ia=f*Gs[0>m.lc?0:m.lc]>>3),g|=m.ia;g&&(alert("todo:VP8InitRandom"),l.ia=1)}l.Ga=a.Id,100<l.Ga?l.Ga=100:0>l.Ga&&(l.Ga=0)}(function(t,i){if(null==t)return 0;if(null==i)return $t(t,2,"NULL VP8Io parameter in VP8Decode().");if(!t.cb&&!Yt(t,i))return 0;if(e(t.cb),null==i.ac||i.ac(i)){i.ob&&(t.L=0);var a=js[t.L];if(2==t.L?(t.yb=0,t.zb=0):(t.yb=i.v-a>>4,t.zb=i.j-a>>4,0>t.yb&&(t.yb=0),0>t.zb&&(t.zb=0)),t.Va=i.o+15+a>>4,t.Hb=i.va+15+a>>4,t.Hb>t.za&&(t.Hb=t.za),t.Va>t.Ub&&(t.Va=t.Ub),0<t.L){var h=t.ed;for(a=0;4>a;++a){var l;if(t.Qa.Cb){var c=t.Qa.Lb[a];t.Qa.Fb||(c+=h.Tb)}else c=h.Tb;for(l=0;1>=l;++l){var u=t.gd[a][l],d=c;if(h.Pc&&(d+=h.vd[0],l&&(d+=h.od[0])),0<(d=0>d?0:63<d?63:d)){var f=d;0<h.wb&&(f=4<h.wb?f>>2:f>>1)>9-h.wb&&(f=9-h.wb),1>f&&(f=1),u.dd=f,u.tc=2*d+f,u.ld=40<=d?2:15<=d?1:0}else u.tc=0;u.La=l}}}a=0}else $t(t,6,"Frame setup failed"),a=t.a;if(a=0==a){if(a){t.$c=0,0<t.Aa||(t.Ic=1);e:{a=t.Ic,h=4*(f=t.za);var p=32*f,g=f+1,m=0<t.L?f*(0<t.Aa?2:1):0,_=(2==t.Aa?2:1)*f;if((u=h+832+(l=3*(16*a+js[t.L])/2*p)+(c=null!=t.Fa&&0<t.Fa.length?t.Kc.c*t.Kc.i:0))!=u)a=0;else{if(u>t.Vb){if(t.Vb=0,t.Ec=r(u),t.Fc=0,null==t.Ec){a=$t(t,1,"no memory during frame initialization.");break e}t.Vb=u}u=t.Ec,d=t.Fc,t.Ac=u,t.Bc=d,d+=h,t.Gd=o(p,Ut),t.Hd=0,t.rb=o(g+1,Gt),t.sb=1,t.wa=m?o(m,jt):null,t.Y=0,t.D.Nb=0,t.D.wa=t.wa,t.D.Y=t.Y,0<t.Aa&&(t.D.Y+=f),e(!0),t.oc=u,t.pc=d,d+=832,t.ya=o(_,zt),t.aa=0,t.D.ya=t.ya,t.D.aa=t.aa,2==t.Aa&&(t.D.aa+=f),t.R=16*f,t.B=8*f,f=(p=js[t.L])*t.R,p=p/2*t.B,t.sa=u,t.ta=d+f,t.qa=t.sa,t.ra=t.ta+16*a*t.R+p,t.Ha=t.qa,t.Ia=t.ra+8*a*t.B+p,t.$c=0,d+=l,t.mb=c?u:null,t.nb=c?d:null,e(d+c<=t.Fc+t.Vb),Jt(t),s(t.Ac,t.Bc,0,h),a=1}}if(a){if(i.ka=0,i.y=t.sa,i.O=t.ta,i.f=t.qa,i.N=t.ra,i.ea=t.Ha,i.Vd=t.Ia,i.fa=t.R,i.Rc=t.B,i.F=null,i.J=0,!kn){for(a=-255;255>=a;++a)Cn[255+a]=0>a?-a:a;for(a=-1020;1020>=a;++a)Mn[1020+a]=-128>a?-128:127<a?127:a;for(a=-112;112>=a;++a)Ln[112+a]=-16>a?-16:15<a?15:a;for(a=-255;510>=a;++a)Pn[255+a]=0>a?0:255<a?255:a;kn=1}sn=he,rn=se,an=re,hn=oe,ln=ae,on=ne,cn=Ke,un=$e,dn=Ze,fn=Je,pn=Xe,gn=Ye,mn=Qe,_n=ti,vn=ze,yn=qe,wn=Ue,bn=We,us[0]=Se,us[1]=ce,us[2]=be,us[3]=xe,us[4]=Ee,us[5]=Ce,us[6]=Ae,us[7]=Me,us[8]=Pe,us[9]=Le,cs[0]=me,cs[1]=de,cs[2]=fe,cs[3]=pe,cs[4]=_e,cs[5]=ve,cs[6]=ye,ds[0]=Te,ds[1]=ue,ds[2]=ke,ds[3]=Ne,ds[4]=Re,ds[5]=Oe,ds[6]=Fe,a=1}else a=0}a&&(a=function(t,i){for(t.M=0;t.M<t.Va;++t.M){var o,a=t.Jc[t.M&t.Xb],h=t.m,l=t;for(o=0;o<l.za;++o){var c=h,u=l,d=u.Ac,f=u.Bc+4*o,p=u.zc,g=u.ya[u.aa+o];if(u.Qa.Bb?g.$b=L(c,u.Pa.jb[0])?2+L(c,u.Pa.jb[2]):L(c,u.Pa.jb[1]):g.$b=0,u.kc&&(g.Ad=L(c,u.Bd)),g.Za=!L(c,145)+0,g.Za){var m=g.Ob,_=0;for(u=0;4>u;++u){var v,y=p[0+u];for(v=0;4>v;++v){y=as[d[f+v]][y];for(var w=rs[L(c,y[0])];0<w;)w=rs[2*w+L(c,y[w])];y=-w,d[f+v]=y}n(m,_,d,f,4),_+=4,p[0+u]=y}}else y=L(c,156)?L(c,128)?1:3:L(c,163)?2:0,g.Ob[0]=y,s(d,f,y,4),s(p,0,y,4);g.Dd=L(c,142)?L(c,114)?L(c,183)?1:3:2:0}if(l.m.Ka)return $t(t,7,"Premature end-of-partition0 encountered.");for(;t.ja<t.za;++t.ja){if(l=a,c=(h=t).rb[h.sb-1],d=h.rb[h.sb+h.ja],o=h.ya[h.aa+h.ja],f=h.kc?o.Ad:0)c.la=d.la=0,o.Za||(c.Na=d.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var b,x;if(c=d,d=l,f=h.Pa.Xc,p=h.ya[h.aa+h.ja],g=h.pb[p.$b],u=p.ad,m=0,_=h.rb[h.sb-1],y=v=0,s(u,m,0,384),p.Za)var S=0,E=f[3];else{w=r(16);var A=c.Na+_.Na;
vendor: 7,298 bytes, line 2
2if(A=is(d,f[1],A,g.Eb,0,w,0),c.Na=_.Na=(0<A)+0,1<A)sn(w,0,u,m);else{var C=w[0]+3>>3;for(w=0;256>w;w+=16)u[m+w]=C}S=1,E=f[0]}var M=15&c.la,P=15&_.la;for(w=0;4>w;++w){var k=1&P;for(C=x=0;4>C;++C)M=M>>1|(k=(A=is(d,E,A=k+(1&M),g.Sc,S,u,m))>S)<<7,x=x<<2|(3<A?3:1<A?2:0!=u[m+0]),m+=16;M>>=4,P=P>>1|k<<7,v=(v<<8|x)>>>0}for(E=M,S=P>>4,b=0;4>b;b+=2){for(x=0,M=c.la>>4+b,P=_.la>>4+b,w=0;2>w;++w){for(k=1&P,C=0;2>C;++C)A=k+(1&M),M=M>>1|(k=0<(A=is(d,f[2],A,g.Qc,0,u,m)))<<3,x=x<<2|(3<A?3:1<A?2:0!=u[m+0]),m+=16;M>>=2,P=P>>1|k<<5}y|=x<<4*b,E|=M<<4<<b,S|=(240&P)<<b}c.la=E,_.la=S,p.Hc=v,p.Gc=y,p.ia=43690&y?0:g.ia,f=!(v|y)}if(0<h.L&&(h.wa[h.Y+h.ja]=h.gd[o.$b][o.Za],h.wa[h.Y+h.ja].La|=!f),l.Ka)return $t(t,7,"Premature end-of-file encountered.")}if(Jt(t),h=i,l=1,o=(a=t).D,c=0<a.L&&a.M>=a.zb&&a.M<=a.Va,0==a.Aa)e:{if(o.M=a.M,o.uc=c,Ii(a,o),l=1,o=(x=a.D).Nb,c=(y=js[a.L])*a.R,d=y/2*a.B,w=16*o*a.R,C=8*o*a.B,f=a.sa,p=a.ta-c+w,g=a.qa,u=a.ra-d+C,m=a.Ha,_=a.Ia-d+C,P=0==(M=x.M),v=M>=a.Va-1,2==a.Aa&&Ii(a,x),x.uc)for(k=(A=a).D.M,e(A.D.uc),x=A.yb;x<A.Hb;++x){S=x,E=k;var N=(I=(z=A).D).Nb;b=z.R;var I=I.wa[I.Y+S],T=z.sa,O=z.ta+16*N*b+16*S,R=I.dd,F=I.tc;if(0!=F)if(e(3<=F),1==z.L)0<S&&yn(T,O,b,F+4),I.La&&bn(T,O,b,F),0<E&&vn(T,O,b,F+4),I.La&&wn(T,O,b,F);else{var D=z.B,j=z.qa,G=z.ra+8*N*D+8*S,B=z.Ha,z=z.Ia+8*N*D+8*S;N=I.ld,0<S&&(un(T,O,b,F+4,R,N),fn(j,G,B,z,D,F+4,R,N)),I.La&&(gn(T,O,b,F,R,N),_n(j,G,B,z,D,F,R,N)),0<E&&(cn(T,O,b,F+4,R,N),dn(j,G,B,z,D,F+4,R,N)),I.La&&(pn(T,O,b,F,R,N),mn(j,G,B,z,D,F,R,N))}}if(a.ia&&alert("todo:DitherRow"),null!=h.put){if(x=16*M,M=16*(M+1),P?(h.y=a.sa,h.O=a.ta+w,h.f=a.qa,h.N=a.ra+C,h.ea=a.Ha,h.W=a.Ia+C):(x-=y,h.y=f,h.O=p,h.f=g,h.N=u,h.ea=m,h.W=_),v||(M-=y),M>h.o&&(M=h.o),h.F=null,h.J=null,null!=a.Fa&&0<a.Fa.length&&x<M&&(h.J=ci(a,h,x,M-x),h.F=a.mb,null==h.F&&0==h.F.length)){l=$t(a,3,"Could not decode alpha data.");break e}x<h.j&&(y=h.j-x,x=h.j,e(!(1&y)),h.O+=a.R*y,h.N+=a.B*(y>>1),h.W+=a.B*(y>>1),null!=h.F&&(h.J+=h.width*y)),x<M&&(h.O+=h.v,h.N+=h.v>>1,h.W+=h.v>>1,null!=h.F&&(h.J+=h.v),h.ka=x-h.j,h.U=h.va-h.v,h.T=M-x,l=h.put(h))}o+1!=a.Ic||v||(n(a.sa,a.ta-c,f,p+16*a.R,c),n(a.qa,a.ra-d,g,u+8*a.B,d),n(a.Ha,a.Ia-d,m,_+8*a.B,d))}if(!l)return $t(t,6,"Output aborted.")}return 1}(t,i)),null!=i.bc&&i.bc(i),a&=1}return a?(t.cb=0,a):0})(t,h)||(i=t.a)}}else i=t.a}0==i&&null!=u.Oa&&u.Oa.fd&&(i=Ri(u.ba))}u=i}c=0!=u?null:11>c?d.f.RGBA.eb:d.f.kb.y}else c=null;return c};var Bs=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(t,e){for(var i="",n=0;n<4;n++)i+=String.fromCharCode(t[e++]);return i}function c(t,e){return t[e+0]|t[e+1]<<8}function u(t,e){return(t[e+0]|t[e+1]<<8|t[e+2]<<16)>>>0}function d(t,e){return(t[e+0]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24)>>>0}new h;var f=[0],p=[0],g=[],m=new h,_=t,v=function(t,e){var i={},n=0,s=!1,r=0,o=0;if(i.frames=[],!function(t,e){for(var i=0;i<4;i++)if(t[e+i]!="RIFF".charCodeAt(i))return!0;return!1}(t,e)){for(d(t,e+=4),e+=8;e<t.length;){var a=l(t,e),h=d(t,e+=4);e+=4;var f=h+(1&h);switch(a){case"VP8 ":case"VP8L":void 0===i.frames[n]&&(i.frames[n]={}),(m=i.frames[n]).src_off=s?o:e-8,m.src_size=r+h+8,n++,s&&(s=!1,r=0,o=0);break;case"VP8X":(m=i.header={}).feature_flags=t[e];var p=e+4;m.canvas_width=1+u(t,p),p+=3,m.canvas_height=1+u(t,p),p+=3;break;case"ALPH":s=!0,r=f+8,o=e-8;break;case"ANIM":(m=i.header).bgcolor=d(t,e),p=e+4,m.loop_count=c(t,p),p+=2;break;case"ANMF":var g,m;(m=i.frames[n]={}).offset_x=2*u(t,e),e+=3,m.offset_y=2*u(t,e),e+=3,m.width=1+u(t,e),e+=3,m.height=1+u(t,e),e+=3,m.duration=u(t,e),e+=3,g=t[e++],m.dispose=1&g,m.blend=g>>1&1}"ANMF"!=a&&(e+=f)}return i}}(_,0);v.response=_,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,w=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,f=[y.canvas_height],p=[y.canvas_width];for(var b=0;b<w.length&&0!=w[b].blend;b++);}var x=w[0],S=m.WebPDecodeRGBA(_,x.src_off,x.src_size,p,f);x.rgba=S,x.imgwidth=p[0],x.imgheight=f[0];for(var E=0;E<p[0]*f[0]*4;E++)g[E]=S[E];return this.width=p,this.height=f,this.data=g,this}function rT(){var t,e=this.internal.__metadata__.metadata,i=unescape(encodeURIComponent(e));t=this.internal.__metadata__.rawXml?i:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+i.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+t.length+" >>"),this.internal.write("stream"),this.internal.write(t),this.internal.write("endstream"),this.internal.write("endobj")}function oT(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}!function(t){var e,i,n,s,r,o,a,h,l,c=function(t){return t=t||{},this.isStrokeTransparent=t.isStrokeTransparent||!1,this.strokeOpacity=t.strokeOpacity||1,this.strokeStyle=t.strokeStyle||"#000000",this.fillStyle=t.fillStyle||"#000000",this.isFillTransparent=t.isFillTransparent||!1,this.fillOpacity=t.fillOpacity||1,this.font=t.font||"10px sans-serif",this.textBaseline=t.textBaseline||"alphabetic",this.textAlign=t.textAlign||"left",this.lineWidth=t.lineWidth||1,this.lineJoin=t.lineJoin||"miter",this.lineCap=t.lineCap||"butt",this.path=t.path||[],this.transform=void 0!==t.transform?t.transform.clone():new h,this.globalCompositeOperation=t.globalCompositeOperation||"normal",this.globalAlpha=t.globalAlpha||1,this.clip_path=t.clip_path||[],this.currentPoint=t.currentPoint||new o,this.miterLimit=t.miterLimit||10,this.lastPoint=t.lastPoint||new o,this.lineDashOffset=t.lineDashOffset||0,this.lineDash=t.lineDash||[],this.margin=t.margin||[0,0,0,0],this.prevPageLastElemOffset=t.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof t.ignoreClearRect||t.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new u(this),e=this.internal.f2,i=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,s=this.internal.getHorizontalCoordinate,r=this.internal.getVerticalCoordinate,o=this.internal.Point,a=this.internal.Rectangle,h=this.internal.Matrix,l=new c}]);var u=function(t){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var e=t;Object.defineProperty(this,"pdf",{get:function(){return e}});var i=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return i},set:function(t){i=Boolean(t)}});var n=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return n},set:function(t){n=Boolean(t)}});var s=0;Object.defineProperty(this,"posX",{get:function(){return s},set:function(t){isNaN(t)||(s=t)}});var r=0;Object.defineProperty(this,"posY",{get:function(){return r},set:function(t){isNaN(t)||(r=t)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(t){var e;"number"==typeof t?e=[t,t,t,t]:((e=new Array(4))[0]=t[0],e[1]=t.length>=2?t[1]:e[0],e[2]=t.length>=3?t[2]:e[0],e[3]=t.length>=4?t[3]:e[1]),l.margin=e}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(t){o=t}});var a=0;Object.defineProperty(this,"lastBreak",{get:function(){return a}
vendor: 8,262 bytes, line 2
2,set:function(t){a=t}});var h=[];Object.defineProperty(this,"pageBreaks",{get:function(){return h},set:function(t){h=t}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(t){t instanceof c&&(l=t)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(t){l.path=t}});var u=[];Object.defineProperty(this,"ctxStack",{get:function(){return u},set:function(t){u=t}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(t){var e;e=d(t),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(t){var e=d(t);this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(t){-1!==["butt","round","square"].indexOf(t)&&(this.ctx.lineCap=t,this.pdf.setLineCap(t))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(t){isNaN(t)||(this.ctx.lineWidth=t,this.pdf.setLineWidth(t))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(t){-1!==["bevel","round","miter"].indexOf(t)&&(this.ctx.lineJoin=t,this.pdf.setLineJoin(t))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(t){isNaN(t)||(this.ctx.miterLimit=t,this.pdf.setMiterLimit(t))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(t){this.ctx.textBaseline=t}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(t){-1!==["right","end","center","left","start"].indexOf(t)&&(this.ctx.textAlign=t)}});var f=null,p=null,g=null;Object.defineProperty(this,"fontFaces",{get:function(){return g},set:function(t){f=null,p=null,g=t}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(t){var e;if(this.ctx.font=t,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(t))){var i=e[1];e[2];var n=e[3],s=e[4];e[5];var r=e[6],o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(s)[2];s="px"===o?Math.floor(parseFloat(s)*this.pdf.internal.scaleFactor):"em"===o?Math.floor(parseFloat(s)*this.pdf.getFontSize()):Math.floor(parseFloat(s)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(s);var a=function(t){var e,i,n=[],s=t.trim();if(""===s)return qI;if(s in II)return[II[s]];for(;""!==s;){switch(i=null,e=(s=OI(s)).charAt(0)){case'"':case"'":i=RI(s.substring(1),e);break;default:i=FI(s)}if(null===i)return qI;if(n.push(i[0]),""!==(s=OI(i[1]))&&","!==s.charAt(0))return qI;s=s.replace(/^,/,"")}return n}(r);if(this.fontFaces){var h=function(t,e){var i=t.getFontList(),n=JSON.stringify(i);if(null===f||p!==n){var s=function(t){var e=[];return Object.keys(t).forEach(function(i){t[i].forEach(function(t){var n=null;switch(t){case"bold":n={family:i,weight:"bold"};break;case"italic":n={family:i,style:"italic"};break;case"bolditalic":n={family:i,weight:"bold",style:"italic"};break;case"":case"normal":n={family:i}}null!==n&&(n.ref={name:i,style:t},e.push(n))})}),e}(i);f=function(t){for(var e={},i=0;i<t.length;++i){var n=PI(t[i]),s=n.family,r=n.stretch,o=n.style,a=n.weight;e[s]=e[s]||{},e[s][r]=e[s][r]||{},e[s][r][o]=e[s][r][o]||{},e[s][r][o][a]=n}return e}(s.concat(e)),p=n}return f}(this.pdf,this.fontFaces),l=a.map(function(t){return{family:t,stretch:"normal",weight:n,style:i}}),c=function(t,e,i){for(var n=(i=i||{}).defaultFontFamily||"times",s=Object.assign({},NI,i.genericFontFamilies||{}),r=null,o=null,a=0;a<e.length;++a)if(s[(r=PI(e[a])).family]&&(r.family=s[r.family]),t.hasOwnProperty(r.family)){o=t[r.family];break}if(!(o=o||t[n]))throw new Error("Could not find a font-family for the rule '"+TI(r)+"' and default family '"+n+"'.");if(o=function(t,e){if(e[t])return e[t];var i=CI[t],n=i<=CI.normal?-1:1,s=kI(e,AI,i,n);if(!s)throw new Error("Could not find a matching font-stretch value for "+t);return s}(r.stretch,o),o=function(t,e){if(e[t])return e[t];for(var i=EI[t],n=0;n<i.length;++n)if(e[i[n]])return e[i[n]];throw new Error("Could not find a matching font-style for "+t)}(r.style,o),!(o=function(t,e){if(e[t])return e[t];if(400===t&&e[500])return e[500];if(500===t&&e[400])return e[400];var i=LI[t],n=kI(e,MI,i,t<400?-1:1);if(!n)throw new Error("Could not find a matching font-weight for value "+t);return n}(r.weight,o)))throw new Error("Failed to resolve a font for the rule '"+TI(r)+"'.");return o}(h,l);this.pdf.setFont(c.ref.name,c.ref.style)}else{var u="";("bold"===n||parseInt(n,10)>=700||"bold"===i)&&(u="bold"),"italic"===i&&(u+="italic"),0===u.length&&(u="normal");for(var d="",g={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},m=0;m<a.length;m++){if(void 0!==this.pdf.internal.getFont(a[m],u,{noFallback:!0,disableWarning:!0})){d=a[m];break}if("bolditalic"===u&&void 0!==this.pdf.internal.getFont(a[m],"bold",{noFallback:!0,disableWarning:!0}))d=a[m],u="bold";else if(void 0!==this.pdf.internal.getFont(a[m],"normal",{noFallback:!0,disableWarning:!0})){d=a[m],u="normal";break}}if(""===d)for(var _=0;_<a.length;_++)if(g[a[_]]){d=g[a[_]];break}d=""===d?"Times":d,this.pdf.setFont(d,u)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(t){this.ctx.globalCompositeOperation=t}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(t){this.ctx.globalAlpha=t}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(t){this.ctx.lineDashOffset=t,D.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(t){this.ctx.lineDash=t,D.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(t){this.ctx.ignoreClearRect=Boolean(t)}})};u.prototype.setLineDash=function(t){this.lineDash=t},u.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},u.prototype.fill=function(){w.call(this,"fill",!1)},u.prototype.stroke=function(){w.call(this,"stroke",!1)},u.prototype.beginPath=function(){this.path=[{type:"begin"}]},u.prototype.moveTo=function(t,e){if(isNaN(t)||isNaN(e))throw iN.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var i=this.ctx.transform.applyToPoint(new o(t,e));this.path.push({type:"mt",x:i.x,y:i.y}),this.ctx.lastPoint=new o(t,e)},u.prototype.closePath=function(){var t=new o(0,0),e=0;for(e=this.path.length-1;-1!==e;e--)if("begin"===this.path[e].type&&"object"===(0,fC.A)(this.path[e+1])&&"number"==typeof this.path[e+1].x){t=new o(this.path[e+1].x,this.path[e+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(t.x,t.y)},u.prototype.lineTo=function(t,e){if(isNaN(t)||isNaN(e))throw iN.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var i=this.ctx.transform.applyToPoint(new o(t,e));this.path.push({type:"lt",x:i.x,y:i.y}),this.ctx.lastPoint=new o(i.x,i.y)},u.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),w.call(this,null,!0)},u.prototype.quadraticCurveTo=function(t,e,i,n){if(isNaN(i)||isNaN(n)||isNaN(t)||isNaN(e))throw iN.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to 
2jsPDF.context2d.quadraticCurveTo");var s=this.ctx.transform.applyToPoint(new o(i,n)),r=this.ctx.transform.applyToPoint(new o(t,e));this.path.push({type:"qct",x1:r.x,y1:r.y,x:s.x,y:s.y}),this.ctx.lastPoint=new o(s.x,s.y)},u.prototype.bezierCurveTo=function(t,e,i,n,s,r){if(isNaN(s)||isNaN(r)||isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw iN.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var a=this.ctx.transform.applyToPoint(new o(s,r)),h=this.ctx.transform.applyToPoint(new o(t,e)),l=this.ctx.transform.applyToPoint(new o(i,n));this.path.push({type:"bct",x1:h.x,y1:h.y,x2:l.x,y2:l.y,x:a.x,y:a.y}),this.ctx.lastPoint=new o(a.x,a.y)},u.prototype.arc=function(t,e,i,n,s,r){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(s))throw iN.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(r=Boolean(r),!this.ctx.transform.isIdentity){var a=this.ctx.transform.applyToPoint(new o(t,e));t=a.x,e=a.y;var h=this.ctx.transform.applyToPoint(new o(0,i)),l=this.ctx.transform.applyToPoint(new o(0,0));i=Math.sqrt(Math.pow(h.x-l.x,2)+Math.pow(h.y-l.y,2))}Math.abs(s-n)>=2*Math.PI&&(n=0,s=2*Math.PI),this.path.push({type:"arc",x:t,y:e,radiu
vendor: 4,170 bytes, line 2
2s:i,startAngle:n,endAngle:s,counterclockwise:r})},u.prototype.arcTo=function(t,e,i,n,s){throw new Error("arcTo not implemented.")},u.prototype.rect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw iN.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.lineTo(t,e),this.lineTo(t+i,e),this.lineTo(t,e)},u.prototype.fillRect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw iN.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!f.call(this)){var s={};"butt"!==this.lineCap&&(s.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(s.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(t,e,i,n),this.fill(),s.hasOwnProperty("lineCap")&&(this.lineCap=s.lineCap),s.hasOwnProperty("lineJoin")&&(this.lineJoin=s.lineJoin)}},u.prototype.strokeRect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw iN.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");p.call(this)||(this.beginPath(),this.rect(t,e,i,n),this.stroke())},u.prototype.clearRect=function(t,e,i,n){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n))throw iN.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(t,e,i,n))},u.prototype.save=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,i=0;i<this.pdf.internal.getNumberOfPages();i++)this.pdf.setPage(i+1),this.pdf.internal.out("q");if(this.pdf.setPage(e),t){this.ctx.fontSize=this.pdf.internal.getFontSize();var n=new c(this.ctx);this.ctxStack.push(this.ctx),this.ctx=n}},u.prototype.restore=function(t){t="boolean"!=typeof t||t;for(var e=this.pdf.internal.getCurrentPageInfo().pageNumber,i=0;i<this.pdf.internal.getNumberOfPages();i++)this.pdf.setPage(i+1),this.pdf.internal.out("Q");this.pdf.setPage(e),t&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},u.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var d=function(t){var e,i,n,s;if(!0===t.isCanvasGradient&&(t=t.getColor()),!t)return{r:0,g:0,b:0,a:0,style:t};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(t))e=0,i=0,n=0,s=0;else{var r=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(t);if(null!==r)e=parseInt(r[1]),i=parseInt(r[2]),n=parseInt(r[3]),s=1;else if(null!==(r=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(t)))e=parseInt(r[1]),i=parseInt(r[2]),n=parseInt(r[3]),s=parseFloat(r[4]);else{if(s=1,"string"==typeof t&&"#"!==t.charAt(0)){var o=new aN(t);t=o.ok?o.toHex():"#000000"}4===t.length?(e=t.substring(1,2),e+=e,i=t.substring(2,3),i+=i,n=t.substring(3,4),n+=n):(e=t.substring(1,3),i=t.substring(3,5),n=t.substring(5,7)),e=parseInt(e,16),i=parseInt(i,16),n=parseInt(n,16)}}return{r:e,g:i,b:n,a:s,style:t}},f=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},p=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};u.prototype.fillText=function(t,e,i,n){if(isNaN(e)||isNaN(i)||"string"!=typeof t)throw iN.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(n=isNaN(n)?void 0:n,!f.call(this)){var s=O(this.ctx.transform.rotation),r=this.ctx.transform.scaleX;L.call(this,{text:t,x:e,y:i,scale:r,angle:s,align:this.textAlign,maxWidth:n})}},u.prototype.strokeText=function(t,e,i,n){if(isNaN(e)||isNaN(i)||"string"!=typeof t)throw iN.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to 
2jsPDF.context2d.strokeText");if(!p.call(this)){n=isNaN(n)?void 0:n;var s=O(this.ctx.transform.rotation),r=this.ctx.transform.scaleX;L.call(this,{text:t,x:e,y:i,scale:r,renderingMode:"stroke",angle:s,align:this.textAlign,maxWidth:n})}},u.prototype.measureText=function(t){if("string"!=typeof t)throw iN.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var e=this.pdf,i=this.pdf.internal.scaleFactor,n=e.internal.getFontSize(),s=e.getStringUnitWidth(t)*n/e.internal.scaleFactor;return new function(t){var e=(t=t||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return e}}),this}({width:s*=Math.round(96*i/72*1e4)/1e4})},u.prototype.scale=function(t,e){if(isNaN(t)||isNaN(e))throw iN.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var i=new h(t,0,0,e,0,0);this.ctx.transform=this.ctx.transform.multiply(i)},u.prototype.rotate=function(t){if(isNaN(t))throw iN.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var e=new h(Math.cos(t),Math.sin(t),-Math.sin(t),Math.cos(t),0,0);this.ctx.transform=this.ctx.transform.multiply(e)},u.prototype.translate=function(t,e){if(isNaN(t)||isNaN(e))throw iN.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var i=new h(1,0,0,1,t,e);this.ctx.transform=this.ctx.transform.multiply(i)},u.prototype.transform=function(t,e,i,n,s,r){if(isNaN(t)||isNaN(e)||isNaN(i)||isNaN(n)||isNaN(s)||isNaN(r))throw iN.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var o=new h(t,e,i,n,s,r);this.ctx.transform=this.ctx.transform.multiply(o)},u.prototype.setTransform=function(t,e,i,n,s,r){t=isNaN(t)?1:t,e=isNaN(e)?0:e,i=isNaN(i)?0:i,n=isNaN(n)?1:n,s=isNaN(s)?0:s,r=isNaN(r)?0:r,this.ctx.transform=new h(t,e,i,n,s,r)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};u.prototype.drawImage=function(t,e,i,n,s,r,o,l,c){var u=this.pdf.getImageProperties(t),d=1,f=1,p=1,_=1;void 0!==n&&void 0!==l&&(p=l/n,_=c/s,d=u.width/n*l/n,f=u.height/s*c/s),void 0===r&&(r=e,o=i,e=0,i=0),void 0!==n&&void 0===l&&(l=n,c=s),void 0===n&&void 0===l&&(l=u.width,c=u.height);var w=this.ctx.transform.decompose(),x=O(w.rotate.shx),S=new h,E=(S=(S=(S=S.multiply(w.translate)).multiply(w.skew)).multiply(w.scale)).applyToRectangle(new a(r-e*p,o-i*_,n*d,s*f));if(this.autoPaging){for(var A,C=m.call(this,E),M=[],L=0;L<C.length;L+=1)-1===M.indexOf(C[L])&&M.push(C[L]);y(M);for(var P=M[0],k=M[M.length-1],N=P;N<k+1;N++){this.pdf.setPage(N);var I=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],T=1===N?this.posY+this.margin[0]:this.margin[0],R=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],F=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],D=1===N?0:R+(N-2)*F;if(0!==this.ctx.clip_path.length){var j=this.path;A=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(A,this.posX+this.margin[3],-D+T+this.ctx.prevPageLastElemOffset),b.call(this,"fill",!0),this.path=j}var G=JSON.parse(JSON.stringify(E));G=v([G],this.posX+this.margin[3],-D+T+this.ctx.prevPageLastElemOffset)[0];var B=(N>P||N<k)&&g.call(this);B&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],I,F,null).clip().discardPath()),this.pdf.addImage(t,"JPEG",G.x,G.y,G.w,G.h,null,null,x),B&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(t,"JPEG",E.x,E.y,E.w,E.h,null,null,x)};var m=function(t,e,i){var n=[];e=e||this.pdf.internal.pageSize.width,i=i||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var s=this.posY+this.ctx.prevPageLastElemOffset;switch(t.type){default:case"mt":case"lt":n.push(Math.floor((t.y+s)/i)+1);break;case"arc":n.push(Math.floor((t.y+s-t.radius)/i)+1),n.push(Math.floor((t.y+s+t.radius)/i)+1);break;case"qct":var r=R(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x,t.y);n.push(Math.floor((r.y+s)/i)+1),n.push(Math.floor((r.y+r.h+s)/i)+1);break;case"bct":var o=F(this.ctx.lastPoint.x,this.ctx.lastPoint.y,t.x1,t.y1,t.x2,t.y2,t.x,t.y);n.push(Math.floor((o.y+s)/i)+1),n.push(Math.floor((o.y+o.h+s)/i)+1);break;
vendor: 10,877 bytes, line 2
2case"rect":n.push(Math.floor((t.y+s)/i)+1),n.push(Math.floor((t.y+t.h+s)/i)+1)}for(var a=0;a<n.length;a+=1)for(;this.pdf.internal.getNumberOfPages()<n[a];)_.call(this);return n},_=function(){var t=this.fillStyle,e=this.strokeStyle,i=this.font,n=this.lineCap,s=this.lineWidth,r=this.lineJoin;this.pdf.addPage(),this.fillStyle=t,this.strokeStyle=e,this.font=i,this.lineCap=n,this.lineWidth=s,this.lineJoin=r},v=function(t,e,i){for(var n=0;n<t.length;n++)switch(t[n].type){case"bct":t[n].x2+=e,t[n].y2+=i;case"qct":t[n].x1+=e,t[n].y1+=i;default:t[n].x+=e,t[n].y+=i}return t},y=function(t){return t.sort(function(t,e){return t-e})},w=function(t,e){var i=this.fillStyle,n=this.strokeStyle,s=this.lineCap,r=this.lineWidth,o=Math.abs(r*this.ctx.transform.scaleX),a=this.lineJoin;if(this.autoPaging){for(var h,l,c=JSON.parse(JSON.stringify(this.path)),u=JSON.parse(JSON.stringify(this.path)),d=[],f=0;f<u.length;f++)if(void 0!==u[f].x)for(var p=m.call(this,u[f]),w=0;w<p.length;w+=1)-1===d.indexOf(p[w])&&d.push(p[w]);for(var x=0;x<d.length;x++)for(;this.pdf.internal.getNumberOfPages()<d[x];)_.call(this);y(d);for(var S=d[0],E=d[d.length-1],A=S;A<E+1;A++){this.pdf.setPage(A),this.fillStyle=i,this.strokeStyle=n,this.lineCap=s,this.lineWidth=o,this.lineJoin=a;var C=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],M=1===A?this.posY+this.margin[0]:this.margin[0],L=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],P=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],k=1===A?0:L+(A-2)*P;if(0!==this.ctx.clip_path.length){var N=this.path;h=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(h,this.posX+this.margin[3],-k+M+this.ctx.prevPageLastElemOffset),b.call(this,t,!0),this.path=N}if(l=JSON.parse(JSON.stringify(c)),this.path=v(l,this.posX+this.margin[3],-k+M+this.ctx.prevPageLastElemOffset),!1===e||0===A){var I=(A>S||A<E)&&g.call(this);I&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],C,P,null).clip().discardPath()),b.call(this,t,e),I&&this.pdf.restoreGraphicsState()}this.lineWidth=r}this.path=c}else this.lineWidth=o,b.call(this,t,e),this.lineWidth=r},b=function(t,e){if(("stroke"!==t||e||!p.call(this))&&("stroke"===t||e||!f.call(this))){for(var i,n,s=[],r=this.path,o=0;o<r.length;o++){var a=r[o];switch(a.type){case"begin":s.push({begin:!0});break;case"close":s.push({close:!0});break;case"mt":s.push({start:a,deltas:[],abs:[]});break;case"lt":var h=s.length;if(r[o-1]&&!isNaN(r[o-1].x)&&(i=[a.x-r[o-1].x,a.y-r[o-1].y],h>0))for(;h>=0;h--)if(!0!==s[h-1].close&&!0!==s[h-1].begin){s[h-1].deltas.push(i),s[h-1].abs.push(a);break}break;case"bct":i=[a.x1-r[o-1].x,a.y1-r[o-1].y,a.x2-r[o-1].x,a.y2-r[o-1].y,a.x-r[o-1].x,a.y-r[o-1].y],s[s.length-1].deltas.push(i);break;case"qct":var l=r[o-1].x+2/3*(a.x1-r[o-1].x),c=r[o-1].y+2/3*(a.y1-r[o-1].y),u=a.x+2/3*(a.x1-a.x),d=a.y+2/3*(a.y1-a.y),g=a.x,m=a.y;i=[l-r[o-1].x,c-r[o-1].y,u-r[o-1].x,d-r[o-1].y,g-r[o-1].x,m-r[o-1].y],s[s.length-1].deltas.push(i);break;case"arc":s.push({deltas:[],abs:[],arc:!0}),Array.isArray(s[s.length-1].abs)&&s[s.length-1].abs.push(a)}}n=e?null:"stroke"===t?"stroke":"fill";for(var _=!1,v=0;v<s.length;v++)if(s[v].arc)for(var y=s[v].abs,w=0;w<y.length;w++){var b=y[w];"arc"===b.type?E.call(this,b.x,b.y,b.radius,b.startAngle,b.endAngle,b.counterclockwise,void 0,e,!_):P.call(this,b.x,b.y),_=!0}else if(!0===s[v].close)this.pdf.internal.out("h"),_=!1;else if(!0!==s[v].begin){var x=s[v].start.x,S=s[v].start.y;k.call(this,s[v].deltas,x,S),_=!0}n&&A.call(this,n),e&&C.call(this)}},x=function(t){var e=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,i=e*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return t-i;case"top":return t+e-i;case"hanging":return t+e-2*i;case"middle":return t+e/2-i;default:return t}},S=function(t){return t+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};u.prototype.createLinearGradient=function(){var t=function(){};return t.colorStops=[],t.addColorStop=function(t,e){this.colorStops.push([t,e])},t.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},t.isCanvasGradient=!0,t},u.prototype.createPattern=function(){return this.createLinearGradient()},u.prototype.createRadialGradient=function(){return this.createLinearGradient()};var E=function(t,e,i,n,s,r,o,a,h){for(var l=I.call(this,i,n,s,r),c=0;c<l.length;c++){var u=l[c];0===c&&(h?M.call(this,u.x1+t,u.y1+e):P.call(this,u.x1+t,u.y1+e)),N.call(this,t,e,u.x2,u.y2,u.x3,u.y3,u.x4,u.y4)}a?C.call(this):A.call(this,o)},A=function(t){switch(t){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},C=function(){this.pdf.clip(),this.pdf.discardPath()},M=function(t,e){this.pdf.internal.out(i(t)+" "+n(e)+" m")},L=function(t){var e;switch(t.align){case"right":case"end":e="right";break;case"center":e="center";break;default:e="left"}var i,n,s,r=this.pdf.getTextDimensions(t.text),l=x.call(this,t.y),c=S.call(this,l)-r.h,u=this.ctx.transform.applyToPoint(new o(t.x,l));if(this.autoPaging){var d=this.ctx.transform.decompose(),f=new h;f=(f=(f=f.multiply(d.translate)).multiply(d.skew)).multiply(d.scale);for(var p=this.ctx.transform.applyToRectangle(new a(t.x,l,r.w,r.h)),_=f.applyToRectangle(new a(t.x,c,r.w,r.h)),w=m.call(this,_),E=[],A=0;A<w.length;A+=1)-1===E.indexOf(w[A])&&E.push(w[A]);y(E);for(var C=E[0],M=E[E.length-1],L=C;L<M+1;L++){this.pdf.setPage(L);var P=1===L?this.posY+this.margin[0]:this.margin[0],k=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],N=this.pdf.internal.pageSize.height-this.margin[2],I=N-this.margin[0],T=this.pdf.internal.pageSize.width-this.margin[1],O=T-this.margin[3],R=1===L?0:k+(L-2)*I;if(0!==this.ctx.clip_path.length){var F=this.path;i=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(i,this.posX+this.margin[3],-1*R+P),b.call(this,"fill",!0),this.path=F}var D=v([JSON.parse(JSON.stringify(_))],this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset)[0];t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),s=this.lineWidth,this.lineWidth=s*t.scale);var j="text"!==this.autoPaging;if(j||D.y+D.h<=N){if(j||D.y>=P&&D.x<=T){var G=j?t.text:this.pdf.splitTextToSize(t.text,t.maxWidth||T-D.x)[0],B=v([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-R+P+this.ctx.prevPageLastElemOffset)[0],z=j&&(L>C||L<M)&&g.call(this);z&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],O,I,null).clip().discardPath()),this.pdf.text(G,B.x,B.y,{angle:t.angle,align:e,renderingMode:t.renderingMode}),z&&this.pdf.restoreGraphicsState()}}else D.y<N&&(this.ctx.prevPageLastElemOffset+=N-D.y);t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=s)}}else t.scale>=.01&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*t.scale),s=this.lineWidth,this.lineWidth=s*t.scale),this.pdf.text(t.text,u.x+this.posX,u.y+this.posY,{angle:t.angle,align:e,renderingMode:t.renderingMode,maxWidth:t.maxWidth}),t.scale>=.01&&(this.pdf.setFontSize(n),this.lineWidth=s)},P=function(t,e,s,r){s=s||0,r=r||0,this.pdf.internal.out(i(t+s)+" "+n(e+r)+" l")},k=function(t,e,i){return this.pdf.lines(t,e,i,null,null)},N=function(t,i,n,o,a,h,l,c){this.pdf.internal.out([e(s(n+t)),e(r(o+i)),e(s(a+t)),e(r(h+i)),e(s(l+t)),e(r(c+i)),"c"].join(" "))},I=function(t,e,i,n){for(var s=2*Math.PI,r=Math.PI/2;e>i;)e-=s;var o=Math.abs(i-e);o<s&&n&&(o=s-o);for(var a=[],h=n?-1:1,l=e;o>1e-5;){var c=l+h*Math.min(o,r);a.push(T.call(this,t,l,c)),o-=Math.abs(c-l),l=c}return a},T=function(t,e,i){var n=(i-e)/2,s=t*Math.cos(n),r=t*Math.sin(n),o=s,a=-r,h=o*o+a*a,l=h+o*s+a*r,c=4/3*(Math.sqrt(2*h*l)-l)/(o*r-a*s),u=o-c*a,d=a+c*o,f=u,p=-d,g=n+e,m=Math.cos(g),_=Math.sin(g);return{x1:t*Math.cos(e),y1:t*Math.sin(e),x2:u*m-d*_,y2:u*_+d*m,x3:f*m-p*_,y3:f*_+p*m,x4:t*Math.cos(i),y4:t*Math.sin(i)}},O=function(t){return 180*t/Math.PI},R=function(t,e,i,n,s,r){var o=t+.5*(i-t),h=e+.5*(n-e),l=s+.5*(i-s),c=r+.5*(n-r),u=Math.min(t,s,o,l),d=Math.max(t,s,o,l),f=Math.min(e,r,h,c),p=Math.max(e,r,h,c);return new a(u,f,d-u,p-f)},F=function(t,e,i,n,s,r,o,h){var l,c,u,d,f,p,g,m,_,v,y,w,b,x,S=i-t,E=n-e,A=s-i,C=r-n,M=o-s,L=h-r;for(c=0;c<41;c++)_=(g=(u=t+(l=c/40)*S)+l*((f=i+l*A)-u))+l*(f+l*(s+l*M-f)-g),v=(m=(d=e+l*E)+l*((p=n+l*C)-d))+l*(p+l*(r+l*L-p)-m),0==c?(y=_,w=v,b=_,x=v):(y=Math.min(y,_),w=Math.min(w,v),b=Math.max(b,_),x=Math.max(x,v));return new a(Math.round(y),Math.round(w),Math.round(b-y),Math.round(x-w))},D=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var t,e,i=(t=this.ctx.lineDash,e=this.ctx.lineDashOffset,JSON.stringify({lineDash:t,lineDashOffset:e}));this.prevLineDash!==i&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=i)}}}(TN.API),function(t){var e=function(t){var e,i,n,s,r,o,a,h,l,c;for(/[^\x00-\xFF]/.test(t),i=[],n=0,s=(t+=e="\0\0\0\0".slice(t.length%4||4)).length;s>n;n+=4)0!==(r=(t.charCodeAt(n)<<24)+(t.charCodeAt(n+1)<<16)+(t.charCodeAt(n+2)<<8)+t.charCodeAt(n+3))?(o=(r=((r=((r=((r=(r-(c=r%85))/85)-(l=r%85))/85)-(h=r%85))/85)-(a=r%85))/85)%85,i.push(o+33,a+33,h+33,l+33,c+33)):i.push(122);return function(t,e){for(var i=e;i>0;i--)t.pop()}(i,e.length),String.fromCharCode.apply(String,i)+"~>"},i=function(t){var e,i,n,s,r,o=String,a="length",h=255,l="charCodeAt",c="slice",u="replace";for(t[c](-2),t=t[c](0,-2)[u](/\s/g,"")[u]("z","!!!!!"),n=[],s=0,r=(t+=e="uuuuu"[c](t[a]%5||5))[a];r>s;s+=5)i=52200625*(t[l](s)-33)+614125*(t[l](s+1)-33)+7225*(t[l](s+2)-33)+85*(t[l](s+3)-33)+(t[l](s+4)-33),n.push(h&i>>24,h&i>>16,h&i>>8,h&i);return function(t,e){for(var i=e;i>0;i--)t.pop()}(n,e[a]),o.fromCharCode.apply(o,n)},n=function(t){return t.split("").map(function(t){return("0"+t.charCodeAt().toString(16)).slice(-2)}).join("")+">"},s=function(t){var e=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(t=t.replace(/\s/g,"")).indexOf(">")&&(t=t.substr(0,t.indexOf(">"))),t.length%2&&(t+="0"),!1===e.test(t))return"";for(var i="",n=0;n<t.length;n+=2)i+=String.fromCharCode("0x"+(t[n]+t[n+1]));return i},r=function(t){for(var e=new Uint8Array(t.length),i=t.length;i--;)e[i]=t.charCodeAt(i);return(e=$C(e)).reduce(function(t,e){return t+String.fromCharCode(e)},"")};t.processDataByFilters=function(t,o){var a=0,h=t||"",l=[];for("string"==typeof(o=o||[])&&(o=[o]),a=0;a<o.length;a+=1)switch(o[a]){case"ASCII85Decode":case"/ASCII85Decode":h=i(h),l.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":h=e(h),l.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":h=s(h),l.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":h=n(h),l.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":h=r(h),l.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[a]+'" is not implemented')}return{data:h,reverseChain:l.reverse().join(" ")}}}
vendor: 6,395 bytes, line 2
2(TN.API),function(t){t.loadFile=function(t,e,i){return function(t,e,i){e=!1!==e,i="function"==typeof i?i:function(){};var n=void 0;try{n=function(t,e,i){var n=new XMLHttpRequest,s=0,r=function(t){var e=t.length,i=[],n=String.fromCharCode;for(s=0;s<e;s+=1)i.push(n(255&t.charCodeAt(s)));return i.join("")};if(n.open("GET",t,!e),n.overrideMimeType("text/plain; charset=x-user-defined"),!1===e&&(n.onload=function(){200===n.status?i(r(this.responseText)):i(void 0)}),n.send(null),e&&200===n.status)return r(n.responseText)}(t,e,i)}catch(t){}return n}(t,e,i)},t.allowFsRead=void 0,t.loadImageFile=t.loadFile}(TN.API),function(t){function e(){return(tN.html2canvas?Promise.resolve(tN.html2canvas):i.e(653).then(()=>i.t(653,23))).catch(function(t){return Promise.reject(new Error("Could not load html2canvas: "+t))}).then(function(t){return t.default?t.default:t})}function n(){return(tN.DOMPurify?Promise.resolve(tN.DOMPurify):i.e(22).then(()=>i(22))).catch(function(t){return Promise.reject(new Error("Could not load dompurify: "+t))}).then(function(t){return t.default?t.default:t})}var s=function(t){var e=(0,fC.A)(t);return"undefined"===e?"undefined":"string"===e||t instanceof String?"string":"number"===e||t instanceof Number?"number":"function"===e||t instanceof Function?"function":t&&t.constructor===Array?"array":t&&1===t.nodeType?"element":"object"===e?"object":"unknown"},r=function(t,e){var i=document.createElement(t);for(var n in e.className&&(i.className=e.className),e.innerHTML&&e.dompurify&&(i.innerHTML=e.dompurify.sanitize(e.innerHTML)),e.style)i.style[n]=e.style[n];return i},o=function t(e,i){for(var n=3===e.nodeType?document.createTextNode(e.nodeValue):e.cloneNode(!1),s=e.firstChild;s;s=s.nextSibling)!0!==i&&1===s.nodeType&&"SCRIPT"===s.nodeName||n.appendChild(t(s,i));return 1===e.nodeType&&("CANVAS"===e.nodeName?(n.width=e.width,n.height=e.height,n.getContext("2d").drawImage(e,0,0)):"TEXTAREA"!==e.nodeName&&"SELECT"!==e.nodeName||(n.value=e.value),n.addEventListener("load",function(){n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft},!0)),n},a=function t(e){var i=Object.assign(t.convert(Promise.resolve()),JSON.parse(JSON.stringify(t.template))),n=t.convert(Promise.resolve(),i);return(n=n.setProgress(1,t,1,[t])).set(e)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(t,e){return t.__proto__=e||a.prototype,t},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(t,e){return this.then(function(){switch(e=e||function(t){switch(s(t)){case"string":return"string";case"element":return"canvas"===t.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(t),e){case"string":return this.then(n).then(function(e){return this.set({src:r("div",{innerHTML:t,dompurify:e})})});case"element":return this.set({src:t});case"canvas":return this.set({canvas:t});case"img":return this.set({img:t});default:return this.error("Unknown source type.")}})},a.prototype.to=function(t){switch(t){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var t={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},e=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===e.tagName&&(t.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=r("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=r("div",{className:"html2pdf__container",style:t}),this.prop.container.appendChild(e),this.prop.container.firstChild.appendChild(r("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then(function(t){var e=Object.assign({},this.opt.html2canvas);return delete e.onrendered,t(this.prop.container,e)}).then(function(t){(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var t=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(t).then(e).then(function(t){var e=this.opt.jsPDF,i=this.opt.fontFaces,n="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,s=Object.assign({async:!0,allowTaint:!0,scale:n,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete s.onrendered,e.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,e.context2d.posX=this.opt.x,e.context2d.posY=this.opt.y,e.context2d.margin=this.opt.margin,e.context2d.fontFaces=i,i)for(var r=0;r<i.length;++r){var o=i[r],a=o.src.find(function(t){return"truetype"===t.format});a&&e.addFont(a.url,o.ref.name,o.ref.style)}
vendor: 4,673 bytes, line 2
2return s.windowHeight=s.windowHeight||0,s.windowHeight=0==s.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):s.windowHeight,e.context2d.save(!0),t(this.prop.container,s)}).then(function(t){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(t),this.prop.canvas=t,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var t=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=t})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(t,e,i){return"img"===(i=i||"pdf").toLowerCase()||"image"===i.toLowerCase()?this.outputImg(t,e):this.outputPdf(t,e)},a.prototype.outputPdf=function(t,e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(t,e)})},a.prototype.outputImg=function(t){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(t){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+t+'" is not supported.'}})},a.prototype.save=function(t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(t?{filename:t}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(t){if("object"!==s(t))return this;var e=Object.keys(t||{}).map(function(e){if(e in a.template.prop)return function(){this.prop[e]=t[e]};switch(e){case"margin":return this.setMargin.bind(this,t.margin);case"jsPDF":return function(){return this.opt.jsPDF=t.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,t.pageSize);default:return function(){this.opt[e]=t[e]}}},this);return this.then(function(){return this.thenList(e)})},a.prototype.get=function(t,e){return this.then(function(){var i=t in a.template.prop?this.prop[t]:this.opt[t];return e?e(i):i})},a.prototype.setMargin=function(t){return this.then(function(){switch(s(t)){case"number":t=[t,t,t,t];case"array":if(2===t.length&&(t=[t[0],t[1],t[0],t[1]]),4===t.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=t}).then(this.setPageSize)},a.prototype.setPageSize=function(t){function e(t,e){return Math.floor(t*e/72*96)}return this.then(function(){(t=t||TN.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(t.inner={width:t.width-this.opt.margin[1]-this.opt.margin[3],height:t.height-this.opt.margin[0]-this.opt.margin[2]},t.inner.px={width:e(t.inner.width,t.k),height:e(t.inner.height,t.k)},t.inner.ratio=t.inner.height/t.inner.width),this.prop.pageSize=t})},a.prototype.setProgress=function(t,e,i,n){return null!=t&&(this.progress.val=t),null!=e&&(this.progress.state=e),null!=i&&(this.progress.n=i),null!=n&&(this.progress.stack=n),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(t,e,i,n){return this.setProgress(t?this.progress.val+t:null,e||null,i?this.progress.n+i:null,n?this.progress.stack.concat(n):null)},a.prototype.then=function(t,e){var i=this;return this.thenCore(t,e,function(t,e){return i.updateProgress(null,null,1,[t]),Promise.prototype.then.call(this,function(e){return i.updateProgress(null,t),e}).then(t,e).then(function(t){return i.updateProgress(1),t})})},a.prototype.thenCore=function(t,e,i){i=i||Promise.prototype.then;var n=this;t&&(t=t.bind(n)),e&&(e=e.bind(n));var s=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?n:a.convert(Object.assign({},n),Promise.prototype),r=i.call(s,t,e);return a.convert(r,n.__proto__)},a.prototype.thenExternal=function(t,e){return Promise.prototype.then.call(this,t,e)},a.prototype.thenList=function(t){var e=this;return t.forEach(function(t){e=e.thenCore(t)}),e},a.prototype.catch=function(t){t&&(t=t.bind(this));var e=Promise.prototype.catch.call(this,t);return a.convert(e,this)},a.prototype.catchExternal=function(t){return Promise.prototype.catch.call(this,t)},a.prototype.error=function(t){return this.then(function(){throw new Error(t)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.exp
vendor: 24,463 bytes, line 2
2ort=a.prototype.output,a.prototype.run=a.prototype.then,TN.getPageSize=function(t,e,i){if("object"===(0,fC.A)(t)){var n=t;t=n.orientation,e=n.unit||e,i=n.format||i}e=e||"mm",i=i||"a4",t=(""+(t||"P")).toLowerCase();var s,r=(""+i).toLowerCase(),o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(e){case"pt":s=1;break;case"mm":s=72/25.4;break;case"cm":s=72/2.54;break;case"in":s=72;break;case"px":s=.75;break;case"pc":case"em":s=12;break;case"ex":s=6;break;default:throw"Invalid unit: "+e}var a,h=0,l=0;if(o.hasOwnProperty(r))h=o[r][1]/s,l=o[r][0]/s;else try{h=i[1],l=i[0]}catch(t){throw new Error("Invalid format: "+i)}if("p"===t||"portrait"===t)t="p",l>h&&(a=l,l=h,h=a);else{if("l"!==t&&"landscape"!==t)throw"Invalid orientation: "+t;t="l",h>l&&(a=l,l=h,h=a)}return{width:l,height:h,unit:e,k:s,orientation:t}},t.html=function(t,e){(e=e||{}).callback=e.callback||function(){},e.html2canvas=e.html2canvas||{},e.html2canvas.canvas=e.html2canvas.canvas||this.canvas,e.jsPDF=e.jsPDF||this,e.fontFaces=e.fontFaces?e.fontFaces.map(PI):null;var i=new a(e);return e.worker?i:i.from(t).doCallback()}}(TN.API),TN.API.addJS=function(t){var e,i,n=function(t){for(var e="",i=0;i<t.length;i++){var n=t[i];if("("===n||")"===n){for(var s=0,r=i-1;r>=0&&"\\"===t[r];r--)s++;e+=s%2==0?"\\"+n:n}else e+=n}return e}(t);return this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(e+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),i=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+n+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==e&&void 0!==i&&this.internal.out("/Names <</JavaScript "+e+" 0 R>>")}),this},function(t){var e;t.events.push(["postPutResources",function(){var t=this,i=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var n=t.outline.render().split(/\r\n/),s=0;s<n.length;s++){var r=n[s],o=i.exec(r);if(null!=o){var a=o[1];t.internal.newObjectDeferredBegin(a,!1)}t.internal.write(r)}if(this.outline.createNamedDestinations){var h=this.internal.pages.length,l=[];for(s=0;s<h;s++){var c=t.internal.newObject();l.push(c);var u=t.internal.getPageInfo(s+1);t.internal.write("<< /D["+u.objId+" 0 R /XYZ null null null]>> endobj")}var d=t.internal.newObject();for(t.internal.write("<< /Names [ "),s=0;s<l.length;s++)t.internal.write("(page_"+(s+1)+")"+l[s]+" 0 R");t.internal.write(" ] >>","endobj"),e=t.internal.newObject(),t.internal.write("<< /Dests "+d+" 0 R"),t.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var t=this;t.outline.root.children.length>0&&(t.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&t.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var t=this;t.outline={createNamedDestinations:!1,root:{children:[]}},t.outline.add=function(t,e,i){var n={title:e,options:i,children:[]};return null==t&&(t=this.root),t.children.push(n),n},t.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=t,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},t.outline.genIds_r=function(e){e.id=t.internal.newObjectDeferred();for(var i=0;i<e.children.length;i++)this.genIds_r(e.children[i])},t.outline.renderRoot=function(t){this.objStart(t),this.line("/Type /Outlines"),t.children.length>0&&(this.line("/First "+this.makeRef(t.children[0])),this.line("/Last "+this.makeRef(t.children[t.children.length-1]))),this.line("/Count "+this.count_r({count:0},t)),this.objEnd()},t.outline.renderItems=function(e){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,n=0;n<e.children.length;n++){var s=e.children[n];this.objStart(s),this.line("/Title "+this.makeString(s.title)),this.line("/Parent "+this.makeRef(e)),n>0&&this.line("/Prev "+this.makeRef(e.children[n-1])),n<e.children.length-1&&this.line("/Next "+this.makeRef(e.children[n+1])),s.children.length>0&&(this.line("/First "+this.makeRef(s.children[0])),this.line("/Last "+this.makeRef(s.children[s.children.length-1])));var r=this.count=this.count_r({count:0},s);if(r>0&&this.line("/Count "+r),s.options&&s.options.pageNumber){var o=t.internal.getPageInfo(s.options.pageNumber);this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var a=0;a<e.children.length;a++)this.renderItems(e.children[a])},t.outline.line=function(t){this.ctx.val+=t+"\r\n"},t.outline.makeRef=function(t){return t.id+" 0 R"},t.outline.makeString=function(e){return"("+t.internal.pdfEscape(e)+")"},t.outline.objStart=function(t){this.ctx.val+="\r\n"+t.id+" 0 obj\r\n<<\r\n"},t.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},t.outline.count_r=function(t,e){for(var i=0;i<e.children.length;i++)t.count++,this.count_r(t,e.children[i]);return t.count}}])}(TN.API),function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(t,i,n,s,r,o){var a,h=this.decode.DCT_DECODE,l=null;if("string"==typeof t||this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t)){switch(t=r||t,t=this.__addimage__.isArrayBuffer(t)?new Uint8Array(t):t,a=function(t){for(var i,n=256*t.charCodeAt(4)+t.charCodeAt(5),s=t.length,r={width:0,height:0,numcomponents:1},o=4;o<s;o+=2){if(o+=n,-1!==e.indexOf(t.charCodeAt(o+1))){i=256*t.charCodeAt(o+5)+t.charCodeAt(o+6),r={width:256*t.charCodeAt(o+7)+t.charCodeAt(o+8),height:i,numcomponents:t.charCodeAt(o+9)};break}n=256*t.charCodeAt(o+2)+t.charCodeAt(o+3)}return r}(t=this.__addimage__.isArrayBufferView(t)?this.__addimage__.arrayBufferToBinaryString(t):t),a.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}l={data:t,width:a.width,height:a.height,colorSpace:o,bitsPerComponent:8,filter:h,index:i,alias:n}}return l}}(TN.API),TN.API.processPNG=function(t,e,i,n){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var s,r=new Jk(t,{checkCrc:!0}).decode(),o=r.width,a=r.height,h=r.channels,l=r.palette,c=r.depth;s=l&&1===h?function(t){for(var e=t.width,i=t.height,n=t.data,s=t.palette,r=t.depth,o=!1,a=[],h=[],l=void 0,c=!1,u=0,d=0;d<s.length;d++){var f=ZC(s[d],4),p=f[0],g=f[1],m=f[2],_=f[3];a.push(p,g,m),null!=_&&(0===_?(u++,h.length<1&&h.push(d)):_<255&&(c=!0))}if(c||u>1){o=!0,h=void 0;var v=e*i;l=new Uint8Array(v);for(var y=new DataView(n.buffer),w=0;w<v;w++){var b=ZC(s[ZI(y,w,r)],4)[3];l[w]=b}}else 0===u&&(h=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:o?8:void 0,colorBytes:n,alphaBytes:l,needSMask:o,palette:a,mask:h}}(r):2===h||4===h?function(t){for(var e=t.data,i=t.width,n=t.height,s=t.channels,r=t.depth,o=2===s?"DeviceGray":"DeviceRGB",a=s-1,h=i*n,l=a,c=h*l,u=1*h,d=Math.ceil(c*r/8),f=Math.ceil(u*r/8),p=new Uint8Array(d),g=new Uint8Array(f),m=new DataView(e.buffer),_=new DataView(p.buffer),v=new DataView(g.buffer),y=!1,w=0;w<h;w++){for(var b=w*s,x=0;x<l;x++)JI(_,ZI(m,b+x,r),w*l+x,r);var S=ZI(m,b+l,r);S<(1<<r)-1&&(y=!0),JI(v,S,1*w,r)}return{colorSpace:o,colorsPerPixel:a,sMaskBitsPerComponent:y?r:void 0,colorBytes:p,alphaBytes:g,needSMask:y}}(r):function(t){var e=t.data,i=1===t.channels?"DeviceGray":"DeviceRGB";return{colorSpace:i,colorsPerPixel:"DeviceGray"===i?1:3,colorBytes:e instanceof Uint16Array?function(t){for(var e=t.length,i=new Uint8Array(2*e),n=new DataView(i.buffer,i.byteOffset,i.byteLength),s=0;s<e;s++)n.setUint16(2*s,t[s],!1);return i}(e):e,needSMask:!1}}(r);var u,d,f,p=s,g=p.colorSpace,m=p.colorsPerPixel,_=p.sMaskBitsPerComponent,v=p.colorBytes,y=p.alphaBytes,w=p.needSMask,b=p.palette,x=p.mask,S=null;return n!==TN.API.image_compression.NONE?(S=function(t){var e;switch(t){case TN.API.image_compression.FAST:e=11;break;case TN.API.image_compression.MEDIUM:e=13;break;case TN.API.image_compression.SLOW:e=14;break;default:e=12}return e}(n),u=this.decode.FLATE_DECODE,d="/Predictor ".concat(S," /Colors ").concat(m," /BitsPerComponent ").concat(c," /Columns ").concat(o),t=UI(v,Math.ceil(o*m*c/8),m,c,n),w&&(f=UI(y,Math.ceil(o*_/8),1,_,n))):(u=void 0,d=void 0,t=v,w&&(f=y)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:i,data:t,index:e,filter:u,decodeParameters:d,transparency:x,palette:b,sMask:f,predictor:S,width:o,height:a,bitsPerComponent:c,sMaskBitsPerComponent:_,colorSpace:g}}},function(t){t.processGIF89A=function(e,i,n,s){var r=new tT(e),o=r.width,a=r.height,h=[];r.decodeAndBlitFrameRGBA(0,h);var l={data:h,width:o,height:a},c=new iT(100).encode(l,100);return t.processJPEG.call(this,c,i,n,s)},t.processGIF87A=t.processGIF89A}(TN.API),nT.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var i=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:s,green:n,blue:i,quad:r}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},nT.prototype.parseBGR=function(){this.pos=this.offset;var t="bit"+this.bitPP,e=this.width*this.height*4;if(e>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(e);try{this[t]()}catch(t){iN.log("bit decode error:"+t)}},nT.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),i=e%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,s=0;s<e;s++)for(var r=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+8*s*4,a=0;a<8&&8*s+a<this.width;a++){var h=this.palette[r>>7-a&1];this.data[o+4*a]=h.blue,this.data[o+4*a+1]=h.green,this.data[o+4*a+2]=h.red,this.data[o+4*a+3]=255}0!==i&&(this.pos+=4-i)}},nT.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,i=this.height-1;i>=0;i--){for(var n=this.bottom_up?i:this.height-1-i,s=0;s<t;s++){var r=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+2*s*4,a=r>>4,h=15&r,l=this.palette[a];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*s+1>=this.width)break;l=this.palette[h],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}0!==e&&(this.pos+=4-e)}},nT.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var i=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var s=this.datav.getUint8(this.pos++,!0),r=i*this.width*4+4*n;if(s<this.palette.length){var o=this.palette[s];this.data[r]=o.red,this.data[r+1]=o.green,this.data[r+2]=o.blue,this.data[r+3]=255}else this.data[r]=255,this.data[r+1]=255,this.data[r+2]=255,this.data[r+3]=255}0!==t&&(this.pos+=4-t)}},nT.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),i=this.height-1;i>=0;i--){for(var n=this.bottom_up?i:this.height-1-i,s=0;s<this.width;s++){var r=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(r&e)/e*255|0,a=(r>>5&e)/e*255|0,h=(r>>10&e)/e*255|0,l=r>>15?255:0,c=n*this.width*4+4*s;this.data[c]=h,this.data[c+1]=a,this.data[c+2]=o,this.data[c+3]=l}this.pos+=t}},nT.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),i=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var s=this.bottom_up?n:this.height-1-n,r=0;r<this.width;r++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(o&e)/e*255|0,h=(o>>5&i)/i*255|0,l=(o>>11)/e*255|0,c=s*this.width*4+4*r;this.data[c]=l,this.data[c+1]=h,this.data[c+2]=a,this.data[c+3]=255}this.pos+=t}},nT.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var n=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*i;this.data[o]=r,this.data[o+1]=s,this.data[o+2]=n,this.data[o+3]=255}this.pos+=this.width%4}},nT.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,i=0;i<this.width;i++){var n=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*i;this.data[a]=r,this.data[a+1]=s,this.data[a+2]=n,this.data[a+3]=o}},nT.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,i,n,s){var r=new nT(e,!1),o=r.width,a=r.height,h={data:r.getData(),width:o,height:a},l=new iT(100).encode(h,100);return t.processJPEG.call(this,l,i,n,s)}}(TN.API),sT.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,i,n,s){var r=new sT(e),o=r.width,a=r.height,h={data:r.getData(),width:o,height:a},l=new iT(100).encode(h,100);return t.processJPEG.call(this,l,i,n,s)}}(TN.API),TN.API.processRGBA=function(t,e,i){for(var n=t.data,s=n.length,r=new Uint8Array(s/4*3),o=new Uint8Array(s/4),a=0,h=0,l=0;l<s;l+=4){var c=n[l],u=n[l+1],d=n[l+2],f=n[l+3];r[a++]=c,r[a++]=u,r[a++]=d,o[h++]=f}var p=this.__addimage__.arrayBufferToBinaryString(r);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:p,index:e,alias:i,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},TN.API.setLanguage=function(t){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]&&(this.internal.languageSettings.languageCode=t,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},DI=TN.API,jI=DI.getCharWidthsArray=function(t,e){var i,n,s=(e=e||{}).font||this.internal.getFont(),r=e.fontSize||this.internal.getFontSize(),o=e.charSpace||this.internal.getCharSpace(),a=e.widths?e.widths:s.metadata.Unicode.widths,h=a.fof?a.fof:1,l=e.kerning?e.kerning:s.metadata.Unicode.kerning,c=l.fof?l.fof:1,u=!1!==e.doKerning,d=0,f=t.length,p=0,g=a[0]||h,m=[];for(i=0;i<f;i++)n=t.charCodeAt(i),"function"==typeof s.metadata.widthOfString?m.push((s.metadata.widthOfGlyph(s.metadata.characterToGlyph(n))+o*(1e3/r)||0)/1e3):(d=u&&"object"===(0,fC.A)(l[n])&&!isNaN(parseInt(l[n][p],10))?l[n][p]/c:0,m.push((a[n]||g)/h+d)),p=n;return m},GI=DI.getStringUnitWidth=function(t,e){var i=(e=e||{}).fontSize||this.internal.getFontSize(),n=e.font||this.internal.getFont(),s=e.charSpace||this.internal.getCharSpace();return DI.processArabic&&(t=DI.processArabic(t)),"function"==typeof n.metadata.widthOfString?n.metadata.widthOfString(t,i,s)/i:jI.apply(this,arguments).reduce(function(t,e){return t+e},0)},BI=function(t,e,i,n){for(var s=[],r=0,o=t.length,a=0;r!==o&&a+e[r]<i;)a+=e[r],r++;s.push(t.slice(0,r));var h=r;for(a=0;r!==o;)a+e[r]>n&&(s.push(t.slice(h,r)),a=0,h=r),a+=e[r],r++;return h!==r&&s.push(t.slice(h,r)),s},zI=function(t,e,i){i||(i={});var n,s,r,o,a,h,l,c=[],u=[c],d=i.textIndent||0,f=0,p=0,g=t.split(" "),m=jI.apply(this,[" ",i])[0];if(h=-1===i.lineIndent?g[0].length+2:i.lineIndent||0){var _=Array(h).join(" "),v=[];g.map(function(t){(t=t.split(/\s*\n/)).length>1?v=v.concat(t.map(function(t,e){return(e&&t.length?"\n":"")+t})):v.push(t[0])}),g=v,h=GI.apply(this,[_,i])}for(r=0,o=g.length;r<o;r++){var y=0;if(n=g[r],h&&"\n"==n[0]&&(n=n.substr(1),y=1),d+f+(p=(s=jI.apply(this,[n,i])).reduce(function(t,e){return t+e},0))>e||y){if(p>e){for(a=BI.apply(this,[n,s,e-(d+f),e]),c.push(a.shift()),c=[a.pop()];a.length;)u.push([a.shift()]);p=s.slice(n.length-(c[0]?c[0].length:0)).reduce(function(t,e){return t+e},0)}else c=[n];u.push(c),d=p+h,f=m}else c.push(n),d+=f+p,f=m}return l=h?function(t,e){return(e?_:"")+t.join(" ")}:function(t){return t.join(" ")},u.map(l)},DI.splitTextToSize=function(t,e,i){var n,s=(i=i||{}).fontSize||this.internal.getFontSize(),r=function(t){if(t.widths&&t.kerning)return{widths:t.widths,kerning:t.kerning};var e=this.internal.getFont(t.fontName,t.fontStyle),i="Unicode";return e.metadata[i]?{widths:e.metadata[i].widths||{0:1},kerning:e.metadata[i].kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,i);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var o=1*this.internal.scaleFactor*e/s;r.textIndent=i.textIndent?1*i.textIndent*this.internal.scaleFactor/s:0,r.lineIndent=i.lineIndent;var a,h,l=[];for(a=0,h=n.length;a<h;a++)l=l.concat(zI.apply(this,[n[a],o,r]));return l},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",i="klmnopqrstuvwxyz",n={},s={},r=0;r<16;r++)n[i[r]]=e[r],s[e[r]]=i[r];var o=function(t){return"0x"+parseInt(t,10).toString(16)},a=t.__fontmetrics__.compress=function(t){var e,i,n,r,h=["{"];for(var l in t){if(e=t[l],isNaN(parseInt(l,10))?i="'"+l+"'":(l=parseInt(l,10),i=(i=o(l).slice(2)).slice(0,-1)+s[i.slice(-1)]),"number"==typeof e)e<0?(n=o(e).slice(3),r="-"):(n=o(e).slice(2),r=""),n=r+n.slice(0,-1)+s[n.slice(-1)];else{if("object"!==(0,fC.A)(e))throw new Error("Don't know what to do with value type "+(0,fC.A)(e)+".");n=a(e)}h.push(i+n)}return h.push("}"),h.join("")},h=t.__fontmetrics__.uncompress=function(t){if("string"!=typeof t)throw new Error("Invalid argument passed to uncompress.");for(var e,i,s,r,o={},a=1,h=o,l=[],c="",u="",d=t.length-1,f=1;f<d;f+=1)"'"==(r=t[f])?e?(s=e.join(""),e=void 0):e=[]:e?e.push(r):"{"==r?(l.push([h,s]),h={},s=void 0):"}"==r?((i=l.pop())[0][i[1]]=h,s=void 0,h=i[0]):"-"==r?a=-1:void 0===s?n.hasOwnProperty(r)?(c+=n[r],s=parseInt(c,16)*a,a=1,c=""):c+=r:n.hasOwnProperty(r)?(u+=n[r],h[s]=parseInt(u,16)*a,a=1,s=void 0,u=""):u+=r;return o},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:h("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":h("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3me
2k3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4y
2dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":h("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:h("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4y
2dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":h("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4y
2dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:h("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":h("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":h("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}
2fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":h("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":h("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4y
2dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(t){var e=t.font,i=u.Unicode[e.postScriptName];i&&(e.metadata.Unicode={},e.metadata.Unicode.widths=i.widths,e.metadata.Unicode.kerning=i.kerning);var n=c.Unicode[e.postScriptName];n&&(e.metadata.Unicode.encoding=n,e.encoding=n.codePages[0])}])}(TN.API),function(t){var e=function(t){for(var e=t.length,i=new Uint8Array(e),n=0;n<e;n++)i[n]=t.charCodeAt(n);return i};t.API.events.push(["addFont",function(i){var n=void 0,s=i.font,r=i.instance;if(!s.isStandardFont){if(void 0===r)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");if("string"!=typeof(n=!1===r.existsFileInVFS(s.postScriptName)?r.loadFile(s.postScriptName):r.getFileFromVFS(s.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+s.postScriptName+"').");!function(i,n){n=/^\x00\x01\x00\x00/.test(n)?e(n):e(hN(n)),i.metadata=t.API.TTFFont.open(n),i.metadata.Unicode=i.metadata.Unicode||{encoding:{},kerning:{},widths:[]},i.metadata.glyIdsUsed=[0]}(s,n)}}])}(TN),TN.API.addSvgAsImage=function(t,e,n,s,r,o,a,h){if(isNaN(e)||isNaN(n))throw iN.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(s)||isNaN(r))throw iN.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=s,l.height=r;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(tN.canvg?Promise.resolve(tN.canvg):i.e(157).then(()=>i(157))).catch(function(t){return Promise.reject(new Error("Could not load canvg: "+t))}).then(function(t){return t.default?t.default:t}).then(function(e){return e.fromString(c,t,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(t){return t.render(u)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),e,n,s,r,a,h)})},TN.API.putTotalPages=function(t){var e,i=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),i=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),i=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var s=0;s<this.internal.pages[n].length;s++)this.internal.pages[n][s]=this.internal.pages[n][s].replace(e,i);return this},TN.API.viewerPreferences=function(t,e){var i;t=t||{},e=e||!1;var n,s,r,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(o),h=[],l=0,c=0,u=0;function d(t,e){var i,n=!1;for(i=0;i<t.length;i+=1)t[i]===e&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),i=this.internal.viewerpreferences.configuration,"reset"===t||!0===e){var f=a.length;for(u=0;
vendor: 5,626 bytes, line 2
2u<f;u+=1)i[a[u]].value=i[a[u]].defaultValue,i[a[u]].explicitSet=!1}if("object"===(0,fC.A)(t))for(s in t)if(r=t[s],d(a,s)&&void 0!==r){if("boolean"===i[s].type&&"boolean"==typeof r)i[s].value=r;else if("name"===i[s].type&&d(i[s].valueSet,r))i[s].value=r;else if("integer"===i[s].type&&Number.isInteger(r))i[s].value=r;else if("array"===i[s].type){for(l=0;l<r.length;l+=1)if(n=!0,1===r[l].length&&"number"==typeof r[l][0])h.push(String(r[l]-1));else if(r[l].length>1){for(c=0;c<r[l].length;c+=1)"number"!=typeof r[l][c]&&(n=!1);!0===n&&h.push([r[l][0]-1,r[l][1]-1].join(" "))}i[s].value="["+h.join(" ")+"]"}else i[s].value=i[s].defaultValue;i[s].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var t,e=[];for(t in i)!0===i[t].explicitSet&&("name"===i[t].type?e.push("/"+t+" /"+i[t].value):e.push("/"+t+" "+i[t].value));0!==e.length&&this.internal.write("/ViewerPreferences\n<<\n"+e.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=i,this},TN.API.addMetadata=function(t,e){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:t,namespaceUri:null!=e?e:"http://jspdf.default.namespaceuri/",rawXml:"boolean"==typeof e&&e},this.internal.events.subscribe("putCatalog",oT),this.internal.events.subscribe("postPutResources",rT)),this},function(t){var e=t.API,i=e.pdfEscape16=function(t,e){for(var i,n=e.metadata.Unicode.widths,s=["","0","00","000","0000"],r=[""],o=0,a=t.length;o<a;++o){if(i=e.metadata.characterToGlyph(t.charCodeAt(o)),e.metadata.glyIdsUsed.push(i),e.metadata.toUnicode[i]=t.charCodeAt(o),-1==n.indexOf(i)&&(n.push(i),n.push([parseInt(e.metadata.widthOfGlyph(i),10)])),"0"==i)return r.join("");i=i.toString(16),r.push(s[4-i.length],i)}return r.join("")},n=function(t){var e,i,n,s,r,o,a;for(r="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",n=[],o=0,a=(i=Object.keys(t).sort(function(t,e){return t-e})).length;o<a;o++)e=i[o],n.length>=100&&(r+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar",n=[]),void 0!==t[e]&&null!==t[e]&&"function"==typeof t[e].toString&&(s=("0000"+t[e].toString(16)).slice(-4),e=("0000"+(+e).toString(16)).slice(-4),n.push("<"+e+"><"+s+">"));return n.length&&(r+="\n"+n.length+" beginbfchar\n"+n.join("\n")+"\nendbfchar\n"),r+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};e.events.push(["putFont",function(e){!function(e){var i=e.font,s=e.out,r=e.newObject,o=e.putStream;if(i.metadata instanceof t.API.TTFFont&&"Identity-H"===i.encoding){for(var a=i.metadata.Unicode.widths,h=i.metadata.subset.encode(i.metadata.glyIdsUsed,1),l="",c=0;c<h.length;c++)l+=String.fromCharCode(h[c]);var u=r();o({data:l,addLength1:!0,objectId:u}),s("endobj");var d=r();o({data:n(i.metadata.toUnicode),addLength1:!0,objectId:d}),s("endobj");var f=r();s("<<"),s("/Type /FontDescriptor"),s("/FontName /"+MN(i.fontName)),s("/FontFile2 "+u+" 0 R"),s("/FontBBox "+t.API.PDFObject.convert(i.metadata.bbox)),s("/Flags "+i.metadata.flags),s("/StemV "+i.metadata.stemV),s("/ItalicAngle "+i.metadata.italicAngle),s("/Ascent "+i.metadata.ascender),s("/Descent "+i.metadata.decender),s("/CapHeight "+i.metadata.capHeight),s(">>"),s("endobj");var p=r();s("<<"),s("/Type /Font"),s("/BaseFont /"+MN(i.fontName)),s("/FontDescriptor "+f+" 0 R"),s("/W "+t.API.PDFObject.convert(a)),s("/CIDToGIDMap /Identity"),s("/DW 1000"),s("/Subtype /CIDFontType2"),s("/CIDSystemInfo"),s("<<"),s("/Supplement 0"),s("/Registry (Adobe)"),s("/Ordering ("+i.encoding+")"),s(">>"),s(">>"),s("endobj"),i.objectNumber=r(),s("<<"),s("/Type /Font"),s("/Subtype /Type0"),s("/ToUnicode "+d+" 0 R"),s("/BaseFont /"+MN(i.fontName)),s("/Encoding /"+i.encoding),s("/DescendantFonts ["+p+" 0 R]"),s(">>"),s("endobj"),i.isAlreadyPutted=!0}}(e)}]),e.events.push(["putFont",function(e){!function(e){var i=e.font,s=e.out,r=e.newObject,o=e.putStream;if(i.metadata instanceof t.API.TTFFont&&"WinAnsiEncoding"===i.encoding){for(var a=i.metadata.rawData,h="",l=0;l<a.length;l++)h+=String.fromCharCode(a[l]);var c=r();o({data:h,addLength1:!0,objectId:c}),s("endobj");var u=r();o({data:n(i.metadata.toUnicode),addLength1:!0,objectId:u}),s("endobj");var d=r();s("<<"),s("/Descent "+i.metadata.decender),s("/CapHeight "+i.metadata.capHeight),s("/StemV "+i.metadata.stemV),s("/Type /FontDescriptor"),s("/FontFile2 "+c+" 0 R"),s("/Flags 96"),s("/FontBBox "+t.API.PDFObject.convert(i.metadata.bbox)),s("/FontName /"+MN(i.fontName)),s("/ItalicAngle "+i.metadata.italicAngle),s("/Ascent "+i.metadata.ascender),s(">>"),s("endobj"),i.objectNumber=r();for(var f=0;f<i.metadata.hmtx.widths.length;f++)i.metadata.hmtx.widths[f]=parseInt(i.metadata.hmtx.widths[f]*(1e3/i.metadata.head.unitsPerEm));s("<</Subtype/TrueType/Type/Font/ToUnicode "+u+" 0 R/BaseFont/"+MN(i.fontName)+"/FontDescriptor "+d+" 0 R/Encoding/"+i.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(i.metadata.hmtx.widths)+">>"),s("endobj"),i.isAlreadyPutted=!0}}(e)}]);var s=function(t){var e,n=t.text||"",s=t.x,r=t.y,o=t.options||{},a=t.mutex||{},h=a.pdfEscape,l=a.activeFontKey,c=a.fonts,u=l,d="",f=0,p="",g=c[u].encoding;if("Identity-H"!==c[u].encoding)return{text:n,x:s,y:r,options:o,mutex:a};for(p=n,u=l,Array.isArray(n)&&(p=n[0]),f=0;f<p.length;f+=1)c[u].metadata.hasOwnProperty("cmap")&&(e=c[u].metadata.cmap.unicode.codeMap[p[f].charCodeAt(0)]),e||p[f].charCodeAt(0)<256&&
vendor: 35,851 bytes, line 2
2c[u].metadata.hasOwnProperty("Unicode")?d+=p[f]:d+="";var m="";return parseInt(u.slice(1))<14||"WinAnsiEncoding"===g?m=h(d,u).split("").map(function(t){return t.charCodeAt(0).toString(16)}).join(""):"Identity-H"===g&&(m=i(d,c[u])),a.isHex=!0,{text:m,x:s,y:r,options:o,mutex:a}};e.events.push(["postProcessText",function(t){var e=t.text||"",i=[],n={text:e,x:t.x,y:t.y,options:t.options,mutex:t.mutex};if(Array.isArray(e)){var r=0;for(r=0;r<e.length;r+=1)Array.isArray(e[r])&&3===e[r].length?i.push([s(Object.assign({},n,{text:e[r][0]})).text,e[r][1],e[r][2]]):i.push(s(Object.assign({},n,{text:e[r]})).text);t.text=i}else t.text=s(Object.assign({},n,{text:e})).text}])}(TN),function(t){var e=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]},t.addFileToVFS=function(t,i){return e.call(this),this.internal.vFS[t]=i,this},t.getFileFromVFS=function(t){return e.call(this),void 0!==this.internal.vFS[t]?this.internal.vFS[t]:null}}(TN.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(t){var i,n,s,r,o,a,h,l=e,c=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],u=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],d={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},f={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],g=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),m=!1,_=0;this.__bidiEngine__={};var v=function(t){var e=t.charCodeAt(),i=e>>8,n=f[i];return void 0!==n?l[256*n+(255&e)]:252===i||253===i?"AL":g.test(i)?"L":8===i?"R":"N"},y=function(t){for(var e,i=0;i<t.length;i++){if("L"===(e=v(t.charAt(i))))return!1;if("R"===e)return!0}return!1},w=function(t,e,o,a){var h,l,c,u,d=e[a];switch(d){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":m=!1;break;case"N":case"AN":break;case"EN":m&&(d="AN");break;case"AL":m=!0,d="R";break;case"WS":case"BN":d="N";break;case"CS":a<1||a+1>=e.length||"EN"!==(h=o[a-1])&&"AN"!==h||"EN"!==(l=e[a+1])&&"AN"!==l?d="N":m&&(l="AN"),d=l===h?l:"N";break;case"ES":d="EN"===(h=a>0?o[a-1]:"B")&&a+1<e.length&&"EN"===e[a+1]?"EN":"N";break;case"ET":if(a>0&&"EN"===o[a-1]){d="EN";break}if(m){d="N";break}for(c=a+1,u=e.length;c<u&&"ET"===e[c];)c++;d=c<u&&"EN"===e[c]?"EN":"N";break;case"NSM":if(s&&!r){for(u=e.length,c=a+1;c<u&&"NSM"===e[c];)c++;if(c<u){var f=t[a],p=f>=1425&&f<=2303||64286===f;if(h=e[c],p&&("R"===h||"AL"===h)){d="R";break}}}d=a<1||"B"===(h=e[a-1])?"N":o[a-1];break;case"B":m=!1,i=!0,d=_;break;case"S":n=!0,d="N"}return d},b=function(t,e,i){var n=t.split("");return i&&x(n,i,{hiLevel:_}),n.reverse(),e&&e.reverse(),n.join("")},x=function(t,e,s){var r,o,a,h,l,f=-1,p=t.length,g=0,y=[],b=_?u:c,x=[];for(m=!1,i=!1,n=!1,o=0;o<p;o++)x[o]=v(t[o]);for(a=0;a<p;a++){if(l=g,y[a]=w(t,x,y,a),r=240&(g=b[l][d[y[a]]]),g&=15,e[a]=h=b[g][5],r>0)if(16===r){for(o=f;o<a;o++)e[o]=1;f=-1}else f=-1;if(b[g][6])-1===f&&(f=a);else if(f>-1){for(o=f;o<a;o++)e[o]=h;f=-1}"B"===x[a]&&(e[a]=0),s.hiLevel|=h}n&&function(t,e,i){for(var n=0;n<i;n++)if("S"===t[n]){e[n]=_;for(var s=n-1;s>=0&&"WS"===t[s];s--)e[s]=_}}(x,e,p)},S=function(t,e,n,s,r){if(!(r.hiLevel<t)){if(1===t&&1===_&&!i)return e.reverse(),void(n&&n.reverse());for(var o,a,h,l,c=e.length,u=0;u<c;){if(s[u]>=t){for(h=u+1;h<c&&s[h]>=t;)h++;for(l=u,a=h-1;l<a;l++,a--)o=e[l],e[l]=e[a],e[a]=o,n&&(o=n[l],n[l]=n[a],n[a]=o);u=h}u++}}},E=function(t,e,i){var n=t.split(""),s={hiLevel:_};return i||(i=[]),x(n,i,s),function(t,e,i){if(0!==i.hiLevel&&h)for(var n,s=0;s<t.length;s++)1===e[s]&&(n=p.indexOf(t[s]))>=0&&(t[s]=p[n+1])}(n,i,s),S(2,n,e,i,s),S(1,n,e,i,s),n.join("")};return this.__bidiEngine__.doBidiReorder=function(t,e,i){if(function(t,e){if(e)for(var i=0;i<t.length;i++)e[i]=i;void 0===r&&(r=y(t)),void 0===a&&(a=y(t))}(t,e),s||!o||a)if(s&&o&&r^a)_=r?1:0,t=b(t,e,i);else if(!s&&o&&a)_=r?1:0,t=E(t,e,i),t=b(t,e);else if(!s||r||o||a){if(s&&!o&&r^a)t=b(t,e),r?(_=0,t=E(t,e,i)):(_=1,t=E(t,e,i),t=b(t,e));else if(s&&r&&!o&&a)_=1,t=E(t,e,i),t=b(t,e);else if(!s&&!o&&r^a){var n=h;r?(_=1,t=E(t,e,i),_=0,h=!1,t=E(t,e,i),h=n):(_=0,t=E(t,e,i),t=b(t,e),_=1,h=!1,t=E(t,e,i),h=n,t=b(t,e))}}else _=0,t=E(t,e,i);else _=r?1:0,t=E(t,e,i);return t},this.__bidiEngine__.setOptions=function(t){t&&(s=t.isInputVisual,o=t.isOutputVisual,r=t.isInputRtl,a=t.isOutputRtl,h=t.isSymmetricSwapping)},this.__bidiEngine__.setOptions(t),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],i=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(t){var e=t.text;t.x,t.y;var n=t.options||{};t.mutex,n.lang;var s=[];if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,i.setOptions(n),"[object Array]"===Object.prototype.toString.call(e)){var r=0;for(s=[],r=0;r<e.length;r+=1)"[object Array]"===Object.prototype.toString.call(e[r])?s.push([i.doBidiReorder(e[r][0]),e[r][1],e[r][2]]):s.push([i.doBidiReorder(e[r])]);t.text=s}else t.text=i.doBidiReorder(e);i.setOptions({isInputVisual:!0})}])}(TN),TN.API.TTFFont=function(){function t(t){var e;if(this.rawData=t,e=this.contents=new hT(t),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new MT(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new lT(this.contents),this.head=new dT(this),this.name=new yT(this),this.cmap=new pT(this),this.toUnicode={},this.hhea=new gT(this),this.maxp=new wT(this),this.hmtx=new bT(this),this.post=new _T(this),this.os2=new mT(this),this.loca=new CT(this),this.glyf=new ST(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var t,e,i,n,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var e,i,n,s;for(s=[],e=0,i=(n=this.bbox).length;e<i;e++)t=n[e],s.push(Math.round(t*this.scaleFactor));return s}.call(this),this.stemV=0,this.post.exists?(i=255&(n=this.post.italic_angle),32768&(e=n>>16)&&(e=-(1+(65535^e))),this.italicAngle=+(e+"."+i)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(s=this.familyClass)||2===s||3===s||4===s||5===s||7===s,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(t){var e;return(null!=(e=this.cmap.unicode)?e.codeMap[t]:void 0)||0},t.prototype.widthOfGlyph=function(t){var e;return e=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(t).advance*e},t.prototype.widthOfString=function(t,e,i){var n,s,r,o;for(r=0,s=0,o=(t=""+t).length;0<=o?s<o:s>o;s=0<=o?++s:--s)n=t.charCodeAt(s),r+=this.widthOfGlyph(this.characterToGlyph(n))+i*(1e3/e)||0;return r*(e/1e3)},t.prototype.lineHeight=function(t,e){var i;return null==e&&(e=!1),i=e?this.lineGap:0,(this.ascender+i-this.decender)/1e3*t},t}();var aT,hT=function(){function t(t){this.data=null!=t?t:[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(t){return this.data[this.pos++]=t},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(t){return this.writeByte(t>>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt32=function(){var t;return(t=this.readUInt32())>=2147483648?t-4294967296:t},t.prototype.writeInt32=function(t){return t<0&&(t+=4294967296),this.writeUInt32(t)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(t){return this.writeByte(t>>8&255),this.writeByte(255&t)},t.prototype.readInt16=function(){var t;return(t=this.readUInt16())>=32768?t-65536:t},t.prototype.writeInt16=function(t){return t<0&&(t+=65536),this.writeUInt16(t)},t.prototype.readString=function(t){var e,i;for(i=[],e=0;0<=t?e<t:e>t;e=0<=t?++e:--e)i[e]=String.fromCharCode(this.readByte());return i.join("")},t.prototype.writeString=function(t){var e,i,n;for(n=[],e=0,i=t.length;0<=i?e<i:e>i;e=0<=i?++e:--e)n.push(this.writeByte(t.charCodeAt(e)));return n},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(t){return this.writeInt16(t)},t.prototype.readLongLong=function(){var t,e,i,n,s,r,o,a;return t=this.readByte(),e=this.readByte(),i=this.readByte(),n=this.readByte(),s=this.readByte(),r=this.readByte(),o=this.readByte(),a=this.readByte(),128&t?-1*(72057594037927940*(255^t)+281474976710656*(255^e)+1099511627776*(255^i)+4294967296*(255^n)+16777216*(255^s)+65536*(255^r)+256*(255^o)+(255^a)+1):72057594037927940*t+281474976710656*e+1099511627776*i+4294967296*n+16777216*s+65536*r+256*o+a},t.prototype.writeLongLong=function(t){var e,i;return e=Math.floor(t/4294967296),i=4294967295&t,this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e),this.writeByte(i>>24&255),this.writeByte(i>>16&255),this.writeByte(i>>8&255),this.writeByte(255&i)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(t){return this.writeInt32(t)},t.prototype.read=function(t){var e,i;for(e=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)e.push(this.readByte());return e},t.prototype.write=function(t){var e,i,n,s;for(s=[],i=0,n=t.length;i<n;i++)e=t[i],s.push(this.writeByte(e));return s},t}(),lT=function(){var t;function e(t){var e,i,n;for(this.scalarType=t.readInt(),this.tableCount=t.readShort(),this.searchRange=t.readShort(),this.entrySelector=t.readShort(),this.rangeShift=t.readShort(),this.tables={},i=0,n=this.tableCount;0<=n?i<n:i>n;i=0<=n?++i:--i)e={tag:t.readString(4),checksum:t.readInt(),offset:t.readInt(),length:t.readInt()},this.tables[e.tag]=e}return e.prototype.encode=function(e){var i,n,s,r,o,a,h,l,c,u,d,f,p;for(p in d=Object.keys(e).length,a=Math.log(2),c=16*Math.floor(Math.log(d)/a),r=Math.floor(c/a),l=16*d-c,(n=new hT).writeInt(this.scalarType),n.writeShort(d),n.writeShort(c),n.writeShort(r),n.writeShort(l),s=16*d,h=n.pos+s,o=null,f=[],e)for(u=e[p],n.writeString(p),n.writeInt(t(u)),n.writeInt(h),n.writeInt(u.length),f=f.concat(u),"head"===p&&(o=h),h+=u.length;h%4;)f.push(0),h++;return n.write(f),i=2981146554-t(n.data),n.pos=o+8,n.writeUInt32(i),n.data},t=function(t){var e,i,n,s;for(t=xT.call(t);t.length%4;)t.push(0);for(n=new hT(t),i=0,e=0,s=t.length;e<s;e=e+=4)i+=n.readUInt32();return 4294967295&i},e}(),cT={}.hasOwnProperty,uT=function(t,e){for(var i in e)cT.call(e,i)&&(t[i]=e[i]);function n(){this.constructor=t}return n.prototype=e.prototype,t.prototype=new n,t.__super__=e.prototype,t};aT=function(){function t(t){var e;this.file=t,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var dT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="head",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.revision=t.readInt(),this.checkSumAdjustment=t.readInt(),this.magicNumber=t.readInt(),this.flags=t.readShort(),this.unitsPerEm=t.readShort(),this.created=t.readLongLong(),this.modified=t.readLongLong(),this.xMin=t.readShort(),this.yMin=t.readShort(),this.xMax=t.readShort(),this.yMax=t.readShort(),this.macStyle=t.readShort(),this.lowestRecPPEM=t.readShort(),this.fontDirectionHint=t.readShort(),this.indexToLocFormat=t.readShort(),this.glyphDataFormat=t.readShort()},t.prototype.encode=function(t){var e;return(e=new hT).writeInt(this.version),e.writeInt(this.revision),e.writeInt(this.checkSumAdjustment),e.writeInt(this.magicNumber),e.writeShort(this.flags),e.writeShort(this.unitsPerEm),e.writeLongLong(this.created),e.writeLongLong(this.modified),e.writeShort(this.xMin),e.writeShort(this.yMin),e.writeShort(this.xMax),e.writeShort(this.yMax),e.writeShort(this.macStyle),e.writeShort(this.lowestRecPPEM),e.writeShort(this.fontDirectionHint),e.writeShort(t),e.writeShort(this.glyphDataFormat),e.data},t}(),fT=function(){function t(t,e){var i,n,s,r,o,a,h,l,c,u,d,f,p,g,m,_,v;switch(this.platformID=t.readUInt16(),this.encodingID=t.readShort(),this.offset=e+t.readInt(),c=t.pos,t.pos=this.offset,this.format=t.readUInt16(),this.length=t.readUInt16(),this.language=t.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(a=0;a<256;++a)this.codeMap[a]=t.readByte();break;case 4:for(d=t.readUInt16(),u=d/2,t.pos+=6,s=function(){var e,i;for(i=[],a=e=0;0<=u?e<u:e>u;a=0<=u?++e:--e)i.push(t.readUInt16());return i}(),t.pos+=2,p=function(){var e,i;for(i=[],a=e=0;0<=u?e<u:e>u;a=0<=u?++e:--e)i.push(t.readUInt16());return i}(),h=function(){var e,i;for(i=[],a=e=0;0<=u?e<u:e>u;a=0<=u?++e:--e)i.push(t.readUInt16());return i}(),l=function(){var e,i;for(i=[],a=e=0;0<=u?e<u:e>u;a=0<=u?++e:--e)i.push(t.readUInt16());return i}(),n=(this.length-t.pos+this.offset)/2,o=function(){var e,i;for(i=[],a=e=0;0<=n?e<n:e>n;a=0<=n?++e:--e)i.push(t.readUInt16());return i}(),a=m=0,v=s.length;m<v;a=++m)for(g=s[a],i=_=f=p[a];f<=g?_<=g:_>=g;i=f<=g?++_:--_)0===l[a]?r=i+h[a]:0!==(r=o[l[a]/2+(i-f)-(u-a)]||0)&&(r+=h[a]),this.codeMap[i]=65535&r}t.pos=c}return t.encode=function(t,e){var i,n,s,r,o,a,h,l,c,u,d,f,p,g,m,_,v,y,w,b,x,S,E,A,C,M,L,P,k,N,I,T,O,R,F,D,j,G,B,z,q,U,W,V,H,K;switch(P=new hT,r=Object.keys(t).sort(function(t,e){return t-e}),e){case"macroman":for(p=0,g=function(){var t=[];for(f=0;f<256;++f)t.push(0);return t}(),_={0:0},s={},k=0,O=r.length;k<O;k++)null==_[W=t[n=r[k]]]&&(_[W]=++p),s[n]={old:t[n],new:_[t[n]]},g[n]=_[t[n]];return P.writeUInt16(1),P.writeUInt16(0),P.writeUInt32(12),P.writeUInt16(0),P.writeUInt16(262),P.writeUInt16(0),P.write(g),{charMap:s,subtable:P.data,maxGlyphID:p+1};case"unicode":for(M=[],c=[],v=0,_={},i={},m=h=null,N=0,R=r.length;N<R;N++)null==_[w=t[n=r[N]]]&&(_[w]=++v),i[n]={old:w,new:_[w]},o=_[w]-n,null!=m&&o===h||(m&&c.push(m),M.push(n),h=o),m=n;for(m&&c.push(m),c.push(65535),M.push(65535),A=2*(E=M.length),S=2*Math.pow(Math.log(E)/Math.LN2,2),u=Math.log(S/2)/Math.LN2,x=2*E-S,a=[],b=[],d=[],f=I=0,F=M.length;I<F;f=++I){if(C=M[f],l=c[f],65535===C){a.push(0),b.push(0);break}if(C-(L=i[C].new)>=32768)for(a.push(0),b.push(2*(d.length+E-f)),n=T=C;C<=l?T<=l:T>=l;n=C<=l?++T:--T)d.push(i[n].new);else a.push(L-C),b.push(0)}for(P.writeUInt16(3),P.writeUInt16(1),P.writeUInt32(12),P.writeUInt16(4),P.writeUInt16(16+8*E+2*d.length),P.writeUInt16(0),P.writeUInt16(A),P.writeUInt16(S),P.writeUInt16(u),P.writeUInt16(x),q=0,D=c.length;q<D;q++)n=c[q],P.writeUInt16(n);for(P.writeUInt16(0),U=0,j=M.length;U<j;U++)n=M[U],P.writeUInt16(n);for(V=0,G=a.length;V<G;V++)o=a[V],P.writeUInt16(o);for(H=0,B=b.length;H<B;H++)y=b[H],P.writeUInt16(y);for(K=0,z=d.length;K<z;K++)p=d[K],P.writeUInt16(p);return{charMap:i,subtable:P.data,maxGlyphID:v+1}}},t}(),pT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="cmap",t.prototype.parse=function(t){var e,i,n;for(t.pos=this.offset,this.version=t.readUInt16(),n=t.readUInt16(),this.tables=[],this.unicode=null,i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)e=new fT(t,this.offset),this.tables.push(e),e.isUnicode&&null==this.unicode&&(this.unicode=e);return!0},t.encode=function(t,e){var i,n;return null==e&&(e="macroman"),i=fT.encode(t,e),(n=new hT).writeUInt16(0),n.writeUInt16(1),i.table=n.data.concat(i.subtable),i},t}(),gT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="hhea",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.ascender=t.readShort(),this.decender=t.readShort(),this.lineGap=t.readShort(),this.advanceWidthMax=t.readShort(),this.minLeftSideBearing=t.readShort(),this.minRightSideBearing=t.readShort(),this.xMaxExtent=t.readShort(),this.caretSlopeRise=t.readShort(),this.caretSlopeRun=t.readShort(),this.caretOffset=t.readShort(),t.pos+=8,this.metricDataFormat=t.readShort(),this.numberOfMetrics=t.readUInt16()},t}(),mT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="OS/2",t.prototype.parse=function(t){if(t.pos=this.offset,this.version=t.readUInt16(),this.averageCharWidth=t.readShort(),this.weightClass=t.readUInt16(),this.widthClass=t.readUInt16(),this.type=t.readShort(),this.ySubscriptXSize=t.readShort(),this.ySubscriptYSize=t.readShort(),this.ySubscriptXOffset=t.readShort(),this.ySubscriptYOffset=t.readShort(),this.ySuperscriptXSize=t.readShort(),this.ySuperscriptYSize=t.readShort(),this.ySuperscriptXOffset=t.readShort(),this.ySuperscriptYOffset=t.readShort(),this.yStrikeoutSize=t.readShort(),this.yStrikeoutPosition=t.readShort(),this.familyClass=t.readShort(),this.panose=function(){var e,i;for(i=[],e=0;e<10;++e)i.push(t.readByte());return i}(),this.charRange=function(){var e,i;for(i=[],e=0;e<4;++e)i.push(t.readInt());return i}(),this.vendorID=t.readString(4),this.selection=t.readShort(),this.firstCharIndex=t.readShort(),this.lastCharIndex=t.readShort(),this.version>0&&(this.ascent=t.readShort(),this.descent=t.readShort(),this.lineGap=t.readShort(),this.winAscent=t.readShort(),this.winDescent=t.readShort(),this.codePageRange=function(){var e,i;for(i=[],e=0;e<2;e=++e)i.push(t.readInt());return i}(),this.version>1))return this.xHeight=t.readShort(),this.capHeight=t.readShort(),this.defaultChar=t.readShort(),this.breakChar=t.readShort(),this.maxContext=t.readShort()},t}(),_T=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="post",t.prototype.parse=function(t){var e,i,n;switch(t.pos=this.offset,this.format=t.readInt(),this.italicAngle=t.readInt(),this.underlinePosition=t.readShort(),this.underlineThickness=t.readShort(),this.isFixedPitch=t.readInt(),this.minMemType42=t.readInt(),this.maxMemType42=t.readInt(),this.minMemType1=t.readInt(),this.maxMemType1=t.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(i=t.readUInt16(),this.glyphNameIndex=[],s=0;0<=i?s<i:s>i;s=0<=i?++s:--s)this.glyphNameIndex.push(t.readUInt16());for(this.names=[],n=[];t.pos<this.offset+this.length;)e=t.readByte(),n.push(this.names.push(t.readString(e)));return n;case 151552:return i=t.readUInt16(),this.offsets=t.read(i);case 262144:return this.map=function(){var e,i,n;for(n=[],s=e=0,i=this.file.maxp.numGlyphs;0<=i?e<i:e>i;s=0<=i?++e:--e)n.push(t.readUInt32());return n}.call(this)}},t}(),vT=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},yT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="name",t.prototype.parse=function(t){var e,i,n,s,r,o,a,h,l,c,u;for(t.pos=this.offset,t.readShort(),e=t.readShort(),o=t.readShort(),i=[],s=0;0<=e?s<e:s>e;s=0<=e?++s:--s)i.push({platformID:t.readShort(),encodingID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:this.offset+o+t.readShort()});for(a={},s=l=0,c=i.length;l<c;s=++l)n=i[s],t.pos=n.offset,h=t.readString(n.length),r=new vT(h,n),null==a[u=n.nameID]&&(a[u]=[]),a[n.nameID].push(r);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(t){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},t}(),wT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="maxp",t.prototype.parse=function(t){return t.pos=this.offset,this.version=t.readInt(),this.numGlyphs=t.readUInt16(),this.maxPoints=t.readUInt16(),this.maxContours=t.readUInt16(),this.maxCompositePoints=t.readUInt16(),this.maxComponentContours=t.readUInt16(),this.maxZones=t.readUInt16(),this.maxTwilightPoints=t.readUInt16(),this.maxStorage=t.readUInt16(),this.maxFunctionDefs=t.readUInt16(),this.maxInstructionDefs=t.readUInt16(),this.maxStackElements=t.readUInt16(),this.maxSizeOfInstructions=t.readUInt16(),this.maxComponentElements=t.readUInt16(),this.maxComponentDepth=t.readUInt16()},t}(),bT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="hmtx",t.prototype.parse=function(t){var e,i,n,s,r,o,a;for(t.pos=this.offset,this.metrics=[],e=0,o=this.file.hhea.numberOfMetrics;0<=o?e<o:e>o;e=0<=o?++e:--e)this.metrics.push({advance:t.readUInt16(),lsb:t.readInt16()});for(n=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var i,s;for(s=[],e=i=0;0<=n?i<n:i>n;e=0<=n?++i:--i)s.push(t.readInt16());return s}(),this.widths=function(){var t,e,i,n;for(n=[],t=0,e=(i=this.metrics).length;t<e;t++)s=i[t],n.push(s.advance);return n}.call(this),i=this.widths[this.widths.length-1],a=[],e=r=0;0<=n?r<n:r>n;e=0<=n?++r:--r)a.push(this.widths.push(i));return a},t.prototype.forGlyph=function(t){return t in this.metrics?this.metrics[t]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[t-this.metrics.length]}},t}(),xT=[].slice,ST=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(t){var e,i,n,s,r,o,a,h,l,c;return t in this.cache?this.cache[t]:(s=this.file.loca,e=this.file.contents,i=s.indexOf(t),0===(n=s.lengthOf(t))?this.cache[t]=null:(e.pos=this.offset+i,r=(o=new hT(e.read(n))).readShort(),h=o.readShort(),c=o.readShort(),a=o.readShort(),l=o.readShort(),this.cache[t]=-1===r?new AT(o,h,c,a,l):new ET(o,r,h,c,a,l),this.cache[t]))},t.prototype.encode=function(t,e,i){var n,s,r,o,a;for(r=[],s=[],o=0,a=e.length;o<a;o++)n=t[e[o]],s.push(r.length),n&&(r=r.concat(n.encode(i)));return s.push(r.length),{table:r,offsets:s}},t}(),ET=function(){function t(t,e,i,n,s,r){this.raw=t,this.numberOfContours=e,this.xMin=i,this.yMin=n,this.xMax=s,this.yMax=r,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),AT=function(){function t(t,e,i,n,s){var r,o;for(this.raw=t,this.xMin=e,this.yMin=i,this.xMax=n,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],r=this.raw;o=r.readShort(),this.glyphOffsets.push(r.pos),this.glyphIDs.push(r.readUInt16()),32&o;)r.pos+=1&o?4:2,128&o?r.pos+=8:64&o?r.pos+=4:8&o&&(r.pos+=2)}return t.prototype.encode=function(){var t,e,i;for(e=new hT(xT.call(this.raw.data)),t=0,i=this.glyphIDs.length;t<i;++t)e.pos=this.glyphOffsets[t];return e.data},t}(),CT=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return uT(t,aT),t.prototype.tag="loca",t.prototype.parse=function(t){var e,i;return t.pos=this.offset,e=this.file.head.indexToLocFormat,this.offsets=0===e?function(){var e,n;for(n=[],i=0,e=this.length;i<e;i+=2)n.push(2*t.readUInt16());return n}.call(this):function(){var e,n;for(n=[],i=0,e=this.length;i<e;i+=4)n.push(t.readUInt32());return n}.call(this)},t.prototype.indexOf=function(t){return this.offsets[t]},t.prototype.lengthOf=function(t){return this.offsets[t+1]-this.offsets[t]},t.prototype.encode=function(t,e){for(var i=new Uint32Array(this.offsets.length),n=0,s=0,r=0;r<i.length;++r)if(i[r]=n,s<e.length&&e[s]==r){++s,i[r]=n;var o=this.offsets[r],a=this.offsets[r+1]-o;a>0&&(n+=a)}for(var h=new Array(4*i.length),l=0;l<i.length;++l)h[4*l+3]=255&i[l],h[4*l+2]=(65280&i[l])>>8,h[4*l+1]=(16711680&i[l])>>16,h[4*l]=(4278190080&i[l])>>24;return h},t}(),MT=function(){function t(t){this.font=t,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var t,e,i,n,s;for(e in n=this.font.cmap.tables[0].codeMap,t={},s=this.subset)i=s[e],t[e]=n[i];return t},t.prototype.glyphsFor=function(t){var e,i,n,s,r,o,a;for(n={},r=0,o=t.length;r<o;r++)n[s=t[r]]=this.font.glyf.glyphFor(s);for(s in e=[],n)(null!=(i=n[s])?i.compound:void 0)&&e.push.apply(e,i.glyphIDs);if(e.length>0)for(s in a=this.glyphsFor(e))i=a[s],n[s]=i;return n},t.prototype.encode=function(t,e){var i,n,s,r,o,a,h,l,c,u,d,f,p,g,m;for(n in i=pT.encode(this.generateCmap(),"unicode"),r=this.glyphsFor(t),d={0:0},m=i.charMap)d[(a=m[n]).old]=a.new;for(f in u=i.maxGlyphID,r)f in d||(d[f]=u++);return l=function(t){var e,i;for(e in i={},t)i[t[e]]=e;return i}(d),c=Object.keys(l).sort(function(t,e){return t-e}),p=function(){var t,e,i;for(i=[],t=0,e=c.length;t<e;t++)o=c[t],i.push(l[o]);return i}(),s=this.font.glyf.encode(r,p,d),h=this.font.loca.encode(s.offsets,p),g={cmap:this.font.cmap.raw(),glyf:s.table,loca:h,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(e)},this.font.os2.exists&&(g["OS/2"]=this.font.os2.raw()),this.font.directory.encode(g)},t}();let LT,PT;TN.API.PDFObject=function(){var t;function e(){}return t=function(t,e){return(Array(e+1).join("0")+t).slice(-e)},e.convert=function(i){var n,s,r,o;
2if(Array.isArray(i))return"["+function(){var t,s,r;for(r=[],t=0,s=i.length;t<s;t++)n=i[t],r.push(e.convert(n));return r}().join(" ")+"]";if("string"==typeof i)return"/"+i;if(null!=i?i.isString:void 0)return"("+i+")";if(i instanceof Date)return"(D:"+t(i.getUTCFullYear(),4)+t(i.getUTCMonth(),2)+t(i.getUTCDate(),2)+t(i.getUTCHours(),2)+t(i.getUTCMinutes(),2)+t(i.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(i)){for(s in r=["<<"],i)o=i[s],r.push("/"+s+" "+e.convert(o));return r.push(">>"),r.join("\n")}return""+i},e}();const kT=t=>{const e=document.createElement("canvas");e.width=30,e.height=30;const i=e.getContext("2d");i.fillStyle="#fff",i.fillRect(0,0,30,30);const n=document.getElementById(t);return n&&i.drawImage(n,0,0,30,30),e.toDataURL("image/jpeg",.9)},NT=()=>{const t=document.getElementsByTagName("canvas")[0];if(!t)return null;const e=t.getContext("2d"),i=e.getImageData(0,0,t.width,t.height),n=i.data;for(let t=0;t<n.length;t+=4){const e=255-n[t+3];n[t]=n[t]+e*(255-n[t])/255,n[t+1]=n[t+1]+e*(255-n[t+1])/255,n[t+2]=n[t+2]+e*(255-n[t+2])/255,n[t+3]=255}return e.putImageData(i,0,0),t},IT=(t,e)=>{const i=NT();if(!i)return;const n=i.toDataURL("image/jpeg",.9);let s="";if(xb){let t="";switch(xb()){case"simple":t=window.atlas_basic_symbology||"Simple (history)";break;case"advanced":t=window.atlas_advanced_symbology||"Advanced (history, native status, validation status)";break;case"count":t=window.atlas_count_symbology||"Number of observations"}switch(bb()){case"11":s=(window.layer_title||"Atlas layer")+" 5x5 km : "+t;break;case"12":s=(window.layer_title||"Atlas layer")+" Welten & Sutter : "+t;break;case"27":s=(window.layer_title||"Atlas layer")+" Welten & Sutter";break;default:s=window.layer_title||"Atlas layer"}}else"fileTitle"in window&&(s=window.fileTitle);s=s.replace(/ \(.*\)/,"");const r=new TN("landscape","mm");r.addImage(n,"jpeg",15,10,270,192),r.setFontSize(12),r.setFont("Helvetica","bold"),r.text(e,15,15),r.text(s,285,15,"right"),r.setFontSize(9),r.setFont("Helvetica","normal");const o=vb()?Pu(vb()).slice(0,10):window.datasetLastModifiedDate||"";if(o){const t=(window.last_update||"Dataset last updated")+" : "+o;r.text(t,15,200)}r.text("© InfoFlora / GEOSTAT / Swisstopo",285,200,"right"),(t=>{if(bb)if(27!=bb())switch(xb()){case"simple":t.addImage(kT("atlas-1"),"jpeg",240,22.2,3,3),t.addImage(kT("atlas-101"),"png",240,27.2,3,3),t.addImage(kT("atlas-201"),"png",240,32.2,3,3),t.text(window.symbols_before_year||"Before threshold year",245,25),t.text(window.symbols_after_year||"From threshold year",245,30),t.text(window.symbols_before_and_after_year||"Before and after threshold year",245,35),t.setFont("Helvetica","bold"),t.text((window.threshold_year||"Threshold year")+" : "+Sb(),245,42);break;case"count":t.addImage(kT("atlas-1001"),"png",210,22.2,3,3),t.addImage(kT("atlas-1002"),"png",210,27.2,3,3),t.text(window.symbols_count_less||"Below the threshold number of observations",215,25),t.text(window.symbols_count_more||"Above or equal the threshold number of observations",215,30),t.setFont("Helvetica","bold"),t.text((window.threshold_count||"Threshold number")+" : "+Eb(),215,37);break;case"advanced":t.setFont("Helvetica","bold"),t.text(window.symbols_form_title||"Symbols",250,25),t.setFont("Helvetica","normal"),t.addImage(kT("atlas-3"),"png",233,27.2,3,3),t.addImage(kT("atlas-13"),"png",237,27.2,3,3),t.addImage(kT("atlas-23"),"png",241,27.2,3,3),t.addImage(kT("atlas-33"),"png",245,27.2,3,3),t.text(window.symbols_before_year||"Before threshold year",250,30),t.addImage(kT("atlas-103"),"png",233,32.2,3,3),t.addImage(kT("atlas-113"),"png",237,32.2,3,3),t.addImage(kT("atlas-123"),"png",241,32.2,3,3),t.addImage(kT("atlas-133"),"png",245,32.2,3,3),t.text(window.symbols_after_year||"From threshold year",250,35),t.addImage(kT("atlas-3"),"png",241,37.2,3,3),t.addImage(kT("atlas-103"),"png",245,37.2,3,3),t.text(window.symbols_native||"Native",250,40),t.addImage(kT("atlas-13"),"png",241,42.2,3,3),t.addImage(kT("atlas-113"),"png",245,42.2,3,3),t.text(window.symbols_reintroduced||"Reintroduced",250,45),t.addImage(kT("atlas-23"),"png",241,47.2,3,3),t.addImage(kT("atlas-123"),"png",245,47.2,3,3),t.text(window.symbols_notnative||"Not native / introduced / subspontaneous / escaped",250,50),t.addImage(kT("atlas-33"),"png",241,52.2,3,3),t.addImage(kT("atlas-133"),"png",245,52.2,3,3),t.text(window.symbols_doubtful||"Doubtful",250,55),t.setFont("Helvetica","bold"),t.text((window.threshold_year||"Threshold year")+" : "+Sb(),250,62),t.text(window.symbols_color_title||"Colors",20,25),t.setFont("Helvetica","normal"),t.addImage(kT("atlas-green"),"png",15,27.2,3,3),t.addImage(kT("atlas-purple"),"png",15,32.2,3,3),t.addImage(kT("atlas-grey"),"png",15,37.2,3,3),t.text(window.symbols_validated||"Validated observations",20,30),t.text(window.symbols_not_validated||"Observations waiting for validation",20,35);const e=(window.symbols_without_observation||"").split(")");e.length>
21&&(e[0]+=")",e[1]+=")",t.text(e,20,40))}else t.setFont("Helvetica","bold"),t.text(window.symbols_form_title||"Symbols",247,25),t.setFont("Helvetica","normal"),t.text(window.symbols_ws_low||"Valley surfaces",238,30,"right"),t.text(window.symbols_ws_high||"Mountain surfaces",242,30),t.addImage(kT("atlas-104"),"png",234,32.2,3,3),t.addImage(kT("atlas-117"),"png",242,32.2,3,3),t.text(window.symbols_ws_frequent||"Abundant or frequent presence",247,35),t.addImage(kT("atlas-103"),"png",234,37.2,3,3),t.addImage(kT("atlas-118"),"png",242,37.2,3,3),t.text(window.symbols_ws_rare||"Scarce or rare presence",247,40),t.setFont("Helvetica","bold"),t.text("H",242,45),t.setFont("Helvetica","normal"),t.text(window.symbols_ws_herbarium||"Herbarium sample",247,45),t.setFont("Helvetica","bold"),t.text("L",242,50),t.setFont("Helvetica","normal"),t.text(window.symbols_ws_litterature||"Mentioned in the litterature",247,50),t.setFont("Helvetica","bold"),t.text(window.symbols_color_title||"Colors",20,25),t.setFont("Helvetica","normal"),t.addImage(kT("atlas-black"),"png",15,27.2,3,3),t.addImage(kT("atlas-green"),"png",15,32.2,3,3),t.addImage(kT("atlas-blue"),"png",15,37.2,3,3),t.text(window.symbols_ws||"Occurrences from Atlas Welten & Sutter (1982)",20,30),t.text(window.symbols_ws_supplements_1||"Occurrences from supplements 1984",20,35),t.text(window.symbols_ws_supplements_2||"Occurrences from supplements 1994",20,40);else"fileLegend"in window&&"function"==typeof window.fileLegend&&window.fileLegend(t)})(r),r.save(t+".pdf")},TT=t=>{const e=NT();if(!e)return;const i=e.toDataURL("image/jpeg",.75),n=document.createElement("a");n.download=t+".jpg",n.href=i,document.body.appendChild(n),n.click(),document.body.removeChild(n)},OT=t=>{let e=0,i=0,n=0;const s=()=>{++i},r=()=>{++n};let o;const a=document.querySelector('input[name="baselayer"]:checked')?.value;switch(a){case"simple":o=Rw.getSource();break;case"relief":o=Nw.getSource();break;case"pktlm3d":o=Pw.getSource()}if(!o)return;o.addEventListener("tileloadstart",s),o.addEventListener("tileloadend",r),o.addEventListener("tileloaderror",r),LT.setSize([4088,2912]),LT.getView().setCenter([658e3,19e4]),LT.getView().setZoom(17),LT.renderSync();let h="";if("map_type"in window)if("embedded"===window.map_type){const t=document.getElementById("taxon-title");t&&(h=t.innerHTML.replace(/<[^<>]*>/g,""))}else h=db;else if("fileNameSubject"in window)h=JSON.stringify(window.fileNameSubject);else{const t=document.getElementsByTagName("h1");t.length>0&&(h=t[0].textContent)}const l=h.replace(/\./g,"").replace(/-/g,"_").replace(/&[^&]+;/g,"").replace(/[ ]+/g,"_")+"_"+(()=>{const t=new Date;return`${t.getFullYear()}-${("0"+(t.getMonth()+1)).slice(-2)}-${("0"+t.getDate()).slice(-2)}_${("0"+t.getHours()).slice(-2)}h${("0"+t.getMinutes()).slice(-2)}`})(),c=()=>{++e,i>0&&i===n||0===i&&e>10?(o.removeEventListener("tileloadstart",s),o.removeEventListener("tileloadend",r),o.removeEventListener("tileloaderror",r),t(l,h),LT.setSize(PT),LT.getView().setZoom(15),LT.renderSync()):setTimeout(c,100)};c()},RT=t=>{LT=t,PT=LT.getSize();const e=document.getElementById("export-pdf"),i=document.getElementById("export-img"),n=document.getElementById("dialogue");e&&e.addEventListener("click",()=>OT(IT)),i&&i.addEventListener("click",()=>OT(TT)),n&&n.addEventListener("click",()=>{console.log("map render"),LT&&(LT.changed(),LT.render())})};var FT=function(t,e){Object.entries(e).forEach(function(e){var i=e[0],n=e[1];"addClass"===i||"removeClass"===i?BT(t,"addClass"===i?"add":"remove",n):t.setAttribute(i,n)})},DT=function(t){return(t.firstElementChild||t).textContent.trim()},jT=function(t,e){t.scrollTop=t.offsetTop-e.offsetHeight},GT=function(t,e){t&&(BT(t,"remove","hidden"),UT(t,"click",e))},BT=function(t,e,i){return t.classList[e](i)},zT=function(t,e){FT(t,{"aria-activedescendant":e||""})},qT=function(t){return document.createElement(t)},UT=function(t,e,i){t.addEventListener(e,i)},WT=function(t,e,i){t.removeEventListener(e,i)},VT=function(t,e){return void 0===e&&(e=!1),{"aria-owns":t,"aria-expanded":"false","aria-autocomplete":e?"both":"list","aria-haspopup":"listbox",role:"combobox",removeClass:"auto-expanded"}},HT=Object.freeze({ESC:27,ENTER:13,UP:38,DOWN:40,TAB:9}),KT=function(t,e){var i,n,s=this,r=e.delay,o=void 0===r?500:r,a=e.clearButton,h=void 0===a||a,l=e.clearButtonOnInitial,c=void 0!==l&&l,u=e.howManyCharacters,d=void 0===u?1:u,f=e.selectFirst,p=void 0!==f&&f,g=e.insertToInput,m=void 0!==g&&g,_=e.showValuesOnClick,v=void 0!==_&&_,y=e.inline,w=void 0!==y&&y,b=e.cache,x=void 0!==b&&b,S=e.disableCloseOnSelect,E=void 0!==S&&S,A=e.preventScrollUp,C=void 0!==A&&A,M=e.removeResultsWhenInputIsEmpty,L=void 0!==M&&M,P=e.dropdownParent,k=e.dropdownAttrs,N=void 0===k?{}:k,I=e.regex,T=void 0===I?{expression:/[|\\{}()[\]^$+*?]/g,replacement:"\\$&"}:I,O=e.classGroup,R=e.classPreventClosing,F=e.classPrefix,D=e.ariaLabelClear,j=e.onSearch,G=e.onResults,B=void 0===G?function(){}:G,z=e.onSubmit,q=void 0===z?function(){}:z,U=e.onOpened,W=void 0===U?function(){}:U,V=e.onReset,H=void 0===V?function(){}:V,K=e.onRender,$=void 0===K?function(){}:K,X=e.onClose,Y=void 0===X?function(){}:X,Z=e.noResults,J=void 0===Z?function(){}:Z,Q=e.onLoading,tt=void 0===Q?function(){}:Q,et=e.onSelectedItem,it=void 0===et?function(){}:et;if(this._initial=function(){s._clearbutton();var t,e,i,n,r,o,a=VT(s._outputUl,s._toInput);(FT(s._root,a),t=s._root,e=s._resultList,i=s._outputUl,n=s._resultWrap,r=s._prefix,FT(e,{id:i,role:"listbox"}),FT(n,{addClass:r+"-results-wrapper"}),n.insertAdjacentElement("beforeend",e),t.parentNode.insertBefore(n,t.nextSibling),s._dropdownParent)&&(s._dropdownParent.appendChild(s._resultWrap),s._dropdownAttrs.class&&(o=s._resultWrap.classList).add.apply(o,s._dropdownAttrs.class.trim().split(/\s+/)),s._dropdownAttrs.style&&s._resultWrap.setAttribute("style",s._dropdownAttrs.style));try{s._resultList.id=s._outputUl,s._root.setAttribute("aria-controls",s._outputUl)}catch(t){}if(UT(s._root,"input",s._handleInput),s._showValuesOnClick&&UT(s._root,"click",s._handleInput),s._inline){var h={root:s._root,type:"load"};UT(s._root,"load",s._handleInput(h))}s._onRender({element:s._root,results:s._resultList}),s._clearButtonOnInitial&&GT(s._clearBtn,s.reset)},this._cacheAct=function(t,e){s._cache&&("update"===t?s._root.setAttribute(s._cacheData,null==e?void 0:e.value):"remove"===t?s._root.removeAttribute(s._cacheData):s._root.value=s._root.getAttribute(s._cacheData))},this._handleInput=function(t){var e,i=t.target,n=t.type;if("true"!==s._root.getAttribute("aria-expanded")||"click"!==n){var r=null==(e=i=s._inline?s._root:i)?void 0:e.value.replace(s._regex.expression,s._regex.replacement);s._cacheAct("update",i);var o=s._showValuesOnClick||s._inline&&"load"===n?0:s._delay;clearTimeout(s._timeout),s._timeout=setTimeout(function(){var t;if(s._removeResultsWhenInputIsEmpty&&0===(null==(t=i)?void 0:t.value.length))return s._resultList.textContent="",s._reset(),void(s._clearButton&&BT(s._clearBtn,"add","hidden"));s._searchItem(null==r?void 0:r.trim())},o)}},this._positionDropdown=function(){var t,e=s._root.getBoundingClientRect();s._resultWrap.style.position="fixed",s._resultWrap.style.left=e.left+"px",s._resultWrap.style.top=e.bottom+"px",s._resultWrap.style.width=e.width+"px",null!=(t=s._dropdownAttrs.style)&&t.includes("z-index")||(s._resultWrap.style.zIndex="9999")},this._startPositionTracking=function(){s._positionDropdown(),window.addEventListener("scroll",s._positionDropdown,!0),window.addEventListener("resize",s._positionDropdown)},this._stopPositionTracking=function(){window.removeEventListener("scroll",s._positionDropdown,!0),window.removeEventListener("resize",s._positionDropdown)},this._reset=function(){var t;BT(s._resultWrap,"remove",s._isActive),s._dropdownParent&&s._stopPositionTracking();var e=VT(s._outputUl,s._toInput),i=s._preventScrollUp?e:Object.assign({},e,{"aria-activedescendant":""});FT(s._root,i),s._preventScrollUp||(s._removeAria(s._resultList.querySelector("."+s._activeList)),s._index=s._selectFirst?0:-1),(0===(null==(t=s._matches)?void 0:t.length)&&!s._toInput||s._showValuesOnClick)&&(s._resultList.textContent=""),s._onClose()},this._searchItem=function(t){s._value=t,GT(s._clearBtn,s.reset),t&&0!==(null==t?void 0:t.length)||!s._clearButton||s._clearButtonOnInitial||BT(s._clearBtn,"add","hidden"),s._characters>(null==t?void 0:t.length)&&!s._showValuesOnClick&&!s._inline||(s._onLoading(!0),s._onSearch({currentValue:t,element:s._root}).then(function(e){var i=s._root.value.length,n=e.length;if(s._matches=Array.isArray(e)?e:JSON.parse(JSON.stringify(e)),s._onLoading(),s._error(),0===n&&0===i&&BT(s._clearBtn,"add","hidden"),0===n&&i){BT(s._root,"remove","auto-expanded"),s._reset();var r=s._noResults({element:s._root,currentValue:t});r&&s._results(r),s._events()}else(n>0||function(t){return t&&"object"==typeof t&&t.constructor===Object}(e))&&(s._index=s._selectFirst?0:-1,s._results(),s._events())}).catch(function(){s._onLoading(),s._reset()}))},this._onLoading=function(t){if(s._root.parentNode.classList[t?"add":"remove"](s._isLoading),t){var e=s._onLoadingCb({element:s._root,currentValue:s._value});e&&(s._resultList.textContent="",s._resultList.insertAdjacentHTML("afterbegin",e),FT(s._root,{"aria-expanded":"true",addClass:s._prefix+"-expanded"}),BT(s._resultWrap,"add",s._isActive),s._dropdownParent&&s._startPositionTracking())}},this._error=function(){return BT(s._root,"remove",s._err)},this._events=function(){WT(s._root,"keydown",s._handleKeys),WT(s._root,"click",s._handleShowItems),WT(document,"click",s._handleDocClick),["mousemove","click"].forEach(function(t){WT(s._resultList,t,s._handleMouse)}),UT(s._root,"keydown",s._handleKeys),UT(s._root,"click",s._handleShowItems),s._inline||UT(document,"click",s._handleDocClick),["mousemove","click"].forEach(function(t){UT(s._resultList,t,s._handleMouse)})},this._results=function(t){FT(s._root,{"aria-expanded":"true",addClass:s._prefix+"-expanded"}),s._resultList.textContent="";var e=null!=t?t:s._onResults({currentValue:s._value,matches:s._matches,classGroup:s._classGroup});s._resultList.insertAdjacentHTML("afterbegin",e),BT(s._resultWrap,"add",s._isActive),s._dropdownParent&&s._startPositionTracking();var i,n=s._classGroup?":not(."+s._classGroup+")":"";s._itemsLi=document.querySelectorAll("#"+s._outputUl+" >
2 li"+n),(i=s._itemsLi).forEach(function(t,e){FT(t,{role:"option",tabindex:"-1","aria-selected":"false","aria-setsize":i.length,"aria-posinset":e+1})}),s._onOpened({type:"results",element:s._root,results:s._resultList}),s._selectFirstElement(),jT(s._resultList,s._resultWrap)},this._handleDocClick=function(t){var e=t.target;if(e instanceof Element){var i=null;(e.closest("ul")&&s._disable||e.closest("."+s._prevClosing))&&(i=!0),e.id===s._id||i||s._reset()}},this._selectFirstElement=function(){if(s._removeAria(s._resultList.querySelector("."+s._activeList)),s._selectFirst){var t=s._resultList.firstElementChild,e=s._classGroup&&s._matches.length>0&&s._selectFirst?t.nextElementSibling:t;s._onSelected({index:s._index,element:s._root,object:s._matches[s._index],currentValue:s._root.value}),FT(e,{id:s._selectedOption+"-0",addClass:s._activeList,"aria-selected":"true"}),zT(s._root,s._selectedOption+"-0")}},this._handleShowItems=function(){if(s._resultList.textContent.length>0&&!BT(s._resultWrap,"contains",s._isActive)){if(FT(s._root,{"aria-expanded":"true",addClass:s._prefix+"-expanded"}),BT(s._resultWrap,"add",s._isActive),s._dropdownParent&&s._startPositionTracking(),s._preventScrollUp||(jT(s._resultList,s._resultWrap),s._selectFirstElement()),s._onOpened({type:"showItems",element:s._root,results:s._resultList}),!s._cache)return;s._cacheAct("update",s._root)}else s._resultList.textContent.length>0&&BT(s._resultWrap,"contains",s._isActive)&&!s._preventScrollUp&&(s._selectFirstElement(),s._index=s._selectFirst?0:-1)},this._handleMouse=function(t){t.preventDefault();var e=t.target,i=t.type,n=e.closest("li"),r=null==n?void 0:n.hasAttribute("role"),o=s._activeList,a=s._resultList.querySelector("."+o);n&&r&&!e.closest("."+s._prevClosing)&&("click"===i&&s._getTextFromLi(n),"mousemove"!==i||BT(n,"contains",o)||(s._removeAria(a),s._setAria(n),s._index=s._indexLiSelected(n),s._toInput&&(s._root.value=DT(n)),s._onSelected({index:s._index,element:s._root,object:s._matches[s._index]}),s._root.value.length>0&&s._clearButton&&BT(s._clearBtn,"remove","hidden")))},this._getTextFromLi=function(t){t&&0!==s._matches.length?(s._clearButton&&BT(s._clearBtn,"remove","hidden"),s._root.value=DT(t),s._onSubmit({index:s._index,element:s._root,object:s._matches[s._index],results:s._resultList}),s._disable||(s._preventScrollUp||s._removeAria(t),s._reset()),s._cacheAct("remove")):!s._disable&&s._reset()},this._indexLiSelected=function(t){return Array.prototype.indexOf.call(s._itemsLi,t)},this._handleKeys=function(t){var e=t.keyCode,i=BT(s._resultWrap,"contains",s._isActive),n=s._matches.length+1;switch(s._selectedLi=s._resultList.querySelector("."+s._activeList),e){case HT.UP:case HT.DOWN:if(t.preventDefault(),n<=1&&s._selectFirst||!i)return;if(e===HT.UP?(s._index<0&&(s._index=n-1),s._index-=1):(s._index+=1,s._index>=n&&(s._index=0)),s._removeAria(s._selectedLi),s._index>=0&&s._index<n-1){var r=s._itemsLi[s._index];s._toInput&&i&&(s._root.value=DT(r),s._clearButton&&BT(s._clearBtn,"remove","hidden")),s._onSelected({index:s._index,element:s._root,object:s._matches[s._index]}),s._setAria(r)}else s._cacheAct(),zT(s._root),s._onSelected({index:null,element:s._root,object:null});break;case HT.ENTER:t.preventDefault(),s._getTextFromLi(s._selectedLi);break;case HT.TAB:case HT.ESC:t.stopPropagation(),s._inline||s._reset()}},this._setAria=function(t){var e=s._selectedOption+"-"+s._indexLiSelected(t);FT(t,{id:e,"aria-selected":"true",addClass:s._activeList}),zT(s._root,e),function(t,e,i,n){var s=n.previousSibling,r=s?s.offsetHeight:0;if("0"===t.getAttribute("aria-posinset")&&(n.scrollTop=t.offsetTop-function(t,e){var i=document.querySelectorAll("#"+t+" > li:not(."+e+")");return Array.from(i).reduce(function(t,e){return t+e.offsetHeight},0)}(e,i)),t.offsetTop-r<n.scrollTop)n.scrollTop=t.offsetTop-r;else{var o=t.offsetTop+t.offsetHeight-r;o>n.scrollTop+n.offsetHeight&&(n.scrollTop=o-n.offsetHeight)}}(t,s._outputUl,s._classGroup,s._resultList)},this._removeAria=function(t){t&&FT(t,{id:"",removeClass:s._activeList,"aria-selected":"false"})},this._clearbutton=function(){s._clearButton&&(FT(s._clearBtn,{type:"button",class:s._prefix+"-clear hidden",title:s._clearBtnAriLabel,"aria-label":s._clearBtnAriLabel}),s._root.insertAdjacentElement("afterend",s._clearBtn))},this.rerender=function(t){var e=null!=t&&t.trim()?t.trim():s._root.value;null!=t&&t.trim()&&(s._root.value=t.trim(),s._cacheAct("update",s._root));var i=e.replace(s._regex.expression,s._regex.replacement);s._searchItem(i.trim())},this.disable=function(t){void 0===t&&(t=!1),s._root.setAttribute("data-auto-disabled","true"),s._clearButton&&BT(s._clearBtn,"add","hidden"),t&&(s._root.value="",s._root.focus()),s._resultList.textContent="",BT(s._resultWrap,"remove",s._isActive),FT(s._root,{"aria-expanded":"false",removeClass:s._prefix+"-expanded","aria-activedescendant":""}),WT(s._root,"input",s._handleInput),WT(s._root,"keydown",s._handleKeys),WT(s._root,"click",s._handleShowItems),s._showValuesOnClick&&WT(s._root,"click",s._handleInput),s._inline||WT(document,"click",s._handleDocClick),["mousemove","click"].forEach(function(t){WT(s._resultList,t,s._handleMouse)}),s._onLoading(!1),s._error(),s._onClose(),setTimeout(function(){s._root.setAttribute("aria-autocomplete","none")},0)},this.enable=function(){s._root.removeAttribute("data-auto-disabled");var t=VT(s._outputUl,s._toInput);FT(s._root,t),UT(s._root,"input",s._handleInput),UT(s._root,"keydown",s._handleKeys),UT(s._root,"click",s._handleShowItems),s._showValuesOnClick&&UT(s._root,"click",s._handleInput),s._inline||UT(document,"click",s._handleDocClick),["mousemove","click"].forEach(function(t){UT(s._resultList,t,s._handleMouse)}),s._dropdownParent&&!s._resultWrap.isConnected&&s._dropdownParent.appendChild(s._resultWrap),s._clearButton&&s._root.value.length>0&&BT(s._clearBtn,"remove","hidden"),s._onOpened({type:"enable",element:s._root,results:s._resultList})},this.destroy=function(){s._dropdownParent&&s._stopPositionTracking(),s._dropdownParent&&s._resultWrap.isConnected&&s._resultWrap.remove(),s._clearButton&&BT(s._clearBtn,"add","hidden"),s._root.value="",s._root.focus(),s._resultList.textContent="",s._inline||s._reset(),s._inline&&s._onClose(),s._error(),s._onLoading(),WT(s._root,"input",s._handleInput),WT(s._root,"keydown",s._handleKeys),WT(s._root,"click",s._handleShowItems),s._showValuesOnClick&&WT(s._root,"click",s._handleInput),WT(document,"click",s._handleDocClick),["mousemove","click"].forEach(function(t){WT(s._resultList,t,s._handleMouse)}),s._onReset(s._root)},this.reset=function(){s._root.value="",s._root.focus(),s._resultList.textContent="",s._clearButton&&BT(s._clearBtn,"add","hidden"),s._reset(),s._error(),s._onReset(s._root)},this._id=t,this._root=document.getElementById(t),!this._root)throw new Error('Autocomplete: Element with id "'+t+'" not found');this._onSearch=(n=j,Boolean(n&&"function"==typeof n.then)?j:function(t){var e=t.currentValue,i=t.element;return Promise.resolve(j({currentValue:e,element:i}))}),this._onResults=B,this._onRender=$,this._onSubmit=q,this._onSelected=it,this._onOpened=W,this._onReset=H,this._noResults=J,this._onLoadingCb=tt,this._onClose=Y,this._delay=o,this._characters=d,this._clearButton=h,this._clearButtonOnInitial=c,this._selectFirst=p,this._toInput=m,this._showValuesOnClick=v,this._inline=w,this._classGroup=O,this._prevClosing=R,this._clearBtnAriLabel=D||"clear the search query",this._prefix=F?F+"-auto":"auto",this._disable=E,this._preventScrollUp=C,this._removeResultsWhenInputIsEmpty=L,this._dropdownParent="string"==typeof P?document.querySelector(P):P||null,this._dropdownAttrs=N,this._cache=x,this._timeout=null,this._outputUl=this._prefix+"-"+this._id+"-results",this._cacheData="data-cache-auto-"+this._id,this._isLoading=this._prefix+"-is-loading",this._isActive=this._prefix+"-is-active",this._activeList=this._prefix+"-selected",this._selectedOption=this._prefix+"-selected-option",this._err=this._prefix+"-error",this._resultWrap=qT("div"),this._resultList=qT("ul"),this._clearBtn=qT("button");var nt={expression:/[|\\{}()[\]^$+*?]/g,replacement:"\\$&"};this._regex={expression:T.expression||nt.expression,replacement:null!=(i=T.replacement)?i:nt.replacement},this._initial()};const $T=({index:t})=>{const e=document.querySelector(".auto-results-wrapper.auto-is-active"),i=e.querySelectorAll(".autocomplete-suggestion")[t];
2if(i){const t=i.offsetTop,n=i.offsetHeight,s=e.scrollTop,r=e.clientHeight;t<s?e.scrollTop=t:t+n>s+r&&(e.scrollTop=t+n-r)}};let XT;const YT=t=>t?t.replace(/[^\p{L}\p{N}×&.\[\]()',: %*_?-]/gu,""):"",ZT=()=>{const t=gb(),e="https://www.infoflora.ch/",i=0===t?e:e+"taxonid/"+t,n=document.getElementById("websiteInfoFloraLink");n&&(n.href=i)};document.addEventListener("DOMContentLoaded",()=>{const t=window.atlasMap=hA();oE.setVisible(!1),window.atlasMap=t,window.createOlMap=hA,window.createOlStyle=aA,window.createOlLayer=jw,window.createSimpleLayer=Tw,bb(),xb(),(t=>{const e=document.querySelectorAll('input[name="atlaslayer"][type="radio"]'),i=document.querySelectorAll('input[name="symbolization"][type="radio"]');e.length&&e.forEach(e=>{e.addEventListener("change",()=>{hb=void 0,t(),sE(),cC(),27==bb()?(sC&&(sC.style.display="none"),rC&&(rC.style.display="none"),i.forEach(t=>{t.disabled=!0;const e=t.closest(".radio");e&&e.classList.add("disabled")})):(hC(),i.forEach(t=>{t.disabled=!1;const e=t.closest(".radio");e&&e.classList.remove("disabled")}))})})})(()=>{uE(t)}),document.querySelectorAll('input[name="symbolization"][type="radio"]').forEach(t=>{t.addEventListener("change",()=>{lb=void 0,hC(),cE.getSource().dispatchEvent("change"),setTimeout(()=>
2{oE.getSource().dispatchEvent("change")},1)})}),aC(t),(t=>{const e=document.querySelectorAll('input[name="baselayer"][type="radio"]'),i=document.getElementById("export-pdf"),n=document.getElementById("export-img");if(!e.length)return;const s=document.querySelector('input[name="baselayer"]:checked');s&&dC(t,s.value),e.forEach(e=>{e.addEventListener("change",()=>{const e=document.querySelector('input[name="baselayer"]:checked')?.value;e&&(dC(t,e),"pkcolor"===e?(i&&(i.style.display="none"),n&&(n.style.display="none")):(i&&(i.style.display=""),n&&(n.style.display="")))})})})(t),(()=>{const t=document.querySelector('input[name="biogeo"][type="checkbox"]');t&&t.addEventListener("change",()=>{Dw.setVisible(t.checked)})})(),hC(),cC(),(t=>{t.addEventListener("singleclick",e=>{const i=Sa(e.coordinate,"EPSG:21781","EPSG:4326");((t,e,i)=>{const n=document.getElementById("expertise-modal-ws-original"),s=document.getElementById("expertise-modal"),r=document.getElementById("expertise-message");if(!s||!i)return;const o=i.forEachFeatureAtPixel(t,t=>t),a=i.forEachFeatureAtPixel(t,(t,e)=>e);if(!o)return;const h=a.get("name");if("highlight"!==h&&"atlas"!==h)return void YS();let l,c,u;LS=null,PS=null;const d=bb();if(12!=d&&27!=d||("highlight"===h?(c=o.get("id"),cE.getSource().getFeatures().forEach(t=>{t.get("gis_id")==c&&(l=t.get("id"))})):(l=o.get("id"),c=o.get("gis_id"))),11==d&&(l=o.get("id")),!l)return console.error("Unit ID not found for feature",o.get("id")),void YS();fetch((t=>`${Eu.obsApiUrl}/rest/v5/communities/0/public/atlases/${bb()}/names/${gb()}/units/${t}.json?with-legend=true`)(l),{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then(t=>t.json()).then(t=>{t.data&&(u=t.data.legend,LS=t.data.x,PS=t.data.y)}).finally(()=>{const t=((t,e,i,n)=>{if(12==t||27==t)return e??"";if(null==i||null==n)return"";const[s,r]=Sa([i,n],"EPSG:4326","EPSG:21781");return`${5*Math.floor(s/5e3)}/${5*Math.floor(r/5e3)}`})(d,c,LS,PS);if(HS&&(HS.textContent=t),KS&&(KS.textContent=t),27==d){const t=void 0!==u?GS[u]:window.legend_unavailable||"Legend unavailable";n&&($S&&($S.textContent=t),n.style.display="block"),s&&(s.style.display="none")}else if(n&&(n.style.display="none"),s&&(s.style.display="block"),r&&(r.style.display="none",RS&&void 0!==u&&u>0)){const t=10*Math.floor(u/100);260==t&&(r.innerHTML=window.specimen_available||"Specimen available",r.classList.remove("alert-success"),r.classList.add("alert-warning"),r.style.display="block"),350==t&&(r.innerHTML=window.valided_with_specimen||"Validated with a specimen",r.classList.remove("alert-warning"),r.classList.add("alert-success"),r.style.display="block")}BS&&(BS.classList.add("show"),BS.style.display="block",BS.setAttribute("aria-hidden","false"),document.body.appendChild(XS),document.addEventListener("click",ZS),document.addEventListener("keydown",JS))}),RS&&qS?(qS.style.display="block",LS??=e[0],PS??=e[1],jS||((async()=>{if(US){IS=new MS(US,{searchEnabled:!0,itemSelectText:"",shouldSort:!1,placeholderValue:"—",searchPlaceholderValue:window.search_placeholder||"Search...",removeItemButton:!0,noResultsText:window.no_results_found||"No results found"});try{const t=`${Eu.obsApiUrl}/rest/public/v5/vocabularies.json?field_name=v_doubt_status&lang=${window.LANG||"de"}`,e=await fetch(t),i=await e.json();if(i.data){i.data.forEach(t=>{FS[t.id]={code:t.code,option:t.option}});const t=[{value:"",label:"—",disabled:!0,placeholder:!0,selected:!0},...i.data.map(t=>({value:t.id.toString(),label:`${t.code}: ${t.option}`}))];IS.setChoices(t,"value","label",!0)}}catch(t){console.error("Failed to load doubt options:",t)}US.addEventListener("change",t=>{kS=t.target.value?parseInt(t.target.value):null})}if(WS){TS=new MS(WS,{searchEnabled:!0,itemSelectText:"",shouldSort:!1,placeholderValue:"—",searchPlaceholderValue:window.search_placeholder||"Search...",removeItemButton:!0,noResultsText:window.no_results_found||"No results found"});try{const t=`${Eu.obsApiUrl}/rest/public/v5/vocabularies.json?field_name=v_introduction_status&lang=${window.LANG||"de"}`,e=await fetch(t),i=await e.json();if(i.data){i.data.forEach(t=>{DS[t.id]={code:t.code,option:t.option}});const t=[{value:"",label:"—",disabled:!0,placeholder:!0,selected:!0},...i.data.map(t=>({value:t.id.toString(),label:`${t.code}: ${t.option}`}))];TS.setChoices(t,"value","label",!0)}}catch(t){console.error("Failed to load intro options:",t)}WS.addEventListener("change",t=>{NS=t.target.value?parseInt(t.target.value):null})}})(),jS=!0),fetch(QS(),{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Bearer "+eE.getAccessToken()}}).then(t=>t.json()).then(t=>{kS=t.data.doubt,NS=t.data.intro,OS=t.data.frequency,IS&&kS&&IS.setChoiceByValue(kS.toString()),TS&&NS&&TS.setChoiceByValue(NS.toString())}).catch(()=>{kS=null,NS=null,OS=null,IS&&IS.setChoiceByValue(""),TS&&TS.setChoiceByValue("")})):qS&&(qS.style.display="none"),VS&&(VS.querySelectorAll("tr:not(:first-child)").forEach(t=>t.remove()),fetch((t=>`${Eu.obsApiUrl}/rest/v5/communities/0/public/atlases/${bb()}/names/${gb()}/units/${t}/observers.json`)(l),{method:"GET",headers:{"Content-Type":"application/json"}}).then(t=>t.json()).then(t=>{if(!t.data)return;t.data.sort((t,e)=>t.year_max!==e.year_max?e.year_max-t.year_max:t.year_min-e.year_min);const e=t.data.map(t=>`<tr class="observers">\n                    <td>${t.observer.name}</td>\n                    <td class="text-center">${t.year_min}</td>\n                    <td class="text-center">${t.year_max}</td>\n                    <td class="text-center">${t.obs_nb}</td>\n                </tr>`);e.length&&VS.querySelector("tr:last-child").insertAdjacentHTML("afterend",e.join(""))}))})(e.pixel,i,t)});let e=null,i=!1,n=null;t.addEventListener("pointermove",e=>{if(e.dragging)return;if(n)return;n=setTimeout(()=>{n=null},16);const i=t.getEventPixel(e.originalEvent);s(i)});const s=n=>{let s=null,r=null,o=null,a=!1;if(t.forEachFeatureAtPixel(n,(t,e)=>{switch(e.get("name")){case"ws":s=t;break;case"atlas":r=t;break;case"expertise":o=t;break;case"highlight":a=!0}},{layerFilter:t=>{const e=t.get("name");return"ws"===e||"atlas"===e||"expertise"===e||"highlight"===e}}),!a||i){let n=null;const a=bb();if(11==a&&(r?(n=r,i=!1):o&&(n=o,i=!0)),12!=a&&27!=a||(s?(n=s,i=!1):o&&(n=o,i=!0)),n){if(t.getViewport().style.cursor="pointer",n!==e){const t=oA.getSource();t.clear(),t.addFeature(n),e=n}}else null!==e&&(t.getViewport().style.cursor="",oA.getSource().clear(),e=null)}}})(t),RT(t),"map_type"in window&&"embedded"===window.map_type&&"staticTaxonId"in window&&window.staticTaxonId?((t,e)=>{console.log("mode: embedded"),wb("embedded"),mb(e),t.getView().setResolution(650),uE(t)})(t,window.staticTaxonId):"map_type"in window&&"standalone"===window.map_type&&(t=>{eE.initOauth();const e=document.getElementById("expert-mode");e&&(e.style.display="none"),(t=>{XT=new KT("autocomplete-taxon",{delay:50,removeResultsWhenInputIsEmpty:!0,clearButton:!1,selectFirst:!0,insertToInput:!0,howManyCharacters:1,preventScrollUp:!0,cache:!0,onSelectedItem:$T,async onSearch({currentValue:t}){const e=YT(t),i=Eu.obsApiUrl+"/rest/public/v5/taxonomy/taxa.json?reference_id[in]=3,5&limit=15&lang="+encodeURIComponent(window.LANG||"de")+"&name="+encodeURIComponent(e),n=Eu.obsApiUrl+"/rest/public/v5/taxonomy/taxa.json?reference_id[in]=3,5&limit=15&lang="+encodeURIComponent(window.LANG||"de")+"&common_name="+encodeURIComponent(e),[s,r]=await Promise.all([fetch(i).then(t=>t.json()).then(t=>t.data.map(t=>({...t,dataset:"latin"}))).catch(()=>[]),fetch(n).then(t=>t.json()).then(t=>t.data.sort((t,e)=>t.common_name.localeCompare(e.common_name)).map(t=>({...t,dataset:"common"}
2))).catch(()=>[])]);return[...s,...r]},onResults({currentValue:t,matches:e,template:i}){if(0===e)return i;const n=YT(t),s=new RegExp(n,"gi");return e.map(t=>{const e="latin"===t.dataset,i=e?t.original_name.replace(s,t=>`<strong>${t}</strong>`):t.common_name.replace(s,t=>`<strong>${t}</strong>`),n=t.common_name&&"null"!==t.common_name,r=e?n?t.common_name:"":t.original_name;return`<li class="autocomplete-suggestion" data-id="${t.id}">\n                    <span>${i}</span>\n                    <small>${r}</small>\n                </li>`}).join("")},noResults:({element:t,template:e})=>e(`\n                <li class="autocomplete-suggestion no-results">\n                    ${window.no_results_found||"No results found"}: ${t.value}\n                </li>`),onSubmit:({object:e})=>{if(e.id){mb(e.id),_b(e.original_name||""),uE(t),sE();const i=new URL(window.location.href);i.searchParams.set("taxon_id",gb()),window.history.replaceState({},null,i.toString()),ZT(),eE.setCookie("if-atlas-taxon",e.id,12e3)}}})})(t),((t,e,i)=>{const n=document.getElementById("clear-taxon");n&&n.addEventListener("click",()=>{XT.destroy(),t.getSource().clear(!0),e.getSource().clear(!0),i.setVisible(!1),window.history.replaceState({},null,eE.redirectUri),mb(0),_b(""),ZT(),eE.deleteCookie("if-atlas-taxon"),yb(null);const n=document.querySelector("#lastModified span");n&&(n.textContent="")})})(cE,nE,oE),(()=>{const t=document.getElementById("login-staff");t&&t.addEventListener("click",()=>{eE.requestAuthorization()});const e=document.getElementById("logout-staff");e&&e.addEventListener("click",()=>{eE.logout()})})(),(t=>{const e=new URLSearchParams(window.location.search);let i=gb();if(e.has("taxon_id")&&e.get("taxon_id")>0)i=parseInt(e.get("taxon_id"));else if(i=parseInt(eE.getCookie("if-atlas-taxon"))||0,i>0){console.log("cookie "+eE.getCookie("if-atlas-taxon"));const t=new URL(window.location.href);t.searchParams.set("taxon_id",i),window.history.replaceState({},null,t.toString())}if(mb(i),e.has("center")){const i=e.get("center").split(",").map(Number);2!==i.length||i.some(isNaN)||t.getView().setCenter(i)}if(e.has("zoom")){const i=parseFloat(e.get("zoom"));isNaN(i)||t.getView().setZoom(i)}if(e.has("baselayer")){const t=e.get("baselayer"),i=document.querySelector(`input[type="radio"][name="baselayer"][value="${t}"]`);i&&(i.checked=!0,i.dispatchEvent(new Event("change")))}if(e.has("biogeo")){const t=document.querySelector('input[type="checkbox"][name="biogeo"]');t&&"1"===e.get("biogeo")&&(t.checked=!0,t.dispatchEvent(new Event("change")))}if(e.has("opacity")){const i=parseFloat(e.get("opacity"));isNaN(i)||(oC.noUiSlider.set(i),uC(t,i))}if(e.has("symbolization")){const t=e.get("symbolization"),i=document.querySelector(`input[type="radio"][name="symbolization"][value="${t}"]`);i&&(i.checked=!0,i.dispatchEvent(new Event("change")))}if(e.has("atlaslayer")){const t=e.get("atlaslayer"),i=document.querySelector(`input[type="radio"][name="atlaslayer"][value="${t}"]`);i&&(i.checked=!0,i.dispatchEvent(new Event("change")))}if(e.has("count")){const t=parseInt(e.get("count"));if(rC&&rC.noUiSlider&&!isNaN(t)){const e=Math.log10(t);rC.noUiSlider.set(e)}}if(e.has("year")){const t=parseInt(e.get("year"));isNaN(t)||sC.noUiSlider.set(t)}if(i>0){ZT();const e=`${Eu.obsApiUrl}/rest/public/v5/taxonomy/taxa/${i}.json`;fetch(e,{method:"GET",headers:{Accept:"application/json","Content-Type":"application/json"}}).then(t=>t.json()).then(e=>{const n=e.data.original_name;n&&(XT._root.value=n,_b(n),uE(t),sE(),eE.setCookie("if-atlas-taxon",i,12e3))}).catch(t=>{console.error("Error loading taxon:",t)})}})(t),(t=>{const e=document.getElementById("copy-link-to-clipboard");if(!e)return;const i=document.getElementById("clipboard-icon");e.addEventListener("click",async()=>{const n=new URL(window.location.origin+window.location.pathname),s=gb();n.searchParams.set("taxon_id",s),n.searchParams.set("center",t.getView().getCenter().join(",")),n.searchParams.set("zoom",t.getView().getZoom());const r=document.querySelector('input[name="baselayer"]:checked');r&&n.searchParams.set("baselayer",r.value);const o=document.querySelector('input[name="biogeo"]');o&&n.searchParams.set("biogeo",o.checked?"1":"0"),n.searchParams.set("opacity",oC.noUiSlider.get());const a=document.querySelector('input[name="symbolization"]:checked');a&&n.searchParams.set("symbolization",a.value);const h=document.querySelector('input[name="atlaslayer"]:checked');h&&n.searchParams.set("atlaslayer",h.value),"count"===xb()?n.searchParams.set("count",rC.noUiSlider.get()):n.searchParams.set("year",sC.noUiSlider.get());try{await navigator.clipboard.writeText(n.toString()),i&&(i.src="/resources/images/clipboard-check.svg",setTimeout(()=>{i.src="/resources/images/clipboard.svg"},1e3))}catch(t){console.error("Clipboard error:",t.message),i&&(i.src="/resources/images/clipboard-x.svg")}finally{e.blur()}})})(t)})(t)})})();

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.