1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[12],{5318:function(t){t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},8:function(t){function e(n){return"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"===typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0},8327:function(t,e,n){"use strict";n.d(e,{z:function(){return P}});var r=n(7294);function i(t,e){if(null!=t)if("function"!==typeof t)try{t.current=e}catch(n){throw new Error("Cannot assign value '"+e+"' to ref '"+t+"'")}else t(e)}function o(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return r.useMemo((()=>e.every((t=>null==t))?null:t=>{e.forEach((e=>{e&&i(e,t)}))}),e)}var s=n(63),a=n(2326),u=n(5284),c=n(3105),l=n(8554),h=n.n(l),f=n(4461),d=n(3808),p=n(8500);function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var[m,v]=(0,p.k)({strict:!1,name:"ButtonGroupContext"}),y=(0,s.G)(((t,e)=>{var{size:n,colorScheme:i,variant:o,className:s,spacing:a="0.5rem",isAttached:u,isDisabled:l}=t,h=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["size","colorScheme","variant","className","spacing","isAttached","isDisabled"]),d=(0,f.cx)("chakra-button__group",s),p=r.useMemo((()=>({size:n,colorScheme:i,variant:o,isDisabled:l})),[n,i,o,l]),v={display:"inline-flex"};return v=g({},v,u?{"> *:first-of-type:not(:last-of-type)":{borderEndRadius:0},"> *:not(:first-of-type):not(:last-of-type)":{borderRadius:0},"> *:not(:first-of-type):last-of-type":{borderStartRadius:0}}:{"& > *:not(style) ~ *:not(style)":{marginStart:a}}),r.createElement(m,{value:p},r.createElement(c.m$.div,g({ref:e,role:"group",__css:v,className:d},h)))}));d.Ts&&(y.displayName="ButtonGroup");var b=n(5754);function _(){return(_=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var w=t=>{var{label:e,placement:n,children:i=r.createElement(b.$,{color:"currentColor",width:"1em",height:"1em"}),className:o,__css:s}=t,a=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["label","placement","spacing","children","className","__css"]),u=(0,f.cx)("chakra-button__spinner",o),l="start"===n?"marginEnd":"marginStart",h=r.useMemo((()=>_({display:"flex",alignItems:"center",position:e?"relative":"absolute",[l]:e?"0.5rem":0,fontSize:"1em",lineHeight:"normal"},s)),[s,e,l]);return r.createElement(c.m$.div,_({className:u},a,{__css:h}),i)};function x(){return(x=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}d.Ts&&(w.displayName="ButtonSpinner");var E=t=>{var{children:e,className:n}=t,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["children","className"]),o=r.isValidElement(e)?r.cloneElement(e,{"aria-hidden":!0,focusable:!1}):e,s=(0,f.cx)("chakra-button__icon",n);return r.createElement(c.m$.span,x({display:"inline-flex",alignSelf:"center",flexShrink:0},i,{className:s}),o)};function T(){return(T=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}d.Ts&&(E.displayName="ButtonIcon");var P=(0,s.G)(((t,e)=>{var n=v(),i=(0,a.m)("Button",T({},n,t)),s=(0,u.Lr)(t),{isDisabled:l=(null==n?void 0:n.isDisabled),isLoading:d,isActive:p,isFullWidth:g,children:m,leftIcon:y,rightIcon:b,loadingText:_,iconSpacing:x="0.5rem",type:E,spinner:P,spinnerPlacement:S="start",className:M,as:O}=s,C=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}
1(s,["isDisabled","isLoading","isActive","isFullWidth","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as"]),L=r.useMemo((()=>{var t,e=h()({},null!=(t=null==i?void 0:i._focus)?t:{},{zIndex:1});return T({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none",width:g?"100%":"auto"},i,!!n&&{_focus:e})}),[i,n,g]),{ref:k,type:R}=function(t){var[e,n]=r.useState(!t);return{ref:r.useCallback((t=>{t&&n("BUTTON"===t.tagName)}),[]),type:e?"button":void 0}}(O),I={rightIcon:b,leftIcon:y,iconSpacing:x,children:m};return r.createElement(c.m$.button,T({disabled:l||d,ref:o(e,k),as:O,type:null!=E?E:R,"data-active":(0,f.PB)(p),"data-loading":(0,f.PB)(d),__css:L,className:(0,f.cx)("chakra-button",M)},C),d&&"start"===S&&r.createElement(w,{className:"chakra-button__spinner--start",label:_,placement:"start"},P),d?_||r.createElement(c.m$.span,{opacity:0},r.createElement(A,I)):r.createElement(A,I),d&&"end"===S&&r.createElement(w,{className:"chakra-button__spinner--end",label:_,placement:"end"},P))}));function A(t){var{leftIcon:e,rightIcon:n,children:i,iconSpacing:o}=t;return r.createElement(r.Fragment,null,e&&r.createElement(E,{marginEnd:o},e),i,n&&r.createElement(E,{marginStart:o},n))}d.Ts&&(P.displayName="Button")},2300:function(t,e,n){"use strict";var r=n(3105),i=n(3808),o=n(7294);function s(){return(s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var a=t=>{var{type:e="checkbox",_hover:n,_invalid:i,_disabled:a,_focus:u,_checked:c,_child:l={opacity:0}
1,_checkedAndChild:h={opacity:1},_checkedAndDisabled:f,_checkedAndFocus:d,_checkedAndHover:p,children:g}=t,m=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["type","_hover","_invalid","_disabled","_focus","_checked","_child","_checkedAndChild","_checkedAndDisabled","_checkedAndFocus","_checkedAndHover","children"]),v="input[type="+e+"]:checked:disabled + &",y="input[type="+e+"]:checked:hover:not(:disabled) + &",b="input[type="+e+"]:checked:focus + &",_="input[type="+e+"]:disabled + &",w="input[type="+e+"]:focus + &",x="input[type="+e+"]:hover:not(:disabled):not(:checked) + &",E="input[type="+e+"]:checked + &, input[type="+e+"][aria-checked=mixed] + &",T="input[type="+e+"][aria-invalid=true] + &",P="& > *";return o.createElement(r.m$.div,s({},m,{"aria-hidden":!0,__css:{display:"inline-flex",alignItems:"center",justifyContent:"center",transitionProperty:"common",transitionDuration:"fast",flexShrink:0,[w]:u,[x]:n,[_]:a,[T]:i,[v]:f,[b]:d,[y]:p,[P]:l,[E]:s({},c,{[P]:h})}}),g)};i.Ts&&(a.displayName="ControlBox")},6729:function(t,e,n){"use strict";n.d(e,{NJ:function(){return y},NI:function(){return b}});var r=n(4577),i=n(7243),o=n(63),s=n(2326),a=n(5284),u=n(9676),c=n(3105),l=n(4461),h=n(3808),f=n(8500),d=n(2947),p=n(7294);function g(){return(g=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function m(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}var[v,y]=(0,f.k)({strict:!1,name:"FormControlContext"});var b=(0,o.G)(((t,e)=>{var n=(0,s.j)("Form",t),o=function(t){var{id:e,isRequired:n,isInvalid:o,isDisabled:s,isReadOnly:a}=t,u=m(t,["id","isRequired","isInvalid","isDisabled","isReadOnly"]),c=(0,r.Me)(),h=e||"field-"+c,f=h+"-label",v=h+"-feedback",y=h+"-helptext",[b,_]=p.useState(!1),[w,x]=p.useState(!1),[E,T]=(0,i.k)(),P=p.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),g({id:y},t,{ref:(0,d.l)(e,(t=>{t&&x(!0)}))})}),[y]),A=p.useCallback((function(t,e){var n,r;return void 0===t&&(t={}),void 0===e&&(e=null),g({},t,{ref:e,"data-focus":(0,l.PB)(E),"data-disabled":(0,l.PB)(s),"data-invalid":(0,l.PB)(o),"data-readonly":(0,l.PB)(a),id:null!=(n=t.id)?n:f,htmlFor:null!=(r=t.htmlFor)?r:h})}),[h,s,E,o,a,f]),S=p.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),g({id:v},t,{ref:(0,d.l)(e,(t=>{t&&_(!0)})),"aria-live":"polite"})}),[v]),M=p.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),g({},t,u,{ref:e,role:"group"})}),[u]),O=p.useCallback((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),g({},t,{ref:e,role:"presentation","aria-hidden":!0,children:t.children||"*"})}),[]);return{isRequired:!!n,isInvalid:!!o,isReadOnly:!!a,isDisabled:!!s,isFocused:!!E,onFocus:T.on,onBlur:T.off,hasFeedbackText:b,setHasFeedbackText:_,hasHelpText:w,setHasHelpText:x,id:h,labelId:f,feedbackId:v,helpTextId:y,htmlProps:u,getHelpTextProps:P,getErrorMessageProps:S,getRootProps:M,getLabelProps:A,getRequiredIndicatorProps:O}}((0,a.Lr)(t)),{getRootProps:h}=o,f=m(o,["getRootProps","htmlProps"]),y=(0,l.cx)("chakra-form-control",t.className),b=p.useMemo((()=>f),[f]);return p.createElement(v,{value:b},p.createElement(u.Fo,{value:n},p.createElement(c.m$.div,g({},h({},e),{className:y,__css:n.container}))))}));h.Ts&&(b.displayName="FormControl");var _=(0,o.G)(((t,e)=>{var n=y(),r=(0,u.yK)(),i=(0,l.cx)("chakra-form__helper-text",t.className);return p.createElement(c.m$.div,g({},null==n?void 0:n.getHelpTextProps(t,e),{__css:r.helperText,className:i}))}));h.Ts&&(_.displayName="FormHelperText")},6618:function(t,e,n){"use strict";n.d(e,{l:function(){return d}});var r=n(63),i=n(2326),o=n(5284),s=n(3105),a=n(9676),u=n(4461),c=n(3808),l=n(7294),h=n(6729);function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var d=(0,r.G)(((t,e)=>{var n,r=(0,i.m)("FormLabel",t),a=(0,o.Lr)(t),{children:c,requiredIndicator:d=l.createElement(p,null)}=a,g=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(a,["className","children","requiredIndicator"]),m=(0,h.NJ)(),v=null!=(n=null==m?void 0:m.getLabelProps(g,e))?n:f({ref:e},g);return l.createElement(s.m$.label,f({},v,{className:(0,u.cx)("chakra-form__label",a.className),__css:f({display:"block",textAlign:"start"},r)}),c,null!=m&&m.isRequired?d:null)}));c.Ts&&(d.displayName="FormLabel");var p=(0,r.G)(((t,e)=>{var n=(0,h.NJ)(),r=(0,a.yK)();if(null==n||!n.isRequired)return null;var i=(0,u.cx)("chakra-form__required-indicator",t.className);return l.createElement(s.m$.span,f({},null==n?void 0:n.getRequiredIndicatorProps(t,e),{__css:r.requiredIndicator,className:i}))}));c.Ts&&(p.displayName="RequiredIndicator")},7243:function(t,e,n){"use strict";n.d(e,{k:function(){return i}});var r=n(7294);function i(t){void 0===t&&(t=!1);var[e,n]=(0,r.useState)(t);return[e,{on:(0,r.useCallback)((()=>{n(!0)}),[]),off:(0,r.useCallback)((()=>{n(!1)}),[]),toggle:(0,r.useCallback)((()=>{n((t=>!t))}),[])}]}},762:function(t,e,n){"use strict";n.d(e,{W:function(){return o}});var r=n(7294),i=n(6732);function o(t,e){void 0===e&&(e=[]);var n=r.useRef(t);return(0,i.G)((()=>{n.current=t})),r.useCallback((function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return null==n.current?void 0:n.current(...e)}),e)}},1034:function(t,e,n){"use strict";n.d(e,{p:function(){return s},T:function(){return a}});var r=n(658),i=n(7294),o=n(762);function s(t,e){var n=void 0!==t;return[n,n&&"undefined"!==typeof t?t:e]}function a(t){var{value:e,defaultValue:n,onChange:s,shouldUpdate:a=((t,e)=>t!==e)}=t,u=(0,o.W)(s),c=(0,o.W)(a),[l,h]=i.useState(n),f=void 0!==e,d=f?e:l,p=i.useCallback((t=>{var e=(0,r.Pu)(t,d);c(d,e)&&(f||h(e),u(e))}),[f,u,d,c]);
1return[d,p]}},4941:function(t,e,n){"use strict";n.d(e,{O:function(){return s}});var r=n(658),i=n(7294),o=n(762);function s(t,e,n,s){var a=(0,o.W)(e);return i.useEffect((()=>{var e,i=null!=(e=(0,r.Pu)(n))?e:document;return i.addEventListener(t,a,s),()=>{i.removeEventListener(t,a,s)}}),[t,n,s,a]),()=>{var e;(null!=(e=(0,r.Pu)(n))?e:document).removeEventListener(t,a,s)}}},3158:function(t,e,n){"use strict";n.d(e,{m:function(){return o}});var r=n(5027),i=n(4941);function o(t,e,n,o){return(0,i.O)((0,r.f7)(e),(0,r.JN)(n,"pointerdown"===e),t,o)}},6732:function(t,e,n){"use strict";n.d(e,{G:function(){return i}});var r=n(7294),i=n(4461).jU?r.useLayoutEffect:r.useEffect},7581:function(t,e,n){"use strict";n.d(e,{z:function(){return i}});var r=n(7294);function i(t,e){return void 0===e&&(e=[]),r.useEffect((()=>()=>t()),e)}},2653:function(t,e,n){"use strict";n.d(e,{r:function(){return i}});var r=n(7294),i=(t,e)=>{var n=r.useRef(!1);return r.useEffect((()=>{if(n.current)return t();n.current=!0}),e),n.current}},4096:function(t,e,n){"use strict";n.d(e,{k:function(){return u}});var r=n(63),i=n(3105),o=n(3808),s=n(7294);function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var u=(0,r.G)(((t,e)=>{var{direction:n,align:r,justify:o,wrap:u,basis:c,grow:l,shrink:h}=t,f=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["direction","align","justify","wrap","basis","grow","shrink"]),d={display:"flex",flexDirection:n,alignItems:r,justifyContent:o,flexWrap:u,flexBasis:c,flexGrow:l,flexShrink:h};return s.createElement(i.m$.div,a({ref:e,__css:d},f))}));o.Ts&&(u.displayName="Flex")},8981:function(t,e,n){"use strict";n.d(e,{J2:function(){return eu},QH:function(){return au},b:function(){return ou},us:function(){return su},yk:function(){return ru},xo:function(){return nu}});var r=n(63),i=n(3105),o=n(4461),s=n(3808),a=n(7294);function u(){return(u=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var c={path:a.createElement("g",{stroke:"currentColor",strokeWidth:"1.5"},a.createElement("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),a.createElement("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),a.createElement("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})),viewBox:"0 0 24 24"},l=(0,r.G)(((t,e)=>{var{as:n,viewBox:r,color:s="currentColor",focusable:l=!1,children:h,className:f,__css:d}=t,p=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["as","viewBox","color","focusable","children","className","__css"]),g={ref:e,focusable:l,className:(0,o.cx)("chakra-icon",f),__css:u({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:s},d)},m=null!=r?r:c.viewBox;if(n&&"string"!==typeof n)return a.createElement(i.m$.svg,u({as:n},g,p));var v=null!=h?h:c.path;return a.createElement(i.m$.svg,u({verticalAlign:"middle",viewBox:m},g,p),v)}));s.Ts&&(l.displayName="Icon");var h=n(2326),f=n(5284);function d(){return(d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var p=t=>a.createElement(l,d({focusable:"false","aria-hidden":!0},t),a.createElement("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,
111.823a.25.25,0,0,1,0,.354Z"})),g=(0,r.G)(((t,e)=>{var n=(0,h.m)("CloseButton",t),r=(0,f.Lr)(t),{children:o,isDisabled:s,__css:u}=r,c=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(r,["children","isDisabled","__css"]);return a.createElement(i.m$.button,d({type:"button","aria-label":"Close",ref:e,disabled:s,__css:d({},{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},n,u)},c),o||a.createElement(p,{width:"1em",height:"1em"}))}));s.Ts&&(g.displayName="CloseButton");var m=n(9676),v=n(658),y=n(8500),[b,_]=(0,y.k)({name:"PopoverContext",errorMessage:"usePopoverContext: `context` is undefined. Seems you forgot to wrap all popover components within `<Popover />`"}),w=function(t,e){return(w=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function x(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}w(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var E=function(){return(E=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function T(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}Object.create;function P(t,e){var n="function"===typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function A(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}Object.create;var S=function(t){return{isEnabled:function(e){return t.some((function(t){return!!e[t]}))}}},M={measureLayout:S(["layout","layoutId","drag","_layoutResetTransform"]),animation:S(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag"]),exit:S(["exit"]),drag:S(["drag","dragControls"]),focus:S(["whileFocus"]),hover:S(["whileHover","onHoverStart","onHoverEnd"]),tap:S(["whileTap","onTap","onTapStart","onTapCancel"]),pan:S(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),layoutAnimation:S(["layout","layoutId"])};var O=(0,a.createContext)({strict:!1}),C=Object.keys(M),L=C.length;var k=(0,a.createContext)({transformPagePoint:function(t){return t},isStatic:!1}),R=(0,a.createContext)({});var I=(0,a.createContext)(null);function j(t){var e=(0,a.useRef)(null);return null===e.current&&(e.current=t()),e.current}function D(){var t=(0,a.useContext)(I);if(null===t)return[!0,null];var e=t.isPresent,n=t.onExitComplete,r=t.register,i=U();(0,a.useEffect)((function(){return r(i)}),[]);return!e&&n?[!1,function(){return null===n||void 0===n?void 0:n(i)}]:[!0]}function N(t){return null===t||t.isPresent}var F=0,B=function(){return F++},U=function(){return j(B)},z=(0,a.createContext)(null),V="undefined"!==typeof window,Z=V?a.useLayoutEffect:a.useEffect;function G(t,e,n,r){var i=(0,a.useContext)(k),o=(0,a.useContext)(O),s=(0,a.useContext)(R).visualElement,u=(0,a.useContext)(I),c=function(t){var e=t.layoutId,n=(0,a.useContext)(z);return n&&void 0!==e?n+"-"+e:e}(n),l=(0,a.useRef)(void 0);r||(r=o.renderer),!l.current&&r&&(l.current=r(t,{visualState:e,parent:s,props:E(E({},n),{layoutId:c}),presenceId:null===u||void 0===u?void 0:u.id,blockInitialAnimation:!1===(null===u||void 0===u?void 0:u.initial)}));var h=l.current;return Z((function(){h&&(h.setProps(E(E(E({},i),n),{layoutId:c})),h.isPresent=N(u),h.isPresenceRoot=!s||s.presenceId!==(null===u||void 0===u?void 0:u.id),h.syncRender())})),(0,a.useEffect)((function(){var t;h&&(null===(t=h.animationState)||void 0===t||t.animateChanges())})),Z((function(){return function(){return null===h||void 0===h?void 0:h.notifyUnmount()}}),[]),h}function H(t){return"object"===typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function W(t){return Array.isArray(t)}function $(t){return"string"===typeof t||W(t)}function q(t,e,n,r,i){var o;return void 0===r&&(r={}),void 0===i&&(i={}),"string"===typeof e&&(e=null===(o=t.variants)||void 0===o?void 0:o[e]),"function"===typeof e?e(null!==n&&void 0!==n?n:t.custom,r,i
1):e}function X(t,e,n){var r=t.getProps();return q(r,e,null!==n&&void 0!==n?n:r.custom,function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.get()})),e}(t),function(t){var e={};return t.forEachValue((function(t,n){return e[n]=t.getVelocity()})),e}(t))}function Y(t){var e;return"function"===typeof(null===(e=t.animate)||void 0===e?void 0:e.start)||$(t.initial)||$(t.animate)||$(t.whileHover)||$(t.whileDrag)||$(t.whileTap)||$(t.whileFocus)||$(t.exit)}function K(t){return Boolean(Y(t)||t.variants)}function Q(t,e){var n=function(t,e){if(Y(t)){var n=t.initial,r=t.animate;return{initial:!1===n||$(n)?n:void 0,animate:$(r)?r:void 0}}return!1!==t.inherit?e:{}}(t,(0,a.useContext)(R)),r=n.initial,i=n.animate;return(0,a.useMemo)((function(){return{initial:r,animate:i}}),e?[J(r),J(i)]:[])}function J(t){return Array.isArray(t)?t.join(" "):t}function tt(t){var e=t.preloadedFeatures,n=t.createVisualElement,r=t.useRender,i=t.useVisualState,o=t.Component;return e&&function(t){for(var e in t){var n=t[e];null!==n&&(M[e].Component=n)}}(e),(0,a.forwardRef)((function(t,e){var s=(0,a.useContext)(k).isStatic,u=null,c=Q(t,s),l=i(t,s);return!s&&V&&(c.visualElement=G(o,l,t,n),u=function(t,e,n){var r=[];if((0,a.useContext)(O),!e)return null;for(var i=0;i<L;i++){var o=C[i],s=M[o],u=s.isEnabled,c=s.Component;u(t)&&c&&r.push(a.createElement(c,E({key:o},t,{visualElement:e})))}return r}(t,c.visualElement)),a.createElement(a.Fragment,null,a.createElement(R.Provider,{value:c},r(o,t,function(t,e,n){return(0,a.useCallback)((function(r){var i;r&&(null===(i=t.mount)||void 0===i||i.call(t,r)),e&&(r?e.mount(r):e.unmount()),n&&("function"===typeof n?n(r):H(n)&&(n.current=r))}),[e])}(l,c.visualElement,e),l,s)),u)}))}function et(t){function e(e,n){return void 0===n&&(n={}
1),tt(t(e,n))}var n=new Map;return new Proxy(e,{get:function(t,r){return n.has(r)||n.set(r,e(r)),n.get(r)}})}var nt=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function rt(t){return"string"===typeof t&&!t.includes("-")&&!!(nt.indexOf(t)>-1||/[A-Z]/.test(t))}var it={};var ot=["","X","Y","Z"],st=["transformPerspective","x","y","z"];function at(t,e){return st.indexOf(t)-st.indexOf(e)}["translate","scale","rotate","skew"].forEach((function(t){return ot.forEach((function(e){return st.push(t+e)}))}));var ut=new Set(st);function ct(t){return ut.has(t)}var lt=new Set(["originX","originY","originZ"]);function ht(t){return lt.has(t)}function ft(t,e){var n=e.layout,r=e.layoutId;return ct(t)||ht(t)||(n||void 0!==r)&&(!!it[t]||"opacity"===t)}var dt=function(t){return null!==t&&"object"===typeof t&&t.getVelocity},pt={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function gt(t){return t.startsWith("--")}var mt=function(t,e){return e&&"number"===typeof t?e.transform(t):t},vt=function(t,e){return function(n){return Math.max(Math.min(n,e),t)}},yt=function(t){return t%1?Number(t.toFixed(5)):t},bt=/(-)?([\d]*\.?[\d])+/g,_t=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,wt=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function xt(t){return"string"===typeof t}var Et=function(t){return{test:function(e){return xt(e)&&e.endsWith(t)&&1===e.split(" ").length},parse:parseFloat,transform:function(e){return""+e+t}}},Tt=Et("deg"),Pt=Et("%"),At=Et("px"),St=Et("vh"),Mt=Et("vw"),Ot=E(E({},Pt),{parse:function(t){return Pt.parse(t)/100},transform:function(t){return Pt.transform(100*t)}}),Ct={test:function(t){return"number"===typeof t},parse:parseFloat,transform:function(t){return t}},Lt=E(E({},Ct),{transform:vt(0,1)}),kt=E(E({},Ct),{default:1}),Rt=E(E({},Ct),{transform:Math.round}),It={borderWidth:At,borderTopWidth:At,borderRightWidth:At,borderBottomWidth:At,borderLeftWidth:At,borderRadius:At,radius:At,borderTopLeftRadius:At,borderTopRightRadius:At,borderBottomRightRadius:At,borderBottomLeftRadius:At,width:At,maxWidth:At,height:At,maxHeight:At,size:At,top:At,right:At,bottom:At,left:At,padding:At,paddingTop:At,paddingRight:At,paddingBottom:At,paddingLeft:At,margin:At,marginTop:At,marginRight:At,marginBottom:At,marginLeft:At,rotate:Tt,rotateX:Tt,rotateY:Tt,rotateZ:Tt,scale:kt,scaleX:kt,scaleY:kt,scaleZ:kt,skew:Tt,skewX:Tt,skewY:Tt,distance:At,translateX:At,translateY:At,translateZ:At,x:At,y:At,z:At,perspective:At,transformPerspective:At,opacity:Lt,originX:Ot,originY:Ot,originZ:At,zIndex:Rt,fillOpacity:Lt,strokeOpacity:Lt,numOctaves:Rt};function jt(t,e,n,r,i,o,s,a){var u,c=t.style,l=t.vars,h=t.transform,f=t.transformKeys,d=t.transformOrigin;f.length=0;var p=!1,g=!1,m=!0;for(var v in e){var y=e[v];if(gt(v))l[v]=y;else{var b=It[v],_=mt(y,b);if(ct(v)){if(p=!0,h[v]=_,f.push(v),!m)continue;y!==(null!==(u=b.default)&&void 0!==u?u:0)&&(m=!1)}else if(ht(v))d[v]=_,g=!0;else if((null===n||void 0===n?void 0:n.isHydrated)&&(null===r||void 0===r?void 0:r.isHydrated)&&it[v]){var w=it[v].process(y,r,n),x=it[v].applyTo;if(x)for(var E=x.length,T=0;T<E;T++)c[x[T]]=w;else c[v]=w}else c[v]=_}}r&&n&&s&&a?(c.transform=s(r.deltaFinal,r.treeScale,p?h:void 0),o&&(c.transform=o(h,c.transform)),c.transformOrigin=a(r)):(p&&(c.transform=function(t,e,n,r){var i=t.transform,o=t.transformKeys,s=e.enableHardwareAcceleration,a=void 0===s||s,u=e.allowTransformNone,c=void 0===u||u,l="";o.sort(at);for(var h=!1,f=o.length,d=0;d<f;d++){var p=o[d];l+=(pt[p]||p)+"("+i[p]+") ","z"===p&&(h=!0)}return!h&&a?l+="translateZ(0)":l=l.trim(),r?l=r(i,n?"":l):c&&n&&(l="none"),l}(t,i,m,o)),g&&(c.transformOrigin=function(t){var e=t.originX,n=void 0===e?"50%":e,r=t.originY,i=void 0===r?"50%":r,o=t.originZ;return n+" "+i+" "+(void 0===o?0:o)}(d)))}var Dt=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function Nt(t,e,n){for(var r in e)dt(e[r])||ft(r,n)||(t[r]=e[r])}function Ft(t,e,n){var r={};return Nt(r,t.style||{},t),Object.assign(r,function(t,e,n){var r=t.transformTemplate;return(0,a.useMemo)((function(){var t={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};jt(t,e,void 0,void 0,{enableHardwareAcceleration:!n},r);var i=t.style;return E(E({},t.vars),i)}),[e])}(t,e,n)),t.transformValues&&(r=t.transformValues(r)),r}function Bt(t,e,n){var r={},i=Ft(t,e,n);return Boolean(t.drag)&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),r.style=i,r}var Ut=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","_layoutRe
1setTransform","onLayoutAnimationComplete","onViewportBoxUpdate","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover"]);function zt(t){return Ut.has(t)}var Vt=function(t){return!zt(t)};try{var Zt=n(6600).Z;Vt=function(t){return t.startsWith("on")?!zt(t):Zt(t)}}catch(uu){}function Gt(t,e,n){return"string"===typeof t?t:At.transform(e+n*t)}var Ht=function(t,e){return At.transform(t*e)},Wt={offset:"stroke-dashoffset",array:"stroke-dasharray"},$t={offset:"strokeDashoffset",array:"strokeDasharray"};function qt(t,e,n,r,i,o,s,a){var u=e.attrX,c=e.attrY,l=e.originX,h=e.originY,f=e.pathLength,d=e.pathSpacing,p=void 0===d?1:d,g=e.pathOffset,m=void 0===g?0:g;jt(t,T(e,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,r,i,o,s,a),t.attrs=t.style,t.style={};var v=t.attrs,y=t.style,b=t.dimensions,_=t.totalPathLength;v.transform&&(b&&(y.transform=v.transform),delete v.transform),b&&(void 0!==l||void 0!==h||y.transform)&&(y.transformOrigin=function(t,e,n){return Gt(e,t.x,t.width)+" "+Gt(n,t.y,t.height)}(b,void 0!==l?l:.5,void 0!==h?h:.5)),void 0!==u&&(v.x=u),void 0!==c&&(v.y=c),void 0!==_&&void 0!==f&&function(t,e,n,r,i,o){void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=!0);var s=o?Wt:$t;t[s.offset]=Ht(-i,e);var a=Ht(n,e),u=Ht(r,e);t[s.array]=a+" "+u}(v,_,f,p,m,!1)}var Xt=function(){return E(E({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Yt(t,e){var n=(0,a.useMemo)((function(){var n=Xt();return qt(n,e,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),E(E({},n.attrs),{style:E({},n.style)})}),[e]);if(t.style){var r={};Nt(r,t.style,t),n.style=E(E({},r),n.style)}return n}function Kt(t){void 0===t&&(t=!1);return function(e,n,r,i,o){var s=i.latestValues,u=(rt(e)?Yt:Bt)(n,s,o),c=function(t,e,n){var r={};for(var i in t)(Vt(i)||!0===n&&zt(i)||!e&&!zt(i))&&(r[i]=t[i]);return r}(n,"string"===typeof e,t),l=E(E(E({},c),u),{ref:r});return(0,a.createElement)(e,l)}}var Qt=/([a-z])([A-Z])/g,Jt=function(t){return t.replace(Qt,"$1-$2").toLowerCase()};function te(t,e){var n=e.style,r=e.vars;for(var i in Object.assign(t.style,n),r)t.style.setProperty(i,r[i])}var ee=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform"]);function ne(t,e){for(var n in te(t,e),e.attrs)t.setAttribute(ee.has(n)?n:Jt(n),e.attrs[n])}function re(t){var e=t.style,n={};for(var r in e)(dt(e[r])||ft(r,t))&&(n[r]=e[r]);return n}function ie(t){var e=re(t);for(var n in t){if(dt(t[n]))e["x"===n||"y"===n?"attr"+n.toUpperCase():n]=t[n]}return e}function oe(t){return"object"===typeof t&&"function"===typeof t.start}var se=function(t){return Array.isArray(t)};function ae(t){var e,n=dt(t)?t.get():t;return e=n,Boolean(e&&"object"===typeof e&&e.mix&&e.toValue)?n.toValue():n}function ue(t,e,n,r){var i=t.scrapeMotionValuesFromProps,o=t.createRenderState,s=t.onMount,a={latestValues:le(e,n,r,i),renderState:o()};return s&&(a.mount=function(t){return s(e,t,a)}),a}var ce=function(t){return function(e,n){var r=(0,a.useContext)(R),i=(0,a.useContext)(I);return n?ue(t,e,r,i):j((function(){return ue(t,e,r,i)}))}};function le(t,e,n,r){var i={},o=!1===(null===n||void 0===n?void 0:n.initial),s=r(t);for(var a in s)i[a]=ae(s[a]);var u=t.initial,c=t.animate,l=Y(t),h=K(t);e&&h&&!l&&!1!==t.inherit&&(null!==u&&void 0!==u||(u=e.initial),null!==c&&void 0!==c||(c=e.animate));var f=o||!1===u?c:u;f&&"boolean"!==typeof f&&!oe(f)&&(Array.isArray(f)?f:[f]).forEac
vendor: 16,544 bytes, line 1
1h((function(e){var n=q(t,e);if(n){var r=n.transitionEnd;n.transition;var o=T(n,["transitionEnd","transition"]);for(var s in o)i[s]=o[s];for(var s in r)i[s]=r[s]}}));return i}var he={useVisualState:ce({scrapeMotionValuesFromProps:ie,createRenderState:Xt,onMount:function(t,e,n){var r=n.renderState,i=n.latestValues;try{r.dimensions="function"===typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(o){r.dimensions={x:0,y:0,width:0,height:0}}"path"===e.tagName&&(r.totalPathLength=e.getTotalLength()),qt(r,i,void 0,void 0,{enableHardwareAcceleration:!1},t.transformTemplate),ne(e,r)}})};var fe,de={useVisualState:ce({scrapeMotionValuesFromProps:re,createRenderState:Dt})};function pe(t,e,n,r){return t.addEventListener(e,n,r),function(){return t.removeEventListener(e,n,r)}}function ge(t,e,n,r){(0,a.useEffect)((function(){var i=t.current;if(n&&i)return pe(i,e,n,r)}),[t,e,n,r])}function me(t){return"undefined"!==typeof PointerEvent&&t instanceof PointerEvent?!("mouse"!==t.pointerType):t instanceof MouseEvent}function ve(t){return!!t.touches}!function(t){t.Animate="animate",t.Hover="whileHover",t.Tap="whileTap",t.Drag="whileDrag",t.Focus="whileFocus",t.Exit="exit"}(fe||(fe={}));var ye={pageX:0,pageY:0};function be(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||ye;return{x:n[e+"X"],y:n[e+"Y"]}}function _e(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function we(t,e){return void 0===e&&(e="page"),{point:ve(t)?be(t,e):_e(t,e)}}var xe=function(t,e){void 0===e&&(e=!1);var n,r=function(e){return t(e,we(e))};return e?(n=r,function(t){var e=t instanceof MouseEvent;(!e||e&&0===t.button)&&n(t)}):r},Ee={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},Te={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function Pe(t){return V&&null===window.onpointerdown?t:V&&null===window.ontouchstart?Te[t]:V&&null===window.onmousedown?Ee[t]:t}function Ae(t,e,n,r){return pe(t,Pe(e),xe(n,"pointerdown"===e),r)}function Se(t,e,n,r){return ge(t,Pe(e),n&&xe(n,"pointerdown"===e),r)}function Me(t){var e=null;return function(){return null===e&&(e=t,function(){e=null})}}var Oe=Me("dragHorizontal"),Ce=Me("dragVertical");function Le(t){var e=!1;if("y"===t)e=Ce();else if("x"===t)e=Oe();else{var n=Oe(),r=Ce();n&&r?e=function(){n(),r()}:(n&&n(),r&&r())}return e}function ke(){var t=Le(!0);return!t||(t(),!1)}function Re(t,e,n){return function(r,i){var o;me(r)&&!ke()&&(null===n||void 0===n||n(r,i),null===(o=t.animationState)||void 0===o||o.setActive(fe.Hover,e))}}var Ie=function(t,e){return!!e&&(t===e||Ie(t,e.parentElement))};function je(t){return(0,a.useEffect)((function(){return function(){return t()}}),[])}var De=function(t,e){return function(n){return e(t(n))}},Ne=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return t.reduce(De)};var Fe=function(t){return function(e){return t(e),null}},Be={tap:Fe((function(t){var e=t.onTap,n=t.onTapStart,r=t.onTapCancel,i=t.whileTap,o=t.visualElement,s=e||n||r||i,u=(0,a.useRef)(!1),c=(0,a.useRef)(null);function l(){var t;null===(t=c.current)||void 0===t||t.call(c),c.current=null}function h(){var t;return l(),u.current=!1,null===(t=o.animationState)||void 0===t||t.setActive(fe.Tap,!1),!ke()}function f(t,n){h()&&(Ie(o.getInstance(),t.target)?null===e||void 0===e||e(t,n):null===r||void 0===r||r(t,n))}function d(t,e){h()&&(null===r||void 0===r||r(t,e))}Se(o,"pointerdown",s?function(t,e){var r;l(),u.current||(u.current=!0,c.current=Ne(Ae(window,"pointerup",f),Ae(window,"pointercancel",d)),null===n||void 0===n||n(t,e),null===(r=o.animationState)||void 0===r||r.setActive(fe.Tap,!0))}:void 0),je(l)})),focus:Fe((function(t){var e=t.whileFocus,n=t.visualElement;ge(n,"focus",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(fe.Focus,!0)}:void 0),ge(n,"blur",e?function(){var t;null===(t=n.animationState)||void 0===t||t.setActive(fe.Focus,!1)}:void 0)})),hover:Fe((function(t){var e=t.onHoverStart,n=t.onHoverEnd,r=t.whileHover,i=t.visualElement;Se(i,"pointerenter",e||r?Re(i,!0,e):void 0),Se(i,"pointerleave",n||r?Re(i,!1,n):void 0)}))};function Ue(t,e){if(!Array.isArray(e))return!1;var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}var ze=function(t,e,n){return Math.min(Math.max(n,t),e)},Ve=.001;function Ze(t){var e,n,r=t.duration,i=void 0===r?800:r,o=t.bounce,s=void 0===o?.25:o,a=t.velocity,u=void 0===a?0:a,c=t.mass,l=void 0===c?1:c,h=1-s;h=ze(.05,1,h),i=ze(.01,10,i/1e3),h<1?(e=function(t){var e=t*h,n=e*i,r=e-u,o=Ge(t,h),s=Math.exp(-n);return Ve-r/o*s},n=function(t){var n=t*h*i,r=n*u+u,o=Math.pow(h,2)*Math.pow(t,2)*i,s=Math.exp(-n),a=Ge(Math.pow(t,2),h);return(-e(t)+Ve>0?-1:1)*((r-o)*s)/a}):(e=function(t){return Math.exp(-t*i)*((t-u)*i+1)-.001},n=function(t){return Math.exp(-t*i)*(i*i*(u-t))});var f=function(t,e,n){for(var r=n,i=1;i<12;i++)r-=t(r)/e(r);return r}(e,n,5/i);if(i*=1e3,isNaN(f))return{stiffness:100,damping:10,duration:i};var d=Math.pow(f,2)*l;return{stiffness:d,damping:2*h*Math.sqrt(l*d),duration:i}}function Ge(t,e){return t*Math.sqrt(1-e*e)}var He=["duration","bounce"],We=["stiffness","damping","mass"];function $e(t,e){return e.some((function(e){return void 0!==t[e]}))}function qe(t){var e=t.from,n=void 0===e?0:e,r=t.to,i=void 0===r?1:r,o=t.restSpeed,s=void 0===o?2:o,a=t.restDelta,u=T(t,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},l=function(t){var e=E({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},t);if(!$e(t,We)&&$e(t,He)){var n=Ze(t);(e=E(E(E({},e),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return e}(u),h=l.stiffness,f=l.damping,d=l.mass,p=l.velocity,g=l.duration,m=l.isResolvedFromDuration,v=Xe,y=Xe;function b(){var t=p?-p/1e3:0,e=i-n,r=f/(2*Math.sqrt(h*d)),o=Math.sqrt(h/d)/1e3;if(null!==a&&void 0!==a||(a=Math.abs(i-n)<=1?.01:.4),r<1){var s=Ge(o,r);v=function(n){var a=Math.exp(-r*o*n);return i-a*((t+r*o*e)/s*Math.sin(s*n)+e*Math.cos(s*n))},y=function(n){var i=Math.exp(-r*o*n);return r*o*i*(Math.sin(s*n)*(t+r*o*e)/s+e*Math.cos(s*n))-i*(Math.cos(s*n)*(t+r*o*e)-s*e*Math.sin(s*n))}}else if(1===r)v=function(n){return i-Math.exp(-o*n)*(e+(t+o*e)*n)};else{var u=o*Math.sqrt(r*r-1);v=function(n){var s=Math.exp(-r*o*n),a=Math.min(u*n,300);return i-s*((t+r*o*e)*Math.sinh(a)+u*e*Math.cosh(a))/u}}}return b(),{next:function(t){var e=v(t);if(m)c.done=t>=g;else{var n=1e3*y(t),r=Math.abs(n)<=s,o=Math.abs(i-e)<=a;c.done=r&&o}return c.value=c.done?i:e,c},flipTarget:function(){var t;p=-p,n=(t=[i,n])[0],i=t[1],b()}}}qe.needsInterpolation=function(t,e){return"string"===typeof t||"string"===typeof e};var Xe=function(t){return 0},Ye=function(t,e,n){var r=e-t;return 0===r?1:(n-t)/r},Ke=function(t,e,n){return-n*t+n*e+t},Qe=function(t,e){return function(n){return Boolean(xt(n)&&wt.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e))}},Je=function(t,e,n){return function(r){var i;if(!xt(r))return r;var o=r.match(bt),s=o[0],a=o[1],u=o[2],c=o[3];return(i={})[t]=parseFloat(s),i[e]=parseFloat(a),i[n]=parseFloat(u),i.alpha=void 0!==c?parseFloat(c):1,i}},tn=vt(0,255),en=E(E({},Ct),{transform:function(t){return Math.round(tn(t))}}),nn={test:Qe("rgb","red"),parse:Je("red","green","blue"),transform:function(t){var e=t.red,n=t.green,r=t.blue,i=t.alpha,o=void 0===i?1:i;return"rgba("+en.transform(e)+", "+en.transform(n)+", "+en.transform(r)+", "+yt(Lt.transform(o))+")"}};var rn={test:Qe("#"),parse:function(t){var e="",n="",r="",i="";return t.length>5?(e=t.substr(1,2),n=t.substr(3,2),r=t.substr(5,2),i=t.substr(7,2)):(e=t.substr(1,1),n=t.substr(2,1),r=t.substr(3,1),i=t.substr(4,1),e+=e,n+=n,r+=r,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:nn.transform},on={test:Qe("hsl","hue"),parse:Je("hue","saturation","lightness"),transform:function(t){var e=t.hue,n=t.saturation,r=t.lightness,i=t.alpha,o=void 0===i?1:i;return"hsla("+Math.round(e)+", "+Pt.transform(yt(n))+", "+Pt.transform(yt(r))+", "+yt(Lt.transform(o))+")"}},sn=function(t,e,n){var r=t*t,i=e*e;return Math.sqrt(Math.max(0,n*(i-r)+r))},an=[rn,nn,on],un=function(t){return an.find((function(e){return e.test(t)}))},cn=function(t){return"'"+t+"' is not an animatable color. Use the equivalent color code instead."},ln=function(t,e){var n=un(t),r=un(e);cn(t),cn(e),n.transform,r.transform;var i=n.parse(t),o=r.parse(e),s=E({},i),a=n===on?Ke:sn;return function(t){for(var e in s)"alpha"!==e&&(s[e]=a(i[e],o[e],t));return s.alpha=Ke(i.alpha,o.alpha,t),n.transform(s)}},hn={test:function(t){return nn.test(t)||rn.test(t)||on.test(t)},parse:function(t){return nn.test(t)?nn.parse(t):on.test(t)?on.parse(t):rn.parse(t)},transform:function(t){return xt(t)?t:t.hasOwnProperty("red")?nn.transform(t):on.transform(t)}},fn="${c}",dn="${n}";function pn(t){var e=[],n=0,r=t.match(_t);r&&(n=r.length,t=t.replace(_t,fn),e.push.apply(e,r.map(hn.parse)));var i=t.match(bt);return i&&(t=t.replace(bt,dn),e.push.apply(e,i.map(Ct.parse))),{values:e,numColors:n,tokenised:t}}function gn(t){return pn(t).values}function mn(t){var e=pn(t),n=e.values,r=e.numColors,i=e.tokenised,o=n.length;return function(t){for(var e=i,n=0;n<o;n++)e=e.replace(n<r?fn:dn,n<r?hn.transform(t[n]):yt(t[n]));return e}}var vn=function(t){return"number"===typeof t?0:t};var yn={test:function(t){var e,n,r,i;return isNaN(t)&&xt(t)&&(null!==(n=null===(e=t.match(bt))||void 0===e?void 0:e.length)&&void 0!==n?n:0)+(null!==(i=null===(r=t.match(_t))||void 0===r?void 0:r.length)&&void 0!==i?i:0)>0},parse:gn,createTransformer:mn,getAnimatableNone:function(t){var e=gn(t);return mn(t)(e.map(vn))}},bn=function(t){return"number"===typeof t};function _n(t,e){return bn(t)?function(n){return Ke(t,e,n)}:hn.test(t)?ln(t,e):Tn(t,e)}var wn=function(t,e){var n=A([],t),r=n.length,i=t.map((function(t,n){return _n(t,e[n])}));return function(t){for(var e=0;e<r;e++)n[e]=i[e](t);return n}},xn=function(t,e){var n=E(E({},t),e),r={};for(var i in n)void 0!==t[i]&&void 0!==e[i]&&(r[i]=_n(t[i],e[i]));return function(t){for(var e in r)n[e]=r[e](t);return n}};function En(t){for(var e=yn.parse(t),n=e.length,r=0,i=0,o=0,s=0;s<n;s++)r||"number"===typeof e[s]?r++:void 0!==e[s].hue?o++:i++;return{parsed:e,numNumbers:r,numRGB:i,numHSL:o}}var Tn=function(t,e){var n=yn.createTransformer(e),r=En(t),i=En(e);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&(r.numNumbers,i.numNumbers),Ne(wn(r.parsed,i.parsed),n)},Pn=function(t,e){return function(n){return Ke(t,e,n)}};function An(t,e,n){for(var r,i=[],o=n||("number"===typeof(r=t[0])?Pn:"string"===typeof r?hn.test(r)?ln:Tn:Array.isArray(r)?wn:"object"===typeof r?xn:void 0),s=t.length-1,a=0;a<s;a++){var u=o(t[a],t[a+1]);if(e){var c=Array.isArray(e)?e[a]:e;u=Ne(c,u)}i.push(u)}return i}function Sn(t,e,n){var r=void 0===n?{}:n,i=r.clamp,o=void 0===i||i,s=r.ease,a=r.mixer,u=t.length;e.length,!s||!Array.isArray(s)||s.length,t[0]>t[u-1]&&(t=[].concat(t),e=[].concat(e),t.reverse(),e.reverse());var c=An(e,s,a),l=2===u?function(t,e){var n=t[0],r=t[1],i=e[0];return function(t){return i(Ye(n,r,t))}}(t,c):function(t,e){var n=t.length,r=n-1;return function(i){var o=0,s=!1;if(i<=t[0]?s=!0:i>=t[r]&&(o=r-1,s=!0),!s){for(var a=1;a<n&&!(t[a]>i||a===r);a++);o=a-1}var u=Ye(t[o],t[o+1],i);return e[o](u)}}(t,c);return o?function(e){return l(ze(t[0],t[u-1],e))}:l}var Mn,On=function(t){return function(e){return 1-t(1-e)}},Cn=function(t){return function(e){return e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2}},Ln=function(t){return function(e){return e*e*((t+1)*e-t)}},kn=function(t){return t},Rn=(Mn=2,function(t){return Math.pow(t,Mn)}),In=On(Rn),jn=Cn(Rn),Dn=function(t){return 1-Math.sin(Math.acos(t))},Nn=On(Dn),Fn=Cn(Nn),Bn=Ln(1.525),Un=On(Bn),zn=Cn(Bn),Vn=function(t){var e=Ln(t);return function(t){return(t*=2)<1?.5*e(t):.5*(2-Math.pow(2,-10*(t-1)))}}(1.525),Zn=function(t){if(1===t||0===t)return t;var e=t*t;return t<.36363636363636365?7.5625*e:t<.7272727272727273?9.075*e-9.9*t+3.4:t<.9?12.066481994459833*e-19.63545706371191*t+8.898060941828255:10.8*t*t-20.52*t+10.72},Gn=On(Zn);function Hn(t,e){return t.map((function(){return e||jn})).splice(0,t.length-1)}function Wn(t){var e=t.from,n=void 0===e?0:e,r=t.to,i=void 0===r?1:r,o=t.ease,s=t.offset,a=t.duration,u=void 0===a?300:a,c={done:!1,value:n},l=Array.isArray(i)?i:[n,i],h=function(t,e){return t.map((function(t){return t*e}))}(s&&s.length===l.length?s:function(t){var e=t.length;return t.map((function(t,n){return 0!==n?n/(e-1):0}))}(l),u);function f(){return Sn(h,l,{ease:Array.isArray(o)?o:Hn(l,o)})}var d=f();return{next:function(t){return c.value=d(t),c.done=t>=u,c},flipTarget:function(){l.reverse(),d=f()}}}var $n={keyframes:Wn,spring:qe,decay:function(t){var e=t.velocity,n=void 0===e?0:e,r=t.from,i=void 0===r?0:r,o=t.power,s=void 0===o?.8:o,a=t.timeConstant,u=void 0===a?350:a,c=t.restDelta,l=void 0===c?.5:c,h=t.modifyTarget,f={done:!1,value:i},d=s*n,p=i+d,g=void 0===h?p:h(p);return g!==p&&(d=g-i),{next:function(t){var e=-d*Math.exp(-t/u);return f.done=!(e>l||e<-l),f.value=f.done?g:g+e,f},flipTarget:function(){}}}};var qn=n(9839);function Xn(t,e,n){return void 0===n&&(n=0),t-e-n}var Yn=function(t){var e=function(e){var n=e.delta;return t(n)};return{start:function(){return qn.ZP.update(e,!0)},stop:function(){return qn.qY.update(e)}}};function Kn(t){var e,n,r,i,o,s=t.from,a=t.autoplay,u=void 0===a||a,c=t.driver,l=void 0===c?Yn:c,h=t.elapsed,f=void 0===h?0:h,d=t.repeat,p=void 0===d?0:d,g=t.repeatType,m=void 0===g?"loop":g,v=t.repeatDelay,y=void 0===v?0:v,b=t.onPlay,_=t.onStop,w=t.onComplete,x=t.onRepeat,P=t.onUpdate,A=T(t,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),S=A.to,M=0,O=A.duration,C=!1,L=!0,k=function(t){if(Array.isArray(t.to))return Wn;if($n[t.type])return $n[t.type];var e=new Set(Object.keys(t));return e.has("ease")||e.has("duration")&&!e.has("dampingRatio")?Wn:e.has("dampingRatio")||e.has("stiffness")||e.has("mass")||e.has("damping")||e.has("restSpeed")||e.has("restDelta")?qe:Wn}(A);(null===(n=(e=k).needsInterpolation)||void 0===n?void 0:n.call(e,s,S))&&(o=Sn([0,100],[s,S],{clamp:!1}),s=0,S=100);var R=k(E(E({},A),{from:s,to:S}));function I(){M++,"reverse"===m?f=function(t,e,n,r){return void 0===n&&(n=0),void 0===r&&(r=!0),r?Xn(e+-t,e,n):e-(t-e)+n}(f,O,y,L=M%2===0):(f=Xn(f,O,y),"mirror"===m&&R.flipTarget()),C=!1,x&&x()}function j(t){if(L||(t=-t),f+=t,!C){var e=R.next(Math.max(0,f));i=e.value,o&&(i=o(i)),C=L?e.done:f<=0}null===P||void 0===P||P(i),C&&(0===M&&(null!==O&&void 0!==O||(O=f)),M<p?function(t,e,n,r){return r?t>=e+n:t<=-n}(f,O,y,L)&&I():(r.stop(),w&&w()))}return u&&(null===b||void 0===b||b(),(r=l(j)).start()),{stop:function(){null===_||void 0===_||_(),r.stop()}}}function Qn(t,e){return e?t*(1e3/e):0}var Jn=function(t){return 1e3*t},tr=function(t,e){return 1-3*e+3*t},er=function(t,e){return 3*e-6*t},nr=function(t){return 3*t},rr=function(t,e,n){return((tr(e,n)*t+er(e,n))*t+nr(e))*t},ir=function(t,e,n){return 3*tr(e,n)*t*t+2*er(e,n)*t+nr(e)};var or=.1;function sr(t,e,n,r){if(t===e&&n===r)return kn;for(var i=new Float32Array(11),o=0;o<11;++o)i[o]=rr(o*or,t,n);function s(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=or;--o;var s=r+(e-i[o])/(i[o+1]-i[o])*or,a=ir(s,t,n);return a>=.001?function(t,e,n,r){for(var i=0;i<8;++i){var o=ir(e,n,r);if(0===o)return e;e-=(rr(e,n,r)-t)/o}return e}(e,s,t,n):0===a?s:function(t,e,n,r,i){var o,s,a=0;do{(o=rr(s=e+(n-e)/2,r,i)-t)>0?n=s:e=s}while(Math.abs(o)>1e-7&&++a<10);return s}(e,r,r+or,t,n)}return function(t){return 0===t||1===t?t:rr(s(t),e,r)}}var ar={linear:kn,easeIn:Rn,easeInOut:jn,easeOut:In,circIn:Dn,circInOut:Fn,circOut:Nn,backIn:Bn,backInOut:zn,backOut:Un,anticipate:Vn,bounceIn:Gn,bounceInOut:function(t){return t<.5?.5*(1-Zn(1-2*t)):.5*Zn(2*t-1)+.5},bounceOut:Zn},ur=function(t){if(Array.isArray(t)){t.length;var e=P(t,4);return sr(e[0],e[1],e[2],e[3])}return"string"===typeof t?ar[t]:t},cr=function(t,e){return"zIndex"!==t&&(!("number"!==typeof e&&!Array.isArray(e))||!("string"!==typeof e||!yn.test(e)||e.startsWith("url(")))},lr=function(){return{type:"spring",stiffness:500,damping:25,restDelta:.5,restSpeed:10}},hr=function(t){return{type:"spring",stiffness:550,damping:0===t?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}},fr=function(){return{type:"keyframes",ease:"linear",duration:.3}},dr=function(t){return{type:"keyframes",duration:.8,values:t}},pr={x:lr,y:lr,z:lr,rotate:lr,rotateX:lr,rotateY:lr,rotateZ:lr,scaleX:hr,
1scaleY:hr,scale:hr,opacity:fr,backgroundColor:fr,color:fr,default:hr},gr=new Set(["brightness","contrast","saturate","opacity"]);function mr(t){var e=t.slice(0,-1).split("("),n=e[0],r=e[1];if("drop-shadow"===n)return t;var i=(r.match(bt)||[])[0];if(!i)return t;var o=r.replace(i,""),s=gr.has(n)?1:0;return i!==r&&(s*=100),n+"("+s+o+")"}var vr=/([a-z-]*)\(.*?\)/g,yr=E(E({},yn),{getAnimatableNone:function(t){var e=t.match(vr);return e?e.map(mr).join(" "):t}}),br=E(E({},It),{color:hn,backgroundColor:hn,outlineColor:hn,fill:hn,stroke:hn,borderColor:hn,borderTopColor:hn,borderRightColor:hn,borderBottomColor:hn,borderLeftColor:hn,filter:yr,WebkitFilter:yr}),_r=function(t){return br[t]};function wr(t,e){var n,r=_r(t);return r!==yr&&(r=yn),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,e)}function xr(t){var e=t.ease,n=t.times,r=t.yoyo,i=t.flip,o=t.loop,s=T(t,["ease","times","yoyo","flip","loop"]),a=E({},s);return n&&(a.offset=n),s.duration&&(a.duration=Jn(s.duration)),s.repeatDelay&&(a.repeatDelay=Jn(s.repeatDelay)),e&&(a.ease=function(t){return Array.isArray(t)&&"number"!==typeof t[0]}(e)?e.map(ur):ur(e)),"tween"===s.type&&(a.type="keyframes"),(r||o||i)&&(!0,r?a.repeatType="reverse":o?a.repeatType="loop":i&&(a.repeatType="mirror"),a.repeat=o||r||i||s.repeat),"spring"!==s.type&&(a.type="keyframes"),a}function Er(t,e,n){var r;return Array.isArray(e.to)&&(null!==(r=t.duration)&&void 0!==r||(t.duration=.8)),function(t){Array.isArray(t.to)&&null===t.to[0]&&(t.to=A([],P(t.to)),t.to[0]=t.from)}(e),function(t){t.when,t.delay,t.delayChildren,t.staggerChildren,t.staggerDirection,t.repeat,t.repeatType,t.repeatDelay,t.from;var e=T(t,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(e).length}(t)||(t=E(E({},t),function(t,e){var n;return n=se(e)?dr:pr[t]||pr.default,E({to:e},n(e))}(n,e.to))),E(E({},e),xr(t))}function Tr(t,e,n,r,i){var o,s=Sr(r,t),a=null!==(o=s.from)&&void 0!==o?o:e.get(),u=cr(t,n);"none"===a&&u&&"string"===typeof n?a=wr(t,n):Pr(a)&&"string"===typeof n?a=Ar(n):!Array.isArray(n)&&Pr(n)&&"string"===typeof a&&(n=Ar(a));var c=cr(t,a);return c&&u&&!1!==s.type?function(){var r={from:a,to:n,velocity:e.getVelocity(),onComplete:i,onUpdate:function(t){return e.set(t)}};return"inertia"===s.type||"decay"===s.type?function(t){var e,n=t.from,r=void 0===n?0:n,i=t.velocity,o=void 0===i?0:i,s=t.min,a=t.max,u=t.power,c=void 0===u?.8:u,l=t.timeConstant,h=void 0===l?750:l,f=t.bounceStiffness,d=void 0===f?500:f,p=t.bounceDamping,g=void 0===p?10:p,m=t.restDelta,v=void 0===m?1:m,y=t.modifyTarget,b=t.driver,_=t.onUpdate,w=t.onComplete;function x(t){return void 0!==s&&t<s||void 0!==a&&t>a}function T(t){return void 0===s?a:void 0===a||Math.abs(s-t)<Math.abs(a-t)?s:a}function P(t){null===e||void 0===e||e.stop(),e=Kn(E(E({},t),{driver:b,onUpdate:function(e){var n;null===_||void 0===_||_(e),null===(n=t.onUpdate)||void 0===n||n.call(t,e)},onComplete:w}))}function A(t){P(E({type:"spring",stiffness:d,damping:g,restDelta:v},t))}if(x(r))A({from:r,velocity:o,to:T(r)});else{var S=c*o+r;"undefined"!==typeof y&&(S=y(S));var M,O,C=T(S),L=C===s?-1:1;P({type:"decay",from:r,velocity:o,timeConstant:h,power:c,restDelta:v,modifyTarget:y,onUpdate:x(S)?function(t){M=O,O=t,o=Qn(t-M,(0,qn.$B)().delta),(1===L&&t>C||-1===L&&t<C)&&A({from:t,to:C,velocity:o})}:void 0})}return{stop:function(){return null===e||void 0===e?void 0:e.stop()}}}(E(E({},r),s)):Kn(E(E({},Er(s,r,t)),{onUpdate:function(t){var e;r.onUpdate(t),null===(e=s.onUpdate)||void 0===e||e.call(s,t)},onComplete:function(){var t;r.onComplete(),null===(t=s.onComplete)||void 0===t||t.call(s)}}))}:function(){var t;return e.set(n),i(),null===(t=null===s||void 0===s?void 0:s.onComplete)||void 0===t||t.call(s),{stop:function(){}}}}function Pr(t){return 0===t||"string"===typeof t&&0===parseFloat(t)&&-1===t.indexOf(" ")}function Ar(t){return"number"===typeof t?0:wr("",t)}function Sr(t,e){return t[e]||t.default||t}function Mr(t,e,n,r){return void 0===r&&(r={}),e.start((function(i){var o,s,a=Tr(t,e,n,r,i),u=function(t,e){var n;return null!==(n=(Sr(t,e)||{}).delay)&&void 0!==n?n:0}(r,t),c=function(){return s=a()};return u?o=setTimeout(c,Jn(u)):c(),function(){clearTimeout(o),null===s||void 0===s||s.stop()}}))}function Or(t,e){-1===t.indexOf(e)&&t.push(e)}function Cr(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)}var Lr=function(){function t(){this.subscriptions=[]}return t.prototype.add=function(t){var e=this;return Or(this.subscriptions,t),function(){return Cr(e.subscriptions,t)}},t.prototype.notify=function(t,e,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](t,e,n);else for(var i=0;i<r;i++){var o=this.subscriptions[i];o&&o(t,e,n)}},t.prototype.getSize=function(){return this.subscriptions.length},t.prototype.clear=function(){this.subscriptions.length=0},t}(),kr=function(){function t(t){var e,n=this;this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new Lr,this.velocityUpdateSubscribers=new Lr,this.renderSubscribers=new Lr,this.canTrackVelocity=!1,this.updateAndNotify=function(t,e){void 0===e&&(e=!0),n.prev=n.current,n.current=t;var r=(0,qn.$B)(),i=r.delta,o=r.timestamp;n.lastUpdated!==o&&(n.timeDelta=i,n.lastUpdated=o,qn.ZP.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),e&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return qn.ZP.postRender(n.velocityCheck)},this.velocityCheck=function(t){t.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e)))}return t.prototype.onChange=function(t){return this.updateSubscribers.add(t)},t.prototype.clearListeners=function(){this.updateSubscribers.clear()},t.prototype.onRenderRequest=function(t){return t(this.get()),this.renderSubscribers.add(t)},t.prototype.attach=function(t){this.passiveEffect=t},t.prototype.set=function(t,e){void 0===e&&(e=!0),e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)},t.prototype.get=function(){return this.current},t.prototype.getPrevious=function(){return this.prev},t.prototype.getVelocity=function(){return this.canTrackVelocity?Qn(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},t.prototype.start=function(t){var e=this;return this.stop(),new Promise((function(n){e.hasAnimated=!0,e.stopAnimation=t(n)})).then((function(){return e.clearAnimation()}))},t.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},t.prototype.isAnimating=function(){return!!this.stopAnimation},t.prototype.clearAnimation=function(){this.stopAnimation=null},t.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},t}();function Rr(t){return new kr(t)}
1var Ir=function(t){return function(e){return e.test(t)}},jr=[Ct,At,Pt,Tt,Mt,St,{test:function(t){return"auto"===t},parse:function(t){return t}}],Dr=function(t){return jr.find(Ir(t))},Nr=A(A([],P(jr)),[hn,yn]),Fr=function(t){return Nr.find(Ir(t))};function Br(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Rr(n))}function Ur(t,e){var n=X(t,e),r=n?t.makeTargetAnimatable(n,!1):{},i=r.transitionEnd,o=void 0===i?{}:i;r.transition;var s,a=T(r,["transitionEnd","transition"]);for(var u in a=E(E({},a),o)){Br(t,u,(s=a[u],se(s)?s[s.length-1]||0:s))}}function zr(t,e){if(e)return(e[t]||e.default||e).from}function Vr(t,e,n){var r;void 0===n&&(n={});var i=X(t,e,n.custom),o=(i||{}).transition,s=void 0===o?t.getDefaultTransition()||{}:o;n.transitionOverride&&(s=n.transitionOverride);var a=i?function(){return Zr(t,i,n)}:function(){return Promise.resolve()},u=(null===(r=t.variantChildren)||void 0===r?void 0:r.size)?function(r){void 0===r&&(r=0);var i=s.delayChildren,o=void 0===i?0:i,a=s.staggerChildren,u=s.staggerDirection;return function(t,e,n,r,i,o){void 0===n&&(n=0);void 0===r&&(r=0);void 0===i&&(i=1);var s=[],a=(t.variantChildren.size-1)*r,u=1===i?function(t){return void 0===t&&(t=0),t*r}:function(t){return void 0===t&&(t=0),a-t*r};return Array.from(t.variantChildren).sort(Gr).forEach((function(t,r){s.push(Vr(t,e,E(E({},o),{delay:n+u(r)})).then((function(){return t.notifyAnimationComplete(e)})))})),Promise.all(s)}(t,e,o+r,a,u,n)}:function(){return Promise.resolve()},c=s.when;if(c){var l=P("beforeChildren"===c?[a,u]:[u,a],2),h=l[0],f=l[1];return h().then(f)}return Promise.all([a(),u(n.delay)])}function Zr(t,e,n){var r,i=void 0===n?{}:n,o=i.delay,s=void 0===o?0:o,a=i.transitionOverride,u=i.type,c=t.makeTargetAnimatable(e),l=c.transition,h=void 0===l?t.getDefaultTransition():l,f=c.transitionEnd,d=T(c,["transition","transitionEnd"]);a&&(h=a);var p=[],g=u&&(null===(r=t.animationState)||void 0===r?void 0:r.getState()[u]);for(var m in d){var v=t.getValue(m),y=d[m];if(!(!v||void 0===y||g&&Hr(g,m))){var b=Mr(m,v,y,E({delay:s},h));p.push(b)}}return Promise.all(p).then((function(){f&&Ur(t,f)}))}function Gr(t,e){return t.sortNodePosition(e)}function Hr(t,e){var n=t.protectedKeys,r=t.needsAnimating,i=n.hasOwnProperty(e)&&!0!==r[e];return r[e]=!1,i}var Wr=[fe.Animate,fe.Hover,fe.Tap,fe.Drag,fe.Focus,fe.Exit],$r=A([],P(Wr)).reverse(),qr=Wr.length;function Xr(t){return function(e){return Promise.all(e.map((function(e){var n=e.animation,r=e.options;return function(t,e,n){var r;if(void 0===n&&(n={}),t.notifyAnimationStart(),Array.isArray(e)){var i=e.map((function(e){return Vr(t,e,n)}));r=Promise.all(i)}else if("string"===typeof e)r=Vr(t,e,n);else{var o="function"===typeof e?X(t,e,n.custom):e;r=Zr(t,o,n)}return r.then((function(){return t.notifyAnimationComplete(e)}))}(t,n,r)})))}}function Yr(t){var e=Xr(t),n=function(){var t;return(t={})[fe.Animate]=Kr(!0),t[fe.Hover]=Kr(),t[fe.Tap]=Kr(),t[fe.Drag]=Kr(),t[fe.Focus]=Kr(),t[fe.Exit]=Kr(),t}(),r={},i=!0,o=function(e,n){var r=X(t,n);if(r){r.transition;var i=r.transitionEnd,o=T(r,["transition","transitionEnd"]);e=E(E(E({},e),o),i)}return e};function s(s,a){for(var u,c=t.getProps(),l=t.getVariantContext(!0)||{},h=[],f=new Set,d={},p=1/0,g=function(e){var r=$r[e],g=n[r],m=null!==(u=c[r])&&void 0!==u?u:l[r],v=$(m),y=r===a?g.isActive:null;!1===y&&(p=e);var b=m===l[r]&&m!==c[r]&&v;if(b&&i&&t.manuallyAnimateOnMount&&(b=!1),g.protectedKeys=E({},d),!g.isActive&&null===y||!m&&!g.prevProp||oe(m)||"boolean"===typeof m)return"continue";var _=function(t,e){if("string"===typeof e)return e!==t;if(W(e))return!Ue(e,t);return!1}(g.prevProp,m)||r===a&&g.isActive&&!b&&v||e>p&&v,w=Array.isArray(m)?m:[m],x=w.reduce(o,{});!1===y&&(x={});var T=g.prevResolvedValues,S=void 0===T?{}:T,M=E(E({},S),x),O=function(t){_=!0,f.delete(t),g.needsAnimating[t]=!0};for(var C in M){var L=x[C],k=S[C];d.hasOwnProperty(C)||(L!==k?se(L)&&se(k)?Ue(L,k)?g.protectedKeys[C]=!0:O(C):void 0!==L?O(C):f.add(C):void 0!==L&&f.has(C)?O(C):g.protectedKeys[C]=!0)}g.prevProp=m,g.prevResolvedValues=x,g.isActive&&(d=E(E({},d),x)),i&&t.blockInitialAnimation&&(_=!1),_&&!b&&h.push.apply(h,A([],P(w.map((function(t){return{animation:t,options:E({type:r},s)}})))))},m=0;m<qr;m++)g(m);if(r=E({},d),f.size){var v={};f.forEach((function(e){var n=t.getBaseTarget(e);void 0!==n&&(v[e]=n)})),h.push({animation:v})}var y=Boolean(h.length);return i&&!1===c.initial&&!t.manuallyAnimateOnMount&&(y=!1),i=!1,y?e(h):Promise.resolve()}return{isAnimated:function(t){return void 0!==r[t]},animateChanges:s,setActive:function(e,r,i){var o;return n[e].isActive===r?Promise.resolve():(null===(o=t.variantChildren)||void 0===o||o.forEach((function(t){var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,r)})),n[e].isActive=r,s(i,e))},setAnimateFunction:function(n){e=n(t)},getState:function(){return n}}}function Kr(t){return void 0===t&&(t=!1),{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Qr={animation:Fe((function(t){var e=t.visualElement,n=t.animate;e.animationState||(e.animationState=Yr(e)),oe(n)&&(0,a.useEffect)((function(){return n.subscribe(e)}),[n])})),exit:Fe((function(t){var e=t.custom,n=t.visualElement,r=P(D(),2),i=r[0],o=r[1],s=(0,a.useContext)(I);(0,a.useEffect)((function(){var t,r,a=null===(t=n.animationState)||void 0===t?void 0:t.setActive(fe.Exit,!i,{custom:null!==(r=null===s||void 0===s?void 0:s.custom)&&void 0!==r?r:e});!i&&(null===a||void 0===a||a.then(o))}),[i])}))},Jr=function(t){return t.hasOwnProperty("x")&&t.hasOwnProperty("y")},ti=function(t){return Jr(t)&&t.hasOwnProperty("z")},ei=function(t,e){return Math.abs(t-e)};function ni(t,e){if(bn(t)&&bn(e))return ei(t,e);
vendor: 14,414 bytes, line 1
1if(Jr(t)&&Jr(e)){var n=ei(t.x,e.x),r=ei(t.y,e.y),i=ti(t)&&ti(e)?ei(t.z,e.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(i,2))}}var ri=function(){function t(t,e,n){var r=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var t=si(r.lastMoveEventInfo,r.history),e=null!==r.startEvent,n=ni(t.offset,{x:0,y:0})>=3;if(e||n){var i=t.point,o=(0,qn.$B)().timestamp;r.history.push(E(E({},i),{timestamp:o}));var s=r.handlers,a=s.onStart,u=s.onMove;e||(a&&a(r.lastMoveEvent,t),r.startEvent=r.lastMoveEvent),u&&u(r.lastMoveEvent,t)}}},this.handlePointerMove=function(t,e){r.lastMoveEvent=t,r.lastMoveEventInfo=ii(e,r.transformPagePoint),me(t)&&0===t.buttons?r.handlePointerUp(t,e):qn.ZP.update(r.updatePoint,!0)},this.handlePointerUp=function(t,e){r.end();var n=r.handlers,i=n.onEnd,o=n.onSessionEnd,s=si(ii(e,r.transformPagePoint),r.history);r.startEvent&&i&&i(t,s),o&&o(t,s)},!(ve(t)&&t.touches.length>1)){this.handlers=e,this.transformPagePoint=i;var o=ii(we(t),this.transformPagePoint),s=o.point,a=(0,qn.$B)().timestamp;this.history=[E(E({},s),{timestamp:a})];var u=e.onSessionStart;u&&u(t,si(o,this.history)),this.removeListeners=Ne(Ae(window,"pointermove",this.handlePointerMove),Ae(window,"pointerup",this.handlePointerUp),Ae(window,"pointercancel",this.handlePointerUp))}}return t.prototype.updateHandlers=function(t){this.handlers=t},t.prototype.end=function(){this.removeListeners&&this.removeListeners(),qn.qY.update(this.updatePoint)},t}();function ii(t,e){return e?{point:e(t.point)}:t}function oi(t,e){return{x:t.x-e.x,y:t.y-e.y}}function si(t,e){var n=t.point;return{point:n,delta:oi(n,ui(e)),offset:oi(n,ai(e)),velocity:ci(e,.1)}}function ai(t){return t[0]}function ui(t){return t[t.length-1]}function ci(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=ui(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>Jn(e)));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function li(t){return t}function hi(t){var e=t.top;return{x:{min:t.left,max:t.right},y:{min:e,max:t.bottom}}}var fi={translate:0,scale:1,origin:0,originPoint:0};function di(){return{x:E({},fi),y:E({},fi)}}function pi(t){return[t("x"),t("y")]}function gi(t,e,n){var r=e.min,i=e.max;return void 0!==r&&t<r?t=n?Ke(r,t,n.min):Math.max(t,r):void 0!==i&&t>i&&(t=n?Ke(i,t,n.max):Math.min(t,i)),t}function mi(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function vi(t,e){var n,r=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&(r=(n=P([i,r],2))[0],i=n[1]),{min:t.min+r,max:t.min+i}}function yi(t,e,n){return{min:bi(t,e),max:bi(t,n)}}function bi(t,e){var n;return"number"===typeof t?t:null!==(n=t[e])&&void 0!==n?n:0}function _i(t,e){return hi(function(t,e){var n=t.top,r=t.left,i=t.bottom,o=t.right;void 0===e&&(e=li);var s=e({x:r,y:n}),a=e({x:o,y:i});return{top:s.y,left:s.x,bottom:a.y,right:a.x}}(t.getBoundingClientRect(),e))}function wi(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=.01),ni(t,e)<n}function xi(t){return t.max-t.min}function Ei(t,e){var n=.5,r=xi(t),i=xi(e);return i>r?n=Ye(e.min,e.max-r,t.min):r>i&&(n=Ye(t.min,t.max-i,e.min)),ze(0,1,n)}function Ti(t,e,n,r){void 0===r&&(r=.5),t.origin=r,t.originPoint=Ke(e.min,e.max,t.origin),t.scale=xi(n)/xi(e),wi(t.scale,1,1e-4)&&(t.scale=1),t.translate=Ke(n.min,n.max,t.origin)-t.originPoint,wi(t.translate)&&(t.translate=0)}function Pi(t,e,n,r){Ti(t.x,e.x,n.x,Ai(r.originX)),Ti(t.y,e.y,n.y,Ai(r.originY))}function Ai(t){return"number"===typeof t?t:.5}function Si(t,e,n){t.min=n.min+e.min,t.max=t.min+xi(e)}var Mi=function(t,e){return t.depth-e.depth};function Oi(t){return t.projection.isEnabled||t.shouldResetTransform()}function Ci(t,e){void 0===e&&(e=[]);var n=t.parent;return n&&Ci(n,e),Oi(t)&&e.push(t),e}function Li(t){if(!t.shouldResetTransform()){var e,n=t.getLayoutState();t.notifyBeforeLayoutMeasure(n.layout),n.isHydrated=!0,n.layout=t.measureViewportBox(),n.layoutCorrected=(e=n.layout,{x:E({},e.x),y:E({},e.y)}),t.notifyLayoutMeasure(n.layout,t.prevViewportBox||n.layout),qn.ZP.update((function(){return t.rebaseProjectionTarget()}))}}function ki(t,e){return{min:e.min-t.min,max:e.max-t.min}}function Ri(t,e){return{x:ki(t.x,e.x),y:ki(t.y,e.y)}}function Ii(t,e){var n=t.getLayoutId(),r=e.getLayoutId();return n!==r||void 0===r&&t!==e}function ji(t){var e=t.getProps(),n=e.drag,r=e._dragX;return n&&!r}function Di(t,e){t.min=e.min,t.max=e.max}function Ni(t,e,n){return n+e*(t-n)}function Fi(t,e,n,r,i){return void 0!==i&&(t=Ni(t,i,r)),Ni(t,n,r)+e}function Bi(t,e,n,r,i){void 0===e&&(e=0),void 0===n&&(n=1),t.min=Fi(t.min,e,n,r,i),t.max=Fi(t.max,e,n,r,i)}function Ui(t,e){var n=e.x,r=e.y;Bi(t.x,n.translate,n.scale,n.originPoint),Bi(t.y,r.translate,r.scale,r.originPoint)}function zi(t,e,n,r){var i=P(r,3),o=i[0],s=i[1],a=i[2];t.min=e.min,t.max=e.max;var u=void 0!==n[a]?n[a]:.5,c=Ke(e.min,e.max,u);Bi(t,n[o],n[s],c,n.scale)}var Vi=["x","scaleX","originX"],Zi=["y","scaleY","originY"];function Gi(t,e,n){zi(t.x,e.x,n,Vi),zi(t.y,e.y,n,Zi)}function Hi(t,e,n,r,i){return t=Ni(t-=e,1/n,r),void 0!==i&&(t=Ni(t,1/i,r)),t}function Wi(t,e,n){var r=P(n,3),i=r[0],o=r[1],s=r[2];!function(t,e,n,r,i){void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5);var o=Ke(t.min,t.max,r)-e;t.min=Hi(t.min,e,n,o,i),t.max=Hi(t.max,e,n,o,i)}(t,e[i],e[o],e[s],e.scale)}function $i(t,e){Wi(t.x,e,Vi),Wi(t.y,e,Zi)}var qi=new Set;function Xi(t,e,n){t[n]||(t[n]=[]),t[n].push(e)}function Yi(t){return qi.add(t),function(){return qi.delete(t)}}function Ki(){if(qi.size){var t=0,e=[[]],n=[],r=function(n){return Xi(e,n,t)},i=function(e){Xi(n,e,t),t++};qi.forEach((function(e){e(r,i),t=0})),qi.clear();for(var o=n.length,s=0;s<=o;s++)e[s]&&e[s].forEach(Ji),n[s]&&n[s].forEach(Ji)}}var Qi,Ji=function(t){return t()},to=new WeakMap,eo=function(){function t(t){var e=t.visualElement;this.isDragging=!1,this.currentDirection=null,this.constraints=!1,this.elastic={x:{min:0,max:1},y:{min:0,max:1}},this.props={},this.hasMutatedConstraints=!1,this.cursorProgress={x:.5,y:.5},this.originPoint={},this.openGlobalLock=null,this.panSession=null,this.visualElement=e,this.visualElement.enableLayoutProjection(),to.set(e,this)}return t.prototype.start=function(t,e){var n=this,r=void 0===e?{}:e,i=r.snapToCursor,o=void 0!==i&&i,s=r.cursorProgress,a=this.props.transformPagePoint;this.panSession=new ri(t,{onSessionStart:function(t){var e;n.stopMotion();var r=function(t){return we(t,"client")}(t).point;null===(e=n.cancelLayout)||void 0===e||e.call(n),n.cancelLayout=Yi((function(t,e){var i=Ci(n.visualElement),a=function(t){var e=[],n=function(t){Oi(t)&&e.push(t),t.children.forEach(n)};return t.children.forEach(n),e.sort(Mi)}(n.visualElement),u=A(A([],P(i)),P(a)),c=!1;n.isLayoutDrag()&&n.visualElement.lockProjectionTarget(),e((function(){u.forEach((function(t){return t.resetTransform()}))})),t((function(){Li(n.visualElement),a.forEach(Li)})),e((function(){u.forEach((function(t){return t.restoreTransform()})),o&&(c=n.snapToCursor(r))})),t((function(){Boolean(n.getAxisMotionValue("x")&&!n.isExternalDrag())||n.visualElement.rebaseProjectionTarget(!0,n.visualElement.measureViewportBox(!1)),n.visualElement.scheduleUpdateLayoutProjection();var t=n.visualElement.projection;pi((function(e){if(!c){var i=t.target[e],o=i.min,a=i.max;n.cursorProgress[e]=s?s[e]:Ye(o,a,r[e])}var u=n.getAxisMotionValue(e);u&&(n.originPoint[e]=u.get())}))})),e((function(){qn.iW.update(),qn.iW.preRender(),qn.iW.render(),qn.iW.postRender()})),t((function(){return n.resolveDragConstraints()}))}))},onStart:function(t,e){var r,i,o,s=n.props,a=s.drag,u=s.dragPropagation;(!a||u||(n.openGlobalLock&&n.openGlobalLock(),n.openGlobalLock=Le(a),n.openGlobalLock))&&(Ki(),n.isDragging=!0,n.currentDirection=null,null===(i=(r=n.props).onDragStart)||void 0===i||i.call(r,t,e),null===(o=n.visualElement.animationState)||void 0===o||o.setActive(fe.Drag,!0))},onMove:function(t,e){var r,i,o,s,a=n.props,u=a.dragPropagation,c=a.dragDirectionLock;if(u||n.openGlobalLock){var l=e.offset;if(c&&null===n.currentDirection)return n.currentDirection=function(t,e){void 0===e&&(e=10);var n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(l),void(null!==n.currentDirection&&(null===(i=(r=n.props).onDirectionLock)||void 0===i||i.call(r,n.currentDirection)));n.updateAxis("x",e.point,l),n.updateAxis("y",e.point,l),null===(s=(o=n.props).onDrag)||void 0===s||s.call(o,t,e),Qi=t}},onSessionEnd:function(t,e){return n.stop(t,e)}},{transformPagePoint:a})},t.prototype.resolveDragConstraints=function(){var t=this,e=this.props,n=e.dragConstraints,r=e.dragElastic,i=this.visualElement.getLayoutState().layoutCorrected;this.constraints=!!n&&(H(n)?this.resolveRefConstraints(i,n):function(t,e){var n=e.top,r=e.left,i=e.bottom,o=e.right;return{x:mi(t.x,r,o),y:mi(t.y,n,i)}}(i,n)),this.elastic=function(t){return!1===t?t=0:!0===t&&(t=.35),{x:yi(t,"left","right"),y:yi(t,"top","bottom")}}(r),this.constraints&&!this.hasMutatedConstraints&&pi((function(e){t.getAxisMotionValue(e)&&(t.constraints[e]=function(t,e){var n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i[e],t.constraints[e]))}))},t.prototype.resolveRefConstraints=function(t,e){var n=this.props,r=n.onMeasureDragConstraints,i=n.transformPagePoint,o=e.current;this.constraintsBox=_i(o,i);var s=function(t,e){return{x:vi(t.x,e.x),y:vi(t.y,e.y)}}(t,this.constraintsBox);if(r){var a=r(function(t){var e=t.x,n=t.y;return{top:n.min,bottom:n.max,left:e.min,right:e.max}}(s));this.hasMutatedConstraints=!!a,a&&(s=hi(a))}return s},t.prototype.cancelDrag=function(){var t,e;this.visualElement.unlockProjectionTarget(),null===(t=this.cancelLayout)||void 0===t||t.call(this),this.isDragging=!1,this.panSession&&this.panSession.end(),this.panSession=null,!this.props.dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(e=this.visualElement.animationState)||void 0===e||e.setActive(fe.Drag,!1)},t.prototype.stop=function(t,e){var n,r,i;null===(n=this.panSession)||void 0===n||n.end(),this.panSession=null;var o=this.isDragging;if(this.cancelDrag(),o){var s=e.velocity;this.animateDragEnd(s),null===(i=(r=this.props).onDragEnd)||void 0===i||i.call(r,t,e)}},t.prototype.snapToCursor=function(t){var e=this;return pi((function(n){if(no(n,e.props.drag,e.currentDirection)){var r=e.getAxisMotionValue(n);if(!r)return e.cursorProgress[n]=.5,!0;var i=e.visualElement.getLayoutState().layout,o=i[n].max-i[n].min,s=i[n].min+o/2,a=t[n]-s;e.originPoint[n]=t[n],r.set(a)}})).includes(!0)},t.prototype.updateAxis=function(t,e,n){if(no(t,this.props.drag,this.currentDirection))return this.getAxisMotionValue(t)?this.updateAxisMotionValue(t,n):this.updateVisualElementAxis(t,e)},t.prototype.updateAxisMotionValue=function(t,e){var n=this.getAxisMotionValue(t);if(e&&n){var r=this.originPoint[t]+e[t],i=this.constraints?gi(r,this.constraints[t],this.elastic[t]):r;n.set(i)}},t.prototype.updateVisualElementAxis=function(t,e){var n,r=this.visualElement.getLayoutState().layout[t],i=r.max-r.min,o=this.cursorProgress[t],s=function(t,e,n,r,i){var o=t-e*n;return r?gi(o,r,i):o}(e[t],i,o,null===(n=this.constraints)||void 0===n?void 0:n[t],this.elastic[t]);this.visualElement.setProjectionTargetAxis(t,s,s+i)},t.prototype.setProps=function(t){var e=t.drag,n=void 0!==e&&e,r=t.dragDirectionLock,i=void 0!==r&&r,o=t.dragPropagation,s=void 0!==o&&o,a=t.dragConstraints,u=void 0!==a&&a,c=t.dragElastic,l=void 0===c?.35:c,h=t.dragMomentum,f=void 0===h||h,d=T(t,["drag","dragDirectionLock","dragPropagation","dragConstraints","dragElastic","dragMomentum"]);this.props=E({drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:u,dragElastic:l,dragMomentum:f},d)},t.prototype.getAxisMotionValue=function(t){var e=this.props,n=e.layout,r=e.layoutId,i="_drag"+t.toUpperCase();return this.props[i]?this.props[i]:n||void 0!==r?void 0:this.visualElement.getValue(t,0)},t.prototype.isLayoutDrag=function(){return!this.getAxisMotionValue("x")},t.prototype.isExternalDrag=function(){var t=this.props,e=t._dragX,n=t._dragY;return e||n},t.prototype.animateDragEnd=function(t){var e=this,n=this.props,r=n.drag,i=n.dragMomentum,o=n.dragElastic,s=n.dragTransition,a=function(t,e){void 0===e&&(e=!0);var n,r=t.getProjectionParent();return!!r&&(e?$i(n=Ri(r.projection.target,t.projection.target),r.getLatestValues()):n=Ri(r.getLayoutState().layout,t.getLayoutState().layout),pi((function(e){return t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)})),!0)}(this.visualElement,this.isLayoutDrag()&&!this.isExternalDrag()),u=this.constraints||{};if(a&&Object.keys(u).length&&this.isLayoutDrag()){var c=this.visualElement.getProjectionParent();if(c){var l=Ri(c.projection.targetFinal,u);pi((function(t){var e=l[t],n=e.min,r=e.max;u[t]={min:isNaN(n)?void 0:n,max:isNaN(r)?void 0:r}}))}}var h=pi((function(n){var c;if(no(n,r,e.currentDirection)){var l=null!==(c=null===u||void 0===u?void 0:u[n])&&void 0!==c?c:{},h=o?200:1e6,f=o?40:1e7,d=E(E({type:"inertia",velocity:i?t[n]:0,bounceStiffness:h,bounceDamping:f,timeConstant:750,restDelta:1,restSpeed:10},s),l);return e.getAxisMotionValue(n)?e.startAxisValueAnimation(n,d):e.visualElement.startLayoutAnimation(n,d,a)}}));return Promise.all(h).then((function(){var t,n;null===(n=(t=e.props).onDragTransitionEnd)||void 0===n||n.call(t)}))},t.prototype.stopMotion=function(){var t=this;pi((function(e){var n=t.getAxisMotionValue(e);n?n.stop():t.visualElement.stopLayoutAnimation()}))},t.prototype.startAxisValueAnimation=function(t,e){var n=this.getAxisMotionValue(t);if(n){var r=n.get();return n.set(r),n.set(r),Mr(t,n,0,e)}},t.prototype.scalePoint=function(){var t=this,e=this.props,n=e.drag;if(H(e.dragConstraints)&&this.constraintsBox){this.stopMotion();var r={x:0,y:0};pi((function(e){r[e]=Ei(t.visualElement.projection.target[e],t.constraintsBox[e])})),this.updateConstraints((function(){pi((function(e){if(no(e,n,null)){var i=function(t,e,n){var r=t.max-t.min,i=Ke(e.min,e.max-r,n);return{min:i,max:i+r}}(t.visualElement.projection.target[e],t.constraintsBox[e],r[e]),o=i.min,s=i.max;t.visualElement.setProjectionTargetAxis(e,o,s)}}))})),setTimeout(Ki,1)}},t.prototype.updateConstraints=function(t){var e=this;this.cancelLayout=Yi((function(n,r){var i=Ci(e.visualElement);
1r((function(){return i.forEach((function(t){return t.resetTransform()}))})),n((function(){return Li(e.visualElement)})),r((function(){return i.forEach((function(t){return t.restoreTransform()}))})),n((function(){e.resolveDragConstraints()})),t&&r(t)}))},t.prototype.mount=function(t){var e=this,n=Ae(t.getInstance(),"pointerdown",(function(t){var n=e.props,r=n.drag,i=n.dragListener;r&&(void 0===i||i)&&e.start(t)})),r=pe(window,"resize",(function(){e.scalePoint()})),i=t.onLayoutUpdate((function(){e.isDragging&&e.resolveDragConstraints()})),o=t.prevDragCursor;return o&&this.start(Qi,{cursorProgress:o}),function(){null===n||void 0===n||n(),null===r||void 0===r||r(),null===i||void 0===i||i(),e.cancelDrag()}},t}();function no(t,e,n){return(!0===e||e===t)&&(null===n||n===t)}var ro,io,oo={pan:Fe((function(t){var e=t.onPan,n=t.onPanStart,r=t.onPanEnd,i=t.onPanSessionStart,o=t.visualElement,s=e||n||r||i,u=(0,a.useRef)(null),c=(0,a.useContext)(k).transformPagePoint,l={onSessionStart:i,onStart:n,onMove:e,onEnd:function(t,e){u.current=null,r&&r(t,e)}};(0,a.useEffect)((function(){null!==u.current&&u.current.updateHandlers(l)})),Se(o,"pointerdown",s&&function(t){u.current=new ri(t,l,{transformPagePoint:c})}),je((function(){return u.current&&u.current.end()}))})),drag:Fe((function(t){var e=t.dragControls,n=t.visualElement,r=(0,a.useContext)(k).transformPagePoint,i=j((function(){return new eo({visualElement:n})}));i.setProps(E(E({},t),{transformPagePoint:r})),(0,a.useEffect)((function(){return e&&e.subscribe(i)}),[i]),(0,a.useEffect)((function(){return i.mount(n)}),[])}))};function so(t){return"string"===typeof t&&t.startsWith("var(--")}!function(t){t[t.Entering=0]="Entering",t[t.Present=1]="Present",t[t.Exiting=2]="Exiting"}(ro||(ro={})),function(t){t[t.Hide=0]="Hide",t[t.Show=1]="Show"}(io||(io={}));var ao=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function uo(t,e,n){void 0===n&&(n=1);var r=P(function(t){var e=ao.exec(t);if(!e)return[,];var n=P(e,3);return[n[1],n[2]]}(t),2),i=r[0],o=r[1];if(i){var s=window.getComputedStyle(e).getPropertyValue(i);return s?s.trim():so(o)?uo(o,e,n+1):o}}function co(t,e){return t/(e.max-e.min)*100}var lo="_$css";var ho={process:function(t,e,n){var r=n.target;if("string"===typeof t){if(!At.test(t))return t;t=parseFloat(t)}return co(t,r.x)+"% "+co(t,r.y)+"%"}},fo={borderRadius:E(E({},ho),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:ho,borderTopRightRadius:ho,borderBottomLeftRadius:ho,borderBottomRightRadius:ho,boxShadow:{process:function(t,e){var n=e.delta,r=e.treeScale,i=t,o=t.includes("var("),s=[];o&&(t=t.replace(ao,(function(t){return s.push(t),lo})));var a=yn.parse(t);if(a.length>5)return i;var u=yn.createTransformer(t),c="number"!==typeof a[0]?1:0,l=n.x.scale*r.x,h=n.y.scale*r.y;a[0+c]/=l,a[1+c]/=h;var f=Ke(l,h,.5);"number"===typeof a[2+c]&&(a[2+c]/=f),"number"===typeof a[3+c]&&(a[3+c]/=f);var d=u(a);if(o){var p=0;d=d.replace(lo,(function(){var t=s[p];return p++,t}))}return d}}},po=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.frameTarget={x:{min:0,max:1},y:{min:0,max:1}},e.currentAnimationTarget={x:{min:0,max:1},y:{min:0,max:1}},e.isAnimating={x:!1,y:!1},e.stopAxisAnimation={x:void 0,y:void 0},e.isAnimatingTree=!1,e.animate=function(t,n,r){void 0===r&&(r={});var i=r.originBox,o=r.targetBox,s=r.visibilityAction,a=r.shouldStackAnimate,u=r.onComplete,c=r.prevParent,l=T(r,["originBox","targetBox","visibilityAction","shouldStackAnimate","onComplete","prevParent"]),h=e.props,f=h.visualElement,d=h.layout;if(!1===a)return e.isAnimatingTree=!1,e.safeToRemove();if(!e.isAnimatingTree||!0===a){a&&(e.isAnimatingTree=!0),n=i||n,t=o||t;var p=!1,g=f.getProjectionParent();if(g){var m=g.prevViewportBox,v=g.getLayoutState().layout;c&&(o&&(v=c.getLayoutState().layout),i&&!Ii(c,g)&&c.prevViewportBox&&(m=c.prevViewportBox)),m&&_o(c,i,o)&&(p=!0,n=Ri(m,n),t=Ri(v,t))}var y=go(n,t),b=pi((function(r){var i,o;if("position"===d){var a=t[r].max-t[r].min;n[r].max=n[r].min+a}if(!f.projection.isTargetLocked)return void 0===s?y?e.animateAxis(r,t[r],n[r],E(E({},l),{isRelative:p})):(null===(o=(i=e.stopAxisAnimation)[r])||void 0===o||o.call(i),f.setProjectionTargetAxis(r,t[r].min,t[r].max,p)):void f.setVisibility(s===io.Show)}));return f.syncRender(),Promise.all(b).then((function(){e.isAnimatingTree=!1,u&&u(),f.notifyLayoutAnimationComplete()}
vendor: 12,492 bytes, line 1
1))}},e}return x(e,t),e.prototype.componentDidMount=function(){var t=this,e=this.props.visualElement;e.animateMotionValue=Mr,e.enableLayoutProjection(),this.unsubLayoutReady=e.onLayoutUpdate(this.animate),e.layoutSafeToRemove=function(){return t.safeToRemove()},function(t){for(var e in t)it[e]=t[e]}(fo)},e.prototype.componentWillUnmount=function(){var t=this;this.unsubLayoutReady(),pi((function(e){var n,r;return null===(r=(n=t.stopAxisAnimation)[e])||void 0===r?void 0:r.call(n)}))},e.prototype.animateAxis=function(t,e,n,r){var i,o,s=this,a=void 0===r?{}:r,u=a.transition,c=a.isRelative;if(!this.isAnimating[t]||!yo(e,this.currentAnimationTarget[t])){null===(o=(i=this.stopAxisAnimation)[t])||void 0===o||o.call(i),this.isAnimating[t]=!0;var l=this.props.visualElement,h=this.frameTarget[t],f=l.getProjectionAnimationProgress()[t];f.clearListeners(),f.set(0),f.set(0);var d=function(){var r=f.get()/1e3;!function(t,e,n,r){t.min=Ke(e.min,n.min,r),t.max=Ke(e.max,n.max,r)}(h,n,e,r),l.setProjectionTargetAxis(t,h.min,h.max,c)};d();var p=f.onChange(d);this.stopAxisAnimation[t]=function(){s.isAnimating[t]=!1,f.stop(),p()},this.currentAnimationTarget[t]=e;var g=u||l.getDefaultTransition()||bo;return Mr("x"===t?"layoutX":"layoutY",f,1e3,g&&Sr(g,"layout")).then(this.stopAxisAnimation[t])}},e.prototype.safeToRemove=function(){var t,e;null===(e=(t=this.props).safeToRemove)||void 0===e||e.call(t)},e.prototype.render=function(){return null},e}(a.Component);function go(t,e){return!vo(t)&&!vo(e)&&(!yo(t.x,e.x)||!yo(t.y,e.y))}var mo={min:0,max:0};function vo(t){return yo(t.x,mo)&&yo(t.y,mo)}function yo(t,e){return t.min===e.min&&t.max===e.max}var bo={duration:.45,ease:[.4,0,.1,1]};function _o(t,e,n){return t||!t&&!(e||n)}var wo={layoutReady:function(t){return t.notifyLayoutReady()}};function xo(){var t=new Set;return{add:function(e){return t.add(e)},flush:function(e){var n=void 0===e?wo:e,r=n.layoutReady,i=n.parent;Yi((function(e,n){var o=Array.from(t).sort(Mi),s=i?Ci(i):[];n((function(){A(A([],P(s)),P(o)).forEach((function(t){return t.resetTransform()}))})),e((function(){o.forEach(Li)})),n((function(){s.forEach((function(t){return t.restoreTransform()})),o.forEach(r)})),e((function(){o.forEach((function(t){t.isPresent&&(t.presence=ro.Present)}))})),n((function(){qn.iW.preRender(),qn.iW.render()})),e((function(){qn.ZP.postRender((function(){return o.forEach(Eo)})),t.clear()}))})),Ki()}}}function Eo(t){t.prevViewportBox=t.projection.target}var To=(0,a.createContext)(xo()),Po=(0,a.createContext)(xo());function Ao(t){return!!t.forceUpdate}var So=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return x(e,t),e.prototype.componentDidMount=function(){var t=this.props,e=t.syncLayout,n=t.framerSyncLayout,r=t.visualElement;Ao(e)&&e.register(r),Ao(n)&&n.register(r),r.onUnmount((function(){Ao(e)&&e.remove(r),Ao(n)&&n.remove(r)}))},e.prototype.getSnapshotBeforeUpdate=function(){var t=this.props,e=t.syncLayout,n=t.visualElement;return Ao(e)?e.syncUpdate():(!function(t){t.shouldResetTransform()||(t.prevViewportBox=t.measureViewportBox(!1),t.rebaseProjectionTarget(!1,t.prevViewportBox))}(n),e.add(n)),null},e.prototype.componentDidUpdate=function(){var t=this.props.syncLayout;Ao(t)||t.flush()},e.prototype.render=function(){return null},e}(a.Component);var Mo={measureLayout:function(t){var e=(0,a.useContext)(To),n=(0,a.useContext)(Po);return a.createElement(So,E({},t,{syncLayout:e,framerSyncLayout:n}))},layoutAnimation:function(t){var e=P(D(),2)[1];return a.createElement(po,E({},t,{safeToRemove:e}))}};function Oo(){return{isHydrated:!1,layout:{x:{min:0,max:1},y:{min:0,max:1}},layoutCorrected:{x:{min:0,max:1},y:{min:0,max:1}},treeScale:{x:1,y:1},delta:di(),deltaFinal:di(),deltaTransform:""}}var Co=Oo();function Lo(t,e,n){var r=t.x,i=t.y,o="translate3d("+r.translate/e.x+"px, "+i.translate/e.y+"px, 0) ";if(n){var s=n.rotate,a=n.rotateX,u=n.rotateY;s&&(o+="rotate("+s+") "),a&&(o+="rotateX("+a+") "),u&&(o+="rotateY("+u+") ")}return o+="scale("+r.scale+", "+i.scale+")",n||o!==Ro?o:""}function ko(t){var e=t.deltaFinal;return 100*e.x.origin+"% "+100*e.y.origin+"% 0"}var Ro=Lo(Co.delta,Co.treeScale,{x:1,y:1}),Io=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","SetAxisTarget","Unmount"];function jo(t,e,n,r){var i,o,s=t.delta,a=t.layout,u=t.layoutCorrected,c=t.treeScale,l=e.target;o=a,Di((i=u).x,o.x),Di(i.y,o.y),function(t,e,n){var r=n.length;if(r){var i,o;e.x=e.y=1;for(var s=0;s<r;s++)o=(i=n[s]).getLayoutState().delta,e.x*=o.x.scale,e.y*=o.y.scale,Ui(t,o),ji(i)&&Gi(t,t,i.getLatestValues())}}(u,c,n),Pi(s,u,l,r)}var Do=function(){function t(){this.children=[],this.isDirty=!1}return t.prototype.add=function(t){Or(this.children,t),this.isDirty=!0},t.prototype.remove=function(t){Cr(this.children,t),this.isDirty=!0},t.prototype.forEach=function(t){this.isDirty&&this.children.sort(Mi),this.isDirty=!1,this.children.forEach(t)},t}();var No=function(t){var e=t.treeType,n=void 0===e?"":e,r=t.build,i=t.getBaseTarget,o=t.makeTargetAnimatable,s=t.measureViewportBox,a=t.render,u=t.readValueFromInstance,c=t.resetTransform,l=t.restoreTransform,h=t.removeValueFromRenderState,f=t.sortNodePosition,d=t.scrapeMotionValuesFromProps;return function(t,e){var p=t.parent,g=t.props,m=t.presenceId,v=t.blockInitialAnimation,y=t.visualState;void 0===e&&(e={});var b,_,w,x,T,S,M=y.latestValues,O=y.renderState,C=function(){var t=Io.map((function(){return new Lr})),e={},n={clearAllListeners:function(){return t.forEach((function(t){return t.clear()}))},updatePropListeners:function(t){return Io.forEach((function(r){var i;null===(i=e[r])||void 0===i||i.call(e);var o="on"+r,s=t[o];s&&(e[r]=n[o](s))}))}};return t.forEach((function(t,e){n["on"+Io[e]]=function(e){return t.add(e)},n["notify"+Io[e]]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.notify.apply(t,A([],P(e)))}})),n}(),L={isEnabled:!1,isHydrated:!1,isTargetLocked:!1,target:{x:{min:0,max:1},y:{min:0,max:1}},targetFinal:{x:{min:0,max:1},y:{min:0,max:1}}},k=L,R=M,I=Oo(),j=!1,D=new Map,N=new Map,F={},B=E({},M);function U(){b&&(Q.isProjectionReady()&&(Gi(k.targetFinal,k.target,R),Pi(I.deltaFinal,I.layoutCorrected,k.targetFinal,M)),z(),a(b,O))}function z(){var t=M;if(x&&x.isActive()){var n=x.getCrossfadeState(Q);n&&(t=n)}r(Q,O,t,k,I,e,g)}function V(){C.notifyUpdate(M)}function Z(){Q.layoutTree.forEach(Bo)}var G=d(g);for(var H in G){var W=G[H];void 0!==M[H]&&dt(W)&&W.set(M[H],!1)}var q=Y(g),X=K(g),Q=E(E({treeType:n,current:null,depth:p?p.depth+1:0,parent:p,children:new Set,path:p?A(A([],P(p.path)),[p]):[],layoutTree:p?p.layoutTree:new Do,presenceId:m,projection:L,variantChildren:X?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null===p||void 0===p?void 0:p.isMounted()),blockInitialAnimation:v,isMounted:function(){return Boolean(b)},mount:function(t){b=Q.current=t,Q.pointTo(Q),X&&p&&!q&&(S=null===p||void 0===p?void 0:p.addVariantChild(Q)),null===p||void 0===p||p.children.add(Q)},unmount:function(){qn.qY.update(V),qn.qY.render(U),qn.qY.preRender(Q.updateLayoutProjection),N.forEach((function(t){return t()})),Q.stopLayoutAnimation(),Q.layoutTree.remove(Q),null===S||void 0===S||S(),null===p||void 0===p||p.children.delete(Q),null===w||void 0===w||w(),C.clearAllListeners()},addVariantChild:function(t){var e,n=Q.getClosestVariantNode();if(n)return null===(e=n.variantChildren)||void 0===e||e.add(t),function(){return n.variantChildren.delete(t)}},sortNodePosition:function(t){return f&&n===t.treeType?f(Q.getInstance(),t.getInstance()):0},getClosestVariantNode:function(){return X?Q:null===p||void 0===p?void 0:p.getClosestVariantNode()},scheduleUpdateLayoutProjection:p?p.scheduleUpdateLayoutProjection:function(){return qn.ZP.preRender(Q.updateTreeLayoutProjection,!1,!0)},getLayoutId:function(){return g.layoutId},getInstance:function(){return b},getStaticValue:function(t){return M[t]},setStaticValue:function(t,e){return M[t]=e},getLatestValues:function(){return M},setVisibility:function(t){Q.isVisible!==t&&(Q.isVisible=t,Q.scheduleRender())},makeTargetAnimatable:function(t,e){return void 0===e&&(e=!0),o(Q,t,g,e)},addValue:function(t,e){Q.hasValue(t)&&Q.removeValue(t),D.set(t,e),M[t]=e.get(),function(t,e){var n=e.onChange((function(e){M[t]=e,g.onUpdate&&qn.ZP.update(V,!1,!0)})),r=e.onRenderRequest(Q.scheduleRender);N.set(t,(function(){n(),r()}))}(t,e)},removeValue:function(t){var e;D.delete(t),null===(e=N.get(t))||void 0===e||e(),N.delete(t),delete M[t],h(t,O)},hasValue:function(t){return D.has(t)},getValue:function(t,e){var n=D.get(t);return void 0===n&&void 0!==e&&(n=Rr(e),Q.addValue(t,n)),n},forEachValue:function(t){return D.forEach(t)},readValue:function(t){var n;return null!==(n=M[t])&&void 0!==n?n:u(b,t,e)},setBaseTarget:function(t,e){B[t]=e},getBaseTarget:function(t){if(i){var e=i(g,t);if(void 0!==e&&!dt(e))return e}return B[t]}},C),{build:function(){return z(),O},scheduleRender:function(){qn.ZP.render(U,!1,!0)},syncRender:U,setProps:function(t){g=t,C.updatePropListeners(t),F=function(t,e,n){var r;for(var i in e){var o=e[i],s=n[i];if(dt(o))t.addValue(i,o);else if(dt(s))t.addValue(i,Rr(o));else if(s!==o)if(t.hasValue(i)){var a=t.getValue(i);!a.hasAnimated&&a.set(o)}else t.addValue(i,Rr(null!==(r=t.getStaticValue(i))&&void 0!==r?r:o))}for(var i in n)void 0===e[i]&&t.removeValue(i);return e}(Q,d(g),F)},getProps:function(){return g},getVariant:function(t){var e;return null===(e=g.variants)||void 0===e?void 0:e[t]},getDefaultTransition:function(){return g.transition},getVariantContext:function(t){if(void 0===t&&(t=!1),t)return null===p||void 0===p?void 0:p.getVariantContext();if(!q){var e=(null===p||void 0===p?void 0:p.getVariantContext())||{};return void 0!==g.initial&&(e.initial=g.initial),e}for(var n={},r=0;r<Vo;r++){var i=zo[r],o=g[i];($(o)||!1===o)&&(n[i]=o)}return n},enableLayoutProjection:function(){L.isEnabled=!0,Q.layoutTree.add(Q)},lockProjectionTarget:function(){L.isTargetLocked=!0},unlockProjectionTarget:function(){Q.stopLayoutAnimation(),L.isTargetLocked=!1},getLayoutState:function(){return I},setCrossfader:function(t){x=t},isProjectionReady:function(){return L.isEnabled&&L.isHydrated&&I.isHydrated},startLayoutAnimation:function(t,e,n){void 0===n&&(n=!1);var r=Q.getProjectionAnimationProgress()[t],i=n?L.relativeTarget[t]:L.target[t],o=i.min,s=i.max-o;return r.clearListeners(),r.set(o),r.set(o),r.onChange((function(e){Q.setProjectionTargetAxis(t,e,e+s,n)})),Q.animateMotionValue(t,r,0,e)},stopLayoutAnimation:function(){pi((function(t){return Q.getProjectionAnimationProgress()[t].stop()}))},measureViewportBox:function(t){void 0===t&&(t=!0);var n=s(b,e);return t||$i(n,M),n},getProjectionAnimationProgress:function(){return T||(T={x:Rr(0),y:Rr(0)}),T},setProjectionTargetAxis:function(t,e,n,r){var i;void 0===r&&(r=!1),r?(L.relativeTarget||(L.relativeTarget={x:{min:0,max:1},y:{min:0,max:1}}),i=L.relativeTarget[t]):(L.relativeTarget=void 0,i=L.target[t]),L.isHydrated=!0,i.min=e,i.max=n,j=!0,C.notifySetAxisTarget()},rebaseProjectionTarget:function(t,e){void 0===e&&(e=I.layout);var n=Q.getProjectionAnimationProgress(),r=n.x,i=n.y,o=!L.relativeTarget&&!L.isTargetLocked&&!r.isAnimating()&&!i.isAnimating();(t||o)&&pi((function(t){var n=e[t],r=n.min,i=n.max;Q.setProjectionTargetAxis(t,r,i)}))},notifyLayoutReady:function(t){!function(t){var e=t.getProjectionParent();if(e){var n=Ri(e.getLayoutState().layout,t.getLayoutState().layout);pi((function(e){t.setProjectionTargetAxis(e,n[e].min,n[e].max,!0)}))}else t.rebaseProjectionTarget()}(Q),Q.notifyLayoutUpdate(I.layout,Q.prevViewportBox||I.layout,t)},resetTransform:function(){return c(Q,b,g)},restoreTransform:function(){return l(b,O)},updateLayoutProjection:function(){if(Q.isProjectionReady()){var t=I.delta,e=I.treeScale,n=e.x,r=e.y,i=I.deltaTransform;jo(I,k,Q.path,M),j&&Q.notifyViewportBoxUpdate(k.target,t),j=!1;var o=Lo(t,e);o===i&&n===e.x&&r===e.y||Q.scheduleRender(),I.deltaTransform=o}},updateTreeLayoutProjection:function(){Q.layoutTree.forEach(Fo),qn.ZP.preRender(Z,!1,!0)},getProjectionParent:function(){if(void 0===_){for(var t=!1,e=Q.path.length-1;e>=0;e--){var n=Q.path[e];if(n.projection.isEnabled){t=n;break}}_=t}return _},resolveRelativeTargetBox:function(){var t=Q.getProjectionParent();if(L.relativeTarget&&t&&(function(t,e){Si(t.target.x,t.relativeTarget.x,e.target.x),Si(t.target.y,t.relativeTarget.y,e.target.y)}(L,t.projection),ji(t))){var e=L.target;Gi(e,e,t.getLatestValues())}}
1,shouldResetTransform:function(){return Boolean(g._layoutResetTransform)},pointTo:function(t){k=t.projection,R=t.getLatestValues(),null===w||void 0===w||w(),w=Ne(t.onSetAxisTarget(Q.scheduleUpdateLayoutProjection),t.onLayoutAnimationComplete((function(){var t;Q.isPresent?Q.presence=ro.Present:null===(t=Q.layoutSafeToRemove)||void 0===t||t.call(Q)})))},isPresent:!0,presence:ro.Entering});return Q}};function Fo(t){t.resolveRelativeTargetBox()}function Bo(t){t.updateLayoutProjection()}var Uo,zo=A(["initial"],P(Wr)),Vo=zo.length,Zo=new Set(["width","height","top","left","right","bottom","x","y"]),Go=function(t){return Zo.has(t)},Ho=function(t,e){t.set(e,!1),t.set(e)},Wo=function(t){return t===Ct||t===At};!function(t){t.width="width",t.height="height",t.left="left",t.right="right",t.top="top",t.bottom="bottom"}(Uo||(Uo={}));var $o=function(t,e){return parseFloat(t.split(", ")[e])},qo=function(t,e){return function(n,r){var i=r.transform;if("none"===i||!i)return 0;var o=i.match(/^matrix3d\((.+)\)$/);if(o)return $o(o[1],e);var s=i.match(/^matrix\((.+)\)$/);return s?$o(s[1],t):0}},Xo=new Set(["x","y","z"]),Yo=st.filter((function(t){return!Xo.has(t)}));var Ko={width:function(t){var e=t.x;return e.max-e.min},height:function(t){var e=t.y;return e.max-e.min},top:function(t,e){var n=e.top;return parseFloat(n)},left:function(t,e){var n=e.left;return parseFloat(n)},bottom:function(t,e){var n=t.y,r=e.top;return parseFloat(r)+(n.max-n.min)},right:function(t,e){var n=t.x,r=e.left;return parseFloat(r)+(n.max-n.min)},x:qo(4,13),y:qo(5,14)},Qo=function(t,e,n,r){void 0===n&&(n={}),void 0===r&&(r={}),e=E({},e),r=E({},r);var i=Object.keys(e).filter(Go),o=[],s=!1,a=[];if(i.forEach((function(i){var u=t.getValue(i);if(t.hasValue(i)){var c,l=n[i],h=e[i],f=Dr(l);if(se(h))for(var d=h.length,p=null===h[0]?1:0;p<d;p++)c?Dr(h[p]):(c=Dr(h[p]))===f||Wo(f)&&Wo(c);else c=Dr(h);if(f!==c)if(Wo(f)&&Wo(c)){var g=u.get();"string"===typeof g&&u.set(parseFloat(g)),"string"===typeof h?e[i]=parseFloat(h):Array.isArray(h)&&c===At&&(e[i]=h.map(parseFloat))}else(null===f||void 0===f?void 0:f.transform)&&(null===c||void 0===c?void 0:c.transform)&&(0===l||0===h)?0===l?u.set(c.transform(l)):e[i]=f.transform(h):(s||(o=function(t){var e=[];return Yo.forEach((function(n){var r=t.getValue(n);void 0!==r&&(e.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),e.length&&t.syncRender(),e}(t),s=!0),a.push(i),r[i]=void 0!==r[i]?r[i]:e[i],Ho(u,h))}})),a.length){var u=function(t,e,n){var r=e.measureViewportBox(),i=e.getInstance(),o=getComputedStyle(i),s=o.display,a={top:o.top,left:o.left,bottom:o.bottom,right:o.right,transform:o.transform};"none"===s&&e.setStaticValue("display",t.display||"block"),e.syncRender();var u=e.measureViewportBox();return n.forEach((function(n){var i=e.getValue(n);Ho(i,Ko[n](r,a)),t[n]=Ko[n](u,o)})),t}(e,t,a);return o.length&&o.forEach((function(e){var n=P(e,2),r=n[0],i=n[1];t.getValue(r).set(i)})),t.syncRender(),{target:u,transitionEnd:r}}return{target:e,transitionEnd:r}};function Jo(t,e,n,r){return function(t){return Object.keys(t).some(Go)}(e)?Qo(t,e,n,r):{target:e,transitionEnd:r}}var ts=function(t,e,n,r){var i=function(t,e,n){var r,i=T(e,[]),o=t.getInstance();if(!(o instanceof HTMLElement))return{target:i,transitionEnd:n};for(var s in n&&(n=E({},n)),t.forEachValue((function(t){var e=t.get();if(so(e)){var n=uo(e,o);n&&t.set(n)}})),i){var a=i[s];if(so(a)){var u=uo(a,o);u&&(i[s]=u,n&&(null!==(r=n[s])&&void 0!==r||(n[s]=a)))}}return{target:i,transitionEnd:n}}(t,e,r);return Jo(t,e=i.target,n,r=i.transitionEnd)};var es={treeType:"dom",readValueFromInstance:function(t,e){if(ct(e)){var n=_r(e);return n&&n.default||0}var r,i=(r=t,window.getComputedStyle(r));return(gt(e)?i.getPropertyValue(e):i[e])||0},sortNodePosition:function(t,e){return 2&t.compareDocumentPosition(e)?1:-1},getBaseTarget:function(t,e){var n;return null===(n=t.style)||void 0===n?void 0:n[e]},measureViewportBox:function(t,e){return _i(t,e.transformPagePoint)},resetTransform:function(t,e,n){var r=n.transformTemplate;e.style.transform=r?r({},""):"none",t.scheduleRender()},restoreTransform:function(t,e){t.style.transform=e.style.transform},removeValueFromRenderState:function(t,e){var n=e.vars,r=e.style;delete n[t],delete r[t]},makeTargetAnimatable:function(t,e,n,r){var i=n.transformValues;void 0===r&&(r=!0);var o=e.transition,s=e.transitionEnd,a=T(e,["transition","transitionEnd"]),u=function(t,e,n){var r,i,o={};for(var s in t)o[s]=null!==(r=zr(s,e))&&void 0!==r?r:null===(i=n.getValue(s))||void 0===i?void 0:i.get();return o}(a,o||{},t);if(i&&(s&&(s=i(s)),a&&(a=i(a)),u&&(u=i(u))),r){!function(t,e,n){var r,i,o,s,a=Object.keys(e).filter((function(e){return!t.hasValue(e)})),u=a.length;if(u)for(var c=0;c<u;c++){var l=a[c],h=e[l],f=null;Array.isArray(h)&&(f=h[0]),null===f&&(f=null!==(i=null!==(r=n[l])&&void 0!==r?r:t.readValue(l))&&void 0!==i?i:e[l]),void 0!==f&&null!==f&&("string"===typeof f&&/^\-?\d*\.?\d+$/.test(f)?f=parseFloat(f):!Fr(f)&&yn.test(h)&&(f=wr(l,h)),t.addValue(l,Rr(f)),null!==(o=(s=n)[l])&&void 0!==o||(s[l]=f),t.setBaseTarget(l,f))}}(t,a,u);var c=ts(t,a,u,s);s=c.transitionEnd,a=c.target}return E({transition:o,transitionEnd:s},a)},scrapeMotionValuesFromProps:re,build:function(t,e,n,r,i,o,s){void 0!==t.isVisible&&(e.style.visibility=t.isVisible?"visible":"hidden");var a=r.isEnabled&&i.isHydrated;jt(e,n,r,i,o,s.transformTemplate,a?Lo:void 0,a?ko:void 0)},render:te},ns=No(es),rs=No(E(E({},es),{getBaseTarget:function(t,e){return t[e]},readValueFromInstance:function(t,e){var n;return ct(e)?(null===(n=_r(e))||void 0===n?void 0:n.default)||0:(e=ee.has(e)?e:Jt(e),t.getAttribute(e))},scrapeMotionValuesFromProps:ie,build:function(t,e,n,r,i,o,s){var a=r.isEnabled&&i.isHydrated;qt(e,n,r,i,o,s.transformTemplate,a?Lo:void 0,a?ko:void 0)},render:ne})),is=function(t,e){return rt(t)?rs(e,{enableHardwareAcceleration:!1}):ns(e,{enableHardwareAcceleration:!0})},os=E(E(E(E({},Qr),Be),oo),Mo),ss=et((function(t,e){return function(t,e,n,r){var i=e.forwardMotionProps,o=void 0!==i&&i,s=rt(t)?he:de;return E(E({},s),{preloadedFeatures:n,useRender:Kt(o),createVisualElement:r,Component:t})}(t,e,os,is)}));var as=n(8554),us=n.n(as);function cs(){return(cs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var ls=t=>{if(t)return us()(t,{enter:{visibility:"visible"},exit:{transitionEnd:{visibility:"hidden"}}})},hs=ss(i.m$.section),fs=a.forwardRef(((t,e)=>{var{isOpen:n}=_();return a.createElement(hs,cs({ref:e,variants:ls(t.variants)},t,{initial:!1,animate:n?"enter":"exit"}))}));fs.defaultProps={variants:{exit:{opacity:0,scale:.95,transition:{duration:.1,ease:[.4,0,1,1]}}
1,enter:{scale:1,opacity:1,transition:{duration:.15,ease:[0,0,.2,1]}}}};var ds=n(1034),ps=n(4577);function gs(){return(gs=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var ms=n(7768),vs=n(7248),ys=n(3158);function bs(t){var e,{ref:n,elements:r,enabled:i}=t,a=(e="Safari",!!o.jU&&function(t){var{userAgent:e,vendor:n}=t,r=/(android)/i.test(e);switch(!0){case/CriOS/.test(e):return"Chrome for iOS";case/Edg\//.test(e):return"Edge";case r&&/Silk\//.test(e):return"Silk";case/Chrome/.test(e)&&/Google Inc/.test(n):return"Chrome";case/Firefox\/\d+\.\d+$/.test(e):return"Firefox";case r:return"AOSP";case/MSIE|Trident/.test(e):return"IE";case/Safari/.test(t.userAgent)&&/Apple Computer/.test(e):return"Safari";case/AppleWebKit/.test(e):return"WebKit";default:return null}}(window.navigator)===e);(0,ys.m)((()=>(0,o.lZ)(n.current)),"pointerdown",(t=>{if(a&&i){var e=t.target,u=(null!=r?r:[n]).some((t=>{var n=(0,s.Ik)(t)?t.current:t;return(0,o.r3)(n,e)}));!(0,ms.H9)(e)&&u&&(t.preventDefault(),(0,vs.T)(e))}}))}var _s=n(2653);function ws(t,e){var{shouldFocus:n,visible:r,focusRef:i}=e,s=n&&!r;(0,_s.r)((()=>{if(s&&!function(t){var e=t.current;if(!e)return!1;var n=(0,o.vY)(e);return!!n&&!(0,o.r3)(e,n)&&!!(0,ms.Wq)(n)}(t)){var e=(null==i?void 0:i.current)||t.current;e&&(0,vs.T)(e,{nextTick:!0})}}),[s,t,i])}var xs=["input:not([disabled])","select:not([disabled])","textarea:not([disabled])","embed","iframe","object","a[href]","area[href]","button:not([disabled])","[tabindex]","audio[controls]","video[controls]","*[tabindex]:not([aria-disabled])","*[contenteditable]"].join();function Es(t){var e=Array.from(t.querySelectorAll(xs));return e.unshift(t),e.filter(ms.EB).filter((t=>"none"!==window.getComputedStyle(t).display))}var Ts=n(4941),Ps={preventScroll:!0,shouldFocus:!1};var As=n(2947);function Ss(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function Ms(t){if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e?e.defaultView:window}return t}function Os(t){var e=Ms(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Cs(t){return t instanceof Ms(t).Element||t instanceof Element}function Ls(t){return t instanceof Ms(t).HTMLElement||t instanceof HTMLElement}function ks(t){return t?(t.nodeName||"").toLowerCase():null}function Rs(t){return(Cs(t)?t.ownerDocument:t.document).documentElement}function Is(t){return Ss(Rs(t)).left+Os(t).scrollLeft}function js(t){return Ms(t).getComputedStyle(t)}function Ds(t){var e=js(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Ns(t,e,n){void 0===n&&(n=!1);var r=Rs(e),i=Ss(t),o=Ls(e),s={scrollLeft:0,scrollTop:0},a={x:0,y:0};return(o||!o&&!n)&&(("body"!==ks(e)||Ds(r))&&(s=function(t){return t!==Ms(t)&&Ls(t)?{scrollLeft:(e=t).scrollLeft,scrollTop:e.scrollTop}:Os(t);var e}(e)),Ls(e)?((a=Ss(e)).x+=e.clientLeft,a.y+=e.clientTop):r&&(a.x=Is(r))),{x:i.left+s.scrollLeft-a.x,y:i.top+s.scrollTop-a.y,width:i.width,height:i.height}}function Fs(t){return{x:t.offsetLeft,y:t.offsetTop,width:t.offsetWidth,height:t.offsetHeight}}function Bs(t){return"html"===ks(t)?t:t.assignedSlot||t.parentNode||t.host||Rs(t)}function Us(t){return["html","body","#document"].indexOf(ks(t))>=0?t.ownerDocument.body:Ls(t)&&Ds(t)?t:Us(Bs(t))}function zs(t,e){void 0===e&&(e=[]);var n=Us(t),r="body"===ks(n),i=Ms(n),o=r?[i].concat(i.visualViewport||[],Ds(n)?n:[]):n,s=e.concat(o);return r?s:s.concat(zs(Bs(o)))}function Vs(t){return["table","td","th"].indexOf(ks(t))>=0}function Zs(t){if(!Ls(t)||"fixed"===js(t).position)return null;var e=t.offsetParent;if(e){var n=Rs(e);if("body"===ks(e)&&"static"===js(e).position&&"static"!==js(n).position)return n}return e}function Gs(t){for(var e=Ms(t),n=Zs(t);n&&Vs(n)&&"static"===js(n).position;)n=Zs(n);return n&&"body"===ks(n)&&"static"===js(n).position?e:n||function(t){for(var e=Bs(t);Ls(e)&&["html","body"].indexOf(ks(e))<0;){var n=js(e);if("none"!==n.transform||"none"!==n.perspective||n.willChange&&"auto"!==n.willChange)return e;e=e.parentNode}return null}(t)||e}var Hs="top",Ws="bottom",$s="right",qs="left",Xs="auto",Ys=[Hs,Ws,$s,qs],Ks="start",Qs="end",Js="viewport",ta="popper",ea=Ys.reduce((function(t,e){return t.concat([e+"-"+Ks,e+"-"+Qs])}),[]),na=[].concat(Ys,[Xs]).reduce((function(t,e){return t.concat([e,e+"-"+Ks,e+"-"+Qs])}),[]),ra=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ia(t){var e=new Map,n=new Set,r=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEac
1h((function(t){if(!n.has(t)){var r=e.get(t);r&&i(r)}})),r.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),r}function oa(t){var e;return function(){return e||(e=new Promise((function(n){Promise.resolve().then((function(){e=void 0,n(t())}))}))),e}}var sa={placement:"bottom",modifiers:[],strategy:"absolute"};function aa(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"===typeof t.getBoundingClientRect)}))}function ua(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,r=void 0===n?[]:n,i=e.defaultOptions,o=void 0===i?sa:i;return function(t,e,n){void 0===n&&(n=o);var i={placement:"bottom",orderedModifiers:[],options:Object.assign(Object.assign({},sa),o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},s=[],a=!1,u={state:i,setOptions:function(n){c(),i.options=Object.assign(Object.assign(Object.assign({},o),i.options),n),i.scrollParents={reference:Cs(t)?zs(t):t.contextElement?zs(t.contextElement):[],popper:zs(e)};var a=function(t){var e=ia(t);return ra.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}(function(t){var e=t.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign(Object.assign(Object.assign({},n),e),{},{options:Object.assign(Object.assign({},n.options),e.options),data:Object.assign(Object.assign({},n.data),e.data)}):e,t}),{});return Object.keys(e).map((function(t){return e[t]}))}([].concat(r,i.options.modifiers)));return i.orderedModifiers=a.filter((function(t){return t.enabled})),i.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,r=void 0===n?{}:n,o=t.effect;if("function"===typeof o){var a=o({state:i,name:e,instance:u,options:r}),c=function(){};s.push(a||c)}})),u.update()},forceUpdate:function(){if(!a){var t=i.elements,e=t.reference,n=t.popper;if(aa(e,n)){i.rects={reference:Ns(e,Gs(n),"fixed"===i.options.strategy),popper:Fs(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach((function(t){return i.modifiersData[t.name]=Object.assign({},t.data)}));for(var r=0;r<i.orderedModifiers.length;r++)if(!0!==i.reset){var o=i.orderedModifiers[r],s=o.fn,c=o.options,l=void 0===c?{}:c,h=o.name;"function"===typeof s&&(i=s({state:i,options:l,name:h,instance:u})||i)}else i.reset=!1,r=-1}}},update:oa((function(){return new Promise((function(t){u.forceUpdate(),t(i)}))})),destroy:function(){c(),a=!0}};if(!aa(t,e))return u;function c(){s.forEach((function(t){return t()})),s=[]}return u.setOptions(n).then((function(t){!a&&n.onFirstUpdate&&n.onFirstUpdate(t)})),u}}var ca={passive:!0};function la(t){return t.split("-")[0]}function ha(t){return t.split("-")[1]}function fa(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function da(t){var e,n=t.reference,r=t.element,i=t.placement,o=i?la(i):null,s=i?ha(i):null,a=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(o){case Hs:e={x:a,y:n.y-r.height};break;case Ws:e={x:a,y:n.y+n.height};break;case $s:e={x:n.x+n.width,y:u};break;case qs:e={x:n.x-r.width,y:u};break;default:e={x:n.x,y:n.y}}var c=o?fa(o):null;if(null!=c){var l="y"===c?"height":"width";switch(s){case Ks:e[c]=Math.floor(e[c])-Math.floor(n[l]/2-r[l]/2);break;case Qs:e[c]=Math.floor(e[c])+Math.ceil(n[l]/2-r[l]/2)}}return e}var pa={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ga(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.offsets,s=t.position,a=t.gpuAcceleration,u=t.adaptive,c=function(t){var e=t.x,n=t.y,r=window.devicePixelRatio||1;return{x:Math.round(e*r)/r||0,y:Math.round(n*r)/r||0}}(o),l=c.x,h=c.y,f=o.hasOwnProperty("x"),d=o.hasOwnProperty("y"),p=qs,g=Hs,m=window;if(u){var v=Gs(n);v===Ms(n)&&(v=Rs(n)),i===Hs&&(g=Ws,h-=v.clientHeight-r.height,h*=a?1:-1),i===qs&&(p=$s,l-=v.clientWidth-r.width,l*=a?1:-1)}var y,b=Object.assign({position:s},u&&pa);return a?Object.assign(Object.assign({},b),{},((y={})[g]=d?"0":"",y[p]=f?"0":"",y.transform=(m.devicePixelRatio||1)<2?"translate("+l+"px, "+h+"px)":"translate3d("+l+"px, "+h+"px, 0)",y)):Object.assign(Object.assign({},b),{},((e={})[g]=d?h+"px":"",e[p]=f?l+"px":"",e.transform="",e))}
vendor: 11,697 bytes, line 1
1var ma={left:"right",right:"left",bottom:"top",top:"bottom"};function va(t){return t.replace(/left|right|bottom|top/g,(function(t){return ma[t]}))}var ya={start:"end",end:"start"};function ba(t){return t.replace(/start|end/g,(function(t){return ya[t]}))}function _a(t,e){var n=Boolean(e.getRootNode&&e.getRootNode().host);if(t.contains(e))return!0;if(n){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wa(t){return Object.assign(Object.assign({},t),{},{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function xa(t,e){return e===Js?wa(function(t){var e=Ms(t),n=Rs(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,a=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:i,height:o,x:s+Is(t),y:a}}(t)):Ls(e)?function(t){var e=Ss(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):wa(function(t){var e=Rs(t),n=Os(t),r=t.ownerDocument.body,i=Math.max(e.scrollWidth,e.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=Math.max(e.scrollHeight,e.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),s=-n.scrollLeft+Is(t),a=-n.scrollTop;return"rtl"===js(r||e).direction&&(s+=Math.max(e.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:s,y:a}}(Rs(t)))}function Ea(t,e,n){var r="clippingParents"===e?function(t){var e=zs(Bs(t)),n=["absolute","fixed"].indexOf(js(t).position)>=0&&Ls(t)?Gs(t):t;return Cs(n)?e.filter((function(t){return Cs(t)&&_a(t,n)&&"body"!==ks(t)})):[]}(t):[].concat(e),i=[].concat(r,[n]),o=i[0],s=i.reduce((function(e,n){var r=xa(t,n);return e.top=Math.max(r.top,e.top),e.right=Math.min(r.right,e.right),e.bottom=Math.min(r.bottom,e.bottom),e.left=Math.max(r.left,e.left),e}),xa(t,o));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Ta(t){return Object.assign(Object.assign({},{top:0,right:0,bottom:0,left:0}),t)}function Pa(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}function Aa(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=void 0===r?t.placement:r,o=n.boundary,s=void 0===o?"clippingParents":o,a=n.rootBoundary,u=void 0===a?Js:a,c=n.elementContext,l=void 0===c?ta:c,h=n.altBoundary,f=void 0!==h&&h,d=n.padding,p=void 0===d?0:d,g=Ta("number"!==typeof p?p:Pa(p,Ys)),m=l===ta?"reference":ta,v=t.elements.reference,y=t.rects.popper,b=t.elements[f?m:l],_=Ea(Cs(b)?b:b.contextElement||Rs(t.elements.popper),s,u),w=Ss(v),x=da({reference:w,element:y,strategy:"absolute",placement:i}),E=wa(Object.assign(Object.assign({},y),x)),T=l===ta?E:w,P={top:_.top-T.top+g.top,bottom:T.bottom-_.bottom+g.bottom,left:_.left-T.left+g.left,right:T.right-_.right+g.right},A=t.modifiersData.offset;if(l===ta&&A){var S=A[i];Object.keys(P).forEach((function(t){var e=[$s,Ws].indexOf(t)>=0?1:-1,n=[Hs,Ws].indexOf(t)>=0?"y":"x";P[t]+=S[n]*e}))}return P}function Sa(t,e,n){return Math.max(t,Math.min(e,n))}function Ma(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Oa(t){return[Hs,$s,Ws,qs].some((function(e){return t[e]>=0}))}var Ca=ua({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=void 0===i||i,s=r.resize,a=void 0===s||s,u=Ms(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",n.update,ca)})),a&&u.addEventListener("resize",n.update,ca),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",n.update,ca)})),a&&u.removeEventListener("resize",n.update,ca)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=da({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=void 0===r||r,o=n.adaptive,s=void 0===o||o,a={placement:la(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign(Object.assign({},e.styles.popper),ga(Object.assign(Object.assign({},a),{},{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:s})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign(Object.assign({},e.styles.arrow),ga(Object.assign(Object.assign({},a),{},{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1})))),e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{},{"data-popper-placement":e.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},r=e.attributes[t]||{},i=e.elements[t];Ls(i)&&ks(i)&&(Object.assign(i.style,n),Object.keys(r).forEach((function(t){var e=r[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var r=e.elements[t],i=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});Ls(r)&&ks(r)&&(Object.assign(r.style,o),Object.keys(i).forEach((function(t){r.removeAttribute(t)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=void 0===i?[0,0]:i,s=na.reduce((function(t,n){return t[n]=function(t,e,n){var r=la(t),i=[qs,Hs].indexOf(r)>=0?-1:1,o="function"===typeof n?n(Object.assign(Object.assign({},e),{},{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*i,[qs,$s].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,o),t}),{}),a=s[e.placement],u=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=c),e.modifiersData[r]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0===s||s,u=n.fallbackPlacements,c=n.padding,l=n.boundary,h=n.rootBoundary,f=n.altBoundary,d=n.flipVariations,p=void 0===d||d,g=n.allowedAutoPlacements,m=e.options.placement,v=la(m),y=u||(v===m||!p?[va(m)]:function(t){if(la(t)===Xs)return[];var e=va(t);return[ba(t),e,ba(e)]}(m)),b=[m].concat(y).reduce((function(t,n){return t.concat(la(n)===Xs?function(t,e){void 0===e&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,u=n.allowedAutoPlacements,c=void 0===u?na:u,l=ha(r),h=l?a?ea:ea.filter((function(t){return ha(t)===l})):Ys,f=h.filter((function(t){return c.indexOf(t)>=0}));0===f.length&&(f=h);var d=f.reduce((function(e,n){return e[n]=Aa(t,{placement:n,boundary:i,rootBoundary:o,padding:s})[la(n)],e}),{});return Object.keys(d).sort((function(t,e){return d[t]-d[e]}))}(e,{placement:n,boundary:l,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:g}):n)}),[]),_=e.rects.reference,w=e.rects.popper,x=new Map,E=!0,T=b[0],P=0;P<b.length;P++){var A=b[P],S=la(A),M=ha(A)===Ks,O=[Hs,Ws].indexOf(S)>=0,C=O?"width":"height",L=Aa(e,{placement:A,boundary:l,rootBoundary:h,altBoundary:f,padding:c}),k=O?M?$s:qs:M?Ws:Hs;_[C]>w[C]&&(k=va(k));var R=va(k),I=[];if(o&&I.push(L[S]<=0),a&&I.push(L[k]<=0,L[R]<=0),I.every((function(t){return t}))){T=A,E=!1;break}x.set(A,I)}if(E)for(var j=function(t){var e=b.find((function(e){var n=x.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return T=e,"break"},D=p?3:1;D>0;D--){if("break"===j(D))break}e.placement!==T&&(e.modifiersData[r]._skip=!0,e.placement=T,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=void 0===i||i,s=n.altAxis,a=void 0!==s&&s,u=n.boundary,c=n.rootBoundary,l=n.altBoundary,h=n.padding,f=n.tether,d=void 0===f||f,p=n.tetherOffset,g=void 0===p?0:p,m=Aa(e,{boundary:u,rootBoundary:c,padding:h,altBoundary:l}),v=la(e.placement),y=ha(e.placement),b=!y,_=fa(v),w="x"===_?"y":"x",x=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,P="function"===typeof g?g(Object.assign(Object.assign({},e.rects),{},{placement:e.placement})):g,A={x:0,y:0};if(x){if(o){var S="y"===_?Hs:qs,M="y"===_?Ws:$s,O="y"===_?"height":"width",C=x[_],L=x[_]+m[S],k=x[_]-m[M],R=d?-T[O]/2:0,I=y===Ks?E[O]:T[O],j=y===Ks?-T[O]:-E[O],D=e.elements.arrow,N=d&&D?Fs(D):{width:0,height:0},F=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=F[S],U=F[M],z=Sa(0,E[O],N[O]),V=b?E[O]/2-R-z-B-P:I-z-B-P,Z=b?-E[O]/2+R+z+U+P:j+z+U+P,G=e.elements.arrow&&Gs(e.elements.arrow),H=G?"y"===_?G.clientTop||0:G.clientLeft||0:0,W=e.modifiersData.offset?e.modifiersData.offset[e.placement][_]:0,$=x[_]+V-W-H,q=x[_]+Z-W,X=Sa(d?Math.min(L,$):L,C,d?Math.max(k,q):k);x[_]=X,A[_]=X-C}if(a){var Y="x"===_?Hs:qs,K="x"===_?Ws:$s,Q=x[w],J=Sa(Q+m[Y],Q,Q-m[K]);x[w]=J,A[w]=J-Q}e.modifiersData[r]=A}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,r=t.name,i=n.elements.arrow,o=n.modifiersData.popperOffsets,s=la(n.placement),a=fa(s),u=[qs,$s].indexOf(s)>=0?"height":"width";if(i&&o){var c=n.modifiersData[r+"#persistent"].padding,l=Fs(i),h="y"===a?Hs:qs,f="y"===a?Ws:$s,d=n.rects.reference[u]+n.rects.reference[a]-o[a]-n.rects.popper[u],p=o[a]-n.rects.reference[a],g=Gs(i),m=g?"y"===a?g.clientHeight||0:g.clientWidth||0:0,v=d/2-p/2,y=c[h],b=m-l[u]-c[f],_=m/2-l[u]/2+v,w=Sa(y,_,b),x=a;n.modifiersData[r]=((e={})[x]=w,e.centerOffset=w-_,e)}},effect:function(t){var e=t.state,n=t.options,r=t.name,i=n.element,o=void 0===i?"[data-popper-arrow]":i,s=n.padding,a=void 0===s?0:s;null!=o&&("string"!==typeof o||(o=e.elements.popper.querySelector(o)))&&_a(e.elements.popper,o)&&(e.elements.arrow=o,e.modifiersData[r+"#persistent"]={padding:Ta("number"!==typeof a?a:Pa(a,Ys))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,s=Aa(e,{elementContext:"reference"}),a=Aa(e,{altBoundary:!0}),u=Ma(s,r),c=Ma(a,i,o),l=Oa(u),h=Oa(c);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:c,isReferenceHidden:l,hasPopperEscaped:h},e.attributes.popper=Object.assign(Object.assign({},e.attributes.popper),{},{"data-popper-reference-hidden":l,"data-popper-escaped":h})}}]});function La(){return(La=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var ka=(t,e)=>({var:t,varRef:e?"var("+t+", "+e+")":"var("+t+")"}),Ra={arrowShadowColor:ka("--popper-arrow-shadow-color"),arrowSize:ka("--popper-arrow-size","8px"),arrowSizeHalf:ka("--popper-arrow-size-half"),arrowBg:ka("--popper-arrow-bg"),transformOrigin:ka("--popper-transform-origin"),arrowOffset:ka("--popper-arrow-offset")};var Ia={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"r
1ight center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},ja={scroll:!0,resize:!0};var Da={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:t=>{var{state:e}=t;e.styles.popper.width=e.rects.reference.width+"px"},effect:t=>{var{state:e}=t;return()=>{var t=e.elements.reference;e.elements.popper.style.width=t.offsetWidth+"px"}}},Na={name:"transformOrigin",enabled:!0,phase:"write",fn:t=>{var{state:e}=t;Fa(e)},effect:t=>{var{state:e}=t;return()=>{Fa(e)}}},Fa=t=>{var e;t.elements.popper.style.setProperty(Ra.transformOrigin.var,(e=t.placement,Ia[e]))},Ba={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:t=>{var{state:e}=t;Ua(e)}},Ua=t=>{var e;if(t.placement){var n=za(t.placement);if(null!=(e=t.elements)&&e.arrow&&n){Object.assign(t.elements.arrow.style,{[n.property]:n.value,width:Ra.arrowSize.varRef,height:Ra.arrowSize.varRef,zIndex:-1});var r={[Ra.arrowSizeHalf.var]:"calc("+Ra.arrowSize.varRef+" / 2)",[Ra.arrowOffset.var]:"calc("+Ra.arrowSizeHalf.varRef+" * -1)"};for(var i in r)t.elements.arrow.style.setProperty(i,r[i])}}},za=t=>t.startsWith("top")?{property:"bottom",value:Ra.arrowOffset.varRef}:t.startsWith("bottom")?{property:"top",value:Ra.arrowOffset.varRef}:t.startsWith("left")?{property:"right",value:Ra.arrowOffset.varRef}:t.startsWith("right")?{property:"left",value:Ra.arrowOffset.varRef}:void 0,Va={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:t=>{var{state:e}=t;Za(e)},effect:t=>{var{state:e}=t;return()=>{Za(e)}}},Za=t=>{if(t.elements.arrow){var e,n=t.elements.arrow.querySelector("[data-popper-arrow-inner]");if(n)Object.assign(n.style,{transform:"rotate(45deg)",background:Ra.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:(e=t.placement,e.includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":e.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":e.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":e.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0)})}},Ga={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},Ha={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function Wa(){return(Wa=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function $a(t){void 0===t&&(t={});var{enabled:e=!0,modifiers:n=[],placement:r="bottom",strategy:i="absolute",arrowPadding:o=8,eventListeners:s=!0,offset:u,gutter:c=8,flip:l=!0,boundary:h="clippingParents",preventOverflow:f=!0,matchWidth:d,direction:p="ltr"}=t,g=(0,a.useRef)(null),m=(0,a.useRef)(null),v=(0,a.useRef)(null),y=function(t,e){var n,r;void 0===e&&(e="ltr");var i=(null==(n=Ga[t])?void 0:n[e])||t;return"ltr"===e?i:null!=(r=Ha[t])?r:i}(r,p),b=(0,a.useRef)((()=>{})),_=(0,a.useCallback)((()=>{var t;e&&g.current&&m.current&&(null==b.current||b.current(),v.current=Ca(g.current,m.current,{placement:y,modifiers:[Va,Ba,Na,Wa({},Da,{enabled:!!d}),Wa({name:"eventListeners"},(t=s,"object"===typeof t?{enabled:!0,options:La({},ja,t)}:{enabled:t,options:ja})),{name:"arrow",options:{padding:o}},{name:"offset",options:{offset:null!=u?u:[0,c]}},{name:"flip",enabled:!!l,options:{padding:8}},{name:"preventOverflow",enabled:!!f,options:{boundary:h}},...n],strategy:i}),v.current.forceUpdate(),b.current=v.current.destroy)}),[y,e,n,d,s,o,u,c,l,f,h,i]);(0,a.useEffect)((()=>()=>{var t;g.current||m.current||(null==(t=v.current)||t.destroy(),v.current=null)}),[]);var w=(0,a.useCallback)((t=>{g.current=t,_()}),[_]),x=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Wa({},t,{ref:(0,As.l)(w,e)})}),[w]),E=(0,a.useCallback)((t=>{m.current=t,_()}),[_]),T=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Wa({},t,{ref:(0,As.l)(E,e),style:Wa({},t.style,{position:i,minWidth:"max-content",inset:"0 auto auto 0"})})}),[i,E]),P=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Wa({},function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["size","shadowColor","bg","style"]),{ref:e,"data-popper-arrow":"",style:qa(t)})}),[]),A=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Wa({},t,{ref:e,"data-popper-arrow-inner":""})}),[]);
1return{update(){var t;null==(t=v.current)||t.update()},forceUpdate(){var t;null==(t=v.current)||t.forceUpdate()},transformOrigin:Ra.transformOrigin.varRef,referenceRef:w,popperRef:E,getPopperProps:T,getArrowProps:P,getArrowInnerProps:A,getReferenceProps:x}}function qa(t){var{size:e,shadowColor:n,bg:r,style:i}=t,o=Wa({},i,{position:"absolute"});return e&&(o["--popper-arrow-size"]=e),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}var Xa=n(1076);function Ya(){return(Ya=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var Ka={click:"click",hover:"hover"};function Qa(t){void 0===t&&(t={});var{closeOnBlur:e=!0,closeOnEsc:n=!0,initialFocusRef:r,id:i,returnFocusOnClose:u=!0,autoFocus:c=!0,arrowSize:l,arrowShadowColor:h,trigger:f=Ka.click,openDelay:d=200,closeDelay:p=200,isLazy:g,lazyBehavior:m="unmount",computePositionOnMount:y}=t,b=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["closeOnBlur","closeOnEsc","initialFocusRef","id","returnFocusOnClose","autoFocus","arrowSize","arrowShadowColor","trigger","openDelay","closeDelay","isLazy","lazyBehavior","computePositionOnMount"]),{isOpen:_,onClose:w,onOpen:x,onToggle:E}=function(t){void 0===t&&(t={});var{onClose:e,onOpen:n,isOpen:r,id:i}=t,[o,s]=a.useState(t.defaultIsOpen||!1),[u,c]=(0,ds.p)(r,o),l=(0,ps.Me)(i,"disclosure"),h=a.useCallback((()=>{u||s(!1),null==e||e()}),[u,e]),f=a.useCallback((()=>{u||s(!0),null==n||n()}),[u,n]),d=a.useCallback((()=>{(c?h:f)()}),[c,f,h]);return{isOpen:!!c,onOpen:f,onClose:h,onToggle:d,isControlled:u,getButtonProps:function(t){return void 0===t&&(t={}),gs({},t,{"aria-expanded":"true","aria-controls":l,onClick:(0,v.v0)(t.onClick,d)})},getDisclosureProps:function(t){return void 0===t&&(t={}),gs({},t,{hidden:!c,id:l})}}}(t),T=(0,a.useRef)(null),P=(0,a.useRef)(null),A=(0,a.useRef)(!1),S=(0,a.useRef)(!1);_&&(S.current=!0);var[M,O]=(0,a.useState)(!1),[C,L]=(0,a.useState)(!1),[k,R,I,j]=(0,ps.ZS)(i,"popover-trigger","popover-content","popover-header","popover-body"),{referenceRef:D,getArrowProps:N,getPopperProps:F,getArrowInnerProps:B,forceUpdate:U}=$a(Ya({},b,{enabled:_||!!y}));bs({enabled:_,ref:T}),ws(P,{focusRef:T,visible:_,shouldFocus:u&&f===Ka.click}),function(t,e){void 0===e&&(e=Ps);var{focusRef:n,preventScroll:r,shouldFocus:i,visible:u}=e,c=(0,s.Ik)(t)?t.current:t,l=i&&u,h=(0,a.useCallback)((()=>{if(c&&l&&!(0,o.r3)(c,document.activeElement))if(null!=n&&n.current)(0,vs.T)(n.current,{preventScroll:r,nextTick:!0});else{var t=Es(c);t.length>0&&(0,vs.T)(t[0],{preventScroll:r,nextTick:!0})}}),[l,r,c,n]);(0,_s.r)((()=>{h()}),[h]),(0,Ts.O)("transitionend",h,c)}(P,{focusRef:r,visible:_,shouldFocus:c&&f===Ka.click});var z=function(t){var{hasBeenSelected:e,isLazy:n,isSelected:r,lazyBehavior:i="unmount"}=t;return!n||!!r||!("keepMounted"!==i||!e)}({hasBeenSelected:S.current,isLazy:g,lazyBehavior:m,isSelected:_}),V=(0,a.useCallback)((function(t,r){void 0===t&&(t={}),void 0===r&&(r=null);var i=Ya({},t,{style:Ya({},t.style,{transformOrigin:Ra.transformOrigin.varRef,[Ra.arrowSize.var]:l?(0,Xa.px)(l):void 0,[Ra.arrowShadowColor.var]:h}),ref:(0,As.l)(P,r),children:z?t.children:null,id:R,tabIndex:-1,role:"dialog",onKeyDown:(0,v.v0)(t.onKeyDown,(t=>{n&&"Escape"===t.key&&w()})),onBlur:(0,v.v0)(t.onBlur,(t=>{var n=(0,o.wN)(t),r=(0,o.r3)(P.current,n),i=(0,o.r3)(T.current,n);_&&e&&(!r&&!i)&&w()})),"aria-labelledby":M?I:void 0,"aria-describedby":C?j:void 0});return f===Ka.hover&&(i.role="tooltip",i.onMouseEnter=(0,v.v0)(t.onMouseEnter,(()=>{A.current=!0})),i.onMouseLeave=(0,v.v0)(t.onMouseLeave,(()=>{A.current=!1,setTimeout(w,p)}))),i}),[z,R,M,I,C,j,f,n,w,_,e,p,h,l]),Z=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),F(Ya({},t,{style:Ya({visibility:_?"visible":"hidden"},t.style)}),e)}),[_,F]),G=(0,a.useRef)(),H=(0,a.useRef)(),W=(0,a.useCallback)((function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var n=Ya({},t,{ref:(0,As.l)(T,e,D),id:k,"aria-haspopup":"dialog","aria-expanded":_,"aria-controls":R});return f===Ka.click&&(n.onClick=(0,v.v0)(t.onClick,E)),f===Ka.hover&&(n.onFocus=(0,v.v0)(t.onFocus,x),n.onBlur=(0,v.v0)(t.onBlur,w),n.onKeyDown=(0,v.v0)(t.onKeyDown,(t=>{"Escape"===t.key&&w()})),n.onMouseEnter=(0,v.v0)(t.onMouseEnter,(()=>{A.current=!0,G.current=window.setTimeout(x,d)})),n.onMouseLeave=(0,v.v0)(t.onMouseLeave,(()=>{A.current=!1,G.current&&(clearTimeout(G.current),G.current=void 0),H.current=window.setTimeout((()=>{!1===A.current&&w()}),p)}))),n}),[k,_,R,f,D,E,x,w,d,p]);(0,a.useEffect)((()=>()=>{G.current&&clearTimeout(G.current),H.current&&clearTimeout(H.current)}),[]);var $=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Ya({},t,{id:I,ref:(0,As.l)(e,(t=>{O(!!t)}))})}),[I]),q=(0,a.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),Ya({},t,{id:j,ref:(0,As.l)(e,(t=>{L(!!t)}))})}),[j]);return{forceUpdate:U,isOpen:_,onClose:w,getArrowProps:N,getArrowInnerProps:B,getPopoverPositionerProps:Z,getPopoverProps:V,getTriggerProps:W,getHeaderProps:$,getBodyProps:q}}function Ja(){return(Ja=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function tu(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}var eu=t=>{var e=(0,h.j)("Popover",t),n=(0,f.Lr)(t),{children:r}=n,i=Qa(Ja({},tu(n,["children"]),{direction:(0,m.Fg)().direction}));return a.createElement(b,{value:i},a.createElement(m.Fo,{value:e},(0,v.Pu)(r,{isOpen:i.isOpen,onClose:i.onClose,forceUpdate:i.forceUpdate})))};s.Ts&&(eu.displayName="Popover");var nu=t=>{var e=a.Children.only(t.children),{getTriggerProps:n}=_();return a.cloneElement(e,n(e.props,e.ref))};s.Ts&&(nu.displayName="PopoverTrigger");var ru=(0,r.G)(((t,e)=>{var{rootProps:n}=t,r=tu(t,["rootProps"]),{getPopoverProps:s,getPopoverPositionerProps:u}=_(),c=(0,m.yK)(),l=Ja({position:"relative",display:"flex",flexDirection:"column"},c.content);return a.createElement(i.m$.div,Ja({}
1,u(n),{__css:c.popper,className:"chakra-popover__popper"}),a.createElement(fs,Ja({},s(r,e),{className:(0,o.cx)("chakra-popover__content",t.className),__css:l})))}));s.Ts&&(ru.displayName="PopoverContent");var iu=(0,r.G)(((t,e)=>{var{getHeaderProps:n}=_(),r=(0,m.yK)();return a.createElement(i.m$.header,Ja({},n(t,e),{className:(0,o.cx)("chakra-popover__header",t.className),__css:r.header}))}));s.Ts&&(iu.displayName="PopoverHeader");var ou=(0,r.G)(((t,e)=>{var{getBodyProps:n}=_(),r=(0,m.yK)();return a.createElement(i.m$.div,Ja({},n(t,e),{className:(0,o.cx)("chakra-popover__body",t.className),__css:r.body}))}));s.Ts&&(ou.displayName="PopoverBody");s.Ts;var su=t=>{var{onClose:e}=_();return a.createElement(g,Ja({size:"sm",onClick:e,position:"absolute",borderRadius:"md",top:"0.25rem",insetEnd:"0.5rem",padding:"0.5rem"},t))};s.Ts&&(su.displayName="PopoverCloseButton");var au=t=>{var e,{bg:n,bgColor:r,backgroundColor:s}=t,{getArrowProps:u,getArrowInnerProps:c}=_(),l=(0,m.yK)(),h=null!=(e=null!=n?n:r)?e:s;return a.createElement(i.m$.div,Ja({},u(),{className:"chakra-popover__arrow-positioner"}),a.createElement(i.m$.div,Ja({className:(0,o.cx)("chakra-popover__arrow",t.className)},c(t),{__css:Ja({},l.arrow,{"--popper-arrow-bg":h?"colors."+h+", "+h:void 0})})))};s.Ts&&(au.displayName="PopoverArrow")},7273:function(t,e,n){"use strict";n.d(e,{h:function(){return b}});var r=n(7294),i=n(7581);function o(){var t=r.useRef(!1),[e,n]=r.useState(0);return(0,i.z)((()=>{t.current=!0})),r.useCallback((()=>{t.current||n(e+1)}),[e])}var s=n(6732),a=n(4461),u=n(3808),c=n(8500),l=n(3935),h=n(4288);function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var[d,p]=(0,c.k)({strict:!1,name:"PortalContext"}),g="chakra-portal",m=t=>r.createElement("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:t.zIndex,top:0,left:0,right:0}},t.children),v=t=>{var{appendToParentPortal:e,children:n}=t,i=r.useRef(null),a=r.useRef(null),u=o(),c=p(),f=(0,h.L)();(0,s.G)((()=>{if(i.current){var t=i.current.ownerDocument,n=e&&null!=c?c:t.body;if(n){a.current=t.createElement("div"),a.current.className=g,n.appendChild(a.current),u();var r=a.current;return()=>{n.contains(r)&&n.removeChild(r)}}}}),[]);var v=null!=f&&f.zIndex?r.createElement(m,{zIndex:null==f?void 0:f.zIndex},n):n;return a.current?(0,l.createPortal)(r.createElement(d,{value:a.current},v),a.current):r.createElement("span",{ref:i})},y=t=>{var{children:e,containerRef:n,appendToParentPortal:i}=t,u=n.current,c=null!=u?u:a.jU?document.body:void 0,h=r.useMemo((()=>{var t=null==u?void 0:u.ownerDocument.createElement("div");return t&&(t.className=g),t}),[u]),f=o();return(0,s.G)((()=>{f()}),[]),(0,s.G)((()=>{if(h&&c)return c.appendChild(h),()=>{c.removeChild(h)}}),[h,c]),c&&h?(0,l.createPortal)(r.createElement(d,{value:i?h:null},e),h):null};function b(t){var{containerRef:e}=t,n=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["containerRef"]);return e?r.createElement(y,f({containerRef:e},n)):r.createElement(v,n)}b.defaultProps={appendToParentPortal:!0},b.className=g,b.selector=".chakra-portal",u.Ts&&(b.displayName="Portal")},2947:function(t,e,n){"use strict";n.d(e,{l:function(){return o}});var r=n(3808);function i(t,e){if(null!=t)if((0,r.mf)(t))t(e);else try{t.current=e}catch(n){throw new Error("Cannot assign value '"+e+"' to ref '"+t+"'")}}function o(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return t=>{e.forEach((e=>i(e,t)))}}},980:function(t,e,n){"use strict";n.d(e,{useTheme:function(){return i.useTheme}});n(2300);var r=n(4806);n.o(r,"useTheme")&&n.d(e,{useTheme:function(){return r.useTheme}});var i=n(1180)},5244:function(t,e,n){"use strict";n.d(e,{iR:function(){return tt},Ms:function(){return rt},gs:function(){return et},Uj:function(){return nt}});var r=n(8500),i=n(63),o=n(2326),s=n(5284),a=n(9676),u=n(3105),c=n(3808),l=n(4461),h=n(7294),f=n(762),d=n(1034),p=n(7243);var g=n(4577),m="Invariant failed";var v=function(t,e){if(!t)throw new Error(m)},y=function(t){var e=t.top,n=t.right,r=t.bottom,i=t.left;return{top:e,right:n,bottom:r,left:i,width:n-i,height:r-e,x:i,y:e,center:{x:(n+i)/2,y:(r+e)/2}}}
1,b=function(t,e){return{top:t.top+e.top,left:t.left+e.left,bottom:t.bottom-e.bottom,right:t.right-e.right}},_={top:0,right:0,bottom:0,left:0},w=function(t){var e,n,r=t.borderBox,i=t.margin,o=void 0===i?_:i,s=t.border,a=void 0===s?_:s,u=t.padding,c=void 0===u?_:u,l=y((n=o,{top:(e=r).top-n.top,left:e.left-n.left,bottom:e.bottom+n.bottom,right:e.right+n.right})),h=y(b(r,a)),f=y(b(h,c));return{marginBox:l,borderBox:y(r),paddingBox:h,contentBox:f,margin:o,border:a,padding:c}},x=function(t){var e=t.slice(0,-2);if("px"!==t.slice(-2))return 0;var n=Number(e);return isNaN(n)&&v(!1),n},E=function(t){return function(t,e){var n={top:x(e.marginTop),right:x(e.marginRight),bottom:x(e.marginBottom),left:x(e.marginLeft)},r={top:x(e.paddingTop),right:x(e.paddingRight),bottom:x(e.paddingBottom),left:x(e.paddingLeft)},i={top:x(e.borderTopWidth),right:x(e.borderRightWidth),bottom:x(e.borderBottomWidth),left:x(e.borderLeftWidth)};return w({borderBox:t,margin:n,padding:r,border:i})}(t.getBoundingClientRect(),window.getComputedStyle(t))},T=n(6732);var P=n(2653),A=n(9839),S=n(658),M=n(5027);function O(){return(O=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function C(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class L{constructor(t,e,n){if(C(this,"history",[]),C(this,"startEvent",null),C(this,"lastEvent",null),C(this,"lastEventInfo",null),C(this,"handlers",{}),C(this,"removeListeners",S.ZT),C(this,"threshold",3),C(this,"win",void 0),C(this,"updatePoint",(()=>{if(this.lastEvent&&this.lastEventInfo){var t=j(this.lastEventInfo,this.history),e=null!==this.startEvent,n=(0,S.TE)(t.offset,{x:0,y:0})>=this.threshold;if(e||n){var{timestamp:r}=(0,A.$B)();this.history.push(O({},t.point,{timestamp:r}));var{onStart:i,onMove:o}=this.handlers;e||(null==i||i(this.lastEvent,t),this.startEvent=this.lastEvent),null==o||o(this.lastEvent,t)}}})),C(this,"onPointerMove",((t,e)=>{this.lastEvent=t,this.lastEventInfo=e,(0,M.N5)(t)&&0===t.buttons?this.onPointerUp(t,e):A.ZP.update(this.updatePoint,!0)})),C(this,"onPointerUp",((t,e)=>{var n=j(e,this.history),{onEnd:r,onSessionEnd:i}=this.handlers;null==i||i(t,n),this.end(),r&&this.startEvent&&(null==r||r(t,n))})),this.win=(0,l.dh)(t),!(0,M.N2)(t)){this.handlers=e,n&&(this.threshold=n),t.stopPropagation(),t.preventDefault();var r=(0,M.Qk)(t),{timestamp:i}=(0,A.$B)();this.history=[O({},r.point,{timestamp:i})];var{onSessionStart:o}=e;null==o||o(t,j(r,this.history)),this.removeListeners=(0,S.zG)((0,M.aM)(this.win,"pointermove",this.onPointerMove),(0,M.aM)(this.win,"pointerup",this.onPointerUp),(0,M.aM)(this.win,"pointercancel",this.onPointerUp))}}updateHandlers(t){this.handlers=t}end(){var t;null==(t=this.removeListeners)||t.call(this),A.qY.update(this.updatePoint)}}function k(t,e){return{x:t.x-e.x,y:t.y-e.y}}function R(t){return t[0]}function I(t){return t[t.length-1]}function j(t,e){return{point:t.point,delta:k(t.point,I(e)),offset:k(t.point,R(e)),velocity:D(e,.1)}}function D(t,e){if(t.length<2)return{x:0,y:0};for(var n=t.length-1,r=null,i=function(t){return t[t.length-1]}(t);n>=0&&(r=t[n],!(i.timestamp-r.timestamp>1e3*e));)n--;if(!r)return{x:0,y:0};var o=(i.timestamp-r.timestamp)/1e3;if(0===o)return{x:0,y:0};var s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}var N=n(3158),F=n(7581);var B=n(2947);Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER;function U(t,e){var n=function(t){var e=parseFloat(t);return(0,c.iy)(e)?0:e}(t),r=10**(null!=e?e:10);return n=Math.round(n*r)/r,e?n.toFixed(e):n.toString()}function z(t,e,n){return 100*(t-e)/(n-e)}function V(t,e,n){return U(Math.round((t-e)/n)*n+e,function(t){if(!Number.isFinite(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n+=1;return n}(n))}function Z(t,e,n){return null==t?t:((0,S.ZK)({condition:n<e,message:"clamp: max cannot be less than min"}),Math.min(Math.max(t,e),n))}var G=n(7248);function H(){return(H=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function W(t){var{orientation:e,vertical:n,horizontal:r}=t;return"vertical"===e?n:r}var $={width:0,height:0};function q(){return(q=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function X(t){var e,{min:n=0,max:r=100,onChange:i,value:o,defaultValue:s,isReversed:a,direction:u="ltr",orientation:c="horizontal",id:m,isDisabled:v,isReadOnly:y,onChangeStart:b,onChangeEnd:_,step:w=1,getAriaValueText:x,"aria-valuetext":A,"aria-label":M,"aria-labelledby":O,name:C,focusThumbOnChange:k=!0}=t,R=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["min","max","onChange","value","defaultValue","isReversed","direction","orientation","id","isDisabled","isReadOnly","onChangeStart","onChangeEnd","step","getAriaValueText","aria-valuetext","aria-label","aria-labelledby","name","focusThumbOnChange"]),I=(0,f.W)(b),j=(0,f.W)(_),D=(0,f.W)(x),U=function(t){var{isReversed:e,direction:n,orientation:r}=t;return"ltr"===n||"vertical"===r?e:!e}({isReversed:a,direction:u,orientation:c}),[X,K]=(0,d.T)({value:o,defaultValue:null!=s?s:Y(n,r),onChange:i}),[Q,J]=(0,p.k)(),[tt,et]=(0,p.k)(),nt=(0,h.useRef)(null),rt=!(v||y),it=Z(X,n,r),ot=function(t){var e=h.useRef(null);return e.current=t,e}(it),st=(0,h.useRef)(ot.current),at=z(U?r-it+n:it,n,r),ut="vertical"===c,ct=(0,h.useRef)(null),lt=(0,h.useRef)(null),ht=(0,h.useRef)(null),[ft,dt]=(0,g.ZS)(m,"slider-thumb","slider-track"),pt=(0,h.useCallback)((t=>{var e,i;if(ct.current){nt.current="pointer";var o=E(ct.current).borderBox,{clientX:s,clientY:a}=null!=(e=null==(i=t.touches)?void 0:i[0])?e:t,u=(ut?o.bottom-a:s-o.left)/(ut?o.height:o.width);U&&(u=1-u);var c=function(t,e,n){return(n-e)*t+e}(u,n,r);return w&&(c=parseFloat(V(c,n,w))),c=Z(c,n,r)}}),[ut,U,r,n,w]),gt=(r-n)/10,mt=w||(r-n)/100,vt=(0,h.useCallback)((t=>{rt&&(t=Z(t=parseFloat(V(t,n,mt)),n,r),K(t))}),[mt,r,n,K,rt]),yt=(0,h.useMemo)((()=>({stepUp:function(t){void 0===t&&(t=mt),vt(U?it-t:it+t)},stepDown:function(t){void 0===t&&(t=mt),vt(U?it+t:it-t)},reset:()=>vt(s||0),stepTo:t=>vt(t)})),[vt,U,it,mt,s]),bt=(0,h.useCallback)((t=>{var e={ArrowRight:()=>yt.stepUp(),ArrowUp:()=>yt.stepUp(),ArrowLeft:()=>yt.stepDown(),ArrowDown:()=>yt.stepDown(),PageUp:()=>yt.stepUp(gt),PageDown:()=>yt.stepDown(gt),Home:()=>vt(n),End:()=>vt(r)}[(0,l.uh)(t)];e&&(t.preventDefault(),t.stopPropagation(),e(t),nt.current="keyboard")}),[yt,vt,r,n,gt]),_t=null!=(e=null==D?void 0:D(it))?e:A,wt=function(t,e){var[n,r]=h.useState(null),i=h.useRef();return(0,T.G)((()=>
1{if(t.current){var n=t.current;return o(),e&&(window.addEventListener("resize",o),window.addEventListener("scroll",o)),()=>{e&&(window.removeEventListener("resize",o),window.removeEventListener("scroll",o)),i.current&&cancelAnimationFrame(i.current)}}function o(){i.current=requestAnimationFrame((()=>{var t=E(n);r(t)}))}}),[e]),n}(lt),{getThumbStyle:xt,rootStyle:Et,trackStyle:Tt,innerTrackStyle:Pt}=(0,h.useMemo)((()=>{var t,e=null!=(t=null==wt?void 0:wt.borderBox)?t:{width:0,height:0};return function(t){var{orientation:e,thumbPercents:n,thumbRects:r,isReversed:i}=t,o="vertical"===e?r.reduce(((t,e)=>t.height>e.height?t:e),$):r.reduce(((t,e)=>t.width>e.width?t:e),$),s=H({position:"relative",touchAction:"none",WebkitTapHighlightColor:"rgba(0,0,0,0)",userSelect:"none",outline:0},W({orientation:e,vertical:{paddingLeft:o.width/2,paddingRight:o.width/2},horizontal:{paddingTop:o.height/2,paddingBottom:o.height/2}})),a=H({position:"absolute"},W({orientation:e,vertical:{left:"50%",transform:"translateX(-50%)",height:"100%"},horizontal:{top:"50%",transform:"translateY(-50%)",width:"100%"}})),u=1===n.length,c=[0,i?100-n[0]:n[0]],l=u?c:n,h=l[0];!u&&i&&(h=100-h);var f=Math.abs(l[l.length-1]-l[0]);return{trackStyle:a,innerTrackStyle:H({},a,W({orientation:e,vertical:i?{height:f+"%",top:h+"%"}:{height:f+"%",bottom:h+"%"},horizontal:i?{width:f+"%",right:h+"%"}:{width:f+"%",left:h+"%"}})),rootStyle:s,getThumbStyle:t=>H({position:"absolute",userSelect:"none",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",touchAction:"none"},W({orientation:e,vertical:{bottom:"calc("+n[t]+"% - "+r[t].height/2+"px)"},horizontal:{left:"calc("+n[t]+"% - "+r[t].width/2+"px)"}}))}}({isReversed:U,orientation:c,thumbRects:[e],thumbPercents:[at]})}),[U,c,null==wt?void 0:wt.borderBox,at]),At=(0,h.useCallback)((()=>{lt.current&&k&&setTimeout((()=>(0,G.T)(lt.current)))}),[k]);(0,P.r)((()=>{At(),"keyboard"===nt.current&&(null==j||j(ot.current))}),[it,j]);var St=t=>{var e=pt(t);null!=e&&e!==ot.current&&K(e)};!function(t,e){var{onPan:n,onPanStart:r,onPanEnd:i,onPanSessionStart:o,onPanSessionEnd:s,threshold:a}=e,u=Boolean(n||r||i||o||s),c=(0,h.useRef)(null),l={onSessionStart:o,onSessionEnd:s,onStart:r,onMove:n,onEnd(t,e){c.current=null,null==i||i(t,e)}};(0,h.useEffect)((()=>{var t;null==(t=c.current)||t.updateHandlers(l)})),(0,N.m)((()=>t.current),"pointerdown",u?function(t){c.current=new L(t,l,a)}:S.ZT),(0,F.z)((()=>{var t;null==(t=c.current)||t.end(),c.current=null}))}(ht,{onPanSessionStart(t){rt&&(J.on(),At(),St(t),null==I||I(ot.current))},onPanSessionEnd(){rt&&(J.off(),null==j||j(ot.current),st.current=ot.current)},onPan(t){rt&&St(t)}});var Mt=(0,h.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),q({},t,R,{ref:(0,B.l)(e,ht),tabIndex:-1,"aria-disabled":(0,l.Qm)(v),"data-focused":(0,l.PB)(tt),style:q({},t.style,Et)})}),[R,v,tt,Et]),Ot=(0,h.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),q({},t,{ref:(0,B.l)(e,ct),id:dt,"data-disabled":(0,l.PB)(v),style:q({},t.style,Tt)})}),[v,dt,Tt]),Ct=(0,h.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),q({},t,{ref:e,style:q({},t.style,Pt)})}),[Pt]),Lt=(0,h.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),q({},t,{ref:(0,B.l)(e,lt),role:"slider",tabIndex:rt?0:void 0,id:ft,"data-active":(0,l.PB)(Q),"aria-valuetext":_t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuenow":it,"aria-orientation":c,"aria-disabled":(0,l.Qm)(v),"aria-readonly":(0,l.Qm)(y),"aria-label":M,"aria-labelledby":M?void 0:O,style:q({},t.style,xt(0)),onKeyDown:(0,S.v0)(t.onKeyDown,bt),onFocus:(0,S.v0)(t.onFocus,et.on),onBlur:(0,S.v0)(t.onBlur,et.off)})}),[rt,ft,Q,_t,n,r,it,c,v,y,M,O,xt,bt,et.on,et.off]),kt=(0,h.useCallback)((function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);var i=!(t.value<n||t.value>r),o=it>=t.value,s=z(t.value,n,r),a=q({position:"absolute",pointerEvents:"none"},function(t){var{orientation:e,vertical:n,horizontal:r}=t;return"vertical"===e?n:r}({orientation:c,vertical:{bottom:U?100-s+"%":s+"%"},horizontal:{left:U?100-s+"%":s+"%"}}));return q({},t,{ref:e,role:"presentation","aria-hidden":!0,"data-disabled":(0,l.PB)(v),"data-invalid":(0,l.PB)(!i),"data-highlighted":(0,l.PB)(o),style:q({},t.style,a)})}),[v,U,r,n,c,it]),Rt=(0,h.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),q({},t,{ref:e,type:"hidden",value:it,name:C})}),[C,it]);return{state:{value:it,isFocused:tt,isDragging:Q},actions:yt,getRootProps:Mt,getTrackProps:Ot,getInnerTrackProps:Ct,getThumbProps:Lt,getMarkerProps:kt,getIn
1putProps:Rt}}function Y(t,e){return e<t?t:t+(e-t)/2}function K(){return(K=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var[Q,J]=(0,r.k)({name:"SliderContext",errorMessage:"useSliderContext: `context` is undefined. Seems you forgot to wrap all slider components within <Slider />"}),tt=(0,i.G)(((t,e)=>{var n=(0,o.j)("Slider",t),r=(0,s.Lr)(t),{direction:i}=(0,a.Fg)();r.direction=i;var c=X(r),{getInputProps:l,getRootProps:f}=c,d=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(c,["getInputProps","getRootProps"]),p=f(),g=l({},e);return h.createElement(Q,{value:d},h.createElement(a.Fo,{value:n},h.createElement(u.m$.div,K({},p,{className:"chakra-slider",__css:n.container}),t.children,h.createElement("input",g))))}));tt.defaultProps={orientation:"horizontal"},c.Ts&&(tt.displayName="Slider");var et=(0,i.G)(((t,e)=>{var{getThumbProps:n}=J(),r=(0,a.yK)(),i=n(t,e);return h.createElement(u.m$.div,K({},i,{className:(0,l.cx)("chakra-slider__thumb",t.className),__css:r.thumb}))}));c.Ts&&(et.displayName="SliderThumb");var nt=(0,i.G)(((t,e)=>{var{getTrackProps:n}=J(),r=(0,a.yK)(),i=n(t,e);return h.createElement(u.m$.div,K({},i,{className:(0,l.cx)("chakra-slider__track",t.className),__css:r.track}))}));c.Ts&&(nt.displayName="SliderTrack");var rt=(0,i.G)(((t,e)=>{var{getInnerTrackProps:n}=J(),r=(0,a.yK)(),i=n(t,e);return h.createElement(u.m$.div,K({},i,{className:"chakra-slider__filled-track",__css:r.filledTrack}))}));c.Ts&&(rt.displayName="SliderFilledTrack");var it=(0,i.G)(((t,e)=>{var{getMarkerProps:n}=J(),r=n(t,e);return h.createElement(u.m$.div,K({},r,{className:(0,l.cx)("chakra-slider__marker",t.className)}))}));c.Ts&&(it.displayName="SliderMark")},5754:function(t,e,n){"use strict";n.d(e,{$:function(){return p}});var r=n(917),i=n(63),o=n(2326),s=n(5284),a=n(3105),u=n(4461),c=n(3808),l=n(5415),h=n(7294);function f(){return(f=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var d=(0,r.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),p=(0,i.G)(((t,e)=>{var n=(0,o.m)("Spinner",t),r=(0,s.Lr)(t),{label:i="Loading...",thickness:c="2px",speed:p="0.45s",emptyColor:g="transparent",className:m}=r,v=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(r,["label","thickness","speed","emptyColor","className"]),y=(0,u.cx)("chakra-spinner",m),b=f({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:c,borderBottomColor:g,borderLeftColor:g,animation:d+" "+p+" linear infinite"},n);return h.createElement(a.m$.div,f({ref:e,__css:b,className:y},v),i&&h.createElement(l.TX,null,i))}));c.Ts&&(p.displayName="Spinner")},8134:function(t,e,n){"use strict";n.d(e,{r:function(){return x}});var r=n(762),i=n(7243),o=n(1034),s=n(6732),a=n(2947),u=n(658),c=n(4461),l=n(7248),h=n(5415),f=n(7294);function d(){return(d=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function p(t){void 0===t&&(t={});var{defaultIsChecked:e,defaultChecked:n=e,isChecked:p,isFocusable:m,isDisabled:v,isReadOnly:y,isRequired:b,onChange:_,isIndeterminate:w,isInvalid:x,name:E,value:T,id:P,onBlur:A,onFocus:S,tabIndex:M,"aria-label":O,"aria-labelledby":C,"aria-invalid":L,"aria-describedby":k}=t,R=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,["defaultIsChecked","defaultChecked","isChecked","isFocusable","isDisabled","isReadOnly","isRequired","onChange","isIndeterminate","isInvalid","name","value","id","onBlur","onFocus","tabIndex","aria-label","aria-labelledby","aria-invalid","aria-describedby"]),I=(0,r.W)(_),j=(0,r.W)(A),D=(0,r.W)(S),[N,F]=(0,i.k)(),[B,U]=(0,i.k)(),[z,V]=(0,i.k)(),Z=(0,f.useRef)(null),[G,H]=(0,f.useState)(!0),[W,$]=(0,f.useState)(!!n),[q,X]=(0,o.p)(p,W);(0,u.ZK)({condition:!!e,message:'The "defaultIsChecked" prop has been deprecated and will be removed in a future version. Please use the "defaultChecked" prop instead, which mirrors default React checkbox behavior.'});var Y=(0,f.useCallback)((t=>{y||v?t.preventDefault():(q||$(X?t.target.checked:!!w||t.target.checked),null==I||I(t))}),[y,v,X,q,w,I]);(0,s.G)((()=>{Z.current&&(Z.current.indeterminate=Boolean(w))}),[w]);var K=v&&!m,Q=(0,f.useCallback)((t=>{" "===t.key&&V.on()}),[V]),J=(0,f.useCallback)((t=>{" "===t.key&&V.off()}),[V]);(0,s.G)((()=>{Z.current&&(Z.current.checked!==X&&$(Z.current.checked))}),[Z.current]);var tt=(0,f.useCallback)((function(t,e){void 0===t&&(t={}),void 0===e&&(e=null);return d({},t,{ref:e,"data-active":(0,c.PB)(z),"data-hover":(0,c.PB)(B),"data-checked":(0,c.PB)(X),"data-focus":(0,c.PB)(N),"data-indeterminate":(0,c.PB)(w),"data-disabled":(0,c.PB)(v),"data-invalid":(0,c.PB)(x),"data-readonly":(0,c.PB)(y),"aria-hidden":!0,onMouseDown:(0,u.v0)(t.onMouseDown,(t=>{t.preventDefault(),V.on()})),onMouseUp:(0,u.v0)(t.onMouseUp,V.off),onMouseEnter:(0,u.v0)(t.onMouseEnter,U.on),onMouseLeave:(0,u.v0)(t.onMouseLeave,U.off)})}),[z,X,v,N,B,w,x,y,V,U.off,U.on]),et=(0,f.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),d({},R,t,{ref:(0,a.l)(e,(t=>{t&&H("LABEL"===t.tagName)})),onClick:(0,u.v0)(t.onClick,(()=>{var t;G||(null==(t=Z.current)||t.click(),(0,l.T)(Z.current,{nextTick:!0}
1))})),"data-disabled":(0,c.PB)(v),"data-checked":(0,c.PB)(X),"data-invalid":(0,c.PB)(x)})}),[R,v,X,x,G]),nt=(0,f.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),d({},t,{ref:(0,a.l)(Z,e),type:"checkbox",name:E,value:T,id:P,tabIndex:M,onChange:(0,u.v0)(t.onChange,Y),onBlur:(0,u.v0)(t.onBlur,j,F.off),onFocus:(0,u.v0)(t.onFocus,D,F.on),onKeyDown:(0,u.v0)(t.onKeyDown,Q),onKeyUp:(0,u.v0)(t.onKeyUp,J),required:b,checked:X,disabled:K,readOnly:y,"aria-label":O,"aria-labelledby":C,"aria-invalid":L?Boolean(L):x,"aria-describedby":k,"aria-disabled":v,style:h.NL})}),[E,T,P,Y,F.off,F.on,j,D,Q,J,b,X,K,y,O,C,L,x,k,v,M]),rt=(0,f.useCallback)((function(t,e){return void 0===t&&(t={}),void 0===e&&(e=null),d({},t,{ref:e,onMouseDown:(0,u.v0)(t.onMouseDown,g),onTouchStart:(0,u.v0)(t.onTouchStart,g),"data-disabled":(0,c.PB)(v),"data-checked":(0,c.PB)(X),"data-invalid":(0,c.PB)(x)})}),[X,v,x]);return{state:{isInvalid:x,isFocused:N,isChecked:X,isActive:z,isHovered:B,isIndeterminate:w,isDisabled:v,isReadOnly:y,isRequired:b},getRootProps:et,getCheckboxProps:tt,getInputProps:nt,getLabelProps:rt,htmlProps:R}}function g(t){t.preventDefault(),t.stopPropagation()}var m=n(63),v=n(2326),y=n(5284),b=n(3105),_=n(3808);function w(){return(w=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}var x=(0,m.G)(((t,e)=>{var n=(0,v.j)("Switch",t),r=(0,y.Lr)(t),{spacing:i="0.5rem",children:o}=r,s=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(r,["spacing","children"]),{state:a,getInputProps:u,getCheckboxProps:l,getRootProps:h,getLabelProps:d}=p(s),g=f.useMemo((()=>w({display:"inline-block",verticalAlign:"middle",lineHeight:"normal"},n.container)),[n.container]),m=f.useMemo((()=>w({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer"},n.track)),[n.track]),_=f.useMemo((()=>w({userSelect:"none",marginStart:i},n.label)),[i,n.label]);return f.createElement(b.m$.label,w({},h(),{className:(0,c.cx)("chakra-switch",t.className),__css:g}),f.createElement("input",w({className:"chakra-switch__input"},u({},e))),f.createElement(b.m$.span,w({},l(),{className:"chakra-switch__track",__css:m}),f.createElement(b.m$.span,{__css:n.thumb,className:"chakra-switch__thumb","data-checked":(0,c.PB)(a.isChecked),"data-hover":(0,c.PB)(a.isHovered)})),o&&f.createElement(b.m$.span,w({className:"chakra-switch__label"},d(),{__css:_}),o))}));_.Ts&&(x.displayName="Switch")},1180:function(t,e,n){"use strict";n.d(e,{useTheme:function(){return o.Fg}});var r=n(9421);n.o(r,"useTheme")&&n.d(e,{useTheme:function(){return r.useTheme}});var i=n(5070);n.o(i,"useTheme")&&n.d(e,{useTheme:function(){return i.useTheme}});var o=n(9676)},5070:function(){},7248:function(t,e,n){"use strict";n.d(e,{T:function(){return s}});var r=n(4461),i=n(658),o=n(7768);function s(t,e){void 0===e&&(e={});var{isActive:n=o.H9,nextTick:s,preventScroll:u=!0,selectTextIfInput:c=!0}=e;if(!t||n(t))return-1;function l(){if(t){if(function(){if(null==a){a=!1;try{document.createElement("div").focus({get preventScroll(){return a=!0,!0}})}catch(t){}}return a}())t.focus({preventScroll:u});else if(t.focus(),u)!function(t){for(var{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}(function(t){var e,n=(0,r.lZ)(t),i=null!=(e=n.defaultView)?e:window,o=t.parentNode,s=[],a=n.scrollingElement||n.documentElement;for(;o instanceof i.HTMLElement&&o!==a;)(o.offsetHeight<o.scrollHeight||o.offsetWidth<o.scrollWidth)&&s.push({element:o,scrollTop:o.scrollTop,scrollLeft:o.scrollLeft}),o=o.parentNode;a instanceof i.HTMLElement&&s.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft});return s}(t));(0,o.cK)(t)&&c&&t.select()}else(0,i.ZK)({condition:!0,message:"[chakra-ui]: can't call focus() on `null` or `undefined` element"})}return s?requestAnimationFrame(l):(l(),-1)}var a=null},5027:function(t,e,n){"use strict";n.d(e,{N5:function(){return i},Qk:function(){return c},JN:function(){return l},f7:function(){return d},aM:function(){return p},N2:function(){return g}});var r=n(4461);function i(t){var e=(0,r.dh)(t);return"undefined"!==typeof e.PointerEvent&&t instanceof e.PointerEvent?!("mouse"!==t.pointerType):t instanceof e.MouseEvent}function o(t){return!!t.touches}var s={pageX:0,pageY:0};function a(t,e){void 0===e&&(e="page");var n=t.touches[0]||t.changedTouches[0]||s;return{x:n[e+"X"],y:n[e+"Y"]}}function u(t,e){return void 0===e&&(e="page"),{x:t[e+"X"],y:t[e+"Y"]}}function c(t,e){return void 0===e&&(e="page"),{point:o(t)?a(t,e):u(t,e)}}var l=function(t,e){void 0===e&&(e=!1);var n,i=e=>t(e,c(e));return e?(n=i,t=>{var e=t instanceof(0,r.dh)(t).MouseEvent;(!e||e&&0===t.button)&&n(t)}):i}
1,h={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},f={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function d(t){return r.jU&&null===window.onpointerdown?t:r.jU&&null===window.ontouchstart?f[t]:r.jU&&null===window.onmousedown?h[t]:t}function p(t,e,n,i){return(0,r.EV)(t,d(e),l(n,"pointerdown"===e),i)}function g(t){return o(t)&&t.touches.length>1}},7768:function(t,e,n){"use strict";n.d(e,{cK:function(){return o},H9:function(){return s},EB:function(){return u},Wq:function(){return c}});var r=n(4461),i=t=>t.hasAttribute("tabindex");function o(t){return(0,r.Re)(t)&&"input"===t.tagName.toLowerCase()&&"select"in t}function s(t){return((0,r.Re)(t)?(0,r.lZ)(t):document).activeElement===t}function a(t){return!(!t.parentElement||!a(t.parentElement))||t.hidden}function u(t){if(!(0,r.Re)(t)||a(t)||function(t){return!0===Boolean(t.getAttribute("disabled"))||!0===Boolean(t.getAttribute("aria-disabled"))}(t))return!1;var{localName:e}=t;if(["input","select","textarea","button"].indexOf(e)>=0)return!0;var n={a:()=>t.hasAttribute("href"),audio:()=>t.hasAttribute("controls"),video:()=>t.hasAttribute("controls")};return e in n?n[e]():!!function(t){var e=t.getAttribute("contenteditable");return"false"!==e&&null!=e}(t)||i(t)}function c(t){return!!t&&((0,r.Re)(t)&&u(t)&&!(t=>i(t)&&-1===t.tabIndex)(t))}},5415:function(t,e,n){"use strict";n.d(e,{NL:function(){return o},TX:function(){return s}});var r=n(3105),i=n(3808),o={border:"0px",clip:"rect(0px, 0px, 0px, 0px)",height:"1px",width:"1px",margin:"-1px",padding:"0px",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},s=(0,r.m$)("span",{baseStyle:o});i.Ts&&(s.displayName="VisuallyHidden");var a=(0,r.m$)("input",{baseStyle:o});i.Ts&&(a.displayName="VisuallyHiddenInput")},3803:function(t,e,n){"use strict";n.d(e,{z:function(){return o},Z:function(){return s}});var r=n(744);let i={};function o(t){i=t}function s(t){r.Z.level>0&&i[t]&&i[t].call(...arguments)}},5361:function(t,e,n){"use strict";n.d(e,{M:function(){return s}});const r=[255,255,255],i=1;let o=0;class s{constructor(t={}){const{color:e=r}=t,{intensity:n=i}=t;this.id=t.id||"ambient-".concat(o++),this.color=e,this.intensity=n,this.type="ambient"}}},9152:function(t,e,n){"use strict";n.d(e,{O:function(){return u}});var r=n(1681);const i=[255,255,255],o=1,s=[0,0,-1];let a=0;class u{constructor(t={}){const{color:e=i}=t,{intensity:n=o}=t,{direction:u=s}=t,{_shadow:c=!1}=t;this.id=t.id||"directional-".concat(a++),this.color=e,this.intensity=n,this.type="directional",this.direction=new r.Z(u).normalize().toArray(),this.shadow=c}getProjectedLight(){return this}}},4739:function(t,e,n){"use strict";n.d(e,{Z:function(){return S}});var r=n(358),i=n(4912),o=n(5361),s=n(9152),a=n(1215),u=n(7293),c=n(1681),l=n(1961),h=n(9830),f=n(3849),d=n(9450);class p extends l.Z{constructor(t,e){super(t,e),this.shadowMap=new i.Z(t,{width:1,height:1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.depthBuffer=new h.Z(t,{format:33189,width:1,height:1}),this.fbo=new f.Z(t,{id:"shadowmap",width:1,height:1,attachments:{36064:this.shadowMap,36096:this.depthBuffer}})}render(t){const e=this.fbo;(0,d.s8)(this.gl,{depthRange:[0,1],depthTest:!0,blend:!1,clearColor:[1,1,1,1]},(()=>{const n=t.viewports[0],r=(0,d.w)(this.gl),i=n.width*r,o=n.height*r;i===e.width&&o===e.height||e.resize({width:i,height:o}),super.render({...t,target:e,pass:"shadow"})}))}shouldDrawLayer(t){return!1!==t.props.shadowEnabled}getModuleParameters(){return{drawToShadowMap:!0}}delete(){this.fbo&&(this.fbo.delete(),this.fbo=null),this.shadowMap&&(this.shadowMap.delete(),this.shadowMap=null),this.depthBuffer&&(this.depthBuffer.delete(),this.depthBuffer=null)}}var g=n(4088),m=n(6084),v=n(8177),y=n(7013);const b=(0,v.Z)((function({viewport:t,center:e}){return new u.Z(t.viewProjectionMatrix).invert().transform(e)})),_=(0,v.Z)((function({viewport:t,shadowMatrices:e}){const n=[],r=t.pixelUnprojectionMatrix,i=t.isGeospatial?void 0:1,o=[[0,0,i],[t.width,0,i],[0,t.height,i],[t.width,t.height,i],[0,0,-1],[t.width,0,-1],[0,t.height,-1],[t.width,t.height,-1]].map((t=>
1function(t,e){const[n,r,i]=t,o=(0,y.CT)([n,r,i],e);if(Number.isFinite(i))return o;return[o[0],o[1],0]}(t,r)));for(const s of e){const e=s.clone().translate(new c.Z(t.center).negate()),r=o.map((t=>e.transform(t))),i=(new u.Z).ortho({left:Math.min(...r.map((t=>t[0]))),right:Math.max(...r.map((t=>t[0]))),bottom:Math.min(...r.map((t=>t[1]))),top:Math.max(...r.map((t=>t[1]))),near:Math.min(...r.map((t=>-t[2]))),far:Math.max(...r.map((t=>-t[2])))});n.push(i.multiplyRight(s))}return n})),w=[0,0,0,1],x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0];var E={name:"shadow",dependencies:[m.Z],vs:"\nconst int max_lights = 2;\nuniform mat4 shadow_uViewProjectionMatrices[max_lights];\nuniform vec4 shadow_uProjectCenters[max_lights];\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform int shadow_uLightId;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nvec4 shadow_setVertexPosition(vec4 position_commonspace) {\n if (shadow_uDrawShadowMap) {\n return project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[shadow_uLightId], shadow_uProjectCenters[shadow_uLightId]);\n }\n if (shadow_uUseShadowMap) {\n for (int i = 0; i < max_lights; i++) {\n if(i < int(shadow_uLightCount)) {\n vec4 shadowMap_position = project_common_position_to_clipspace(position_commonspace, shadow_uViewProjectionMatrices[i], shadow_uProjectCenters[i]);\n shadow_vPosition[i] = (shadowMap_position.xyz / shadowMap_position.w + 1.0) / 2.0;\n }\n }\n }\n return gl_Position;\n}\n",fs:"\nconst int max_lights = 2;\nuniform bool shadow_uDrawShadowMap;\nuniform bool shadow_uUseShadowMap;\nuniform sampler2D shadow_uShadowMap0;\nuniform sampler2D shadow_uShadowMap1;\nuniform vec4 shadow_uColor;\nuniform float shadow_uLightCount;\n\nvarying vec3 shadow_vPosition[max_lights];\n\nconst vec4 bitPackShift = vec4(1.0, 255.0, 65025.0, 16581375.0);\nconst vec4 bitUnpackShift = 1.0 / bitPackShift;\nconst vec4 bitMask = vec4(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0, 0.0);\n\nfloat shadow_getShadowWeight(vec3 position, sampler2D shadowMap) {\n vec4 rgbaDepth = texture2D(shadowMap, position.xy);\n\n float z = dot(rgbaDepth, bitUnpackShift);\n return smoothstep(0.001, 0.01, position.z - z);\n}\n\nvec4 shadow_filterShadowColor(vec4 color) {\n if (shadow_uDrawShadowMap) {\n vec4 rgbaDepth = fract(gl_FragCoord.z * bitPackShift);\n rgbaDepth -= rgbaDepth.gbaa * bitMask;\n return rgbaDepth;\n }\n if (shadow_uUseShadowMap) {\n float shadowAlpha = 0.0;\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[0], shadow_uShadowMap0);\n if(shadow_uLightCount > 1.0) {\n shadowAlpha += shadow_getShadowWeight(shadow_vPosition[1], shadow_uShadowMap1);\n }\n shadowAlpha *= shadow_uColor.a / shadow_uLightCount;\n float blendedAlpha = shadowAlpha + color.a * (1.0 - shadowAlpha);\n\n return vec4(\n mix(color.rgb, shadow_uColor.rgb, shadowAlpha / blendedAlpha),\n blendedAlpha\n );\n }\n return color;\n}\n",inject:{"vs:DECKGL_FILTER_GL_POSITION":"\n position = shadow_setVertexPosition(geometry.position);\n ","fs:DECKGL_FILTER_COLOR":"\n color = shadow_filterShadowColor(color);\n "},getUniforms:(t={},e={})=>{if(t.drawToShadowMap||t.shadowMaps&&t.shadowMaps.length>0){const{shadowEnabled:n=!0}=t;return n&&t.shadowMatrices&&t.shadowMatrices.length>0?function(t={},e={}){const n={shadow_uDrawShadowMap:Boolean(t.drawToShadowMap),shadow_uUseShadowMap:!!t.shadowMaps&&t.shadowMaps.length>0,shadow_uColor:t.shadowColor||w,shadow_uLightId:t.shadowLightId||0,shadow_uLightCount:t.shadowMatrices.length},r=b({viewport:t.viewport,center:e.project_uCenter}),i=[],o=_({shadowMatrices:t.shadowMatrices,viewport:t.viewport}).slice();for(let s=0;s<t.shadowMatrices.length;s++){const n=o[s],a=n.clone().translate(new c.Z(t.viewport.center).negate());e.project_uCoordinateSystem===g.Df.LNGLAT&&e.project_uProjectionMode===g.zG.WEB_MERCATOR?(o[s]=a,i[s]=r):(o[s]=n.clone().multiplyRight(x),i[s]=a.transform(r))}for(let s=0;s<o.length;s++)n["shadow_uViewProjectionMatrices[".concat(s,"]")]=o[s],n["shadow_uProjectCenters[".concat(s,"]")]=i[s],t.shadowMaps&&t.shadowMaps.length>0?n["shadow_uShadowMap".concat(s)]=t.shadowMaps[s]:n["shadow_uShadowMap".concat(s)]=t.dummyShadowMap;return n}(t,e):{shadow_uDrawShadowMap:!1,shadow_uUseShadowMap:!1}}return{}}};const T={color:[255,255,255],intensity:1},P=[{color:[255,255,255],intensity:1,direction:[-1,3,-1]},{color:[255,255,255],intensity:.9,direction:[1,-8,-2.5]}],A=[0,0,0,200/255];class S extends a.Z{constructor(t){super(t),this.ambientLight=null,this.directionalLights=[],this.pointLights=[],this.shadowColor=A,this.shadowPasses=[],this.shadowMaps=[],this.dummyShadowMap=null,this.shadow=!1,this.programManager=null;for(const e in t){const n=t[e];switch(n.type){case"ambient":this.ambientLight=n;break;case"directional":this.directionalLights.push(n);break;case"point":this.pointLights.push(n)}}this._applyDefaultLights(),this.shadow=this.directionalLights.some((t=>t.shadow))}preRender(t,{layers:e,layerFilter:n,viewports:o,onViewportActive:s,views:a}
1){if(this.shadow){this.shadowMatrices=this._createLightMatrix(),0===this.shadowPasses.length&&this._createShadowPasses(t),this.programManager||(this.programManager=r.Z.getDefaultProgramManager(t),E&&this.programManager.addDefaultModule(E)),this.dummyShadowMap||(this.dummyShadowMap=new i.Z(t,{width:1,height:1}));for(let t=0;t<this.shadowPasses.length;t++){this.shadowPasses[t].render({layers:e,layerFilter:n,viewports:o,onViewportActive:s,views:a,moduleParameters:{shadowLightId:t,dummyShadowMap:this.dummyShadowMap,shadowMatrices:this.shadowMatrices}})}}}getModuleParameters(t){const e=this.shadow?{shadowMaps:this.shadowMaps,dummyShadowMap:this.dummyShadowMap,shadowColor:this.shadowColor,shadowMatrices:this.shadowMatrices}:{};return e.lightSources={ambientLight:this.ambientLight,directionalLights:this.directionalLights.map((e=>e.getProjectedLight({layer:t}))),pointLights:this.pointLights.map((e=>e.getProjectedLight({layer:t})))},e}cleanup(){for(const t of this.shadowPasses)t.delete();this.shadowPasses.length=0,this.shadowMaps.length=0,this.dummyShadowMap&&(this.dummyShadowMap.delete(),this.dummyShadowMap=null),this.shadow&&this.programManager&&(this.programManager.removeDefaultModule(E),this.programManager=null)}_createLightMatrix(){const t=[];for(const e of this.directionalLights){const n=(new u.Z).lookAt({eye:new c.Z(e.direction).negate()});t.push(n)}return t}_createShadowPasses(t){for(let e=0;e<this.directionalLights.length;e++){const n=new p(t);this.shadowPasses[e]=n,this.shadowMaps[e]=n.shadowMap}}_applyDefaultLights(){const{ambientLight:t,pointLights:e,directionalLights:n}=this;t||0!==e.length||0!==n.length||(this.ambientLight=new o.M(T),this.directionalLights.push(new s.O(P[0]),new s.O(P[1])))}}},9124:function(t,e,n){"use strict";n.d(e,{c:function(){return l}});var r=n(4058),i=n(4088);const o=[255,255,255],s=1,a=[0,0,1],u=[0,0,1];let c=0;class l{constructor(t={}){const{color:e=o}=t,{intensity:n=s}=t,{position:r=u}=t;this.id=t.id||"point-".concat(c++),this.color=e,this.intensity=n,this.type="point",this.position=r,this.attenuation=function(t){if("attenuation"in t)return t.attenuation;if("intensity"in t)return[0,0,t.intensity];return a}(t),this.projectedLight={...this}}getProjectedLight({layer:t}){const{projectedLight:e}=this,n=t.context.viewport,{coordinateSystem:o,coordinateOrigin:s}=t.props,a=(0,r.D)(this.position,{viewport:n,coordinateSystem:o,coordinateOrigin:s,fromCoordinateSystem:n.isGeospatial?i.Df.LNGLAT:i.Df.CARTESIAN,fromCoordinateOrigin:[0,0,0]});return e.color=this.color,e.intensity=this.intensity,e.position=a,e}}},4088:function(t,e,n){"use strict";n.d(e,{Df:function(){return i},zG:function(){return o},iI:function(){return s},FP:function(){return a}});var r=n(744);const i={DEFAULT:-1,LNGLAT:1,METER_OFFSETS:2,LNGLAT_OFFSETS:3,CARTESIAN:0};Object.defineProperty(i,"IDENTITY",{get:()=>r.Z.deprecated("COORDINATE_SYSTEM.IDENTITY","COORDINATE_SYSTEM.CARTESIAN")()||0});const o={WEB_MERCATOR:1,GLOBE:2,WEB_MERCATOR_AUTO_OFFSET:4,IDENTITY:0},s={common:0,meters:1,pixels:2},a={click:{handler:"onClick"},panstart:{handler:"onDragStart"},panmove:{handler:"onDrag"},panend:{handler:"onDragEnd"}}},1215:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});class r{constructor(t={}){const{id:e="effect"}=t;this.id=e,this.props={...t}}preRender(){}getModuleParameters(){}cleanup(){}}},1069:function(t,e,n){"use strict";n.d(e,{Z:function(){return ie}});var r=n(4088),i=n(4211),o=n(6948),s=n(3478);class a{constructor(t,e){this.opts=e,this.source=t}get value(){return this.source.value}getValue(){const t=this.source.getBuffer(),e=this.getAccessor();if(t)return[t,e];const{value:n}=this.source,{size:r}=e;let i=n;if(n&&n.length!==r){i=new Float32Array(r);const t=e.elementOffset||0;for(let e=0;e<r;++e)i[e]=n[t+e]}return i}getAccessor(){return{...this.source.getAccessor(),...this.opts}}}var u=n(6610),c=n(5126),l=n(744);function h(t){return t.stride||t.size*t.bytesPerElement}function f(t,e){e.offset&&l.Z.removed("shaderAttribute.offset","vertexOffset, elementOffset")();const n=h(t),r=("vertexOffset"in e?e.vertexOffset:t.vertexOffset||0)*n+(e.elementOffset||0)*t.bytesPerElement+(t.offset||0);return{...e,offset:r,stride:n}}var d=n(5304),p=n(8550),g=n(1855);const m=[],v=[[0,1/0]];function y({source:t,target:e,start:n=0,end:r,size:i,getData:o}){r=r||e.length;const s=t.length,a=r-n;if(s>a)return void e.set(t.subarray(0,a),n);if(e.set(t,n),!o)return;let u=s;for(;u<a;){const r=o(u,t);for(let t=0;t<i;t++)e[n+u]=r[t]||0,u++}}const b={interpolation:{duration:0,easing:t=>t},spring:{stiffness:.05,damping:.5}};function _(t,e){return t?(Number.isFinite(t)&&(t={duration:t}),t.type=t.type||"interpolation",{...b[t.type],...e,...t}):null}function w(t,e){return e.getBuffer()?[e.getBuffer(),{divisor:0,size:e.size,normalized:e.settings.normalized}]:e.value}function x(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4";default:throw new Error('No defined attribute type for size "'.concat(t,'"'))}}function E(t){t.push(t.shift())}function T(t,e){const{doublePrecision:n,settings:r,value:i,size:o}=t,s=n&&i instanceof Float64Array?2:1;return(r.noAlloc?i.length:e*o)*s}function P({buffer:t,numInstances:e,attribute:n,fromLength:r,fromStartIndices:i,getData:o=(t=>t)}){const s=n.doublePrecision&&n.value instanceof Float64Array?2:1,a=n.size*s,u=n.byteOffset,c=n.startIndices,l=i&&c,h=T(n,e),f=n.state.constant;if(!l&&r>=h)return;const d=f?n.value:n.getBuffer().getData({srcByteOffset:u});if(n.settings.normalized&&!f){const t=o;o=(e,r)=>n._normalizeConstant(t(e,r))}const p=f?(t,e)=>o(d,e):(t,e)=>o(d.subarray(t,t+a),e),g=t.getData({length:r}),m=new Float32Array(h);!function({source:t,target:e,size:n,getData:r,sourceStartIndices:i,targetStartIndices:o}
1){if(!Array.isArray(o))return y({source:t,target:e,size:n,getData:r}),e;let s=0,a=0;const u=r&&((t,e)=>r(t+a,e)),c=Math.min(i.length,o.length);for(let l=1;l<c;l++){const r=i[l]*n,c=o[l]*n;y({source:t.subarray(s,r),target:e,start:a,end:c,size:n,getData:u}),s=r,a=c}a<e.length&&y({source:[],target:e,start:a,size:n,getData:u})}({source:g,target:m,sourceStartIndices:i,targetStartIndices:c,size:a,getData:p}),t.byteLength<m.byteLength+u&&t.reallocate(m.byteLength+u),t.subData({data:m,offset:u})}class A extends class{constructor(t,e){this.gl=t,this.id=e.id,this.size=e.size;const n=e.logicalType||e.type,r=5130===n;let{defaultValue:s}=e;s=Number.isFinite(s)?[s]:s||new Array(this.size).fill(0),e.defaultValue=s;let a=n;r?a=5126:!a&&e.isIndexed?a=t&&(0,i.U6)(t,o.h.ELEMENT_INDEX_UINT32)?5125:5123:a||(a=5126),e.logicalType=n,e.type=a;let u=function(t){switch(t){case 5126:return Float32Array;case 5130:return Float64Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return Uint8ClampedArray;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Unknown GL type")}}(n||a||5126);this.shaderAttributes={},this.doublePrecision=r,r&&!1===e.fp64&&(u=Float32Array),e.bytesPerElement=u.BYTES_PER_ELEMENT,this.defaultType=u,this.value=null,this.settings=e,this.state={externalBuffer:null,bufferAccessor:e,allocatedValue:null,constant:!1},this._buffer=null,this.setData(e)}get buffer(){if(!this._buffer){const{isIndexed:t,type:e}=this.settings;this._buffer=new s.Z(this.gl,{id:this.id,target:t?34963:34962,accessor:{type:e}})}return this._buffer}get byteOffset(){const t=this.getAccessor();return t.vertexOffset?t.vertexOffset*h(t):0}delete(){this._buffer&&(this._buffer.delete(),this._buffer=null),u.Z.release(this.state.allocatedValue)}getShaderAttributes(t,e){if(this.doublePrecision){const n={},r=this.value instanceof Float64Array,i=function(t,e){const n=f(t,e);return{high:n,low:{...n,offset:n.offset+4*t.size}}}(this.getAccessor(),e||{});return n[t]=new a(this,i.high),n["".concat(t,"64Low")]=r?new a(this,i.low):new Float32Array(this.size),n}if(e){const n=f(this.getAccessor(),e);return{[t]:new a(this,n)}}return{[t]:this}}getBuffer(){return this.state.constant?null:this.state.externalBuffer||this._buffer}getValue(){return this.state.constant?this.value:[this.getBuffer(),this.getAccessor()]}getAccessor(){return this.state.bufferAccessor}setData(t){const{state:e}=this;ArrayBuffer.isView(t)?t={value:t}:t instanceof s.Z&&(t={buffer:t});const n={...this.settings,...t};if(e.bufferAccessor=n,t.constant){let n=t.value;n=this._normalizeValue(n,[],0),this.settings.normalized&&(n=this._normalizeConstant(n));if(!(!e.constant||!this._areValuesEqual(n,this.value)))return!1;e.externalBuffer=null,e.constant=!0,this.value=n}else if(t.buffer){const r=t.buffer;e.externalBuffer=r,e.constant=!1,this.value=t.value;const i=t.value instanceof Float64Array;n.type=t.type||r.accessor.type,n.bytesPerElement=r.accessor.BYTES_PER_ELEMENT*(i?2:1),n.stride=h(n)}else if(t.value){this._checkExternalBuffer(t);let r=t.value;e.externalBuffer=null,e.constant=!1,this.value=r,n.bytesPerElement=r.BYTES_PER_ELEMENT,n.stride=h(n);const{buffer:i,byteOffset:o}=this;this.doublePrecision&&r instanceof Float64Array&&(r=(0,c.TK)(r,n));const s=r.byteLength+o+2*n.stride;i.byteLength<s&&i.reallocate(s),i.setAccessor(null),i.subData({data:r,offset:o}),n.type=t.type||i.accessor.type}return!0}updateSubBuffer(t={}){const{value:e}=this,{startOffset:n=0,endOffset:r}=t;this.buffer.subData({data:this.doublePrecision&&e instanceof Float64Array?(0,c.TK)(e,{size:this.size,startIndex:n,endIndex:r}):e.subarray(n,r),offset:n*e.BYTES_PER_ELEMENT+this.byteOffset})}allocate({numInstances:t,copy:e=!1}){const{state:n}=this,r=n.allocatedValue,i=u.Z.allocate(r,t+1,{size:this.size,type:this.defaultType,copy:e});this.value=i;const{buffer:o,byteOffset:s}=this;return o.byteLength<i.byteLength+s&&(o.reallocate(i.byteLength+s),e&&r&&o.subData({data:r instanceof Float64Array?(0,c.TK)(r,this):r,offset:s})),n.allocatedValue=i,n.constant=!1,n.externalBuffer=null,n.bufferAccessor=this.settings,!0}_checkExternalBuffer(t){const{value:e}=t;if(!t.constant&&e){const n=this.defaultType;let r=!1;if(this.doublePrecision&&(r=e.BYTES_PER_ELEMENT<4),r)throw new Error("Attribute ".concat(this.id," does not support ").concat(e.constructor.name));e instanceof n||!this.settings.normalized||"normalized"in t||l.Z.warn("Attribute ".concat(this.id," is normalized"))()}}_normalizeConstant(t){switch(this.settings.type){case 5120:return new Float32Array(t).map((t=>(t+128)/255*2-1));case 5122:return new Float32Array(t).map((t=>(t+32768)/65535*2-1));case 5121:return new Float32Array(t).map((t=>t/255));case 5123:return new Float32Array(t).map((t=>t/65535));default:return t}}_normalizeValue(t,e,n){const{defaultValue:r,size:i}=this.settings;if(Number.isFinite(t))return e[n]=t,e;if(!t)return e[n]=r[0],e;switch(i){case 4:e[n+3]=Number.isFinite(t[3])?t[3]:r[3];case 3:e[n+2]=Number.isFinite(t[2])?t[2]:r[2];case 2:e[n+1]=Number.isFinite(t[1])?t[1]:r[1];case 1:e[n+0]=Number.isFinite(t[0])?t[0]:r[0];break;default:let o=i;for(;--o>=0;)e[n+o]=Number.isFinite(t[o])?t[o]:r[o]}return e}_areValuesEqual(t,e){if(!t||!e)return!1;const{size:n}=this;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}}{constructor(t,e={}){super(t,e);const{transition:n=!1,noAlloc:r=!1,update:i=null,accessor:o=null,transform:s=null,startIndices:a=null}=e;Object.assign(this.settings,{transition:n,noAlloc:r,update:i||o&&this._autoUpdater,accessor:o,transform:s}
1),Object.assign(this.state,{lastExternalBuffer:null,binaryValue:null,binaryAccessor:null,needsUpdate:!0,needsRedraw:!1,updateRanges:v,startIndices:a}),Object.seal(this.settings),Object.seal(this.state),this._validateAttributeUpdaters()}get startIndices(){return this.state.startIndices}set startIndices(t){this.state.startIndices=t}needsUpdate(){return this.state.needsUpdate}needsRedraw({clearChangedFlags:t=!1}={}){const e=this.state.needsRedraw;return this.state.needsRedraw=e&&!t,e}getUpdateTriggers(){const{accessor:t}=this.settings;return[this.id].concat("function"!==typeof t&&t||[])}supportsTransition(){return Boolean(this.settings.transition)}getTransitionSetting(t){if(!t||!this.supportsTransition())return null;const{accessor:e}=this.settings,n=this.settings.transition;return _(Array.isArray(e)?t[e.find((e=>t[e]))]:t[e],n)}setNeedsUpdate(t=this.id,e){if(this.state.needsUpdate=this.state.needsUpdate||t,this.setNeedsRedraw(t),e){const{startRow:t=0,endRow:n=1/0}=e;this.state.updateRanges=function(t,e){if(t===v)return t;if(e[0]<0&&(e[0]=0),e[0]>=e[1])return t;const n=[],r=t.length;let i=0;for(let o=0;o<r;o++){const r=t[o];r[1]<e[0]?(n.push(r),i=o+1):r[0]>e[1]?n.push(r):e=[Math.min(r[0],e[0]),Math.max(r[1],e[1])]}return n.splice(i,0,e),n}(this.state.updateRanges,[t,n])}else this.state.updateRanges=v}clearNeedsUpdate(){this.state.needsUpdate=!1,this.state.updateRanges=m}setNeedsRedraw(t=this.id){this.state.needsRedraw=this.state.needsRedraw||t}update(t){this.setData(t)}allocate(t){const{state:e,settings:n}=this;return!n.noAlloc&&(!!n.update&&(super.allocate({numInstances:t,copy:e.updateRanges!==v}),!0))}updateBuffer({numInstances:t,data:e,props:n,context:r}){if(!this.needsUpdate())return!1;const{state:{updateRanges:i},settings:{update:o,noAlloc:s}}=this;let a=!0;if(o){for(const[s,a]of i)o.call(r,this,{data:e,startRow:s,endRow:a,props:n,numInstances:t});if(this.value)if(this.constant||this.buffer.byteLength<this.value.byteLength+this.byteOffset)this.setData({value:this.value,constant:this.constant}),this.constant=!1;else for(const[e,n]of i){const r=Number.isFinite(e)?this.getVertexOffset(e):0,i=Number.isFinite(n)?this.getVertexOffset(n):s||!Number.isFinite(t)?this.value.length:t*this.size;super.updateSubBuffer({startOffset:r,endOffset:i})}else;this._checkAttributeArray()}else a=!1;return this.clearNeedsUpdate(),this.setNeedsRedraw(),a}setConstantValue(t){if(void 0===t||"function"===typeof t)return!1;return this.setData({constant:!0,value:t})&&this.setNeedsRedraw(),this.clearNeedsUpdate(),!0}setExternalBuffer(t){const{state:e}=this;return t?(this.clearNeedsUpdate(),e.lastExternalBuffer===t||(e.lastExternalBuffer=t,this.setNeedsRedraw(),this.setData(t)),!0):(e.lastExternalBuffer=null,!1)}setBinaryValue(t,e=null){const{state:n,settings:r}=this;if(!t)return n.binaryValue=null,n.binaryAccessor=null,!1;if(r.noAlloc)return!1;if(n.binaryValue===t)return this.clearNeedsUpdate(),!0;n.binaryValue=t,this.setNeedsRedraw(),ArrayBuffer.isView(t)&&(t={value:t});if(r.transform||e!==this.startIndices){(0,d.Z)(ArrayBuffer.isView(t.value),"invalid ".concat(r.accessor));const i=t.size&&t.size!==this.size;return n.binaryAccessor=(0,p.jr)(t.value,{size:t.size||this.size,stride:t.stride,offset:t.offset,startIndices:e,nested:i}),!1}return this.clearNeedsUpdate(),this.setData(t),!0}getVertexOffset(t){const{startIndices:e}=this;return(e?e[t]:t)*this.size}getShaderAttributes(){const t=this.settings.shaderAttributes||{[this.id]:null},e={};for(const n in t)Object.assign(e,super.getShaderAttributes(n,t[n]));return e}_autoUpdater(t,{data:e,startRow:n,endRow:r,props:i,numInstances:o}){if(t.constant)return;const{settings:s,state:a,value:u,size:c,startIndices:l}=t,{accessor:h,transform:f}=s,m=a.binaryAccessor||("function"===typeof h?h:i[h]);(0,d.Z)("function"===typeof m,'accessor "'.concat(h,'" is not a function'));let v=t.getVertexOffset(n);const{iterable:y,objectInfo:b}=(0,p.jB)(e,n,r);for(const d of y){b.index++;let e=m(d,b);if(f&&(e=f.call(this,e)),l){const n=(b.index<l.length-1?l[b.index+1]:o)-l[b.index];if(e&&Array.isArray(e[0])){let n=v;for(const r of e)t._normalizeValue(r,u,n),n+=c}else e&&e.length>c?u.set(e,v):(t._normalizeValue(e,b.target,0),(0,g.k)({target:u,source:b.target,start:v,count:n}));v+=n*c}else t._normalizeValue(e,u,v),v+=c}}_validateAttributeUpdaters(){const{settings:t}=this;if(!(t.noAlloc||"function"===typeof t.update))throw new Error("Attribute ".concat(this.id," missing update or accessor"))}_checkAttributeArray(){const{value:t}=this,e=Math.min(4,this.size);if(t&&t.length>=e){let n=!0;switch(e){case 4:n=n&&Number.isFinite(t[3]);case 3:n=n&&Number.isFinite(t[2]);case 2:n=n&&Number.isFinite(t[1]);case 1:n=n&&Number.isFinite(t[0]);break;default:n=!1}if(!n)throw new Error("Illegal attribute generated for ".concat(this.id
1))}}}var S=n(3803),M=n(9047);const O="out vec4 transform_output;\nvoid main() {\n transform_output = vec4(0);\n}",C=`#version 300 es\n${O}`;function L(t,e){e=Array.isArray(e)?e:[e];const n=t.replace(/^\s+/,"").split(/\s+/),[r,i,o]=n;if(!e.includes(r)||!i||!o)return null;return{qualifier:r,type:i,name:o.split(";")[0]}}function k(t={}){const{version:e=100,input:n,inputType:r,output:i}=t;if(!n)return 300===e?C:e>300?`#version ${e}\n${O}`:"void main() {gl_FragColor = vec4(0);}";const o=function(t,e){switch(e){case"float":return`vec4(${t}, 0.0, 0.0, 1.0)`;case"vec2":return`vec4(${t}, 0.0, 1.0)`;case"vec3":return`vec4(${t}, 1.0)`;case"vec4":return t;default:return(0,M.Z)(!1),null}}(n,r);return e>=300?`#version ${e} ${300===e?"es":""}\nin ${r} ${n};\nout vec4 ${i};\nvoid main() {\n ${i} = ${o};\n}`:`varying ${r} ${n};\nvoid main() {\n gl_FragColor = ${o};\n}`}var R=n(9450),I=n(1053),j=n(2525);class D{constructor(t,e={}){this.gl=t,this.currentIndex=0,this.feedbackMap={},this.varyings=null,this.bindings=[],this.resources={},this._initialize(e),Object.seal(this)}setupResources(t){for(const e of this.bindings)this._setupTransformFeedback(e,t)}updateModelProps(t={}){const{varyings:e}=this;return e.length>0&&(t=Object.assign({},t,{varyings:e})),t}getDrawOptions(t={}){const e=this.bindings[this.currentIndex],{sourceBuffers:n,transformFeedback:r}=e;return{attributes:Object.assign({},n,t.attributes),transformFeedback:r}}swap(){return!!this.feedbackMap&&(this.currentIndex=this._getNextIndex(),!0)}update(t={}){this._setupBuffers(t)}getBuffer(t){const{feedbackBuffers:e}=this.bindings[this.currentIndex],n=t?e[t]:null;return n?n instanceof s.Z?n:n.buffer:null}getData(t={}){const{varyingName:e}=t,n=this.getBuffer(e);return n?n.getData():null}delete(){for(const t in this.resources)this.resources[t].delete()}_initialize(t={}){this._setupBuffers(t),this.varyings=t.varyings||Object.keys(this.bindings[this.currentIndex].feedbackBuffers),this.varyings.length>0&&(0,j.h)((0,R.D0)(this.gl))}_getFeedbackBuffers(t){const{sourceBuffers:e={}}=t,n={};if(this.bindings[this.currentIndex]&&Object.assign(n,this.bindings[this.currentIndex].feedbackBuffers),this.feedbackMap)for(const r in this.feedbackMap){const t=this.feedbackMap[r];r in e&&(n[t]=r)}Object.assign(n,t.feedbackBuffers);for(const r in n){const t=n[r];if("string"===typeof t){const i=e[t],{byteLength:o,usage:s,accessor:a}=i;n[r]=this._createNewBuffer(r,{byteLength:o,usage:s,accessor:a})}}return n}_setupBuffers(t={}){const{sourceBuffers:e=null}=t;Object.assign(this.feedbackMap,t.feedbackMap);const n=this._getFeedbackBuffers(t);this._updateBindings({sourceBuffers:e,feedbackBuffers:n})}_setupTransformFeedback(t,{model:e}){const{program:n}=e;t.transformFeedback=new I.Z(this.gl,{program:n,buffers:t.feedbackBuffers})}_updateBindings(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this.feedbackMap){const{sourceBuffers:t,feedbackBuffers:e}=this._swapBuffers(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceBuffers:t,feedbackBuffers:e})}}_updateBinding(t,e){return t?(Object.assign(t.sourceBuffers,e.sourceBuffers),Object.assign(t.feedbackBuffers,e.feedbackBuffers),t.transformFeedback&&t.transformFeedback.setBuffers(t.feedbackBuffers),t):{sourceBuffers:Object.assign({},e.sourceBuffers),feedbackBuffers:Object.assign({},e.feedbackBuffers)}}_swapBuffers(t){if(!this.feedbackMap)return null;const e=Object.assign({},t.sourceBuffers),n=Object.assign({},t.feedbackBuffers);for(const r in this.feedbackMap){const i=this.feedbackMap[r];e[r]=t.feedbackBuffers[i],n[i]=t.sourceBuffers[r],(0,j.h)(n[i]instanceof s.Z)}return{sourceBuffers:e,feedbackBuffers:n}}_createNewBuffer(t,e){const n=new s.Z(this.gl,e);return this.resources[t]&&this.resources[t].delete(),this.resources[t]=n,n}_getNextIndex(){return(this.currentIndex+1)%2}}var N=n(1953),F=n(4912),B=n(3849),U=n(5432);function z(t){let e=100;const n=t.match(/[^\s]+/g);if(n.length>=2&&"#version"===n[0]){const t=parseInt(n[1],10);Number.isFinite(t)&&(e=t)}return e}var V=n(6713);const Z={name:"transform",vs:"attribute float transform_elementID;\nvec2 transform_getPixelSizeHalf(vec2 size) {\n return vec2(1.) / (2. * size);\n}\n\nvec2 transform_getPixelIndices(vec2 texSize, vec2 pixelSizeHalf) {\n float yIndex = floor((transform_elementID / texSize[0]) + pixelSizeHalf[1]);\n float xIndex = transform_elementID - (yIndex * texSize[0]);\n return vec2(xIndex, yIndex);\n}\nvec2 transform_getTexCoord(vec2 size) {\n vec2 pixelSizeHalf = transform_getPixelSizeHalf(size);\n vec2 indices = transform_getPixelIndices(size, pixelSizeHalf);\n vec2 coord = indices / size + pixelSizeHalf;\n return coord;\n}\nvec2 transform_getPos(vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec2 pos = (texCoord * (2.0, 2.0)) - (1., 1.);\n return pos;\n}\nvec4 transform_getInput(sampler2D texSampler, vec2 size) {\n vec2 texCoord = transform_getTexCoord(size);\n vec4 textureColor = texture2D(texSampler, texCoord);\n return textureColor;\n}\n",fs:null};function G({vs:t,sourceTextureMap:e,targetTextureVarying:n,targetTexture:r}){let i=Object.keys(e).length,o=null;const s={};let a=t,u={};
1if(i>0||n){const t=a.split("\n"),c=t.slice();if(t.forEach(((t,r,a)=>{if(i>0){const n=function(t,e){const n={},r=function(t){return L(t,["attribute","in"])}(t);if(!r)return null;const{type:i,name:o}=r;if(o&&e[o]){const e=`// ${t} => Replaced by Transform with a sampler`,{samplerName:r,sizeName:s,uniformDeclerations:a}=function(t){const e=`transform_uSampler_${t}`,n=`transform_uSize_${t}`;return{samplerName:e,sizeName:n,uniformDeclerations:` uniform sampler2D ${e};\n uniform vec2 ${n};`}}(o),u=` ${i} ${o} = transform_getInput(${r}, ${s}).${function(t){switch(t){case"float":return"x";case"vec2":return"xy";case"vec3":return"xyz";case"vec4":return"xyzw";default:return(0,M.Z)(!1),null}}(i)};\n`;n[r]=o;return{updatedLine:e,inject:{"vs:#decl":a,"vs:#main-start":u},samplerTextureMap:n}}return null}(t,e);if(n){const{updatedLine:t,inject:e}=n;c[r]=t,u=(0,V.Lm)([u,e]),Object.assign(s,n.samplerTextureMap),i--}}n&&!o&&(o=function(t,e){const n=L(t,["varying","out"]);if(!n)return null;return n.name===e?n.type:null}(t,n))})),n){(0,j.h)(r);const t=`transform_uSize_${n}`,e={"vs:#decl":`uniform vec2 ${t};\n`,"vs:#main-start":` vec2 transform_position = transform_getPos(${t});\n gl_Position = vec4(transform_position, 0, 1.);\n`};u=(0,V.Lm)([u,e])}a=c.join("\n")}return{vs:a,targetTextureType:o,inject:u,samplerTextureMap:s}}const H={10241:9728,10240:9728,10242:33071,10243:33071};class W{constructor(t,e={}){this.gl=t,this.id=this.currentIndex=0,this._swapTexture=null,this.targetTextureVarying=null,this.targetTextureType=null,this.samplerTextureMap=null,this.bindings=[],this.resources={},this._initialize(e),Object.seal(this)}updateModelProps(t={}){const e=this._processVertexShader(t);return Object.assign({},t,e)}getDrawOptions(t={}){const{sourceBuffers:e,sourceTextures:n,framebuffer:r,targetTexture:i}=this.bindings[this.currentIndex],o=Object.assign({},e,t.attributes),s=Object.assign({},t.uniforms),a=Object.assign({},t.parameters);let u=t.discard;if(this.hasSourceTextures||this.hasTargetTexture){o.transform_elementID=this.elementIDBuffer;for(const e in this.samplerTextureMap){const t=this.samplerTextureMap[e];s[e]=n[t]}this._setSourceTextureParameters();const t=function({sourceTextureMap:t,targetTextureVarying:e,targetTexture:n}){const r={};let i,o;e&&(({width:i,height:o}=n),r[`transform_uSize_${e}`]=[i,o]);for(const s in t)({width:i,height:o}=t[s]),r[`transform_uSize_${s}`]=[i,o];return r}({sourceTextureMap:n,targetTextureVarying:this.targetTextureVarying,targetTexture:i});Object.assign(s,t)}return this.hasTargetTexture&&(u=!1,a.viewport=[0,0,r.width,r.height]),{attributes:o,framebuffer:r,uniforms:s,discard:u,parameters:a}}swap(){return!!this._swapTexture&&(this.currentIndex=this._getNextIndex(),!0)}update(t={}){this._setupTextures(t)}getTargetTexture(){const{targetTexture:t}=this.bindings[this.currentIndex];return t}getData({packed:t=!1}={}){const{framebuffer:e}=this.bindings[this.currentIndex],n=(0,N.z6)(e);if(!t)return n;const r=n.constructor,i=function(t){switch(t){case"float":return 1;case"vec2":return 2;case"vec3":return 3;case"vec4":return 4;default:return(0,M.Z)(!1),null}}(this.targetTextureType),o=new r(n.length*i/4);let s=0;for(let a=0;a<n.length;a+=4)for(let t=0;t<i;t++)o[s++]=n[a+t];return o}getFramebuffer(){return this.bindings[this.currentIndex].framebuffer}delete(){this.ownTexture&&this.ownTexture.delete(),this.elementIDBuffer&&this.elementIDBuffer.delete()}_initialize(t={}){const{_targetTextureVarying:e,_swapTexture:n}=t;this._swapTexture=n,this.targetTextureVarying=e,this.hasTargetTexture=e,this._setupTextures(t)}_createTargetTexture(t){const{sourceTextures:e,textureOrReference:n}=t;if(n instanceof F.Z)return n;const r=e[n];return r?(this._targetRefTexName=n,this._createNewTexture(r)):null}_setupTextures(t={}){const{sourceBuffers:e,_sourceTextures:n={},_targetTexture:r}=t,i=this._createTargetTexture({sourceTextures:n,textureOrReference:r});this.hasSourceTextures=this.hasSourceTextures||n&&Object.keys(n).length>0,this._updateBindings({sourceBuffers:e,sourceTextures:n,targetTexture:i}),"elementCount"in t&&this._updateElementIDBuffer(t.elementCount)}
1_updateElementIDBuffer(t){if("number"!==typeof t||this.elementCount>=t)return;const e=new Float32Array(t);e.forEach(((t,e,n)=>{n[e]=e})),this.elementIDBuffer?this.elementIDBuffer.setData({data:e}):this.elementIDBuffer=new s.Z(this.gl,{data:e,accessor:{size:1}}),this.elementCount=t}_updateBindings(t){if(this.bindings[this.currentIndex]=this._updateBinding(this.bindings[this.currentIndex],t),this._swapTexture){const{sourceTextures:t,targetTexture:e}=this._swapTextures(this.bindings[this.currentIndex]),n=this._getNextIndex();this.bindings[n]=this._updateBinding(this.bindings[n],{sourceTextures:t,targetTexture:e})}}_updateBinding(t,e){const{sourceBuffers:n,sourceTextures:r,targetTexture:i}=e;if(t||(t={sourceBuffers:{},sourceTextures:{},targetTexture:null}),Object.assign(t.sourceTextures,r),Object.assign(t.sourceBuffers,n),i){t.targetTexture=i;const{width:e,height:n}=i,{framebuffer:r}=t;r?(r.update({attachments:{36064:i},resizeAttachments:!1}),r.resize({width:e,height:n})):t.framebuffer=new B.Z(this.gl,{id:"transform-framebuffer",width:e,height:n,attachments:{36064:i}})}return t}_setSourceTextureParameters(){const t=this.currentIndex,{sourceTextures:e}=this.bindings[t];for(const n in e)e[n].setParameters(H)}_swapTextures(t){if(!this._swapTexture)return null;const e=Object.assign({},t.sourceTextures);e[this._swapTexture]=t.targetTexture;return{sourceTextures:e,targetTexture:t.sourceTextures[this._swapTexture]}}_createNewTexture(t){const e=(0,U.h)(t,{parameters:{10241:9728,10240:9728,10242:33071,10243:33071},pixelStore:{37440:!1}});return this.ownTexture&&this.ownTexture.delete(),this.ownTexture=e,e}_getNextIndex(){return(this.currentIndex+1)%2}_processVertexShader(t={}){const{sourceTextures:e,targetTexture:n}=this.bindings[this.currentIndex],{vs:r,uniforms:i,targetTextureType:o,inject:s,samplerTextureMap:a}=G({vs:t.vs,sourceTextureMap:e,targetTextureVarying:this.targetTextureVarying,targetTexture:n}),u=(0,V.Lm)([t.inject||{},s]);this.targetTextureType=o,this.samplerTextureMap=a;return{vs:r,fs:t._fs||k({version:z(r),input:this.targetTextureVarying,inputType:o,output:"transform_output"}),modules:this.hasSourceTextures||this.targetTextureVarying?[Z].concat(t.modules||[]):t.modules,uniforms:i,inject:u}}}var $=n(4538),q=n(1113);class X{static isSupported(t){return(0,R.D0)(t)}constructor(t,e={}){this.gl=t,this.model=null,this.elementCount=0,this.bufferTransform=null,this.textureTransform=null,this.elementIDBuffer=null,this._initialize(e),Object.seal(this)}delete(){const{model:t,bufferTransform:e,textureTransform:n}=this;t&&t.delete(),e&&e.delete(),n&&n.delete()}run(t={}){const{clearRenderTarget:e=!0}=t,n=this._updateDrawOptions(t);e&&n.framebuffer&&n.framebuffer.clear({color:!0}),this.model.transform(n)}swap(){let t=!1;const e=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of e)t=t||n.swap();(0,j.h)(t,"Nothing to swap")}getBuffer(t=null){return this.bufferTransform&&this.bufferTransform.getBuffer(t)}getData(t={}){const e=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of e){const e=n.getData(t);if(e)return e}return null}getFramebuffer(){return this.textureTransform&&this.textureTransform.getFramebuffer()}update(t={}){"elementCount"in t&&this.model.setVertexCount(t.elementCount);const e=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const n of e)n.update(t)}_initialize(t={}){const{gl:e}=this;this._buildResourceTransforms(e,t),t=this._updateModelProps(t),this.model=new q.Z(e,Object.assign({},t,{fs:t.fs||k({version:z(t.vs)}),id:t.id||"transform-model",drawMode:t.drawMode||0,vertexCount:t.elementCount})),this.bufferTransform&&this.bufferTransform.setupResources({model:this.model})}_updateModelProps(t){let e=Object.assign({},t);const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)e=r.updateModelProps(e);return e}_buildResourceTransforms(t,e){(function(t){if(!(0,$.nK)(t.feedbackBuffers)||!(0,$.nK)(t.feedbackMap)||t.varyings&&t.varyings.length>0)return!0;return!1})(e)&&(this.bufferTransform=new D(t,e)),function(t){if(!(0,$.nK)(t._sourceTextures)||t._targetTexture||t._targetTextureVarying)return!0;return!1}(e)&&(this.textureTransform=new W(t,e)),(0,j.h)(this.bufferTransform||this.textureTransform,"must provide source/feedback buffers or source/target textures")}_updateDrawOptions(t){let e=Object.assign({},t);
1const n=[this.bufferTransform,this.textureTransform].filter(Boolean);for(const r of n)e=Object.assign(e,r.getDrawOptions(e));return e}}var Y=n(6395);const K="\n#define SHADER_NAME interpolation-transition-vertex-shader\n\nuniform float time;\nattribute ATTRIBUTE_TYPE aFrom;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vCurrent;\n\nvoid main(void) {\n vCurrent = mix(aFrom, aTo, time);\n gl_Position = vec4(0.0);\n}\n";const Q={interpolation:class{constructor({gl:t,attribute:e,timeline:n}){this.gl=t,this.type="interpolation",this.transition=new Y.Z(n),this.attribute=e,this.attributeInTransition=new A(t,e.settings),this.currentStartIndices=e.startIndices,this.currentLength=0,this.transform=function(t,e){const n=x(e.size);return new X(t,{vs:K,defines:{ATTRIBUTE_TYPE:n},varyings:["vCurrent"]})}(t,e);const r={byteLength:0,usage:35050};this.buffers=[new s.Z(t,r),new s.Z(t,r)]}get inProgress(){return this.transition.inProgress}start(t,e){if(t.duration<=0)return void this.transition.cancel();const{gl:n,buffers:r,attribute:i}=this;E(r);const o={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter};for(const s of r)P({buffer:s,...o});this.currentStartIndices=i.startIndices,this.currentLength=T(i,e),this.attributeInTransition.update({buffer:r[1],value:i.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aFrom:r[0],aTo:w(0,i)},feedbackBuffers:{vCurrent:r[1]}})}update(){const t=this.transition.update();if(t){const{time:t,settings:{duration:e,easing:n}}=this.transition,r=n(t/e);this.transform.run({uniforms:{time:r}})}return t}cancel(){for(this.transition.cancel(),this.transform.delete();this.buffers.length;)this.buffers.pop().delete()}},spring:class{constructor({gl:t,attribute:e,timeline:n}){this.gl=t,this.type="spring",this.transition=new Y.Z(n),this.attribute=e,this.attributeInTransition=new A(t,{...e.settings,normalized:!1}),this.currentStartIndices=e.startIndices,this.currentLength=0,this.texture=function(t){return new F.Z(t,{data:new Uint8Array(4),format:6408,type:5121,border:0,mipmaps:!1,dataFormat:6408,width:1,height:1})}(t),this.framebuffer=function(t,e){return new B.Z(t,{id:"spring-transition-is-transitioning-framebuffer",width:1,height:1,attachments:{36064:e}})}(t,this.texture),this.transform=function(t,e,n){const r=x(e.size);return new X(t,{framebuffer:n,vs:"\n#define SHADER_NAME spring-transition-vertex-shader\n\n#define EPSILON 0.00001\n\nuniform float stiffness;\nuniform float damping;\nattribute ATTRIBUTE_TYPE aPrev;\nattribute ATTRIBUTE_TYPE aCur;\nattribute ATTRIBUTE_TYPE aTo;\nvarying ATTRIBUTE_TYPE vNext;\nvarying float vIsTransitioningFlag;\n\nATTRIBUTE_TYPE getNextValue(ATTRIBUTE_TYPE cur, ATTRIBUTE_TYPE prev, ATTRIBUTE_TYPE dest) {\n ATTRIBUTE_TYPE velocity = cur - prev;\n ATTRIBUTE_TYPE delta = dest - cur;\n ATTRIBUTE_TYPE spring = delta * stiffness;\n ATTRIBUTE_TYPE damper = velocity * -1.0 * damping;\n return spring + damper + velocity + cur;\n}\n\nvoid main(void) {\n bool isTransitioning = length(aCur - aPrev) > EPSILON || length(aTo - aCur) > EPSILON;\n vIsTransitioningFlag = isTransitioning ? 1.0 : 0.0;\n\n vNext = getNextValue(aCur, aPrev, aTo);\n gl_Position = vec4(0, 0, 0, 1);\n gl_PointSize = 100.0;\n}\n",fs:"\n#define SHADER_NAME spring-transition-is-transitioning-fragment-shader\n\nvarying float vIsTransitioningFlag;\n\nvoid main(void) {\n if (vIsTransitioningFlag == 0.0) {\n discard;\n }\n gl_FragColor = vec4(1.0);\n}",defines:{ATTRIBUTE_TYPE:r},varyings:["vNext"]})}(t,e,this.framebuffer);const r={byteLength:0,usage:35050};this.buffers=[new s.Z(t,r),new s.Z(t,r),new s.Z(t,r)]}get inProgress(){return this.transition.inProgress}start(t,e){const{gl:n,buffers:r,attribute:i}=this,o={numInstances:e,attribute:i,fromLength:this.currentLength,fromStartIndices:this.currentStartIndices,getData:t.enter};for(const s of r)P({buffer:s,...o});this.currentStartIndices=i.startIndices,this.currentLength=T(i,e),this.attributeInTransition.update({buffer:r[1],value:i.value}),this.transition.start(t),this.transform.update({elementCount:Math.floor(this.currentLength/i.size),sourceBuffers:{aTo:w(0,i)}})}update(){const{buffers:t,transform:e,framebuffer:n,transition:r}=this;
1if(!r.update())return!1;e.update({sourceBuffers:{aPrev:t[0],aCur:t[1]},feedbackBuffers:{vNext:t[2]}}),e.run({framebuffer:n,discard:!1,clearRenderTarget:!0,uniforms:{stiffness:r.settings.stiffness,damping:r.settings.damping},parameters:{depthTest:!1,blend:!0,viewport:[0,0,1,1],blendFunc:[1,1],blendEquation:[32776,32776]}}),E(t),this.attributeInTransition.update({buffer:t[1],value:this.attribute.value});return(0,N.z6)(n)[0]>0||r.end(),!0}cancel(){for(this.transition.cancel(),this.transform.delete();this.buffers.length;)this.buffers.pop().delete();this.texture.delete(),this.texture=null,this.framebuffer.delete(),this.framebuffer=null}}};class J{constructor(t,{id:e,timeline:n}){this.id=e,this.gl=t,this.timeline=n,this.transitions={},this.needsRedraw=!1,this.numInstances=1,this.isSupported=X.isSupported(t)}finalize(){for(const t in this.transitions)this._removeTransition(t)}update({attributes:t,transitions:e,numInstances:n}){this.numInstances=n||1;for(const r in t){const n=t[r],i=n.getTransitionSetting(e);i&&this._updateAttribute(r,n,i)}for(const r in this.transitions){const n=t[r];n&&n.getTransitionSetting(e)||this._removeTransition(r)}}hasAttribute(t){const e=this.transitions[t];return e&&e.inProgress}getAttributes(){const t={};for(const e in this.transitions){const n=this.transitions[e];n.inProgress&&(t[e]=n.attributeInTransition)}return t}run(){if(!this.isSupported||0===this.numInstances)return!1;for(const e in this.transitions){this.transitions[e].update()&&(this.needsRedraw=!0)}const t=this.needsRedraw;return this.needsRedraw=!1,t}_removeTransition(t){this.transitions[t].cancel(),delete this.transitions[t]}_updateAttribute(t,e,n){const r=this.transitions[t];let i=!r||r.type!==n.type;if(i){if(!this.isSupported)return void l.Z.warn("WebGL2 not supported by this browser. Transition for ".concat(t," is disabled."))();r&&this._removeTransition(t);const o=Q[n.type];o?this.transitions[t]=new o({attribute:e,timeline:this.timeline,gl:this.gl}):(l.Z.error("unsupported transition type '".concat(n.type,"'"))(),i=!1)}(i||e.needsRedraw())&&(this.needsRedraw=!0,this.transitions[t].start(n,this.numInstances))}}const tt="attributeManager.invalidate";class et{constructor(t,{id:e="attribute-manager",stats:n,timeline:r}={}){this.id=e,this.gl=t,this.attributes={},this.updateTriggers={},this.accessors={},this.needsRedraw=!0,this.userData={},this.stats=n,this.attributeTransitionManager=new J(t,{id:"".concat(e,"-transitions"),timeline:r}),Object.seal(this)}finalize(){for(const t in this.attributes)this.attributes[t].delete();this.attributeTransitionManager.finalize()}getNeedsRedraw(t={clearRedrawFlags:!1}){const e=this.needsRedraw;return this.needsRedraw=this.needsRedraw&&!t.clearRedrawFlags,e&&this.id}setNeedsRedraw(t=!0){return this.needsRedraw=!0,this}add(t,e){this._add(t,e)}addInstanced(t,e){this._add(t,e,{instanced:1})}remove(t){for(let e=0;e<t.length;e++){const n=t[e];void 0!==this.attributes[n]&&(this.attributes[n].delete(),delete this.attributes[n])}}invalidate(t,e){const n=this._invalidateTrigger(t,e);(0,S.Z)(tt,this,t,n)}invalidateAll(t){for(const e in this.attributes)this.attributes[e].setNeedsUpdate(e,t);(0,S.Z)(tt,this,"all")}update({data:t,numInstances:e,startIndices:n=null,transitions:r,props:i={},buffers:o={},context:s={}}={}){let a=!1;(0,S.Z)("attributeManager.updateStart",this),this.stats&&this.stats.get("Update Attributes").timeStart();for(const u in this.attributes){const r=this.attributes[u],c=r.settings.accessor;r.startIndices=n,i[u]&&l.Z.removed("props.".concat(u),"data.attributes.".concat(u))(),r.setExternalBuffer(o[u])||r.setBinaryValue(o[c],t.startIndices)||!o[c]&&r.setConstantValue(i[c])||r.needsUpdate()&&(a=!0,this._updateAttribute({attribute:r,numInstances:e,data:t,props:i,context:s})),this.needsRedraw|=r.needsRedraw()}a&&(0,S.Z)("attributeManager.updateEnd",this,e),this.stats&&this.stats.get("Update Attributes").timeEnd(),this.attributeTransitionManager.update({attributes:this.attributes,numInstances:e,transitions:r})}updateTransition(){const{attributeTransitionManager:t}=this,e=t.run();return this.needsRedraw=this.needsRedraw||e,e}getAttributes(){return this.attributes}getChangedAttributes(t={clearChangedFlags:!1}){const{attributes:e,attributeTransitionManager:n}=this,r={...n.getAttributes()};for(const i in e){const o=e[i];o.needsRedraw(t)&&!n.hasAttribute(i)&&(r[i]=o)}return r}getShaderAttributes(t,e={}){t||(t=this.getAttributes());const n={};for(const r in t)e[r]||Object.assign(n,t[r].getShaderAttributes());return n}getAccessors(){return this.updateTriggers}_add(t,e,n={}){e&&l.Z.warn("AttributeManager.add({updaters}) - updater map no longer supported")();for(const r in t){const e=t[r];this.attributes[r]=this._createAttribute(r,e,n)}this._mapUpdateTriggersToAttributes()}_createAttribute(t,e,n){const r={...e,id:t,isIndexed:e.isIndexed||e.elements||!1,constant:e.constant||!1,size:(e.elements?1:e.size)||1,value:e.value||null,divisor:e.instanced||n.instanced?1:e.divisor||0};return new A(this.gl,r)}_mapUpdateTriggersToAttributes(){const t={};for(const e in this.attributes){this.attributes[e].getUpdateTriggers().forEac
1h((n=>{t[n]||(t[n]=[]),t[n].push(e)}))}this.updateTriggers=t}_invalidateTrigger(t,e){const{attributes:n,updateTriggers:r}=this,i=r[t];return i&&i.forEach((t=>{const r=n[t];r&&r.setNeedsUpdate(r.id,e)})),i}_updateAttribute(t){const{attribute:e,numInstances:n}=t;if((0,S.Z)("attribute.updateStart",e),e.constant)return void e.setConstantValue(e.value);e.allocate(n)&&(0,S.Z)("attribute.allocate",e,n);e.updateBuffer(t)&&(this.needsRedraw=!0,(0,S.Z)("attribute.updateEnd",e,n))}}var nt=n(4034);class rt extends Y.Z{get value(){return this._value}_onUpdate(){const{time:t,settings:{fromValue:e,toValue:n,duration:r,easing:i}}=this,o=i(t/r);this._value=(0,nt.t7)(e,n,o)}}const it=1e-5;function ot(t,e,n,r,i){const o=e-t;return(n-e)*i+-o*r+o+e}function st(t,e){if(Array.isArray(t)){let n=0;for(let r=0;r<t.length;r++){const i=t[r]-e[r];n+=i*i}return Math.sqrt(n)}return Math.abs(t-e)}class at extends Y.Z{get value(){return this._currValue}_onUpdate(){const{fromValue:t,toValue:e,damping:n,stiffness:r}=this.settings,{_prevValue:i=t,_currValue:o=t}=this;let s=function(t,e,n,r,i){if(Array.isArray(n)){const o=[];for(let s=0;s<n.length;s++)o[s]=ot(t[s],e[s],n[s],r,i);return o}return ot(t,e,n,r,i)}(i,o,e,n,r);const a=st(s,e),u=st(s,o);a<it&&u<it&&(s=e,this.end()),this._prevValue=o,this._currValue=s}}const ut={interpolation:rt,spring:at};class ct{constructor(t){this.transitions=new Map,this.timeline=t}get active(){return this.transitions.size>0}add(t,e,n,r){const{transitions:i}=this;if(i.has(t)){const n=i.get(t),{value:r=n.settings.fromValue}=n;e=r,this.remove(t)}if(!(r=_(r)))return;const o=ut[r.type];if(!o)return void l.Z.error("unsupported transition type '".concat(r.type,"'"))();const s=new o(this.timeline);s.start({...r,fromValue:e,toValue:n}),i.set(t,s)}remove(t){const{transitions:e}=this;e.has(t)&&(e.get(t).cancel(),e.delete(t))}update(){const t={};for(const[e,n]of this.transitions)n.update(),t[e]=n.value,n.inProgress||this.remove(e);return t}clear(){for(const t of this.transitions.keys())this.remove(t)}}var lt=n(5409);const{COMPONENT:ht}=lt.A;function ft(t,e){const n=pt({newProps:t,oldProps:e,propTypes:yt(t),ignoreProps:{data:null,updateTriggers:null,extensions:null,transitions:null}}),r=function(t,e){if(null===e)return"oldProps is null, initial diff";let n=null;const{dataComparator:r,_dataDiff:i}=t;r?r(t.data,e.data)||(n="Data comparator detected a change"):t.data!==e.data&&(n="A new data container was supplied");n&&i&&(n=i(t.data,e.data)||n);return n}(t,e);let i=!1;return r||(i=function(t,e){if(null===e)return"oldProps is null, initial diff";if("all"in t.updateTriggers){if(vt(t,e,"all"))return{all:!0}}const n={};let r=!1;for(const i in t.updateTriggers)if("all"!==i){vt(t,e,i)&&(n[i]=!0,r=n)}return r}(t,e)),{dataChanged:r,propsChanged:n,updateTriggersChanged:i,extensionsChanged:mt(t,e),transitionsChanged:dt(t,e)}}function dt(t,e){if(!t.transitions)return null;const n={},r=yt(t);for(const i in t.transitions){const o=r[i],s=o&&o.type;("number"===s||"color"===s||"array"===s)&>(t[i],e[i],o)&&(n[i]=!0)}return n}function pt({newProps:t,oldProps:e,ignoreProps:n={},propTypes:r={},triggerName:i="props"}={}){if(e===t)return null;if("object"!==typeof t||null===t)return"".concat(i," changed shallowly");if("object"!==typeof e||null===e)return"".concat(i," changed shallowly");for(const o of Object.keys(t))if(!(o in n)){if(!(o in e))return"".concat(i,".").concat(o," added");const n=gt(t[o],e[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}for(const o of Object.keys(e))if(!(o in n)){if(!(o in t))return"".concat(i,".").concat(o," dropped");if(!Object.hasOwnProperty.call(t,o)){const n=gt(t[o],e[o],r[o]);if(n)return"".concat(i,".").concat(o," ").concat(n)}}return null}function gt(t,e,n){let r=n&&n.equal;return r&&!r(t,e,n)?"changed deeply":r||(r=t&&e&&t.equals,!r||r.call(t,e))?r||e===t?null:"changed shallowly":"changed deeply"}function mt(t,e){if(null===e)return"oldProps is null, initial diff";const n=e.extensions,{extensions:r}=t;if(r===n)return!1;if(r.length!==n.length)return!0;for(let i=0;i<r.length;i++)if(!r[i].equals(n[i]))return!0;return!1}function vt(t,e,n){let r=t.updateTriggers[n];r=void 0===r||null===r?{}:r;let i=e.updateTriggers[n];i=void 0===i||null===i?{}:i;return pt({oldProps:i,newProps:r,triggerName:n})}function yt(t){const e=t[ht],n=e&&e.constructor;return n?n._propTypes:{}}function bt(t){if(null===(e=t)||"object"!==typeof e)throw new Error("count(): argument not an object");var e;if("function"===typeof t.count)return t.count();if(Number.isFinite(t.size))return t.size;if(Number.isFinite(t.length))return t.length;if(function(t){return null!==t&&"object"===typeof t&&t.constructor===Object}(t))return Object.keys(t).length;throw new Error("count(): argument not a container")}var _t=n(8177);function wt(t,e){if(!e)return t;const n={...t,...e};if("defines"in e&&(n.defines={...t.defines,...e.defines}),"modules"in e&&(n.modules=(t.modules||[]).concat(e.modules),e.modules.some((t=>"project64"===t.name)))){const t=n.modules.findIndex((t=>"project32"===t.name));t>=0&&n.modules.splice(t,1)}if("inject"in e)if(t.inject){const r={...t.inject};for(const t in e.inject)r[t]=(r[t]||"")+e.inject[t];n.inject=r}else n.inject=e.inject;return n}var xt=n(4058);const Et={10241:9987,10240:9729,10242:33071,10243:33071},Tt={};const Pt={boolean:{validate:(t,e)=>!0,equal:(t,e,n)=>
1Boolean(t)===Boolean(e)},number:{validate:(t,e)=>Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)},color:{validate:(t,e)=>e.optional&&!t||Ot(t)&&(3===t.length||4===t.length),equal:(t,e,n)=>At(t,e)},accessor:{validate(t,e){const n=Ct(t);return"function"===n||n===Ct(e.value)},equal:(t,e,n)=>"function"===typeof e||At(t,e)},array:{validate:(t,e)=>e.optional&&!t||Ot(t),equal:(t,e,n)=>n.compare?At(t,e):t===e},function:{validate:(t,e)=>e.optional&&!t||"function"===typeof t,equal:(t,e,n)=>!n.compare||t===e},data:{transform:(t,e,n)=>{const{dataTransform:r}=n?n.props:{};return r&&t?r(t):t}},image:{transform:(t,e,n)=>function(t,e){const n=t.context&&t.context.gl;if(!n||!e)return null;if(e instanceof F.Z)return e;e.constructor&&"Object"!==e.constructor.name&&(e={data:e});let r=null;e.compressed&&(r={10241:e.data.length>1?9985:9729});const i=new F.Z(n,{...e,parameters:{...Et,...r,...t.props.textureParameters}});return Tt[i.id]=!0,i}(n,t),release:t=>{var e;(e=t)&&e instanceof F.Z&&Tt[e.id]&&(e.delete(),delete Tt[e.id])}}};function At(t,e){if(t===e)return!0;if(!Ot(t)||!Ot(e))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function St(t,e){switch(Ct(e)){case"object":return Mt(t,e);case"array":return Mt(t,{type:"array",value:e,compare:!1});case"boolean":return Mt(t,{type:"boolean",value:e});case"number":return Mt(t,{type:"number",value:e});case"function":return Mt(t,{type:"function",value:e,compare:!0});default:return{name:t,type:"unknown",value:e}}}function Mt(t,e){return"type"in e?{name:t,...Pt[e.type],...e}:"value"in e?{name:t,type:Ct(e.value),...e}:{name:t,type:"object",value:e}}function Ot(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function Ct(t){return Ot(t)?"array":null===t?"null":typeof t}const{COMPONENT:Lt,ASYNC_ORIGINAL:kt,ASYNC_RESOLVED:Rt,ASYNC_DEFAULTS:It}=lt.A;function jt(){const t=this,e=Dt(t.constructor),n=Object.create(e);n[Lt]=t,n[kt]={},n[Rt]={};for(let r=0;r<arguments.length;++r){const t=arguments[r];for(const e in t)n[e]=t[e]}return Object.freeze(n),n}function Dt(t){const e=Bt(t,"_mergedDefaultProps");return e||(function(t){if(!t.prototype)return;const e=Object.getPrototypeOf(t),n=Dt(e),r=function(t){const e={},n={},r={};for(const[i,o]of Object.entries(t))if(o&&o.deprecatedFor)r[i]=Array.isArray(o.deprecatedFor)?o.deprecatedFor:[o.deprecatedFor];else{const t=St(i,o);e[i]=t,n[i]=t.value}return{propTypes:e,defaultProps:n,deprecatedProps:r}}(Bt(t,"defaultProps")||{}),i=function(t,e,n){const r=Object.create(null);Object.assign(r,e,t);const i=function(t){const e=Bt(t,"layerName")||Bt(t,"componentName");e||l.Z.once(0,"".concat(t.name,".componentName not specified"))();return e||t.name}(n);return delete t.id,Object.defineProperties(r,{id:{writable:!0,value:i}}),r}(r.defaultProps,n,t),o={...e._propTypes,...r.propTypes};!function(t,e){const n={},r={};for(const i in e){const t=e[i],{name:o,value:s}=t;t.async&&(n[o]=s,r[o]=Nt(o))}t[It]=n,t[kt]={},Object.defineProperties(t,r)}(i,o);const s={...e._deprecatedProps,...r.deprecatedProps};(function(t,e){for(const n in e)Object.defineProperty(t,n,{enumerable:!1,set(t){const r="".concat(this.id,": ").concat(n);for(const i of e[n])Ft(this,i)||(this[i]=t);l.Z.deprecated(r,e[n].join("/"))()}})})(i,s),t._mergedDefaultProps=i,t._propTypes=o,t._deprecatedProps=s}(t),t._mergedDefaultProps)}function Nt(t){return{enumerable:!0,set(e){"string"===typeof e||e instanceof Promise||(0,p.D0)(e)?this[kt][t]=e:this[Rt][t]=e},get(){if(this[Rt]){if(t in this[Rt]){return this[Rt][t]||this[It][t]}if(t in this[kt]){const e=this[Lt]&&this[Lt].internalState;if(e&&e.hasAsyncProp(t))return e.getAsyncProp(t)||this[It][t]}}return this[It][t]}}}function Ft(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Bt(t,e){return Ft(t,e)&&t[e]}const{ASYNC_ORIGINAL:Ut,ASYNC_RESOLVED:zt,ASYNC_DEFAULTS:Vt}=lt.A,Zt=Object.freeze({});class Gt{constructor(t=null){this.component=t,this.asyncProps={},this.onAsyncPropUpdated=()=>{},this.oldProps=Zt,this.oldAsyncProps=null}finalize(){for(const t in this.asyncProps){const e=this.asyncProps[t];e.type&&e.type.release&&e.type.release(e.resolvedValue,e.type,this.component)}}getOldProps(){return this.oldAsyncProps||this.oldProps}resetOldProps(){this.oldAsyncProps=null,this.oldProps=this.component.props}freezeAsyncOldProps(){if(!this.oldAsyncProps){this.oldProps=this.oldProps||this.component.props,this.oldAsyncProps=Object.create(this.oldProps);for(const t in this.asyncProps)Object.defineProperty(this.oldAsyncProps,t,{enumerable:!0,value:this.oldProps[t]})}}hasAsyncProp(t){return t in this.asyncProps}getAsyncProp(t){const e=this.asyncProps[t];return e&&e.resolvedValue}isAsyncPropLoading(t){if(t){const e=this.asyncProps[t];return Boolean(e&&e.pendingLoadCount>0&&e.pendingLoadCount!==e.resolvedLoadCount)}for(const e in this.asyncProps)if(this.isAsyncPropLoading(e))return!0;return!1}reloadAsyncProp(t,e){this._watchPromise(t,Promise.resolve(e))}setAsyncProps(t){const e=t[zt]||{},n=t[Ut]||t,r=t[Vt]||{};for(const i in e){const t=e[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,t),e[i]=this.getAsyncProp(i)}for(const i in n){const t=n[i];this._createAsyncPropData(i,r[i]),this._updateAsyncProp(i,t)}}_updateAsyncProp(t,e){if(this._didAsyncInputValueChange(t,e)){if("string"===typeof e){var n;const r=null===(n=this.layer)||void 0===n?void 0:n.props.fetch,i=e;r&&(e=r(i,{propName:t,layer:this.layer}))}e instanceof Promise?this._watchPromise(t,e):(0,p.D0)(e)?this._resolveAsyncIterable(t,e):this._setPropValue(t,e)}}_didAsyncInputValueChange(t,e){const n=this.asyncProps[t];return e!==n.resolvedValue&&e!==n.lastValue&&(n.lastValue=e,!0)}_setPropValue(t,e){this.freezeAsyncOldProps();const n=this.asyncProps[t];e=this._postProcessValue(n,e),n.resolvedValue=e,n.pendingLoadCount++,n.resolvedLoadCount=n.pendingLoadCount}_setAsyncPropValue(t,e,n){const r=this.asyncProps[t];r&&n>=r.resolvedLoadCount&&void 0!==e&&(this.freezeAsyncOldProps(),r.resolvedValue=e,r.resolvedLoadCount=n,this.onAsyncPropUpdated(t,e))}_watchPromise(t,e){const n=this.asyncProps[t];n.pendingLoadCount++;const r=n.pendingLoadCount;e.then((e=>{var i;e=this._postProcessValue(n,e),this._setAsyncPropValue(t,e,r);const o=null===(i=this.layer)||void 0===i?void 0:i.props.onDataLoad;"data"===t&&o&&o(e,{propName:t,layer:this.layer})})).catch((e=>{var n;null===(n=this.layer)||void 0===n||n.raiseError(e,"loading ".concat(t," of ").concat(this.layer))}))}async _resolveAsyncIterable(t,e){var n;"data"!==t&&this._setPropValue(t,e);const r=this.asyncProps[t];r.pendingLoadCount++;const i=r.pendingLoadCount;let o=[],s=0;for await(const u of e){const{dataTransform:e}=this.component?this.component.props:{};o=e?e(u,o):o.concat(u),Object.defineProperty(o,"__diff",{enumerable:!1,value:[{startRow:s,endRow:o.length}]}),s=o.length,this._setAsyncPropValue(t,o,i)}const a=null===(n=this.layer)||void 0===n?void 0:n.props.onDataLoad;a&&a(o,{propName:t,layer:this.layer})}_postProcessValue(t,e){const n=t.type;return n&&(n.release&&n.release(t.resolvedValue,n,this.component),n.transform)?n.transform(e,n,this.component):e}_createAsyncPropData(t,e){if(!this.asyncProps[t]){const n=this.component&&this.component.constructor._propTypes;this.asyncProps[t]={type:n&&n[t],lastValue:null,resolvedValue:e,pendingLoadCount:0,resolvedLoadCount:0}}}}const{ASYNC_ORIGINAL:Ht,ASYNC_RESOLVED:Wt,ASYNC_DEFAULTS:$t}=lt.A;let qt=0;class Xt{constructor(){this.props=jt.apply(this,arguments),this.id=this.props.id,this.count=qt++,this.lifecycle=lt.d.NO_STATE,this.parent=null,this.context=null,this.state=null,this.internalState=null,Object.seal(this)}get root(){let t=this;for(;t.parent;)t=t.parent;return t}clone(t){const{props:e}=this,n={};for(const r in e[$t])r in e[Wt]?n[r]=e[Wt][r]:r in e[Ht]&&(n[r]=e[Ht][r]);return new this.constructor({...e,...n,...t})}get stats(){return this.internalState.stats}_initState(){this.internalState=new Gt({})}}Xt.componentName="Component",Xt.defaultProps={};class Yt extends Gt{constructor({attributeManager:t,layer:e}){super(e),this.attributeManager=t,this.model=null,this.needsRedraw=!0,this.subLayers=null,this.usesPickingColorCache=!1}get layer(){return this.component}set layer(t){this.component=t}}var Kt=n(7013),Qt=n(3079);const Jt=2**24-1,te=Object.freeze([]),ee=(0,_t.Z)((({oldViewport:t,viewport:e})=>t.equals(e)));let ne=new Uint8ClampedArray(0);const re={data:{type:"data",value:te,async:!0},dataComparator:null,_dataDiff:{type:"function",value:t=>t&&t.__diff,compare:!1,optional:!0},dataTransform:{type:"function",value:null,compare:!1,optional:!0},onDataLoad:{type:"function",value:null,compare:!1,optional:!0},onError:{type:"function",value:null,compare:!1,optional:!0},fetch:{type:"function",value:(t,{propName:e,layer:n,loaders:r,loadOptions:i,signal:o})=>{const{resourceManager:s}=n.context;var a;(i=i||n.getLoadOptions(),r=r||n.props.loaders,o)&&(i={...i,fetch:{...null===(a=i)||void 0===a?void 0:a.fetch,signal:o}});let u=s.contains(t);return u||i||(s.add({resourceId:t,data:(0,Qt.z)(t,r),persistent:!1}),u=!0),u?s.subscribe({resourceId:t,onChange:t=>n.internalState.reloadAsyncProp(e,t),consumerId:n.id,requestId:e}):(0,Qt.z)(t,r,i)},compare:!1},updateTriggers:{},visible:!0,pickable:!1,opacity:{type:"number",min:0,max:1,value:1},onHover:{type:"function",value:null,compare:!1,optional:!0},onClick:{type:"function",value:null,compare:!1,optional:!0},onDragStart:{type:"function",value:null,compare:!1,optional:!0},onDrag:{type:"function",value:null,compare:!1,optional:!0},onDragEnd:{type:"function",value:null,compare:!1,optional:!0},coordinateSystem:r.Df.DEFAULT,coordinateOrigin:{type:"array",value:[0,0,0],compare:!0},modelMatrix:{type:"array",value:null,compare:!0,optional:!0},wrapLongitude:!1,positionFormat:"XYZ",colorFormat:"RGBA",parameters:{},transitions:null,extensions:[],loaders:{type:"array",value:[],optional:!0,compare:!0},getPolygonOffset:{type:"function",value:({layerIndex:t})=>[0,100*-t],compare:!1},highlightedObjectIndex:-1,autoHighlight:!1,highlightColor:{type:"accessor",value:[0,0,128,128]}};class ie extends Xt{toString(){const t=this.constructor.layerName||this.constructor.name;return"".concat(t,"({id: '").concat(this.props.id,"'})")}raiseError(t,e){var n,r,i,o;(e&&(t.message="".concat(e,": ").concat(t.message)),null===(n=(r=this.props).onError)||void 0===n?void 0:n.call(r,t))||(null===(i=this.context)||void 0===i||null===(o=i.onError)||void 0===o||o.call(i,t,this))}setState(t){this.setChangeFlags({stateChanged:!0}),Object.assign(this.state,t),this.setNeedsRedraw()}setNeedsRedraw(t=!0){this.internalState&&(this.internalState.needsRedraw=t)}setNeedsUpdate(){this.context.layerManager.setNeedsUpdate(String(this)),this.internalState.needsUpdate=!0}getNeedsRedraw(t={clearRedrawFlags:!1}){return this._getNeedsRedraw(t)}needsUpdate(){return this.internalState.needsUpdate||this.hasUniformTransition()||this.shouldUpdateState(this._getUpd
1ateParams())}hasUniformTransition(){return this.internalState.uniformTransitions.active}get isLoaded(){return this.internalState&&!this.internalState.isAsyncPropLoading()}get wrapLongitude(){return this.props.wrapLongitude}isPickable(){return this.props.pickable&&this.props.visible}getModels(){return this.state&&(this.state.models||(this.state.model?[this.state.model]:[]))}getAttributeManager(){return this.internalState&&this.internalState.attributeManager}getCurrentLayer(){return this.internalState&&this.internalState.layer}getLoadOptions(){return this.props.loadOptions}project(t){const{viewport:e}=this.context,n=(0,xt.T)(t,{viewport:e,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem}),[r,i,o]=(0,Kt.aW)(n,e.pixelProjectionMatrix);return 2===t.length?[r,i]:[r,i,o]}unproject(t){const{viewport:e}=this.context;return e.unproject(t)}projectPosition(t){return(0,xt.D)(t,{viewport:this.context.viewport,modelMatrix:this.props.modelMatrix,coordinateOrigin:this.props.coordinateOrigin,coordinateSystem:this.props.coordinateSystem})}use64bitPositions(){const{coordinateSystem:t}=this.props;return t===r.Df.DEFAULT||t===r.Df.LNGLAT||t===r.Df.CARTESIAN}onHover(t,e){return!!this.props.onHover&&this.props.onHover(t,e)}onClick(t,e){return!!this.props.onClick&&this.props.onClick(t,e)}nullPickingColor(){return[0,0,0]}encodePickingColor(t,e=[]){return e[0]=t+1&255,e[1]=t+1>>8&255,e[2]=t+1>>8>>8&255,e}decodePickingColor(t){(0,d.Z)(t instanceof Uint8Array);const[e,n,r]=t;return e+256*n+65536*r-1}initializeState(){throw new Error("Layer ".concat(this," has not defined initializeState"))}getShaders(t){for(const e of this.props.extensions)t=wt(t,e.getShaders.call(this,e));return t}shouldUpdateState({oldProps:t,props:e,context:n,changeFlags:r}){return r.propsOrDataChanged}updateState({oldProps:t,props:e,context:n,changeFlags:r}){const i=this.getAttributeManager();if(r.dataChanged&&i){const{dataChanged:t}=r;if(Array.isArray(t))for(const e of t)i.invalidateAll(e);else i.invalidateAll()}const o=t.highlightedObjectIndex>=0||t.pickable,s=e.highlightedObjectIndex>=0||e.pickable;if(o!==s&&i){const{pickingColors:t,instancePickingColors:e}=i.attributes,n=t||e;n&&(s&&n.constant&&(n.constant=!1,i.invalidate(n.id)),n.value||s||(n.constant=!0,n.value=[0,0,0]))}}finalizeState(){for(const e of this.getModels())e.delete();const t=this.getAttributeManager();t&&t.finalize(),this.context.resourceManager.unsubscribe({consumerId:this.id}),this.internalState.uniformTransitions.clear(),this.internalState.finalize()}draw(t){for(const e of this.getModels())e.draw(t)}getPickingInfo({info:t,mode:e}){const{index:n}=t;return n>=0&&Array.isArray(this.props.data)&&(t.object=this.props.data[n]),t}activateViewport(t){const e=this.internalState.viewport;this.internalState.viewport=t,e&&ee({oldViewport:e,viewport:t})||(this.setChangeFlags({viewportChanged:!0}),this.isComposite?this.needsUpdate()&&this.setNeedsUpdate():this._update())}invalidateAttribute(t="all",e=""){const n=this.getAttributeManager();n&&("all"===t?n.invalidateAll():n.invalidate(t))}updateAttributes(t){for(const e of this.getModels())this._setModelAttributes(e,t)}_updateAttributes(t){const e=this.getAttributeManager();if(!e)return;const n=this.getNumInstances(t),r=this.getStartIndices(t);e.update({data:t.data,numInstances:n,startIndices:r,props:t,transitions:t.transitions,buffers:t.data.attributes,context:this,ignoreUnknownAttributes:!0});const i=e.getChangedAttributes({clearChangedFlags:!0});this.updateAttributes(i)}_updateAttributeTransition(){const t=this.getAttributeManager();t&&t.updateTransition()}_updateUniformTransition(){const{uniformTransitions:t}=this.internalState;if(t.active){const e=t.update(),n=Object.create(this.props);for(const t in e)Object.defineProperty(n,t,{value:e[t]});return n}return this.props}calculateInstancePickingColors(t,{numInstances:e}){if(t.constant)return;const n=Math.floor(ne.length/3);if(this.internalState.usesPickingColorCache=!0,n<e){e>Jt&&l.Z.warn("Layer has too many data objects. Picking might not be able to distinguish all objects.")(),ne=u.Z.allocate(ne,e,{size:3,copy:!0,maxCount:Math.max(e,Jt)});const t=Math.floor(ne.length/3),r=[];for(let e=n;e<t;
1e++)this.encodePickingColor(e,r),ne[3*e+0]=r[0],ne[3*e+1]=r[1],ne[3*e+2]=r[2]}t.value=ne.subarray(0,3*e)}_setModelAttributes(t,e){const n=this.getAttributeManager(),r=t.userData.excludeAttributes||{},i=n.getShaderAttributes(e,r);t.setAttributes(i)}disablePickingIndex(t){this._disablePickingIndex(t)}_disablePickingIndex(t){const{pickingColors:e,instancePickingColors:n}=this.getAttributeManager().attributes,r=e||n,i=r.getVertexOffset(t),o=r.getVertexOffset(t+1);r.buffer.subData({data:new Uint8Array(o-i),offset:i})}restorePickingColors(){const{pickingColors:t,instancePickingColors:e}=this.getAttributeManager().attributes,n=t||e;this.internalState.usesPickingColorCache&&n.value.buffer!==ne.buffer&&(n.value=ne.subarray(0,n.value.length)),n.updateSubBuffer({startOffset:0})}getNumInstances(t){return void 0!==(t=t||this.props).numInstances?t.numInstances:this.state&&void 0!==this.state.numInstances?this.state.numInstances:bt(t.data)}getStartIndices(t){return void 0!==(t=t||this.props).startIndices?t.startIndices:this.state&&this.state.startIndices?this.state.startIndices:null}_initialize(){(0,S.Z)("layer.initialize",this),this._initState(),this.initializeState(this.context);for(const t of this.props.extensions)t.initializeState.call(this,this.context,t);this.setChangeFlags({dataChanged:!0,propsChanged:!0,viewportChanged:!0,extensionsChanged:!0}),this._updateState()}_update(){const t=this.needsUpdate();(0,S.Z)("layer.update",this,t),t&&this._updateState()}_updateState(){const t=this.props,e=this.context.viewport,n=this._updateUniformTransition();this.internalState.propsInTransition=n,this.context.viewport=this.internalState.viewport||e,this.props=n;try{const n=this._getUpdateParams(),i=this.getModels();if(this.context.gl)this.updateState(n);else try{this.updateState(n)}catch(r){}for(const t of this.props.extensions)t.updateState.call(this,n,t);const o=this.getModels()[0]!==i[0];this._updateModules(n,o),this.isComposite?this._renderLayers(n):(this.setNeedsRedraw(),this._updateAttributes(this.props),this.state.model&&this.state.model.setInstanceCount(this.getNumInstances()))}finally{this.context.viewport=e,this.props=t,this.clearChangeFlags(),this.internalState.needsUpdate=!1,this.internalState.resetOldProps()}}_finalize(){(0,S.Z)("layer.finalize",this),this.finalizeState(this.context);for(const t of this.props.extensions)t.finalizeState.call(this,t)}drawLayer({moduleParameters:t=null,uniforms:e={},parameters:n={}}){this._updateAttributeTransition();const r=this.props;this.props=this.internalState.propsInTransition||r;const{opacity:i}=this.props;e.opacity=Math.pow(i,1/2.2);try{t&&this.setModuleParameters(t);const{getPolygonOffset:i}=this.props,o=i&&i(e)||[0,0];(0,R.dR)(this.context.gl,{polygonOffset:o}),(0,R.s8)(this.context.gl,n,(()=>{const r={moduleParameters:t,uniforms:e,parameters:n,context:this.context};for(const t of this.props.extensions)t.draw.call(this,r,t);this.draw(r)}))}finally{this.props=r}}getChangeFlags(){return this.internalState.changeFlags}setChangeFlags(t){const{changeFlags:e}=this.internalState;for(const r in t)if(t[r]){let n=!1;switch(r){case"dataChanged":Array.isArray(e[r])&&(e[r]=Array.isArray(t[r])?e[r].concat(t[r]):t[r],n=!0);default:e[r]||(e[r]=t[r],n=!0)}n&&(0,S.Z)("layer.changeFlag",this,r,t)}const n=e.dataChanged||e.updateTriggersChanged||e.propsChanged||e.extensionsChanged;e.propsOrDataChanged=n,e.somethingChanged=n||t.viewportChanged||t.stateChanged}clearChangeFlags(){this.internalState.changeFlags={dataChanged:!1,propsChanged:!1,updateTriggersChanged:!1,viewportChanged:!1,stateChanged:!1,extensionsChanged:!1,propsOrDataChanged:!1,somethingChanged:!1}}diffProps(t,e){const n=ft(t,e);if(n.updateTriggersChanged)for(const r in n.updateTriggersChanged)n.updateTriggersChanged[r]&&this.invalidateAttribute(r);if(n.transitionsChanged)for(const r in n.transitionsChanged)this.internalState.uniformTransitions.add(r,e[r],t[r],t.transitions[r]);return this.setChangeFlags(n)}validateProps(){!function(t){const e=yt(t);for(const n in e){const r=e[n],{validate:i}=r;if(i&&!i(t[n],r))throw new Error("Invalid prop ".concat(n,": ").concat(t[n]))}}(this.props)}setModuleParameters(t){for(const e of this.getModels())e.updateModuleSettings(t)}updateAutoHighlight(t){this.props.autoHighlight&&this._updateAutoHighlight(t)}_updateAutoHighlight(t){const e={pickingSelectedColor:t.picked?t.color:null},{highlightColor:n}=this.props;t.picked&&"function"===typeof n&&(e.pickingHighlightColor=n(t)),this.setModuleParameters(e),this.setNeedsRedraw()}_updateModules({props:t,oldProps:e},n){const{autoHighlight:r,highlightedObjectIndex:i,highlightColor:o}=t;if(n||e.autoHighlight!==r||e.highlightedObjectIndex!==i||e.highlightColor!==o){const t={};r||(t.pickingSelectedColor=null),Array.isArray(o)&&(t.pickingHighlightColor=o),Number.isInteger(i)&&(t.pickingSelectedColor=i>=0?this.encodePickingColor(i):null),this.setModuleParameters(t)}}_getUpdateParams(){return{props:this.props,oldProps:this.internalState.getOldProps(),context:this.context,changeFlags:this.internalState.changeFlags}}_getNeedsRedraw(t){if(!this.internalState)return!1;let e=!1;e=e||this.internalState.needsRedraw&&this.id,this.internalState.needsRedraw=this.internalState.needsRedraw&&!t.clearRedrawFlags;const n=this.getAttributeManager(),r=n&&n.getNeedsRedraw(t);return e=e||r,e}_getAttributeManager(){return new et(this.context.gl,{id:this.props.id,stats:this.context.stats,timeline:this.context.timeline})}_initState(){(0,d.Z)(!this.internalState&&!this.state),(0,d.Z)(isFinite(this.props.coordinateSystem));const t=this._getAttributeManager();t&&t.addInstanced({instancePickingColors:{type:5121,size:3,noAlloc:!0,update:this.calculateInstancePickingColors}}),this.internalState=new Yt({attributeManager:t,layer:this}),this.clearChangeFlags(),this.state={},Object.defineProperty(this.state,"attributeManager",{get:()=>(l.Z.deprecated("layer.state.attributeManager","layer.getAttributeManager()"),t)}),this.internalState.layer=this,this.internalState.uniformTransitions=new ct(this.context.timeline),this.internalState.onAsyncPropUpdated=this._onAsyncPropUpdated.bind(this),this.internalState.setAsyncProps(this.props)}_transferState(t){(0,S.Z)("layer.matched",this,this===t);const{state:e,internalState:n}=t;this!==t&&(this.internalState=n,this.internalState.layer=this,this.state=e,this.internalState.setAsyncProps(this.props),this.diffProps(this.props,this.internalState.getOldProps()))}_onAsyncPropUpdated(){this.diffProps(this.props,this.internalState.getOldProps()),this.setNeedsUpdate()}}ie.layerName="Layer",ie.defaultProps=re},5409:function(t,e,n){"use strict";n.d(e,{d:function(){return r},A:function(){return i}});const r={NO_STATE:"Awaiting state",MATCHED:"Matched. State transferred from previous layer",INITIALIZED:"Initialized",AWAITING_GC:"Discarded. Awaiting garbage collection",AWAITING_FINALIZATION:"No longer matched. Awaiting garbage collection",FINALIZED:"Finalized! Awaiting garbage collection"},i={COMPONENT:Symbol.for("component"),ASYNC_DEFAULTS:Symbol.for("asyncPropDefaults"),ASYNC_ORIGINAL:Symbol.for("asyncPropOriginal"),ASYNC_RESOLVED:Symbol.for("asyncPropResolved")}},1961:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(9450),i=n(6047);class o extends class{constructor(t,e={}){const{id:n="pass"}=e;this.id=n,this.gl=t,this.props={...e}}setProps(t){Object.assign(this.props,t)}render(){}cleanup(){}}{render(t){const e=this.gl;return(0,r.dR)(e,{framebuffer:t.target}),this._drawLayers(t)}_drawLayers(t){const{viewports:e,views:n,onViewportActive:i,clearCanvas:o=!0}=t;t.pass=t.pass||"unknown";const s=this.gl;o&&function(t){const e=t.drawingBufferWidth,n=t.drawingBufferHeight;(0,r.dR)(t,{viewport:[0,0,e,n]}),t.clear(16640)}(s);const a=[];for(const r of e){const e=r.viewport||r,o=n&&n[e.id];i(e);const u=this._getDrawLayerParams(e,t);t.view=o;const c=e.subViewports||[e];for(const n of c){t.viewport=n;const e=this._drawLayersInViewport(s,t,u);a.push(e)}}return a}_getDrawLayerParams(t,{layers:e,pass:n,layerFilter:r,effects:i,moduleParameters:o}){const a=[],u=s(),c={viewport:t,isPicking:n.startsWith("picking"),renderPass:n},l={};for(let s=0;s<e.length;s++){const h=e[s],f=this._shouldDrawLayer(h,c,r,l),d={shouldDrawLayer:f,layerRenderIndex:u(h,f)};f&&(d.moduleParameters=this._getModuleParameters(h,i,n,o),d.layerParameters=this.getLayerParameters(h,s,t)),a[s]=d}return a}_drawLayersInViewport(t,{layers:e,pass:n,viewport:o,view:s},a){const u=function(t,{viewport:e}){const n=t.canvas?t.canvas.clientHeight||t.canvas.height:100,i=e,o=(0,r.w)(t);return[i.x*o,(n-i.y-i.height)*o,i.width*o,i.height*o]}(t,{viewport:o});if(s&&s.props.clear){const e=!0===s.props.clear?{color:!0,depth:!0}:s.props.clear;(0,r.s8)(t,{scissorTest:!0,scissor:u},(()=>(0,i.Z)(t,e)))}const c={totalCount:e.length,visibleCount:0,compositeCount:0,pickableCount:0};(0,r.dR)(t,{viewport:u});for(let r=0;r<e.length;r++){const t=e[r],{shouldDrawLayer:i,layerRenderIndex:s,moduleParameters:u,layerParameters:h}=a[r];if(i&&t.props.pickable&&c.pickableCount++,t.isComposite)c.compositeCount++;else if(i){c.visibleCount++,u.viewport=o;try{t.drawLayer({moduleParameters:u,uniforms:{layerIndex:s},parameters:h})}catch(l){t.raiseError(l,"drawing ".concat(t," to ").concat(n))}}}return c}shouldDrawLayer(t){return!0}getModuleParameters(t,e){return null}getLayerParameters(t,e){return t.props.parameters}_shouldDrawLayer(t,e,n,r){if(!(this.shouldDrawLayer(t)&&t.props.visible))return!1;e.layer=t;let i=t.parent;for(;i;){if(!i.props.visible||!i.filterSubLayer(e))return!1;e.layer=i,i=i.parent}if(n){const t=e.layer.id;if(t in r||(r[t]=n(e)),!r[t])return!1}return t.activateViewport(e.viewport),!0}_getModuleParameters(t,e,n,i){const o=Object.assign(Object.create(t.props),{autoWrapLongitude:t.wrapLongitude,viewport:t.context.viewport,mousePosition:t.context.mousePosition,pickingActive:0,devicePixelRatio:(0,r.w)(this.gl)});if(e)for(const r of e)Object.assign(o,r.getModuleParameters(t));return Object.assign(o,this.getModuleParameters(t,e),i)}}function s(t=0,e={}){const n={},r=(i,o)=>{const a=i.props._offset,u=i.id,c=i.parent&&i.parent.id;let l;if(c&&!(c in e)&&r(i.parent,!1),c in n){const t=n[c]=n[c]||s(e[c],e);l=t(i,o),n[u]=t}else Number.isFinite(a)?(l=a+(e[c]||0),n[u]=null):l=t;return o&&l>=t&&(t=l+1),e[u]=l,l};return r}},1331:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});const r={pickingSelectedColor:null,pickingHighlightColor:new Uint8Array([0,255,255,255]),pickingActive:!1,pickingAttribute:!1};var i={inject:{"vs:DECKGL_FILTER_COLOR":"\n picking_setPickingColor(geometry.pickingColor);\n // for picking depth values\n picking_setPickingAttribute(geometry.position.z);\n ","fs:DECKGL_FILTER_COLOR":{order:99,injection:"\n // use highlight color if this fragment belongs to the selected object.\n color = picking_filterHighlightColor(color);\n\n // use picking color if rendering to picking FBO.\n color = picking_filterPickingColor(color);\n "}},...{name:"picking",vs:"uniform bool picking_uActive;\nuniform bool picking_uAttribute;\nuniform vec3 picking_uSelectedColor;\nuniform bool picking_uSelectedColorValid;
1\n\nout vec4 picking_vRGBcolor_Avalid;\n\nconst float COLOR_SCALE = 1. / 255.;\n\nbool picking_isColorValid(vec3 color) {\n return dot(color, vec3(1.0)) > 0.001;\n}\n\nbool isVertexPicked(vec3 vertexColor) {\n return\n picking_uSelectedColorValid &&\n !picking_isColorValid(abs(vertexColor - picking_uSelectedColor));\n}\n\nvoid picking_setPickingColor(vec3 pickingColor) {\n if (picking_uActive) {\n picking_vRGBcolor_Avalid.a = float(picking_isColorValid(pickingColor));\n\n if (!picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = pickingColor * COLOR_SCALE;\n }\n } else {\n picking_vRGBcolor_Avalid.a = float(isVertexPicked(pickingColor));\n }\n}\n\nvoid picking_setPickingAttribute(float value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.r = value;\n }\n}\nvoid picking_setPickingAttribute(vec2 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rg = value;\n }\n}\nvoid picking_setPickingAttribute(vec3 value) {\n if (picking_uAttribute) {\n picking_vRGBcolor_Avalid.rgb = value;\n }\n}\n",fs:"uniform bool picking_uActive;\nuniform vec3 picking_uSelectedColor;\nuniform vec4 picking_uHighlightColor;\n\nin vec4 picking_vRGBcolor_Avalid;\nvec4 picking_filterHighlightColor(vec4 color) {\n if (picking_uActive) {\n return color;\n }\n bool selected = bool(picking_vRGBcolor_Avalid.a);\n\n if (selected) {\n float highLightAlpha = picking_uHighlightColor.a;\n float blendedAlpha = highLightAlpha + color.a * (1.0 - highLightAlpha);\n float highLightRatio = highLightAlpha / blendedAlpha;\n\n vec3 blendedRGB = mix(color.rgb, picking_uHighlightColor.rgb, highLightRatio);\n return vec4(blendedRGB, blendedAlpha);\n } else {\n return color;\n }\n}\nvec4 picking_filterPickingColor(vec4 color) {\n if (picking_uActive) {\n if (picking_vRGBcolor_Avalid.a == 0.0) {\n discard;\n }\n return picking_vRGBcolor_Avalid;\n }\n return color;\n}\nvec4 picking_filterColor(vec4 color) {\n vec4 highightColor = picking_filterHighlightColor(color);\n return picking_filterPickingColor(highightColor);\n}\n\n",getUniforms:function(t=r){const e={};if(void 0!==t.pickingSelectedColor)if(t.pickingSelectedColor){const n=t.pickingSelectedColor.slice(0,3);e.picking_uSelectedColorValid=1,e.picking_uSelectedColor=n}else e.picking_uSelectedColorValid=0;if(t.pickingHighlightColor){const n=Array.from(t.pickingHighlightColor,(t=>t/255));Number.isFinite(n[3])||(n[3]=1),e.picking_uHighlightColor=n}return void 0!==t.pickingActive&&(e.picking_uActive=Boolean(t.pickingActive),e.picking_uAttribute=Boolean(t.pickingAttribute)),e}}}},4058:function(t,e,n){"use strict";n.d(e,{T:function(){return h},D:function(){return f}});var r=n(4088),i=n(8771),o=n(3123),s=n(616),a=n(4479);var u=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t},c=(function(){var t=function(){var t=new a.WT(3);return a.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}()}(),n(7013));function l(t,e,n=!1){const r=e.projectPosition(t);if(n&&e instanceof o.Z){const[n,i,o=0]=t,s=e.getDistanceScales([n,i]);r[2]=o*s.unitsPerMeter[2]}return r}function h(t,{viewport:e,modelMatrix:n,coordinateSystem:i,coordinateOrigin:o,offsetMode:a}){let[u,h,f=0]=t;switch(n&&([u,h,f]=s.fF([],[u,h,f,1],n)),i){case r.Df.LNGLAT:return l([u,h,f],e,a);case r.Df.LNGLAT_OFFSETS:return l([u+o[0],h+o[1],f+(o[2]||0)],e,a);case r.Df.METER_OFFSETS:return l((0,c.eG)(o,[u,h,f]),e,a);case r.Df.CARTESIAN:default:return e.isGeospatial?[u+o[0],h+o[1],f+o[2]]:e.projectPosition([u,h,f])}}function f(t,e){const{viewport:n,coordinateSystem:o,coordinateOrigin:s,modelMatrix:a,fromCoordinateSystem:c,fromCoordinateOrigin:l}=function(t){const e={...t};let{coordinateSystem:n}=t;const{viewport:i,coordinateOrigin:o,fromCoordinateSystem:s,fromCoordinateOrigin:a}=t;return n===r.Df.DEFAULT&&(n=i.isGeospatial?r.Df.LNGLAT:r.Df.CARTESIAN),void 0===s&&(e.fromCoordinateSystem=n),void 0===a&&(e.fromCoordinateOrigin=o),e.coordinateSystem=n,e}(e),{geospatialOrigin:f,shaderCoordinateOrigin:d,offsetMode:p}=(0,i.v)(n,o,s),g=h(t,{viewport:n,modelMatrix:a,coordinateSystem:c,coordinateOrigin:l,offsetMode:p});if(p){const t=n.projectPosition(f||d);u(g,g,t)}return g}},6084:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});const r={name:"fp32",vs:"#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\nconst float TWO_PI = 6.2831854820251465;\nconst float PI_2 = 1.5707963705062866;\nconst float PI_16 = 0.1963495463132858;\n\nconst float SIN_TABLE_0 = 0.19509032368659973;\nconst float SIN_TABLE_1 = 0.3826834261417389;\nconst float SIN_TABLE_2 = 0.5555702447891235;\nconst float SIN_TABLE_3 = 0.7071067690849304;\n\nconst float COS_TABLE_0 = 0.9807852506637573;\nconst float COS_TABLE_1 = 0.9238795042037964;\nconst float COS_TABLE_2 = 0.8314695954322815;\nconst float COS_TABLE_3 = 0.7071067690849304;\n\nconst float INVERSE_FACTORIAL_3 = 1.666666716337204e-01;\nconst float INVERSE_FACTORIAL_5 = 8.333333767950535e-03;\nconst float INVERSE_FACTORIAL_7 = 1.9841270113829523e-04;
1\nconst float INVERSE_FACTORIAL_9 = 2.75573188446287533e-06;\n\nfloat sin_taylor_fp32(float a) {\n float r, s, t, x;\n\n if (a == 0.0) {\n return 0.0;\n }\n\n x = -a * a;\n s = a;\n r = a;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_3;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_5;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_7;\n s = s + t;\n\n r = r * x;\n t = r * INVERSE_FACTORIAL_9;\n s = s + t;\n\n return s;\n}\n\nvoid sincos_taylor_fp32(float a, out float sin_t, out float cos_t) {\n if (a == 0.0) {\n sin_t = 0.0;\n cos_t = 1.0;\n }\n sin_t = sin_taylor_fp32(a);\n cos_t = sqrt(1.0 - sin_t * sin_t);\n}\n\nfloat tan_taylor_fp32(float a) {\n float sin_a;\n float cos_a;\n\n if (a == 0.0) {\n return 0.0;\n }\n float z = floor(a / TWO_PI);\n float r = a - TWO_PI * z;\n\n float t;\n float q = floor(r / PI_2 + 0.5);\n int j = int(q);\n\n if (j < -2 || j > 2) {\n return 1.0 / 0.0;\n }\n\n t = r - PI_2 * q;\n\n q = floor(t / PI_16 + 0.5);\n int k = int(q);\n int abs_k = int(abs(float(k)));\n\n if (abs_k > 4) {\n return 1.0 / 0.0;\n } else {\n t = t - PI_16 * q;\n }\n\n float u = 0.0;\n float v = 0.0;\n\n float sin_t, cos_t;\n float s, c;\n sincos_taylor_fp32(t, sin_t, cos_t);\n\n if (k == 0) {\n s = sin_t;\n c = cos_t;\n } else {\n if (abs(float(abs_k) - 1.0) < 0.5) {\n u = COS_TABLE_0;\n v = SIN_TABLE_0;\n } else if (abs(float(abs_k) - 2.0) < 0.5) {\n u = COS_TABLE_1;\n v = SIN_TABLE_1;\n } else if (abs(float(abs_k) - 3.0) < 0.5) {\n u = COS_TABLE_2;\n v = SIN_TABLE_2;\n } else if (abs(float(abs_k) - 4.0) < 0.5) {\n u = COS_TABLE_3;\n v = SIN_TABLE_3;\n }\n if (k > 0) {\n s = u * sin_t + v * cos_t;\n c = u * cos_t - v * sin_t;\n } else {\n s = u * sin_t - v * cos_t;\n c = u * cos_t + v * sin_t;\n }\n }\n\n if (j == 0) {\n sin_a = s;\n cos_a = c;\n } else if (j == 1) {\n sin_a = c;\n cos_a = -s;\n } else if (j == -1) {\n sin_a = -c;\n cos_a = s;\n } else {\n sin_a = -s;\n cos_a = -c;\n }\n return sin_a / cos_a;\n}\n#endif\n\nfloat tan_fp32(float a) {\n#ifdef LUMA_FP32_TAN_PRECISION_WORKAROUND\n return tan_taylor_fp32(a);\n#else\n return tan(a);\n#endif\n}\n",fs:null};var i={name:"geometry",vs:"\nstruct VertexGeometry {\n vec4 position;\n vec3 worldPosition;\n vec3 worldPositionAlt;\n vec3 normal;\n vec2 uv;\n vec3 pickingColor;\n} geometry = VertexGeometry(\n vec4(0.0),\n vec3(0.0),\n vec3(0.0),\n vec3(0.0),\n vec2(0.0),\n vec3(0.0)\n);\n",fs:"\n#define SMOOTH_EDGE_RADIUS 0.5\n\nstruct FragmentGeometry {\n vec2 uv;\n} geometry;\n\nfloat smoothedge(float edge, float x) {\n return smoothstep(edge - SMOOTH_EDGE_RADIUS, edge + SMOOTH_EDGE_RADIUS, x);\n}\n"},o=n(4088);const s=Object.keys(o.Df).map((t=>"const int COORDINATE_SYSTEM_".concat(t," = ").concat(o.Df[t],";"))).join(""),a=Object.keys(o.zG).map((t=>"const int PROJECTION_MODE_".concat(t," = ").concat(o.zG[t],";"))).join(""),u=Object.keys(o.iI).map((t=>"const int UNIT_".concat(t.toUpperCase()," = ").concat(o.iI[t],";"))).join("");var c="".concat(s,"\n").concat(a,"\n").concat(u,"\n\nuniform int project_uCoordinateSystem;\nuniform int project_uProjectionMode;\nuniform float project_uScale;\nuniform bool project_uWrapLongitude;\nuniform vec3 project_uCommonUnitsPerMeter;\nuniform vec3 project_uCommonUnitsPerWorldUnit;\nuniform vec3 project_uCommonUnitsPerWorldUnit2;\nuniform vec4 project_uCenter;\nuniform mat4 project_uModelMatrix;\nuniform mat4 project_uViewProjectionMatrix;\nuniform vec2 project_uViewportSize;\nuniform float project_uDevicePixelRatio;\nuniform float project_uFocalDistance;\nuniform vec3 project_uCameraPosition;\nuniform vec3 project_uCoordinateOrigin;\nuniform vec3 project_uCommonOrigin;\nuniform bool project_uPseudoMeters;\n\nconst float TILE_SIZE = 512.0;\nconst float PI = 3.1415926536;\nconst float WORLD_SCALE = TILE_SIZE / (PI * 2.0);\nconst vec3 ZERO_64_LOW = vec3(0.0);\nconst float EARTH_RADIUS = 6370972.0;\nconst float GLOBE_RADIUS = 256.0;\nfloat project_size() {\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR &&\n project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT &&\n project_uPseudoMeters == false) {\n \n if (geometry.position.w == 0.0) {\n float y = clamp(geometry.worldPosition.y, -89.9, 89.9);\n return 1.0 / cos(radians(y));\n }\n \n float y = geometry.position.y / TILE_SIZE * 2.0 - 1.0;
1\n float y2 = y * y;\n float y4 = y2 * y2;\n float y6 = y4 * y2;\n return 1.0 + 4.9348 * y2 + 4.0587 * y4 + 1.5642 * y6;\n }\n return 1.0;\n}\nfloat project_size(float meters) {\n return meters * project_uCommonUnitsPerMeter.z * project_size();\n}\n\nvec2 project_size(vec2 meters) {\n return meters * project_uCommonUnitsPerMeter.xy * project_size();\n}\n\nvec3 project_size(vec3 meters) {\n return meters * project_uCommonUnitsPerMeter * project_size();\n}\n\nvec4 project_size(vec4 meters) {\n return vec4(meters.xyz * project_uCommonUnitsPerMeter, meters.w);\n}\nvec3 project_normal(vec3 vector) {\n vec4 normal_modelspace = project_uModelMatrix * vec4(vector, 0.0);\n return normalize(normal_modelspace.xyz * project_uCommonUnitsPerMeter);\n}\n\nvec4 project_offset_(vec4 offset) {\n float dy = offset.y;\n vec3 commonUnitsPerWorldUnit = project_uCommonUnitsPerWorldUnit + project_uCommonUnitsPerWorldUnit2 * dy;\n return vec4(offset.xyz * commonUnitsPerWorldUnit, offset.w);\n}\nvec2 project_mercator_(vec2 lnglat) {\n float x = lnglat.x;
1\n if (project_uWrapLongitude) {\n x = mod(x + 180., 360.0) - 180.;\n }\n float y = clamp(lnglat.y, -89.9, 89.9);\n return vec2(\n radians(x) + PI,\n PI + log(tan_fp32(PI * 0.25 + radians(y) * 0.5))\n ) * WORLD_SCALE;\n}\n\nvec3 project_globe_(vec3 lnglatz) {\n float lambda = radians(lnglatz.x);\n float phi = radians(lnglatz.y);\n float cosPhi = cos(phi);\n float D = (lnglatz.z / EARTH_RADIUS + 1.0) * GLOBE_RADIUS;\n\n return vec3(\n sin(lambda) * cosPhi,\n -cos(lambda) * cosPhi,\n sin(phi)\n ) * D;\n}\nvec4 project_position(vec4 position, vec3 position64Low) {\n vec4 position_world = project_uModelMatrix * position;\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_mercator_(position_world.xy),\n project_size(position_world.z),\n position_world.w\n );\n }\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN) {\n position_world.xyz += project_uCoordinateOrigin;\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n return vec4(\n project_globe_(position_world.xyz),\n position_world.w\n );\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET) {\n if (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT) {\n if (abs(position_world.y - project_uCoordinateOrigin.y) > 0.25) {\n return vec4(\n project_mercator_(position_world.xy) - project_uCommonOrigin.xy,\n project_size(position_world.z),\n position_world.w\n );\n }\n }\n }\n if (project_uProjectionMode == PROJECTION_MODE_IDENTITY ||\n (project_uProjectionMode == PROJECTION_MODE_WEB_MERCATOR_AUTO_OFFSET &&\n (project_uCoordinateSystem == COORDINATE_SYSTEM_LNGLAT ||\n project_uCoordinateSystem == COORDINATE_SYSTEM_CARTESIAN))) {\n position_world.xyz -= project_uCoordinateOrigin;\n }\n return project_offset_(position_world + project_uModelMatrix * vec4(position64Low, 0.0));\n}\n\nvec4 project_position(vec4 position) {\n return project_position(position, ZERO_64_LOW);\n}\n\nvec3 project_position(vec3 position, vec3 position64Low) {\n vec4 projected_position = project_position(vec4(position, 1.0), position64Low);\n return projected_position.xyz;\n}\n\nvec3 project_position(vec3 position) {\n vec4 projected_position = project_position(vec4(position, 1.0), ZERO_64_LOW);\n return projected_position.xyz;\n}\n\nvec2 project_position(vec2 position) {\n vec4 projected_position = project_position(vec4(position, 0.0, 1.0), ZERO_64_LOW);\n return projected_position.xy;\n}\n\nvec4 project_common_position_to_clipspace(vec4 position, mat4 viewProjectionMatrix, vec4 center) {\n return viewProjectionMatrix * position + center;\n}\nvec4 project_common_position_to_clipspace(vec4 position) {\n return project_common_position_to_clipspace(position, project_uViewProjectionMatrix, project_uCenter);\n}\nvec2 project_pixel_size_to_clipspace(vec2 pixels) {\n vec2 offset = pixels / project_uViewportSize * project_uDevicePixelRatio * 2.0;\n return offset * project_uFocalDistance;\n}\n\nfloat project_size_to_pixel(float meters) {\n return project_size(meters) * project_uScale;\n}\nfloat project_size_to_pixel(float size, int unit) {\n if (unit == UNIT_METERS) return project_size_to_pixel(size);\n if (unit == UNIT_COMMON) return size * project_uScale;\n return size;\n}\nfloat project_pixel_size(float pixels) {\n return pixels / project_uScale;\n}\nvec2 project_pixel_size(vec2 pixels) {\n return pixels / project_uScale;\n}\nmat3 project_get_orientation_matrix(vec3 up) {\n vec3 uz = normalize(up);\n vec3 ux = abs(uz.z) == 1.0 ? vec3(1.0, 0.0, 0.0) : normalize(vec3(uz.y, -uz.x, 0));\n vec3 uy = cross(uz, ux);\n return mat3(ux, uy, uz);\n}\n\nbool project_needs_rotation(vec3 commonPosition, out mat3 transform) {\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n transform = project_get_orientation_matrix(commonPosition);\n return true;\n }\n return false;\n}\n"),l=n(8771);const h={};var f={name:"project",dependencies:[r,i],vs:c,getUniforms:function(t=h){return t.viewport?(0,l.C)(t):{}}}},8771:function(t,e,n){"use strict";n.d(e,{v:function(){return d},C:function(){return p}});var r=n(9884),i=n(616),o=n(4088),s=n(8177);const a=[0,0,0,0],u=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0],c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],l=[0,0,0],h=[0,0,0],f=(0,s.Z)((function({viewport:t,devicePixelRatio:e,coordinateSystem:n,coordinateOrigin:s}){const{projectionCenter:c,viewProjectionMatrix:h,originCommon:f,cameraPosCommon:p,shaderCoordinateOrigin:g,geospatialOrigin:m}=function(t,e,n){const{viewMatrixUncentered:o,projectionMatrix:s}=t;let{viewMatrix:c,viewProjectionMatrix:l}=t,h=a,f=a,p=t.cameraPosition;const{geospatialOrigin:g,shaderCoordinateOrigin:m,offsetMode:v}=d(t,e,n);v&&(f=t.projectPosition(g||m),p=[p[0]-f[0],p[1]-f[1],p[2]-f[2]],f[3]=1,h=i.fF([],f,l),c=o||c,l=r.Jp([],s,c),l=r.Jp([],l,u));return{viewMatrix:c,viewProjectionMatrix:l,projectionCenter:h,originCommon:f,cameraPosCommon:p,shaderCoordinateOrigin:m,geospatialOrigin:g}}(t,n,s),v=t.getDistanceScales(),y=[t.width*e,t.height*e],b=t.projectionMatrix.transform([0,0,-t.focalDistance,1])[3]||1,_={project_uCoordinateSystem:n,project_uProjectionMode:t.projectionMode,project_uCoordinateOrigin:g,project_uCommonOrigin:f.slice(0,3),project_uCenter:c,project_uPseudoMeters:Boolean(t._pseudoMeters),project_uViewportSize:y,project_uDevicePixelRatio:e,project_uFocalDistance:b,project_uCommonUnitsPerMeter:v.unitsPerMeter,project_uCommonUnitsPerWorldUnit:v.unitsPerMeter,project_uCommonUnitsPerWorldUnit2:l,project_uScale:t.scale,project_uViewProjectionMatrix:h,project_uCameraPosition:p};if(m){const e=t.getDistanceScales(m);switch(n){case o.Df.METER_OFFSETS:_.project_uCommonUnitsPerWorldUnit=e.unitsPerMeter,_.project_uCommonUnitsPerWorldUnit2=e.unitsPerMeter2;break;case o.Df.LNGLAT:case o.Df.LNGLAT_OFFSETS:t._pseudoMeters||(_.project_uCommonUnitsPerMeter=e.unitsPerMeter),_.project_uCommonUnitsPerWorldUnit=e.unitsPerDegree,_.project_uCommonUnitsPerWorldUnit2=e.unitsPerDegree2;break;case o.Df.CARTESIAN:_.project_uCommonUnitsPerWorldUnit=[1,1,e.unitsPerMeter[2]],_.project_uCommonUnitsPerWorldUnit2=[0,0,e.unitsPerMeter2[2]]}}return _}));function d(t,e,n=h){let r,i=n,s=!0;switch(r=e===o.Df.LNGLAT_OFFSETS||e===o.Df.METER_OFFSETS?n:t.isGeospatial?[Math.fround(t.longitude),Math.fround(t.latitude),0]:null,t.projectionMode){case o.zG.WEB_MERCATOR:e!==o.Df.LNGLAT&&e!==o.Df.CARTESIAN||(r=[0,0,0],s=!1);break;case o.zG.WEB_MERCATOR_AUTO_OFFSET:e===o.Df.LNGLAT?i=r:e===o.Df.CARTESIAN&&(i=[Math.fround(t.center[0]),Math.fround(t.center[1]),0],r=t.unprojectPosition(i),i[0]-=n[0],i[1]-=n[1],i[2]-=n[2]);break;case o.zG.IDENTITY:i=t.position.map(Math.fround);break;case o.zG.GLOBE:s=!1,r=null;break;default:s=!1}return i[2]=i[2]||0,{geospatialOrigin:r,shaderCoordinateOrigin:i,offsetMode:s}}function p({viewport:t,devicePixelRatio:e=1,modelMatrix:n=null,coordinateSystem:r=o.Df.DEFAULT,coordinateOrigin:i,autoWrapLongitude:s=!1}={}){r===o.Df.DEFAULT&&(r=t.isGeospatial?o.Df.LNGLAT:o.Df.CARTESIAN);const a=f({viewport:t,devicePixelRatio:e,coordinateSystem:r,coordinateOrigin:i});return a.project_uWrapLongitude=s,a.project_uModelMatrix=n||c,a}},3844:function(t,e,n){"use strict";var r=n(6084);
1e.Z={name:"project32",dependencies:[r.Z],vs:"\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition\n) {\n vec3 projectedPosition = project_position(position, position64Low);\n if (project_uProjectionMode == PROJECTION_MODE_GLOBE) {\n // offset is specified as ENU\n // when in globe projection, rotate offset so that the ground alighs with the surface of the globe\n mat3 rotation = project_get_orientation_matrix(projectedPosition);\n offset = rotation * offset;\n }\n commonPosition = vec4(projectedPosition + offset, 1.0);\n return project_common_position_to_clipspace(commonPosition);\n}\n\nvec4 project_position_to_clipspace(\n vec3 position, vec3 position64Low, vec3 offset\n) {\n vec4 commonPosition;\n return project_position_to_clipspace(position, position64Low, offset, commonPosition);\n}\n"}},6395:function(t,e,n){"use strict";function r(){}n.d(e,{Z:function(){return o}});const i={onStart:r,onUpdate:r,onInterrupt:r,onEnd:r};class o{constructor(t){this._inProgress=!1,this._handle=null,this.timeline=t,this.settings={}}get inProgress(){return this._inProgress}start(t){this.cancel(),this.settings={...i,...t},this._inProgress=!0,this.settings.onStart(this)}end(){this._inProgress&&(this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1,this.settings.onEnd(this))}cancel(){this._inProgress&&(this.settings.onInterrupt(this),this.timeline.removeChannel(this._handle),this._handle=null,this._inProgress=!1)}update(){if(!this._inProgress)return!1;if(null===this._handle){const{timeline:t,settings:e}=this;this._handle=t.addChannel({delay:t.getTime(),duration:e.duration})}return this.time=this.timeline.getTime(this._handle),this._onUpdate(),this.settings.onUpdate(this),this.timeline.isFinished(this._handle)&&this.end(),!0}_onUpdate(){}}},5304:function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"deck.gl: assertion failed.")}n.d(e,{Z:function(){return r}})},6871:function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(!t||!e)return!1;for(const n in t){const i=t[n],o=e[n];if(!(i===o||Array.isArray(i)&&Array.isArray(o)&&r(i,o)))return!1}return!0}n.d(e,{v:function(){return r}})},1855:function(t,e,n){"use strict";function r(t,e=(()=>!0)){return Array.isArray(t)?i(t,e,[]):e(t)?[t]:[]}function i(t,e,n){let r=-1;for(;++r<t.length;){const o=t[r];Array.isArray(o)?i(o,e,n):e(o)&&n.push(o)}return n}function o({target:t,source:e,start:n=0,count:r=1}){const i=e.length,o=r*i;let s=0;for(let a=n;s<i;s++)t[a++]=e[s];for(;s<o;)s<o-s?(t.copyWithin(n+s,n,n+s),s*=2):(t.copyWithin(n+s,n,n+o-s),s=o);return t}n.d(e,{x:function(){return r},k:function(){return o}})},8550:function(t,e,n){"use strict";n.d(e,{jB:function(){return o},D0:function(){return s},jr:function(){return a}});const r=[],i=[];function o(t,e=0,n=1/0){let o=r;const s={index:-1,data:t,target:[]};return t?"function"===typeof t[Symbol.iterator]?o=t:t.length>0&&(i.length=t.length,o=i):o=r,(e>0||Number.isFinite(n))&&(o=(Array.isArray(o)?o:Array.from(o)).slice(e,n),s.index=e-1),{iterable:o,objectInfo:s}}function s(t){return t&&t[Symbol.asyncIterator]}function a(t,{size:e,stride:n,offset:r,startIndices:i,nested:o}){const s=t.BYTES_PER_ELEMENT,a=n?n/s:e,u=r?r/s:0,c=Math.floor((t.length-u)/a);return(n,{index:r,target:s})=>{if(!i){const n=r*a+u;for(let r=0;r<e;r++)s[r]=t[n+r];return s}const l=i[r],h=i[r+1]||c;let f;if(o){f=new Array(h-l);for(let n=l;n<h;n++){const r=n*a+u;s=new Array(e);for(let n=0;n<e;n++)s[n]=t[r+n];f[n-l]=s}}else if(a===e)f=t.subarray(l*e+u,h*e+u);else{f=new t.constructor((h-l)*e);let n=0;for(let r=l;r<h;r++){const i=r*a+u;for(let r=0;r<e;r++)f[n++]=t[i+r]}}return f}}},744:function(t,e,n){"use strict";var r=n(4708);e.Z=new r.Z({id:"deck"})},5126:function(t,e,n){"use strict";n.d(e,{bS:function(){return o},Xt:function(){return s},Du:function(){return a},TK:function(){return h}});var r=n(6610),i=n(1681);function o(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function s(t){return[t[12],t[13],t[14]]}function a(t){const e={};return e.left=c(t[3]+t[0],t[7]+t[4],t[11]+t[8],t[15]+t[12]),e.right=c(t[3]-t[0],t[7]-t[4],t[11]-t[8],t[15]-t[12]),e.bottom=c(t[3]+t[1],t[7]+t[5],t[11]+t[9],t[15]+t[13]),e.top=c(t[3]-t[1],t[7]-t[5],t[11]-t[9],t[15]-t[13]),e.near=c(t[3]+t[2],t[7]+t[6],t[11]+t[10
1],t[15]+t[14]),e.far=c(t[3]-t[2],t[7]-t[6],t[11]-t[10],t[15]-t[14]),e}const u=new i.Z;function c(t,e,n,r){u.set(t,e,n);const o=u.len();return{distance:r/o,normal:new i.Z(-t/o,-e/o,-n/o)}}let l;function h(t,{size:e=1,startIndex:n=0,endIndex:i}){Number.isFinite(i)||(i=t.length);const o=(i-n)/e;l=r.Z.allocate(l,o,{type:Float32Array,size:2*e});let s=n,a=0;for(;s<i;){for(let n=0;n<e;n++){const r=t[s++];l[a+n]=r,l[a+n+e]=(u=r)-Math.fround(u)}a+=2*e}var u;return l.subarray(0,o*e*2)}},8177:function(t,e,n){"use strict";function r(t,e){if(t===e)return!0;if(Array.isArray(t)){const n=t.length;if(!e||e.length!==n)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}return!1}function i(t){let e,n={};return i=>{for(const o in i)if(!r(i[o],n[o])){e=t(i),n=i;break}return e}}n.d(e,{Z:function(){return i}})},6610:function(t,e,n){"use strict";e.Z=new class{constructor(t){this._pool=[],this.props={overAlloc:2,poolSize:100},this.setProps(t)}setProps(t){Object.assign(this.props,t)}allocate(t,e,{size:n=1,type:r,padding:i=0,copy:o=!1,initialize:s=!1,maxCount:a}){const u=r||t&&t.constructor||Float32Array,c=e*n+i;if(ArrayBuffer.isView(t)){if(c<=t.length)return t;if(c*t.BYTES_PER_ELEMENT<=t.buffer.byteLength)return new u(t.buffer,0,c)}let l;a&&(l=a*n+i);const h=this._allocate(u,c,s,l);return t&&o?h.set(t):s||h.fill(0,0,4),this._release(t),h}release(t){this._release(t)}_allocate(t,e,n,r){let i=Math.max(Math.ceil(e*this.props.overAlloc),1);i>r&&(i=r);const o=this._pool,s=t.BYTES_PER_ELEMENT*i,a=o.findIndex((t=>t.byteLength>=s));if(a>=0){const e=new t(o.splice(a,1)[0],0,i);return n&&e.fill(0),e}return new t(i)}_release(t){if(!ArrayBuffer.isView(t))return;const e=this._pool,{buffer:n}
1=t,{byteLength:r}=n,i=e.findIndex((t=>t.byteLength>=r));i<0?e.push(n):(i>0||e.length<this.props.poolSize)&&e.splice(i,0,n),e.length>this.props.poolSize&&e.shift()}}},9225:function(t,e,n){"use strict";n.d(e,{Z:function(){return g}});var r=n(744),i=n(5126),o=n(4034),s=n(7293),a=n(1681),u=n(9884),c=n(7013),l=n(4088);const h=Math.PI/180,f=(0,i.bS)(),d=[0,0,0],p={unitsPerMeter:[1,1,1],metersPerUnit:[1,1,1]};class g{constructor(t={}){const{id:e=null,x:n=0,y:r=0,width:i=1,height:o=1}=t;this.id=e||this.constructor.displayName||"viewport",this.x=n,this.y=r,this.width=i||1,this.height=o||1,this._frustumPlanes={},this._initViewMatrix(t),this._initProjectionMatrix(t),this._initPixelMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),this.projectFlat=this.projectFlat.bind(this),this.unprojectFlat=this.unprojectFlat.bind(this)}get metersPerPixel(){return this.distanceScales.metersPerUnit[2]/this.scale}get projectionMode(){return this.isGeospatial?this.zoom<12?l.zG.WEB_MERCATOR:l.zG.WEB_MERCATOR_AUTO_OFFSET:l.zG.IDENTITY}equals(t){return t instanceof g&&(this===t||t.width===this.width&&t.height===this.height&&t.scale===this.scale&&(0,o.fS)(t.projectionMatrix,this.projectionMatrix)&&(0,o.fS)(t.viewMatrix,this.viewMatrix))}project(t,{topLeft:e=!0}={}){const n=this.projectPosition(t),r=(0,c.aW)(n,this.pixelProjectionMatrix),[i,o]=r,s=e?o:this.height-o;return 2===t.length?[i,s]:[i,s,r[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,s=e?i:this.height-i,a=n&&n*this.distanceScales.unitsPerMeter[2],u=(0,c.CT)([r,s,o],this.pixelUnprojectionMatrix,a),[l,h,f]=this.unprojectPosition(u);return Number.isFinite(o)?[l,h,f]:Number.isFinite(n)?[l,h,n]:[l,h]}projectPosition(t){const[e,n]=this.projectFlat(t);return[e,n,(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}unprojectPosition(t){const[e,n]=this.unprojectFlat(t);return[e,n,(t[2]||0)*this.distanceScales.metersPerUnit[2]]}projectFlat(t){return this.isGeospatial?(0,c.w5)(t):t}unprojectFlat(t){return this.isGeospatial?(0,c.es)(t):t}getBounds(t={}){const e={targetZ:t.z||0},n=this.unproject([0,0],e),r=this.unproject([this.width,0],e),i=this.unproject([0,this.height],e),o=this.unproject([this.width,this.height],e);return[Math.min(n[0],r[0],i[0],o[0]),Math.min(n[1],r[1],i[1],o[1]),Math.max(n[0],r[0],i[0],o[0]),Math.max(n[1],r[1],i[1],o[1])]}getDistanceScales(t=null){return t?(0,c.ro)({longitude:t[0],latitude:t[1],highPrecision:!0}):this.distanceScales}containsPixel({x:t,y:e,width:n=1,height:r=1}){return t<this.x+this.width&&this.x<t+n&&e<this.y+this.height&&this.y<e+r}getFrustumPlanes(){return this._frustumPlanes.near||Object.assign(this._frustumPlanes,(0,i.Du)(this.viewProjectionMatrix)),this._frustumPlanes}panByPosition(t,e){return null}getCameraPosition(){return this.cameraPosition}getCameraDirection(){return this.cameraDirection}getCameraUp(){return this.cameraUp}_createProjectionMatrix({orthographic:t,fovyRadians:e,aspect:n,focalDistance:r,near:i,far:o}){return t?(new s.Z).orthographic({fovy:e,aspect:n,focalDistance:r,near:i,far:o}):(new s.Z).perspective({fovy:e,aspect:n,near:i,far:o})}_initViewMatrix(t){const{viewMatrix:e=f,longitude:n=null,latitude:r=null,zoom:i=null,position:o=null,modelMatrix:u=null,focalDistance:l=1,distanceScales:h=null}=t;this.isGeospatial=Number.isFinite(r)&&Number.isFinite(n),this.zoom=i,Number.isFinite(this.zoom)||(this.zoom=this.isGeospatial?(0,c.Bf)({latitude:r})+Math.log2(l):0);const g=Math.pow(2,this.zoom);this.scale=g,this.distanceScales=this.isGeospatial?(0,c.ro)({latitude:r,longitude:n}):h||p,this.focalDistance=l,this.distanceScales.metersPerUnit=new a.Z(this.distanceScales.metersPerUnit),this.distanceScales.unitsPerMeter=new a.Z(this.distanceScales.unitsPerMeter),this.position=d,this.meterOffset=d,o&&(this.position=o,this.modelMatrix=u,this.meterOffset=u?u.transformVector(o):o),this.isGeospatial?(this.longitude=n,this.latitude=r,this.center=this._getCenterInWorld({longitude:n,latitude:r})):this.center=o?this.projectPosition(o):[0,0,0],this.viewMatrixUncentered=e,this.viewMatrix=(new s.Z).multiplyRight(this.viewMatrixUncentered).translate(new a.Z(this.center||d).negate())}_getCenterInWorld({longitude:t,latitude:e}){const{meterOffset:n,distanceScales:r}=this,i=new a.Z(this.projectPosition([t,e,0]));if(n){const t=new a.Z(n).scale(r.unitsPerMeter);i.add(t)}return i}_initProjectionMatrix(t){const{projectionMatrix:e=null,orthographic:n=!1,fovyRadians:r,fovy:i=75,near:o=.1,far:s=1e3,focalDistance:a=1}=t;this.projectionMatrix=e||this._createProjectionMatrix({orthographic:n,fovyRadians:r||i*h,aspect:this.width/this.height,focalDistance:a,near:o,far:s})}_initPixelMatrices(){const t=(0,i.bS)();u.Jp(t,t,this.projectionMatrix),u.Jp(t,t,this.viewMatrix),this.viewProjectionMatrix=t,this.viewMatrixInverse=u.U_([],this.viewMatrix)||this.viewMatrix,this.cameraPosition=(0,i.Xt)(this.viewMatrixInverse);const e=(0,i.bS)(),n=(0,i.bS)();u.bA(e,e,[this.width/2,-this.height/2,1]),u.Iu(e,e,[1,-1,0]),u.Jp(n,e,this.viewProjectionMatrix),this.pixelProjectionMatrix=n,this.viewportMatrix=e,this.pixelUnprojectionMatrix=u.U_((0,i.bS)(),this.pixelProjectionMatrix),this.pixelUnprojectionMatrix||r.Z.warn("Pixel project matrix not invertible")()}}g.displayName="Viewport"},3123:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(9225),i=n(7013),o=n(4479);function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}!function(){var t=function(){var t=new o.WT(2);return o.WT!=Float32Array&&(t[0]=0,t[1]=0),t}()}();var a=n(7293);const u=Math.PI/180;function c(t){return 512/4003e4/Math.cos(t*u)}class l extends r.Z{constructor(t={}){const{latitude:e=0,longitude:n=0,zoom:r=11,pitch:o=0,bearing:s=0,nearZMultiplier:u=.1,farZMultiplier:c=1.01,orthographic:l=!1,projectionMatrix:h,repeat:f=!1,worldOffset:d=0,legacyMeterSizes:p=!1}=t;let{width:g,height:m,altitude:v=1.5}=t;const y=Math.pow(2,r);let b;g=g||1,m=m||1;let _=null;h?(v=h[5]/2,b=(0,i.Lu)(v)):(t.fovy?(b=t.fovy,v=(0,i.sj)(b)):b=(0,i.Lu)(v),_=(0,i.wl)({width:g,height:m,pitch:o,fovy:b,nearZMultiplier:u,farZMultiplier:c}));let w=(0,i.lf)({height:m,pitch:o,bearing:s,scale:y,altitude:v});if(d){w=(new a.Z).translate([512*d,0,0]).multiplyLeft(w)}super({...t,width:g,height:m,viewMatrix:w,longitude:n,latitude:e,zoom:r,..._,fovy:b,focalDistance:v}),this.latitude=e,this.longitude=n,this.zoom=r,this.pitch=o,this.bearing=s,this.altitude=v,this.fovy=b,this.orthographic=l,this._subViewports=f?[]:null,this._pseudoMeters=p,Object.freeze(this)}get subViewports(){if(this._subViewports&&!this._subViewports.length){const t=this.getBounds(),e=Math.floor((t[0]+180)/360),n=Math.ceil((t[2]-180)/360);for(let r=e;r<=n;r++){const t=r?new l({...this,worldOffset:r}):this;this._subViewports.push(t)}}return this._subViewports}projectPosition(t){if(this._pseudoMeters)return super.projectPosition(t);const[e,n]=this.projectFlat(t);return[e,n,(t[2]||0)*c(t[1])]}unprojectPosition(t){if(this._pseudoMeters)return super.unprojectPosition(t);const[e,n]=this.unprojectFlat(t);return[e,n,(t[2]||0)/c(n)]}addMetersToLngLat(t,e){return(0,i.eG)(t,e)}panByPosition(t,e){const n=(0,i.CT)(e,this.pixelUnprojectionMatrix),r=s([],this.projectFlat(t),((o=[])[0]=-(a=n)[0],o[1]=-a[1],o));var o,a;const u=s([],this.center,r),[c,l]=this.unprojectFlat(u);return{longitude:c,latitude:l}}getBounds(t={}){const e=(0,i.zX)(this,t.z||0);return[Math.min(e[0][0],e[1][0],e[2][0],e[3][0]),Math.min(e[0][1],e[1][1],e[2][1],e[3][1]),Math.max(e[0][0],e[1][0],e[2][0],e[3][0]),Math.max(e[0][1],e[1][1],e[2][1],e[3][1])]}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:o,latitude:s,zoom:a}
1=(0,i.Xg)({width:n,height:r,bounds:t,...e});return new l({width:n,height:r,longitude:o,latitude:s,zoom:a})}}l.displayName="WebMercatorViewport"},937:function(t,e,n){"use strict";n.d(e,{Z:function(){return D}});var r=n(4897),i=n(3123),o=n(4034),s=n(6395);const a=()=>{},u=1,c=2,l=3,h={transitionEasing:t=>t,transitionInterruption:u,onTransitionStart:a,onTransitionInterrupt:a,onTransitionEnd:a};class f{constructor(t,e={}){this.ControllerState=t,this.props={...h,...e},this.propsInTransition=null,this.transition=new s.Z(e.timeline),this.onViewStateChange=e.onViewStateChange||a,this.onStateChange=e.onStateChange||a,this._onTransitionUpdate=this._onTransitionUpdate.bind(this)}finalize(){this.transition.cancel()}getViewportInTransition(){return this.propsInTransition}processViewStateChange(t){let e=!1;const n=this.props;if(t={...h,...t},this.props=t,this._shouldIgnoreViewportChange(n,t))return e;if(this._isTransitionEnabled(t)){const{interruption:r,endProps:i}=this.transition.settings,o={...n,...r===c?i:this.propsInTransition||n};this._triggerTransition(o,t),e=!0}else this.transition.cancel();return e}updateTransition(){this.transition.update()}_isTransitionEnabled(t){const{transitionDuration:e,transitionInterpolator:n}=t;return(e>0||"auto"===e)&&Boolean(n)}_isUpdateDueToCurrentTransition(t){return!!this.transition.inProgress&&this.transition.settings.interpolator.arePropsEqual(t,this.propsInTransition)}_shouldIgnoreViewportChange(t,e){return this.transition.inProgress?this.transition.settings.interruption===l||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e)}_triggerTransition(t,e){const n=new this.ControllerState(t),r=new this.ControllerState(e).shortestPathFrom(n),{transitionInterpolator:i}=e,o=i.getDuration?i.getDuration(t,e):e.transitionDuration;if(0===o)return;const s=e.transitionInterpolator.initializeProps(t,r);this.propsInTransition={},this.duration=o,this.transition.start({duration:o,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startProps:s.start,endProps:s.end,onStart:e.onTransitionStart,onUpdate:this._onTransitionUpdate,onInterrupt:this._onTransitionEnd(e.onTransitionInterrupt),onEnd:this._onTransitionEnd(e.onTransitionEnd)}),this.onStateChange({inTransition:!0}),this.updateTransition()}_onTransitionEnd(t){return e=>{this.propsInTransition=null,this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1}),t(e)}}_onTransitionUpdate(t){const{time:e,settings:{interpolator:n,startProps:r,endProps:i,duration:o,easing:s}}=t,a=s(e/o),u=n.interpolateProps(r,i,a);this.propsInTransition=new this.ControllerState({...this.props,...u}).getViewportProps(),this.onViewStateChange({viewState:this.propsInTransition,oldViewState:this.props})}}var d=n(5304);const p=["longitude","latitude","zoom","bearing","pitch"],g=["longitude","latitude","zoom"];class m extends class{constructor(t={}){Array.isArray(t)&&(t={compare:t,extract:t,required:t});const{compare:e,extract:n,required:r}=t;this._propsToCompare=e,this._propsToExtract=n,this._requiredProps=r}arePropsEqual(t,e){for(const n of this._propsToCompare||Object.keys(e))if(!(n in t)||!(n in e)||!(0,o.fS)(t[n],e[n]))return!1;return!0}initializeProps(t,e){let n;if(this._propsToExtract){const r={},i={};for(const n of this._propsToExtract)r[n]=t[n],i[n]=e[n];n={start:r,end:i}}else n={start:t,end:e};return this._checkRequiredProps(n.start),this._checkRequiredProps(n.end),n}interpolateProps(t,e,n){return e}getDuration(t,e){return e.transitionDuration}_checkRequiredProps(t){this._requiredProps&&this._requiredProps.forEach((e=>{const n=t[e];(0,d.Z)(Number.isFinite(n)||Array.isArray(n),"".concat(e," is required for transition"))}))}}{constructor(t={}){super((Array.isArray(t)?t:t.transitionProps)||{compare:p,extract:p,required:g}),this.opts=t}initializeProps(t,e){const n=super.initializeProps(t,e),{makeViewport:r,around:i}=this.opts;if(r&&i){const o=r(t),s=r(e),a=o.unproject(i);n.start.around=i,Object.assign(n.end,{around:s.project(a),aroundPosition:a,width:e.width,height:e.height})}return n}interpolateProps(t,e,n){const r={};for(const i of this._propsToExtract)r[i]=(0,o.t7)(t[i]||0,e[i]||0,n);if(e.aroundPosition){const i=this.opts.makeViewport({...e,...r});Object.assign(r,i.panByPosition(e.aroundPosition,(0,o.t7)(t.around,e.around,n)))}return r}}const v={transitionDuration:0},y={transitionDuration:300,transitionEasing:t=>t,transitionInterruption:u},b=t=>1-(1-t)*(1-t),_=["wheel"],w=["panstart","panmove","panend"],x=["pinchstart","pinchmove","pinchend"],E=["tripanstart","tripanmove","tripanend"],T=["doubletap"],P=["keydown"];var A=n(7013);const S=0,M=0,O=1.5,C=0,L=20,k=0,R=60;class I extends class{constructor(t){this._viewportProps=this._applyConstraints(t)}getViewportProps(){return this._viewportProps}getState(){return this._state}shortestPathFrom(t){return this._viewportProps}_applyConstraints(t){return t}}{constructor({makeViewport:t,width:e,height:n,latitude:r,longitude:i,zoom:o,bearing:s=M,pitch:a=S,altitude:u=O,maxZoom:c=L,minZoom:l=C,maxPitch:h=R,minPitch:f=k,startPanLngLat:p,startZoomLngLat:g,startRotatePos:m,startBearing:v,startPitch:y,startZoom:b,normalize:_}={}){(0,d.Z)(Number.isFinite(i)),(0,d.Z)(Number.isFinite(r)),(0,d.Z)(Number.isFinite(o)),super({width:e,height:n,latitude:r,longitude:i,zoom:o,bearing:s,pitch:a,altitude:u,maxZoom:c,minZoom:l,maxPitch:h,minPitch:f,normalize:_}),this._state={startPanLngLat:p,startZoomLngLat:g,startRotatePos:m,startBearing:v,startPitch:y,startZoom:b},this.makeViewport=t}panStart({pos:t}
1){return this._getUpdatedState({startPanLngLat:this._unproject(t)})}pan({pos:t,startPos:e}){const n=this._state.startPanLngLat||this._unproject(e);if(!n)return this;const r=this.makeViewport(this._viewportProps).panByPosition(n,t);return this._getUpdatedState(r)}panEnd(){return this._getUpdatedState({startPanLngLat:null})}rotateStart({pos:t}){return this._getUpdatedState({startRotatePos:t,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}rotate({pos:t,deltaAngleX:e=0,deltaAngleY:n=0}){const{startRotatePos:r,startBearing:i,startPitch:o}=this._state;if(!r||!Number.isFinite(i)||!Number.isFinite(o))return this;let s;return s=t?this._calculateNewPitchAndBearing({...this._getRotationParams(t,r),startBearing:i,startPitch:o}):{bearing:i+e,pitch:o+n},this._getUpdatedState(s)}rotateEnd(){return this._getUpdatedState({startBearing:null,startPitch:null})}zoomStart({pos:t}){return this._getUpdatedState({startZoomLngLat:this._unproject(t),startZoom:this._viewportProps.zoom})}zoom({pos:t,startPos:e,scale:n}){let{startZoom:r,startZoomLngLat:i}=this._state;Number.isFinite(r)||(r=this._viewportProps.zoom,i=this._unproject(e)||this._unproject(t));const o=this._calculateNewZoom({scale:n,startZoom:r}),s=this.makeViewport({...this._viewportProps,zoom:o});return this._getUpdatedState({zoom:o,...s.panByPosition(i,t)})}zoomEnd(){return this._getUpdatedState({startZoomLngLat:null,startZoom:null})}zoomIn(t=2){return this._zoomFromCenter(t)}zoomOut(t=2){return this._zoomFromCenter(1/t)}moveLeft(t=100){return this._panFromCenter([t,0])}moveRight(t=100){return this._panFromCenter([-t,0])}moveUp(t=100){return this._panFromCenter([0,t])}moveDown(t=100){return this._panFromCenter([0,-t])}rotateLeft(t=15){return this._getUpdatedState({bearing:this._viewportProps.bearing-t})}rotateRight(t=15){return this._getUpdatedState({bearing:this._viewportProps.bearing+t})}rotateUp(t=10){return this._getUpdatedState({pitch:this._viewportProps.pitch+t})}rotateDown(t=10){return this._getUpdatedState({pitch:this._viewportProps.pitch-t})}shortestPathFrom(t){const e=t.getViewportProps(),n={...this._viewportProps},{bearing:r,longitude:i}=n;return Math.abs(r-e.bearing)>180&&(n.bearing=r<0?r+360:r-360),Math.abs(i-e.longitude)>180&&(n.longitude=i<0?i+360:i-360),n}_zoomFromCenter(t){const{width:e,height:n}=this._viewportProps;return this.zoom({pos:[e/2,n/2],scale:t})}_panFromCenter(t){const{width:e,height:n}=this._viewportProps;return this.pan({startPos:[e/2,n/2],pos:[e/2+t[0],n/2+t[1]]})}_getUpdatedState(t){return new this.constructor({makeViewport:this.makeViewport,...this._viewportProps,...this._state,...t})}_applyConstraints(t){const{maxZoom:e,minZoom:n,zoom:r}=t;t.zoom=(0,o.uZ)(r,n,e);const{maxPitch:i,minPitch:s,pitch:a}=t;t.pitch=(0,o.uZ)(a,s,i);const{normalize:u=!0}=t;return u&&Object.assign(t,(0,A.QA)(t)),t}_unproject(t){const e=this.makeViewport(this._viewportProps);return t&&e.unproject(t)}_calculateNewZoom({scale:t,startZoom:e}){const{maxZoom:n,minZoom:r}=this._viewportProps,i=e+Math.log2(t);return(0,o.uZ)(i,r,n)}_calculateNewPitchAndBearing({deltaScaleX:t,deltaScaleY:e,startBearing:n,startPitch:r}){e=(0,o.uZ)(e,-1,1);const{minPitch:i,maxPitch:s}=this._viewportProps;let a=r;return e>0?a=r+e*(s-r):e<0&&(a=r-e*(i-r)),{pitch:a,bearing:n+180*t}}_getRotationParams(t,e){const n=t[0]-e[0],r=t[1]-e[1],i=t[1],o=e[1],{width:s,height:a}=this._viewportProps,u=n/s;let c=0;return r>0?Math.abs(a-o)>5&&(c=r/(o-a)*1.2):r<0&&o>5&&(c=1-i/o),c=Math.min(1,Math.max(-1,c)),{deltaScaleX:u,deltaScaleY:c}}}class j extends class{constructor(t,e={}){this.ControllerState=t,this.controllerState=null,this.controllerStateProps=null,this.eventManager=null,this.transitionManager=new f(t,{...e,onViewStateChange:this._onTransition.bind(this),onStateChange:this._setInteractionState.bind(this)});const n=this.linearTransitionProps;this._transition=n&&{...y,transitionInterpolator:new m({transitionProps:n})},this._events=null,this._interactionState={isDragging:!1},this._customEvents=[],this.onViewStateChange=null,this.onStateChange=null,this.handleEvent=this.handleEvent.bind(this),this.setProps(e)}get linearTransitionProps(){return null}set events(t){this.toggleEvents(this._customEvents,!1),this.toggleEvents(t,!0),this._customEvents=t,this.setProps(this.controllerStateProps)}finalize(){for(const t in this._events)this._events[t]&&this.eventManager.off(t,this.handleEvent);this.transitionManager.finalize()}handleEvent(t){const{ControllerState:e}=this;this.controllerState=new e({makeViewport:this.makeViewport,...this.controllerStateProps,...this._state});const n=this._eventStartBlocked;switch(t.type){case"panstart":return!n&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!n&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!n&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}getCenter(t){const{x:e,y:n}=this.controllerStateProps,{offsetCenter:r}=t;return[r.x-e,r.y-n]}isPointInBounds(t,e){const{width:n,height:r}=this.controllerStateProps;if(e&&e.handled)return!1;const i=t[0]>=0&&t[0]<=n&&t[1]>=0&&t[1]<=r;return i&&e&&e.stopPropagation(),i}isFunctionKeyPressed(t){const{srcEvent:e}=t;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}isDragging(){return this._interactionState.isDragging}blockEvents(t){const e=setTimeout((()=>{this._eventStartBlocked===e&&(this._eventStartBlocked=null)}),t);this._eventStartBlocked=e}setProps(t){"onViewStateChange"in t&&(this.onViewStateChange=t.onViewStateChange),"onStateChange"in t&&(this.onStateChange=t.onStateChange),"makeViewport"in t&&(this.makeViewport=t.makeViewport),"dragMode"in t&&(this.dragMode=t.dragMode),this.controllerStateProps=t,"eventManager"in t&&this.eventManager!==t.eventManager&&(this.eventManager=t.eventManager,this._events={},this.toggleEvents(this._customEvents,!0)),"transitionInterpolator"in t||(t.transitionInterpolator=this._getTransitionProps().transitionInterpolator),this.transitionManager.processViewStateChange(t);let{inertia:e}=t;!0===e&&(e=300),this.inertia=e;const{scrollZoom:n=!0,dragPan:r=!0,dragRotate:i=!0,doubleClickZoom:o=!0,touchZoom:s=!0,touchRotate:a=!1,keyboard:u=!0}=t,c=Boolean(this.onViewStateChange);this.toggleEvents(_,c&&n),this.toggleEvents(w,c&&(r||i)),this.toggleEvents(x,c&&(s||a)),this.toggleEvents(E,c&&a),this.toggleEvents(T,c&&o),this.toggleEvents(P,c&&u),this.scrollZoom=n,this.dragPan=r,this.dragRotate=i,this.doubleClickZoom=o,this.touchZoom=s,this.touchRotate=a,this.keyboard=u}updateTransition(){this.transitionManager.updateTransition()}toggleEvents(t,e){this.eventManager&&t.forEach((t=>{this._events[t]!==e&&(this._events[t]=e,e?this.eventManager.on(t,this.handleEvent):this.eventManager.off(t,this.handleEvent))}))}updateViewport(t,e={},n={}){const r={...t.getViewportProps(),...e},i=this.controllerState!==t;if(this._state=t.getState(),this._setInteractionState(n),i){const t=this.controllerState?this.controllerState.getViewportProps():null;this.onViewStateChange&&this.onViewStateChange({viewState:r,interactionState:this._interactionState,oldViewState:t})}}_onTransition(t){this.onViewStateChange&&(t.interactionState=this._interactionState,this.onViewStateChange(t))}_setInteractionState(t){Object.assign(this._interactionState,t),this.onStateChange&&this.onStateChange(this._interactionState)}_onPanStart(t){const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;let n=this.isFunctionKeyPressed(t)||t.rightButton;(this.invertPan||"pan"===this.dragMode)&&(n=!n);const r=this.controllerState[n?"panStart":"rotateStart"]({pos:e});return this._panMove=n,this.updateViewport(r,v,{isDragging:!0}),!0}_onPan(t){return!!this.isDragging()&&(this._panMove?this._onPanMove(t):this._onPanRotate(t))}_onPanEnd(t){return!!this.isDragging()&&(this._panMove?this._onPanMoveEnd(t):this._onPanRotateEnd(t))}_onPanMove(t){if(!this.dragPan)return!1;const e=this.getCenter(t),n=this.controllerState.pan({pos:e});return this.updateViewport(n,v,{isDragging:!0,isPanning:!0}),!0}_onPanMoveEnd(t){const{inertia:e}=this;if(this.dragPan&&e&&t.velocity){const n=this.getCenter(t),r=[n[0]+t.velocityX*e/2,n[1]+t.velocityY*e/2],i=this.controllerState.pan({pos:r}).panEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:e,transitionEasing:b},{isDragging:!1,isPanning:!0})}else{const t=this.controllerState.panEnd();this.updateViewport(t,null,{isDragging:!1,isPanning:!1})}return!0}_onPanRotate(t){if(!this.dragRotate)return!1;const e=this.getCenter(t),n=this.controllerState.rotate({pos:e});return this.updateViewport(n,v,{isDragging:!0,isRotating:!0}),!0}_onPanRotateEnd(t){const{inertia:e}=this;if(this.dragRotate&&e&&t.velocity){const n=this.getCenter(t),r=[n[0]+t.velocityX*e/2,n[1]+t.velocityY*e/2],i=this.controllerState.rotate({pos:r}).rotateEnd();this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:e,transitionEasing:b},{isDragging:!1,isRotating:!0})}else{const t=this.controllerState.rotateEnd();this.updateViewport(t,null,{isDragging:!1,isRotating:!1})}return!0}_onWheel(t){if(!this.scrollZoom)return!1;t.preventDefault();const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;
1const{speed:n=.01,smooth:r=!1}=this.scrollZoom,{delta:i}=t;let o=2/(1+Math.exp(-Math.abs(i*n)));i<0&&0!==o&&(o=1/o);const s=this.controllerState.zoom({pos:e,scale:o});return this.updateViewport(s,{...this._getTransitionProps({around:e}),transitionDuration:r?250:1},{isZooming:!0,isPanning:!0}),!0}_onTriplePanStart(t){const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const n=this.controllerState.rotateStart({pos:e});return this.updateViewport(n,v,{isDragging:!0}),!0}_onTriplePan(t){if(!this.touchRotate)return!1;if(!this.isDragging())return!1;const e=this.getCenter(t);e[0]-=t.deltaX;const n=this.controllerState.rotate({pos:e});return this.updateViewport(n,v,{isDragging:!0,isRotating:!0}),!0}_onTriplePanEnd(t){if(!this.isDragging())return!1;const{inertia:e}=this;if(this.touchRotate&&e&&t.velocityY){const n=this.getCenter(t),r=[n[0],n[1]+=t.velocityY*e/2],i=this.controllerState.rotate({pos:r});this.updateViewport(i,{...this._getTransitionProps(),transitionDuration:e,transitionEasing:b},{isDragging:!1,isRotating:!0}),this.blockEvents(e)}else{const t=this.controllerState.rotateEnd();this.updateViewport(t,null,{isDragging:!1,isRotating:!1})}return!0}_onPinchStart(t){const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const n=this.controllerState.zoomStart({pos:e}).rotateStart({pos:e});return this._startPinchRotation=t.rotation,this._lastPinchEvent=t,this.updateViewport(n,v,{isDragging:!0}),!0}_onPinch(t){if(!this.touchZoom&&!this.touchRotate)return!1;if(!this.isDragging())return!1;let e=this.controllerState;if(this.touchZoom){const{scale:n}=t,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){const{rotation:n}=t;e=e.rotate({deltaAngleX:this._startPinchRotation-n})}return this.updateViewport(e,v,{isDragging:!0,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:this.touchRotate}),this._lastPinchEvent=t,!0}_onPinchEnd(t){if(!this.isDragging())return!1;const{inertia:e,_lastPinchEvent:n}=this;if(this.touchZoom&&e&&n&&t.scale!==n.scale){const r=this.getCenter(t);let i=this.controllerState.rotateEnd();const o=Math.log2(t.scale),s=(o-Math.log2(n.scale))/(t.deltaTime-n.deltaTime),a=Math.pow(2,o+s*e/2);i=i.zoom({pos:r,scale:a}).zoomEnd(),this.updateViewport(i,{...this._getTransitionProps({around:r}),transitionDuration:e,transitionEasing:b},{isDragging:!1,isPanning:this.touchZoom,isZooming:this.touchZoom,isRotating:!1}),this.blockEvents(e)}else{const t=this.controllerState.zoomEnd().rotateEnd();this.updateViewport(t,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1})}return this._startPinchRotation=null,this._lastPinchEvent=null,!0}_onDoubleTap(t){if(!this.doubleClickZoom)return!1;const e=this.getCenter(t);if(!this.isPointInBounds(e,t))return!1;const n=this.isFunctionKeyPressed(t),r=this.controllerState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,this._getTransitionProps({around:e}),{isZooming:!0,isPanning:!0}),this.blockEvents(100),!0}_onKeyDown(t){if(!this.keyboard)return!1;const e=this.isFunctionKeyPressed(t),{zoomSpeed:n,moveSpeed:r,rotateSpeedX:i,rotateSpeedY:o}=this.keyboard,{controllerState:s}=this;let a;const u={};switch(t.srcEvent.code){case"Minus":a=e?s.zoomOut(n).zoomOut(n):s.zoomOut(n),u.isZooming=!0;break;case"Equal":a=e?s.zoomIn(n).zoomIn(n):s.zoomIn(n),u.isZooming=!0;break;case"ArrowLeft":e?(a=s.rotateLeft(i),u.isRotating=!0):(a=s.moveLeft(r),u.isPanning=!0);break;case"ArrowRight":e?(a=s.rotateRight(i),u.isRotating=!0):(a=s.moveRight(r),u.isPanning=!0);break;case"ArrowUp":e?(a=s.rotateUp(o),u.isRotating=!0):(a=s.moveUp(r),u.isPanning=!0);break;case"ArrowDown":e?(a=s.rotateDown(o),u.isRotating=!0):(a=s.moveDown(r),u.isPanning=!0);break;default:return!1}return this.updateViewport(a,this._getTransitionProps(),u),!0}_getTransitionProps(t){const{_transition:e}=this;return e?t?{...e,transitionInterpolator:new m({...t,transitionProps:this.linearTransitionProps,makeViewport:this.controllerState.makeViewport})}:e:v}}{constructor(t){t.dragMode=t.dragMode||"pan",super(I,t)}setProps(t){const e=this.controllerStateProps;super.setProps(t);(!e||e.height!==t.height)&&this.updateViewport(new this.ControllerState({makeViewport:this.makeViewport,...this.controllerStateProps,...this._state}))}get linearTransitionProps(){return["longitude","latitude","zoom","bearing","pitch"]}}class D extends r.Z{constructor(t){super({...t,type:i.Z})}get controller(){return this._getControllerProps({type:j})}}D.displayName="MapView"},4897:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});var r=n(9225);const i=/([0-9]+\.?[0-9]*)(%|px)/;function o(t){switch(typeof t){case"number":return{position:t,relative:!1};case"string":const e=t.match(i);if(e&&e.length>=3){const t="%"===e[2],n=parseFloat(e[1]);return{position:t?n/100:n,relative:t}}default:throw new Error("Could not parse position string ".concat(t))}}function s(t,e){return t.relative?Math.round(t.position*e):t.position}var a=n(6871),u=n(5304);class c{constructor(t={}){const{id:e=null,x:n=0,y:i=0,width:o="100%",height:s="100%",viewportInstance:a,type:c=r.Z}=t;(0,u.Z)(!a||a instanceof r.Z),this.viewportInstance=a,this.id=e||this.constructor.displayName||"view",this.type=c,this.props={...t,id:this.id},this._parseDimensions({x:n,y:i,width:o,height:s}
1),this.equals=this.equals.bind(this),Object.seal(this)}equals(t){if(this===t)return!0;if(this.viewportInstance)return t.viewportInstance&&this.viewportInstance.equals(t.viewportInstance);return(0,a.v)(this.props,t.props)}makeViewport({width:t,height:e,viewState:n}){if(this.viewportInstance)return this.viewportInstance;n=this.filterViewState(n);const r=this.getDimensions({width:t,height:e});return this._getViewport(n,r)}getViewStateId(){switch(typeof this.props.viewState){case"string":return this.props.viewState;case"object":return this.props.viewState&&this.props.viewState.id;default:return this.id}}filterViewState(t){if(this.props.viewState&&"object"===typeof this.props.viewState){if(!this.props.viewState.id)return this.props.viewState;const e={...t};for(const t in this.props.viewState)"id"!==t&&(e[t]=this.props.viewState[t]);return e}return t}getDimensions({width:t,height:e}){return{x:s(this._x,t),y:s(this._y,e),width:s(this._width,t),height:s(this._height,e)}}_getControllerProps(t){let e=this.props.controller;return e?!0===e?t:("function"===typeof e&&(e={type:e}),{...t,...e}):null}_getViewport(t,e){const{type:n}=this;return new n({...t,...this.props,...e})}_parseDimensions({x:t,y:e,width:n,height:r}){this._x=o(t),this._y=o(e),this._width=o(n),this._height=o(r)}}},4479:function(t,e,n){"use strict";n.d(e,{WT:function(){return r}});var r="undefined"!==typeof Float32Array?Float32Array:Array;Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},9884:function(t,e,n){"use strict";function r(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],v=e[15],y=n*a-r*s,b=n*u-i*s,_=n*c-o*s,w=r*u-i*a,x=r*c-o*a,E=i*c-o*u,T=l*g-h*p,P=l*m-f*p,A=l*v-d*p,S=h*m-f*g,M=h*v-d*g,O=f*v-d*m,C=y*O-b*M+_*S+w*A-x*P+E*T;return C?(C=1/C,t[0]=(a*O-u*M+c*S)*C,t[1]=(i*M-r*O-o*S)*C,t[2]=(g*E-m*x+v*w)*C,t[3]=(f*x-h*E-d*w)*C,t[4]=(u*A-s*O-c*P)*C,t[5]=(n*O-i*A+o*P)*C,t[6]=(m*_-p*E-v*b)*C,t[7]=(l*E-f*_+d*b)*C,t[8]=(s*M-a*A+c*T)*C,t[9]=(r*A-n*M-o*T)*C,t[10]=(p*x-g*_+v*y)*C,t[11]=(h*_-l*x-d*y)*C,t[12]=(a*P-s*S-u*T)*C,t[13]=(n*S-r*P+i*T)*C,t[14]=(g*b-p*w-m*y)*C,t[15]=(l*w-h*b+f*y)*C,t):null}function i(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],m=e[13],v=e[14],y=e[15],b=n[0],_=n[1],w=n[2],x=n[3];return t[0]=b*r+_*a+w*h+x*g,t[1]=b*i+_*u+w*f+x*m,t[2]=b*o+_*c+w*d+x*v,t[3]=b*s+_*l+w*p+x*y,b=n[4],_=n[5],w=n[6],x=n[7],t[4]=b*r+_*a+w*h+x*g,t[5]=b*i+_*u+w*f+x*m,t[6]=b*o+_*c+w*d+x*v,t[7]=b*s+_*l+w*p+x*y,b=n[8],_=n[9],w=n[10],x=n[11],t[8]=b*r+_*a+w*h+x*g,t[9]=b*i+_*u+w*f+x*m,t[10]=b*o+_*c+w*d+x*v,t[11]=b*s+_*l+w*p+x*y,b=n[12],_=n[13],w=n[14],x=n[15],t[12]=b*r+_*a+w*h+x*g,t[13]=b*i+_*u+w*f+x*m,t[14]=b*o+_*c+w*d+x*v,t[15]=b*s+_*l+w*p+x*y,t}function o(t,e,n){var r,i,o,s,a,u,c,l,h,f,d,p,g=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+a*m+h*v+e[12],t[13]=i*g+u*m+f*v+e[13],t[14]=o*g+c*m+d*v+e[14],t[15]=s*g+l*m+p*v+e[15]),t}function s(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}n.d(e,{U_:function(){return r},Jp:function(){return i},Iu:function(){return o},bA:function(){return s}})},616:function(t,e,n){"use strict";n.d(e,{fF:function(){return i}});var r=n(4479);function i(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*s,t}!function(){var t=function(){var t=new r.WT(4);return r.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}()},4262:function(t,e,n){"use strict";n.d(e,{Z:function(){return R}});var r=n(1069),i=n(3844),o=n(1331),s=n(744),a=n(4088),u=n(1113),c=n(4538),l=n(2525);const h={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};class f{static get DRAW_MODE(){return h}constructor(t={}){const{id:e=(0,c.hQ)("geometry"),drawMode:n=h.TRIANGLES,attributes:r={},indices:i=null,vertexCount:o=null}=t;this.id=e,this.drawMode=0|n,this.attributes={},this.userData={},this._setAttributes(r,i),this.vertexCount=o||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(t){return`Geometry ${this.id} attribute ${t}`}_setAttributes(t,e){e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e);for(const n in t){let e=t[n];e=ArrayBuffer.isView(e)?{value:e}:e,(0,l.h)(ArrayBuffer.isView(e.value),`${this._print(n)}: must be typed array or object with value as typed array`),"POSITION"!==n&&"positions"!==n||e.size||(e.size=3),"indices"===n?((0,l.h)(!this.indices),this.indices=e):this.attributes[n]=e}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(t,e){if(e)return e.value.length;let n=1/0;for(const r in t){const e=t[r],{value:i,size:o,constant:s}=e;!s&&i&&o>=1&&(n=Math.min(n,i.length/o))}return(0,l.h)(Number.isFinite(n)),n}}var d=n(8550),p=n(6610),g=n(5304),m=n(3478);function v(t,e,n,r,i=[]){let o,s;
1if(8&n)o=(r[3]-t[1])/(e[1]-t[1]),s=3;else if(4&n)o=(r[1]-t[1])/(e[1]-t[1]),s=1;else if(2&n)o=(r[2]-t[0])/(e[0]-t[0]),s=2;else{if(!(1&n))return null;o=(r[0]-t[0])/(e[0]-t[0]),s=0}for(let a=0;a<t.length;a++)i[a]=(1&s)===a?r[s]:o*(e[a]-t[a])+t[a];return i}function y(t,e){let n=0;return t[0]<e[0]?n|=1:t[0]>e[2]&&(n|=2),t[1]<e[1]?n|=4:t[1]>e[3]&&(n|=8),n}function b(t,e){const n=e.length,r=t.length;if(r>0){let i=!0;for(let o=0;o<n;o++)if(t[r-n+o]!==e[o]){i=!1;break}if(i)return!1}for(let i=0;i<n;i++)t[r+i]=e[i];return!0}function _(t,e){const n=e.length;for(let r=0;r<n;r++)t[r]=e[r]}function w(t,e,n,r,i=[]){const o=r+e*n;for(let s=0;s<n;s++)i[s]=t[o+s];return i}function x(t,e={}){const{size:n=2,broken:r=!1,gridResolution:i=10,gridOffset:o=[0,0],startIndex:s=0,endIndex:a=t.length}=e,u=(a-s)/n;let c=[];const l=[c],h=w(t,0,n,s);let f,d;const p=E(h,i,o,[]),g=[];b(c,h);for(let m=1;m<u;m++){for(f=w(t,m,n,s,f),d=y(f,p);d;){v(h,f,d,p,g);const t=y(g,p);t&&(v(h,g,t,p,g),d=t),b(c,g),_(h,g),T(p,i,d),r&&c.length>n&&(c=[],l.push(c),b(c,h)),d=y(f,p)}b(c,f),_(h,f)}return r?l:l[0]}function E(t,e,n,r){const i=Math.floor((t[0]-n[0])/e)*e+n[0],o=Math.floor((t[1]-n[1])/e)*e+n[1];return r[0]=i,r[1]=o,r[2]=i+e,r[3]=o+e,r}function T(t,e,n){8&n?(t[1]+=e,t[3]+=e):4&n?(t[1]-=e,t[3]-=e):2&n?(t[0]+=e,t[2]+=e):1&n&&(t[0]-=e,t[2]-=e)}function P(t,e,n,r){let i,o=t[0];for(let s=n;s<r;s+=e){i=t[s];const e=i-o;(e>180||e<-180)&&(i-=360*Math.round(e/360)),t[s]=o=i}}function A(t,e){let n;const r=t.length/e;for(let o=0;o<r&&(n=t[o*e],(n+180)%360===0);o++);const i=360*-Math.round(n/360);if(0!==i)for(let o=0;o<r;o++)t[o*e]+=i}function S(t,e,n,r){let i=t;if(Array.isArray(t[0])){const n=t.length*e;i=new Array(n);for(let r=0;r<t.length;r++)for(let n=0;n<e;n++)i[r*e+n]=t[r][n]||0}return n?x(i,{size:e,gridResolution:n}):r?function(t,e={}){const{size:n=2,startIndex:r=0,endIndex:i=t.length,normalize:o=!0}=e,s=t.slice(r,i);P(s,n,0,i-r);const a=x(s,{size:n,broken:!0,gridResolution:360,gridOffset:[-180,-180]});if(o)for(const u of a)A(u,n);return a}(i,{size:e}):i}class M extends class{constructor(t={}){const{attributes:e={}}=t;this.typedArrayManager=p.Z,this.indexStarts=null,this.vertexStarts=null,this.vertexCount=0,this.instanceCount=0,this.attributes={},this._attributeDefs=e,this.opts=t,this.updateGeometry(t),Object.seal(this)}updateGeometry(t){Object.assign(this.opts,t);const{data:e,buffers:n={},getGeometry:r,geometryBuffer:i,positionFormat:o,dataChanged:s,normalize:a=!0}=this.opts;if(this.data=e,this.getGeometry=r,this.positionSize=i&&i.size||("XY"===o?2:3),this.buffers=n,this.normalize=a,i&&((0,g.Z)(e.startIndices),this.getGeometry=this.getGeometryFromBuffer(i),a||(n.positions=i)),this.geometryBuffer=n.positions,Array.isArray(s))for(const u of s)this._rebuildGeometry(u);else this._rebuildGeometry()}updatePartialGeometry({startRow:t,endRow:e}){this._rebuildGeometry({startRow:t,endRow:e})}normalizeGeometry(t){return t}updateGeometryAttributes(t,e,n){throw new Error("Not implemented")}getGeometrySize(t){throw new Error("Not implemented")}getGeometryFromBuffer(t){const e=t.value||t;return(0,g.Z)(ArrayBuffer.isView(e)),(0,d.jr)(e,{size:this.positionSize,offset:t.offset,stride:t.stride,startIndices:this.data.startIndices})}_allocate(t,e){const{attributes:n,buffers:r,_attributeDefs:i,typedArrayManager:o}=this;for(const s in i)if(s in r)o.release(n[s]),n[s]=null;else{const r=i[s];r.copy=e,n[s]=o.allocate(n[s],t,r)}}_forEachGeometry(t,e,n){const{data:r,getGeometry:i}=this,{iterable:o,objectInfo:s}=(0,d.jB)(r,e,n);for(const a of o){s.index++;t(i(a,s),s.index)}}_rebuildGeometry(t){if(!this.data||!this.getGeometry)return;let{indexStarts:e,vertexStarts:n,instanceCount:r}=this;const{data:i,geometryBuffer:o}=this,{startRow:s=0,endRow:a=1/0}=t||{},u={};if(t||(e=[0],n=[0]),this.normalize||!o)this._forEachGeometry(((t,e)=>{t=this.normalizeGeometry(t),u[e]=t,n[e+1]=n[e]+this.getGeometrySize(t)}),s,a),r=n[n.length-1];else if(o.buffer instanceof m.Z){const t=o.stride||4*this.positionSize;n=i.startIndices,r=n[i.length]||o.buffer.byteLength/t}else{const t=o.value||o,e=o.stride/t.BYTES_PER_ELEMENT||this.positionSize;n=i.startIndices,r=n[i.length]||t.length/e}this._allocate(r,Boolean(t)),this.indexStarts=e,this.vertexStarts=n,this.instanceCount=r;const c={};
1this._forEachGeometry(((t,i)=>{t=u[i]||t,c.vertexStart=n[i],c.indexStart=e[i];const o=i<n.length-1?n[i+1]:r;c.geometrySize=o-n[i],c.geometryIndex=i,this.updateGeometryAttributes(t,c)}),s,a),this.vertexCount=e[e.length-1]}}{constructor(t){super({...t,attributes:{positions:{size:3,padding:18,initialize:!0,type:t.fp64?Float64Array:Float32Array},segmentTypes:{size:1,type:Uint8ClampedArray}}})}getGeometryFromBuffer(t){return this.normalize?super.getGeometryFromBuffer(t):()=>null}normalizeGeometry(t){return this.normalize?S(t,this.positionSize,this.opts.resolution,this.opts.wrapLongitude):t}get(t){return this.attributes[t]}getGeometrySize(t){if(Array.isArray(t[0])){let e=0;for(const n of t)e+=this.getGeometrySize(n);return e}const e=this.getPathLength(t);return e<2?0:this.isClosed(t)?e<3?0:e+2:e}updateGeometryAttributes(t,e){if(0!==e.geometrySize)if(t&&Array.isArray(t[0]))for(const n of t){const t=this.getGeometrySize(n);e.geometrySize=t,this.updateGeometryAttributes(n,e),e.vertexStart+=t}else this._updateSegmentTypes(t,e),this._updatePositions(t,e)}_updateSegmentTypes(t,e){const{segmentTypes:n}=this.attributes,r=this.isClosed(t),{vertexStart:i,geometrySize:o}=e;n.fill(0,i,i+o),r?(n[i]=4,n[i+o-2]=4):(n[i]+=1,n[i+o-2]+=2),n[i+o-1]=4}_updatePositions(t,e){const{positions:n}=this.attributes;if(!n)return;const{vertexStart:r,geometrySize:i}=e,o=new Array(3);for(let s=r,a=0;a<i;s++,a++)this.getPointOnPath(t,a,o),n[3*s]=o[0],n[3*s+1]=o[1],n[3*s+2]=o[2]}getPathLength(t){return t.length/this.positionSize}getPointOnPath(t,e,n=[]){const{positionSize:r}=this;e*r>=t.length&&(e+=1-t.length/r);const i=e*r;return n[0]=t[i],n[1]=t[i+1],n[2]=3===r&&t[i+2]||0,n}isClosed(t){if(!this.normalize)return this.opts.loop;const{positionSize:e}=this,n=t.length-e;return t[0]===t[n]&&t[1]===t[n+1]&&(2===e||t[2]===t[n+2])}}const O=[0,0,0,255],C={widthUnits:"meters",widthScale:{type:"number",min:0,value:1},widthMinPixels:{type:"number",min:0,value:0},widthMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},jointRounded:!1,capRounded:!1,miterLimit:{type:"number",min:0,value:4},billboard:!1,_pathType:null,getPath:{type:"accessor",value:t=>t.path},getColor:{type:"accessor",value:O},getWidth:{type:"accessor",value:1},rounded:{deprecatedFor:["jointRounded","capRounded"]}},L={enter:(t,e)=>e.length?e.subarray(e.length-t.length):t};class k extends r.Z{getShaders(){return super.getShaders({vs:"#define SHADER_NAME path-layer-vertex-shader\n\nattribute vec2 positions;\n\nattribute float instanceTypes;\nattribute vec3 instanceStartPositions;\nattribute vec3 instanceEndPositions;\nattribute vec3 instanceLeftPositions;\nattribute vec3 instanceRightPositions;\nattribute vec3 instanceLeftPositions64Low;\nattribute vec3 instanceStartPositions64Low;\nattribute vec3 instanceEndPositions64Low;\nattribute vec3 instanceRightPositions64Low;\nattribute float instanceStrokeWidths;\nattribute vec4 instanceColors;\nattribute vec3 instancePickingColors;\n\nuniform float widthScale;\nuniform float widthMinPixels;\nuniform float widthMaxPixels;\nuniform float jointType;\nuniform float capType;\nuniform float miterLimit;\nuniform bool billboard;\nuniform int widthUnits;\n\nuniform float opacity;\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nconst float EPSILON = 0.001;\nconst vec3 ZERO_OFFSET = vec3(0.0);\n\nfloat flipIfTrue(bool flag) {\n return -(float(flag) * 2. - 1.);\n}\nvec3 lineJoin(\n vec3 prevPoint, vec3 currPoint, vec3 nextPoint,\n vec2 width\n) {\n bool isEnd = positions.x > 0.0;\n float sideOfPath = positions.y;\n float isJoint = float(sideOfPath == 0.0);\n\n vec3 deltaA3 = (currPoint - prevPoint);\n vec3 deltaB3 = (nextPoint - currPoint);\n\n mat3 rotationMatrix;\n bool needsRotation = !billboard && project_needs_rotation(currPoint, rotationMatrix);\n if (needsRotation) {\n deltaA3 = deltaA3 * rotationMatrix;\n deltaB3 = deltaB3 * rotationMatrix;\n }\n vec2 deltaA = deltaA3.xy / width;\n vec2 deltaB = deltaB3.xy / width;\n\n float lenA = length(deltaA);\n float lenB = length(deltaB);\n\n vec2 dirA = lenA > 0. ? normalize(deltaA) : vec2(0.0, 0.0);\n vec2 dirB = lenB > 0. ? normalize(deltaB) : vec2(0.0, 0.0);\n\n vec2 perpA = vec2(-dirA.y, dirA.x);\n vec2 perpB = vec2(-dirB.y, dirB.x);\n vec2 tangent = dirA + dirB;\n tangent = length(tangent) > 0. ? normalize(tangent) : perpA;\n vec2 miterVec = vec2(-tangent.y, tangent.x);\n vec2 dir = isEnd ? dirA : dirB;\n vec2 perp = isEnd ? perpA : perpB;\n float L = isEnd ? lenA : lenB;\n float sinHalfA = abs(dot(miterVec, perp));\n float cosHalfA = abs(dot(dirA, miterVec));\n float turnDirection = flipIfTrue(dirA.x * dirB.y >= dirA.y * dirB.x);\n float cornerPosition = sideOfPath * turnDirection;\n\n float miterSize = 1.0 / max(sinHalfA, EPSILON);\n miterSize = mix(\n min(miterSize, max(lenA, lenB) / max(cosHalfA, EPSILON)),\n miterSize,\n step(0.0, cornerPosition)\n );\n\n vec2 offsetVec = mix(miterVec * miterSize, perp, step(0.5, cornerPosition))\n * (sideOfPath + isJoint * turnDirection);\n bool isStartCap = lenA == 0.0 || (!isEnd && (instanceTypes == 1.0 || instanceTypes == 3.0));\n bool isEndCap = lenB == 0.0 || (isEnd && (instanceTypes == 2.0 || instanceTypes == 3.0));\n bool isCap = isStartCap || isEndCap;\n if (isCap) {\n offsetVec = mix(perp * sideOfPath, dir * capType * 4.0 * flipIfTrue(isStartCap), isJoint);\n vJointType = capType;\n } else {\n vJointType = jointType;\n }\n vPathLength = L;\n vCornerOffset = offsetVec;\n vMiterLength = dot(vCornerOffset, miterVec * turnDirection);\n vMiterLength = isCap ? isJoint : vMiterLength;\n\n vec2 offsetFromStartOfPath = vCornerOffset + deltaA * float(isEnd);\n vPathPosition = vec2(\n dot(offsetFromStartOfPath, perp),\n dot(offsetFromStartOfPath, dir)\n );\n geometry.uv = vPathPosition;\n\n float isValid = step(instanceTypes, 3.5);\n vec3 offset = vec3(offsetVec * width * isValid, 0.0);\n\n if (needsRotation) {\n offset = rotationMatrix * offset;\n }\n return currPoint + offset;\n}\nvoid clipLine(inout vec4 position, vec4 refPosition) {\n if (position.w < EPSILON) {\n float r = (EPSILON - refPosition.w) / (position.w - refPosition.w);\n position = refPosition + (position - refPosition) * r;\n }\n}\n\nvoid main() {\n geometry.pickingColor = instancePickingColors;\n\n vColor = vec4(instanceColors.rgb, instanceColors.a * opacity);\n\n float isEnd = positions.x;\n\n vec3 prevPosition = mix(instanceLeftPositions, instanceStartPositions, isEnd);\n vec3 prevPosition64Low = mix(instanceLeftPositions64Low, instanceStartPositions64Low, isEnd);\n\n vec3 currPosition = mix(instanceStartPositions, instanceEndPositions, isEnd);\n vec3 currPosition64Low = mix(instanceStartPositions64Low, instanceEndPositions64Low, isEnd);\n\n vec3 nextPosition = mix(instanceEndPositions, instanceRightPositions, isEnd);\n vec3 nextPosition64Low = mix(instanceEndPositions64Low, instanceRightPositions64Low, isEnd);\n\n geometry.worldPosition = currPosition;\n vec2 widthPixels = vec2(clamp(\n project_size_to_pixel(instanceStrokeWidths * widthScale, widthUnits),\n widthMinPixels, widthMaxPixels) / 2.0);\n vec3 width;\n\n if (billboard) {\n vec4 prevPositionScreen = project_position_to_clipspace(prevPosition, prevPosition64Low, ZERO_OFFSET);\n vec4 currPositionScreen = project_position_to_clipspace(currPosition, currPosition64Low, ZERO_OFFSET, geometry.position);\n vec4 nextPositionScreen = project_position_to_clipspace(nextPosition, nextPosition64Low, ZERO_OFFSET);\n\n clipLine(prevPositionScreen, currPositionScreen);\n clipLine(nextPositionScreen, currPositionScreen);\n clipLine(currPositionScreen, mix(nextPositionScreen, prevPositionScreen, isEnd));\n\n width = vec3(widthPixels, 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec3 pos = lineJoin(\n prevPositionScreen.xyz / prevPositionScreen.w,\n currPositionScreen.xyz / currPositionScreen.w,\n nextPositionScreen.xyz / nextPositionScreen.w,\n project_pixel_size_to_clipspace(width.xy)\n );\n\n gl_Position = vec4(pos * currPositionScreen.w, currPositionScreen.w);\n } else {\n prevPosition = project_position(prevPosition, prevPosition64Low);\n currPosition = project_position(currPosition, currPosition64Low);\n nextPosition = project_position(nextPosition, nextPosition64Low);\n\n width = vec3(project_pixel_size(widthPixels), 0.0);\n DECKGL_FILTER_SIZE(width, geometry);\n\n vec4 pos = vec4(\n lineJoin(prevPosition, currPosition, nextPosition, width.xy),\n 1.0);\n geometry.position = pos;\n gl_Position = project_common_position_to_clipspace(pos);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#define SHADER_NAME path-layer-fragment-shader\n\nprecision highp float;\n\nuniform float miterLimit;
1\n\nvarying vec4 vColor;\nvarying vec2 vCornerOffset;\nvarying float vMiterLength;\nvarying vec2 vPathPosition;\nvarying float vPathLength;\nvarying float vJointType;\n\nvoid main(void) {\n geometry.uv = vPathPosition;\n\n if (vPathPosition.y < 0.0 || vPathPosition.y > vPathLength) {\n if (vJointType > 0.5 && length(vCornerOffset) > 1.0) {\n discard;\n }\n if (vJointType < 0.5 && vMiterLength > miterLimit + 1.0) {\n discard;\n }\n }\n gl_FragColor = vColor;\n\n DECKGL_FILTER_COLOR(gl_FragColor, geometry);\n}\n",modules:[i.Z,o.Z]})}get wrapLongitude(){return!1}initializeState(){this.getAttributeManager().addInstanced({positions:{size:3,vertexOffset:1,type:5130,fp64:this.use64bitPositions(),transition:L,accessor:"getPath",update:this.calculatePositions,noAlloc:true,shaderAttributes:{instanceLeftPositions:{vertexOffset:0},instanceStartPositions:{vertexOffset:1},instanceEndPositions:{vertexOffset:2},instanceRightPositions:{vertexOffset:3}}},instanceTypes:{size:1,type:5121,update:this.calculateSegmentTypes,noAlloc:true},instanceStrokeWidths:{size:1,accessor:"getWidth",transition:L,defaultValue:1},instanceColors:{size:this.props.colorFormat.length,type:5121,normalized:!0,accessor:"getColor",transition:L,defaultValue:O},instancePickingColors:{size:3,type:5121,accessor:(t,{index:e,target:n})=>this.encodePickingColor(t&&t.__source?t.__source.index:e,n)}}),this.setState({pathTesselator:new M({fp64:this.use64bitPositions()})}),this.props.getDashArray&&!this.props.extensions.length&&s.Z.removed("getDashArray","PathStyleExtension")()}updateState({oldProps:t,props:e,changeFlags:n}){super.updateState({props:e,oldProps:t,changeFlags:n});const r=this.getAttributeManager();if(n.dataChanged||n.updateTriggersChanged&&(n.updateTriggersChanged.all||n.updateTriggersChanged.getPath)){const{pathTesselator:t}=this.state,i=e.data.attributes||{};t.updateGeometry({data:e.data,geometryBuffer:i.getPath,buffers:i,normalize:!e._pathType,loop:"loop"===e._pathType,getGeometry:e.getPath,positionFormat:e.positionFormat,wrapLongitude:e.wrapLongitude,resolution:this.context.viewport.resolution,dataChanged:n.dataChanged}),this.setState({numInstances:t.instanceCount,startIndices:t.vertexStarts}),n.dataChanged||r.invalidateAll()}if(n.extensionsChanged){var i;const{gl:t}=this.context;null===(i=this.state.model)||void 0===i||i.delete(),this.state.model=this._getModel(t),r.invalidateAll()}}getPickingInfo(t){const e=super.getPickingInfo(t),{index:n}=e,{data:r}=this.props;return r[0]&&r[0].__source&&(e.object=r.find((t=>t.__source.index===n))),e}disablePickingIndex(t){const{data:e}=this.props;if(e[0]&&e[0].__source)for(let n=0;n<e.length;n++)e[n].__source.index===t&&this._disablePickingIndex(n);else this._disablePickingIndex(t)}draw({uniforms:t}){const{jointRounded:e,capRounded:n,billboard:r,miterLimit:i,widthUnits:o,widthScale:s,widthMinPixels:u,widthMaxPixels:c}=this.props;this.state.model.setUniforms(t).setUniforms({jointType:Number(e),capType:Number(n),billboard:r,widthUnits:a.iI[o],widthScale:s,miterLimit:i,widthMinPixels:u,widthMaxPixels:c}).draw()}_getModel(t){return new u.Z(t,{...this.getShaders(),id:this.props.id,geometry:new f({drawMode:4,attributes:{indices:new Uint16Array([0,1,2,1,4,2,1,3,4,3,5,4]),positions:{value:new Float32Array([0,0,0,-1,0,1,1,-1,1,1,1,0]),size:2}}}),isInstanced:!0})}calculatePositions(t){const{pathTesselator:e}=this.state;t.startIndices=e.vertexStarts,t.value=e.get("positions")}calculateSegmentTypes(t){const{pathTesselator:e}=this.state;t.startIndices=e.vertexStarts,t.value=e.get("segmentTypes")}}k.layerName="PathLayer",k.defaultProps=C;class R extends k{getShaders(){const t=super.getShaders();return t.inject={"vs:#decl":"uniform float trailLength;\nattribute float instanceTimestamps;\nattribute float instanceNextTimestamps;\nvarying float vTime;\n","vs:#main-end":"vTime = instanceTimestamps + (instanceNextTimestamps - instanceTimestamps) * vPathPosition.y / vPathLength;\n","fs:#decl":"uniform bool fadeTrail;\nuniform float trailLength;\nuniform float currentTime;\nvarying float vTime;\n","fs:#main-start":"if(vTime > currentTime || (fadeTrail && (vTime < currentTime - trailLength))) {\n discard;\n}\n","fs:DECKGL_FILTER_COLOR":"if(fadeTrail) {\n color.a *= 1.0 - (currentTime - vTime) / trailLength;\n}\n"},t}initializeState(t){super.initializeState(t);this.getAttributeManager().addInstanced({timestamps:{size:1,accessor:"getTimestamps",shaderAttributes:{instanceTimestamps:{vertexOffset:0},instanceNextTimestamps:{vertexOffset:1}}}})}draw(t){const{fadeTrail:e,trailLength:n,currentTime:r}=this.props;t.uniforms={...t.uniforms,fadeTrail:e,trailLength:n,currentTime:r},super.draw(t)}}R.layerName="TripsLayer",R.defaultProps={fadeTrail:!0,trailLength:{type:"number",value:120,min:0},currentTime:{type:"number",value:0,min:0},getTimestamps:{type:"accessor",value:null}}},8203:function(t,e,n){"use strict";n.d(e,{Z:function(){return mn}});var r={};n.r(r),n.d(r,{decode:function(){return Ae},encode:function(){return Se}});var i={};n.r(i),n.d(i,{decode:function(){return Ce},encode:function(){return Le}});var o={};n.r(o),n.d(o,{decode:function(){return ke},encode:function(){return Re}});var s={};n.r(s),n.d(s,{decode:function(){return Ie},encode:function(){return je}});var a=n(1069),u=n(3844),c=n(1331),l=n(744),h=n(9450),f="#if (defined(SHADER_TYPE_FRAGMENT) && defined(LIGHTING_FRAGMENT)) || (defined(SHADER_TYPE_VERTEX) && defined(LIGHTING_VERTEX))\n\nstruct AmbientLight {\n vec3 color;\n};\n\nstruct PointLight {\n vec3 color;\n vec3 position;\n vec3 attenuation;\n};\n\nstruct DirectionalLight {\n vec3 color;\n vec3 direction;\n};\n\nuniform AmbientLight lighting_uAmbientLight;\nuniform PointLight lighting_uPointLight[MAX_LIGHTS];\nuniform DirectionalLight lighting_uDirectionalLight[MAX_LIGHTS];\nuniform int lighting_uPointLightCount;\nuniform int lighting_uDirectionalLightCount;\n\nuniform bool lighting_uEnabled;\n\nfloat getPointLightAttenuation(PointLight pointLight, float distance) {\n return pointLight.attenuation.x\n + pointLight.attenuation.y * distance\n + pointLight.attenuation.z * distance * distance;\n}\n\n#endif\n";const d={lightSources:{}};function p({color:t=[0,0,0],intensity:e=1}={}){return t.map((t=>t*e/255))}const g={name:"pbr",vs:"uniform mat4 u_MVPMatrix;\nuniform mat4 u_ModelMatrix;\nuniform mat4 u_NormalMatrix;\n\nvarying vec3 pbr_vPosition;\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n# ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n# else\nvarying vec3 pbr_vNormal;\n# endif\n#endif\n\nvoid pbr_setPositionNormalTangentUV(vec4 position, vec4 normal, vec4 tangent, vec2 uv)\n{\n vec4 pos = u_ModelMatrix * position;\n pbr_vPosition = vec3(pos.xyz) / pos.w;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\n vec3 normalW = normalize(vec3(u_NormalMatrix * vec4(normal.xyz, 0.0)));\n vec3 tangentW = normalize(vec3(u_ModelMatrix * vec4(tangent.xyz, 0.0)));\n vec3 bitangentW = cross(normalW, tangentW) * tangent.w;\n pbr_vTBN = mat3(tangentW, bitangentW, normalW);\n#else\n pbr_vNormal = normalize(vec3(u_ModelMatrix * vec4(normal.xyz, 0.0)));\n#endif\n#endif\n\n#ifdef HAS_UV\n pbr_vUV = uv;\n#else\n pbr_vUV = vec2(0.,0.);\n#endif\n}\n",fs:"#if defined(USE_TEX_LOD) && !defined(FEATURE_GLSL_TEXTURE_LOD)\n# error PBR fragment shader: Texture LOD is not available\n#endif\n\n#if !defined(HAS_TANGENTS) && !defined(FEATURE_GLSL_DERIVATIVES)\n# error PBR fragment shader: Derivatives are not available\n#endif\n\n\n#if (__VERSION__ < 300)\n #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL1COND; INCR)\n#else\n #define SMART_FOR(INIT, WEBGL1COND, WEBGL2COND, INCR) for (INIT; WEBGL2COND; INCR)\n#endif\n\nprecision highp float;\n\nuniform bool pbr_uUnlit;\n\n#ifdef USE_IBL\nuniform samplerCube u_DiffuseEnvSampler;\nuniform samplerCube u_SpecularEnvSampler;\nuniform sampler2D u_brdfLUT;\nuniform vec2 u_ScaleIBLAmbient;\n#endif\n\n#ifdef HAS_BASECOLORMAP\nuniform sampler2D u_BaseColorSampler;\n#endif\n#ifdef HAS_NORMALMAP\nuniform sampler2D u_NormalSampler;\nuniform float u_NormalScale;\n#endif\n#ifdef HAS_EMISSIVEMAP\nuniform sampler2D u_EmissiveSampler;\nuniform vec3 u_EmissiveFactor;
1\n#endif\n#ifdef HAS_METALROUGHNESSMAP\nuniform sampler2D u_MetallicRoughnessSampler;\n#endif\n#ifdef HAS_OCCLUSIONMAP\nuniform sampler2D u_OcclusionSampler;\nuniform float u_OcclusionStrength;\n#endif\n\n#ifdef ALPHA_CUTOFF\nuniform float u_AlphaCutoff;\n#endif\n\nuniform vec2 u_MetallicRoughnessValues;\nuniform vec4 u_BaseColorFactor;\n\nuniform vec3 u_Camera;\n#ifdef PBR_DEBUG\nuniform vec4 u_ScaleDiffBaseMR;\nuniform vec4 u_ScaleFGDSpec;\n#endif\n\nvarying vec3 pbr_vPosition;\n\nvarying vec2 pbr_vUV;\n\n#ifdef HAS_NORMALS\n#ifdef HAS_TANGENTS\nvarying mat3 pbr_vTBN;\n#else\nvarying vec3 pbr_vNormal;\n#endif\n#endif\n\n\nstruct PBRInfo\n{\n float NdotL;\n float NdotV;\n float NdotH;\n float LdotH;\n float VdotH;\n float perceptualRoughness;\n float metalness;\n vec3 reflectance0;\n vec3 reflectance90;\n float alphaRoughness;\n vec3 diffuseColor;\n vec3 specularColor;\n vec3 n;\n vec3 v;\n};\n\nconst float M_PI = 3.141592653589793;\nconst float c_MinRoughness = 0.04;\n\nvec4 SRGBtoLINEAR(vec4 srgbIn)\n{\n#ifdef MANUAL_SRGB\n#ifdef SRGB_FAST_APPROXIMATION\n vec3 linOut = pow(srgbIn.xyz,vec3(2.2));\n#else\n vec3 bLess = step(vec3(0.04045),srgbIn.xyz);\n vec3 linOut = mix( srgbIn.xyz/vec3(12.92), pow((srgbIn.xyz+vec3(0.055))/vec3(1.055),vec3(2.4)), bLess );\n#endif\n return vec4(linOut,srgbIn.w);;\n#else\n return srgbIn;\n#endif\n}\n\nvec3 getNormal()\n{\n#ifndef HAS_TANGENTS\n vec3 pos_dx = dFdx(pbr_vPosition);\n vec3 pos_dy = dFdy(pbr_vPosition);\n vec3 tex_dx = dFdx(vec3(pbr_vUV, 0.0));\n vec3 tex_dy = dFdy(vec3(pbr_vUV, 0.0));\n vec3 t = (tex_dy.t * pos_dx - tex_dx.t * pos_dy) / (tex_dx.s * tex_dy.t - tex_dy.s * tex_dx.t);\n\n#ifdef HAS_NORMALS\n vec3 ng = normalize(pbr_vNormal);\n#else\n vec3 ng = cross(pos_dx, pos_dy);\n#endif\n\n t = normalize(t - ng * dot(ng, t));\n vec3 b = normalize(cross(ng, t));\n mat3 tbn = mat3(t, b, ng);\n#else\n mat3 tbn = pbr_vTBN;\n#endif\n\n#ifdef HAS_NORMALMAP\n vec3 n = texture2D(u_NormalSampler, pbr_vUV).rgb;\n n = normalize(tbn * ((2.0 * n - 1.0) * vec3(u_NormalScale, u_NormalScale, 1.0)));\n#else\n vec3 n = normalize(tbn[2].xyz);\n#endif\n\n return n;\n}\n\n\n#ifdef USE_IBL\nvec3 getIBLContribution(PBRInfo pbrInputs, vec3 n, vec3 reflection)\n{\n float mipCount = 9.0;\n float lod = (pbrInputs.perceptualRoughness * mipCount);\n vec3 brdf = SRGBtoLINEAR(texture2D(u_brdfLUT,\n vec2(pbrInputs.NdotV, 1.0 - pbrInputs.perceptualRoughness))).rgb;\n vec3 diffuseLight = SRGBtoLINEAR(textureCube(u_DiffuseEnvSampler, n)).rgb;\n\n#ifdef USE_TEX_LOD\n vec3 specularLight = SRGBtoLINEAR(textureCubeLod(u_SpecularEnvSampler, reflection, lod)).rgb;\n#else\n vec3 specularLight = SRGBtoLINEAR(textureCube(u_SpecularEnvSampler, reflection)).rgb;\n#endif\n\n vec3 diffuse = diffuseLight * pbrInputs.diffuseColor;\n vec3 specular = specularLight * (pbrInputs.specularColor * brdf.x + brdf.y);\n diffuse *= u_ScaleIBLAmbient.x;\n specular *= u_ScaleIBLAmbient.y;\n\n return diffuse + specular;\n}\n#endif\n\n\nvec3 diffuse(PBRInfo pbrInputs)\n{\n return pbrInputs.diffuseColor / M_PI;\n}\n\nvec3 specularReflection(PBRInfo pbrInputs)\n{\n return pbrInputs.reflectance0 +\n (pbrInputs.reflectance90 - pbrInputs.reflectance0) *\n pow(clamp(1.0 - pbrInputs.VdotH, 0.0, 1.0), 5.0);\n}\n\n\n\nfloat geometricOcclusion(PBRInfo pbrInputs)\n{\n float NdotL = pbrInputs.NdotL;\n float NdotV = pbrInputs.NdotV;\n float r = pbrInputs.alphaRoughness;\n\n float attenuationL = 2.0 * NdotL / (NdotL + sqrt(r * r + (1.0 - r * r) * (NdotL * NdotL)));\n float attenuationV = 2.0 * NdotV / (NdotV + sqrt(r * r + (1.0 - r * r) * (NdotV * NdotV)));\n return attenuationL * attenuationV;\n}\n\n\n\n\n\nfloat microfacetDistribution(PBRInfo pbrInputs)\n{\n float roughnessSq = pbrInputs.alphaRoughness * pbrInputs.alphaRoughness;\n float f = (pbrInputs.NdotH * roughnessSq - pbrInputs.NdotH) * pbrInputs.NdotH + 1.0;\n return roughnessSq / (M_PI * f * f);\n}\n\nvoid PBRInfo_setAmbientLight(inout PBRInfo pbrInputs) {\n pbrInputs.NdotL = 1.0;\n pbrInputs.NdotH = 0.0;\n pbrInputs.LdotH = 0.0;\n pbrInputs.VdotH = 1.0;\n}\n\nvoid PBRInfo_setDirectionalLight(inout PBRInfo pbrInputs, vec3 lightDirection) {\n vec3 n = pbrInputs.n;\n vec3 v = pbrInputs.v;\n vec3 l = normalize(lightDirection);\n vec3 h = normalize(l+v);\n\n pbrInputs.NdotL = clamp(dot(n, l), 0.001, 1.0);\n pbrInputs.NdotH = clamp(dot(n, h), 0.0, 1.0);\n pbrInputs.LdotH = clamp(dot(l, h), 0.0, 1.0);\n pbrInputs.VdotH = clamp(dot(v, h), 0.0, 1.0);\n}\n\nvoid PBRInfo_setPointLight(inout PBRInfo pbrInputs, PointLight pointLight) {\n vec3 light_direction = normalize(pointLight.position - pbr_vPosition);\n PBRInfo_setDirectionalLight(pbrInputs, light_direction);\n}\n\nvec3 calculateFinalColor(PBRInfo pbrInputs, vec3 lightColor) {\n vec3 F = specularReflection(pbrInputs);\n float G = geometricOcclusion(pbrInputs);\n float D = microfacetDistribution(pbrInputs);\n vec3 diffuseContrib = (1.0 - F) * diffuse(pbrInputs);\n vec3 specContrib = F * G * D / (4.0 * pbrInputs.NdotL * pbrInputs.NdotV);\n return pbrInputs.NdotL * lightColor * (diffuseContrib + specContrib);\n}\n\nvec4 pbr_filterColor(vec4 colorUnused)\n{\n#ifdef HAS_BASECOLORMAP\n vec4 baseColor = SRGBtoLINEAR(texture2D(u_BaseColorSampler, pbr_vUV)) * u_BaseColorFactor;
1\n#else\n vec4 baseColor = u_BaseColorFactor;\n#endif\n\n#ifdef ALPHA_CUTOFF\n if (baseColor.a < u_AlphaCutoff) {\n discard;\n }\n#endif\n\n vec3 color = vec3(0, 0, 0);\n\n if(pbr_uUnlit){\n color.rgb = baseColor.rgb;\n }\n else{\n\n\n float perceptualRoughness = u_MetallicRoughnessValues.y;\n float metallic = u_MetallicRoughnessValues.x;\n#ifdef HAS_METALROUGHNESSMAP\n\n vec4 mrSample = texture2D(u_MetallicRoughnessSampler, pbr_vUV);\n perceptualRoughness = mrSample.g * perceptualRoughness;\n metallic = mrSample.b * metallic;\n#endif\n perceptualRoughness = clamp(perceptualRoughness, c_MinRoughness, 1.0);\n metallic = clamp(metallic, 0.0, 1.0);\n\n float alphaRoughness = perceptualRoughness * perceptualRoughness;\n\n vec3 f0 = vec3(0.04);\n vec3 diffuseColor = baseColor.rgb * (vec3(1.0) - f0);\n diffuseColor *= 1.0 - metallic;\n vec3 specularColor = mix(f0, baseColor.rgb, metallic);\n float reflectance = max(max(specularColor.r, specularColor.g), specularColor.b);\n\n\n\n float reflectance90 = clamp(reflectance * 25.0, 0.0, 1.0);\n vec3 specularEnvironmentR0 = specularColor.rgb;\n vec3 specularEnvironmentR90 = vec3(1.0, 1.0, 1.0) * reflectance90;\n\n vec3 n = getNormal();\n vec3 v = normalize(u_Camera - pbr_vPosition);\n\n float NdotV = clamp(abs(dot(n, v)), 0.001, 1.0);\n vec3 reflection = -normalize(reflect(v, n));\n\n PBRInfo pbrInputs = PBRInfo(\n 0.0,\n NdotV,\n 0.0,\n 0.0,\n 0.0,\n perceptualRoughness,\n metallic,\n specularEnvironmentR0,\n specularEnvironmentR90,\n alphaRoughness,\n diffuseColor,\n specularColor,\n n,\n v\n );\n\n#ifdef USE_LIGHTS\n PBRInfo_setAmbientLight(pbrInputs);\n color += calculateFinalColor(pbrInputs, lighting_uAmbientLight.color);\n SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uDirectionalLightCount, i++) {\n if (i < lighting_uDirectionalLightCount) {\n PBRInfo_setDirectionalLight(pbrInputs, lighting_uDirectionalLight[i].direction);\n color += calculateFinalColor(pbrInputs, lighting_uDirectionalLight[i].color);\n }\n }\n SMART_FOR(int i = 0, i < MAX_LIGHTS, i < lighting_uPointLightCount, i++) {\n if (i < lighting_uPointLightCount) {\n PBRInfo_setPointLight(pbrInputs, lighting_uPointLight[i]);\n float attenuation = getPointLightAttenuation(lighting_uPointLight[i], distance(lighting_uPointLight[i].position, pbr_vPosition));\n color += calculateFinalColor(pbrInputs, lighting_uPointLight[i].color / attenuation);\n }\n }\n#endif\n#ifdef USE_IBL\n color += getIBLContribution(pbrInputs, n, reflection);\n#endif\n#ifdef HAS_OCCLUSIONMAP\n float ao = texture2D(u_OcclusionSampler, pbr_vUV).r;\n color = mix(color, color * ao, u_OcclusionStrength);\n#endif\n\n#ifdef HAS_EMISSIVEMAP\n vec3 emissive = SRGBtoLINEAR(texture2D(u_EmissiveSampler, pbr_vUV)).rgb * u_EmissiveFactor;\n color += emissive;\n#endif\n\n#ifdef PBR_DEBUG\n\n\n\n\n\n color = mix(color, baseColor.rgb, u_ScaleDiffBaseMR.y);\n color = mix(color, vec3(metallic), u_ScaleDiffBaseMR.z);\n color = mix(color, vec3(perceptualRoughness), u_ScaleDiffBaseMR.w);\n#endif\n\n }\n\n return vec4(pow(color,vec3(1.0/2.2)), baseColor.a);\n}\n",defines:{LIGHTING_FRAGMENT:1},dependencies:[{name:"lights",vs:f,fs:f,getUniforms:function t(e=d){if("lightSources"in e){const{ambientLight:t,pointLights:n,directionalLights:r}=e.lightSources||{};return t||n&&n.length>0||r&&r.length>0?Object.assign({},function({ambientLight:t,pointLights:e=[],directionalLights:n=[]}){const r={};return r["lighting_uAmbientLight.color"]=t?p(t):[0,0,0],e.forEach(((t,e)=>{r[`lighting_uPointLight[${e}].color`]=p(t),r[`lighting_uPointLight[${e}].position`]=t.position,r[`lighting_uPointLight[${e}].attenuation`]=t.attenuation||[1,0,0]})),r.lighting_uPointLightCount=e.length,n.forEach(((t,e)=>{r[`lighting_uDirectionalLight[${e}].color`]=p(t),r[`lighting_uDirectionalLight[${e}].direction`]=t.direction})),r.lighting_uDirectionalLightCount=n.length,r}({ambientLight:t,pointLights:n,directionalLights:r}),{lighting_uEnabled:!0}):{lighting_uEnabled:!1}}if("lights"in e){const n={pointLights:[],directionalLights:[]};for(const t of e.lights||[])switch(t.type){case"ambient":n.ambientLight=t;break;case"directional":n.directionalLights.push(t);break;case"point":n.pointLights.push(t)}return t({lightSources:n})}return{}},defines:{MAX_LIGHTS:3}}]};var m=n(1681),v=n(7293),y=n(4538),b=n(2525);class _{constructor(t={}){const{id:e}=t;this.id=e||(0,y.hQ)(this.constructor.name),this.display=!0,this.position=new m.Z,this.rotation=new m.Z,this.scale=new m.Z(1,1,1),this.matrix=new v.Z,this.userData={},this.props={},this._setScenegraphNodeProps(t)}delete(){}setProps(t){return this._setScenegraphNodeProps(t),this}toString(){return`{type: ScenegraphNode, id: ${this.id})}`}setPosition(t){return(0,b.h)(3===t.length,"setPosition requires vector argument"),this.position=t,this}setRotation(t){return(0,b.h)(3===t.length,"setRotation requires vector argument"),this.rotation=t,this}setScale(t){return(0,b.h)(3===t.length,"setScale requires vector argument"),this.scale=t,this}setMatrix(t,e=!0){e?this.matrix.copy(t):this.matrix=t}setMatrixComponents({position:t,rotation:e,scale:n,update:r=!0}){return t&&this.setPosition(t),e&&this.setRotation(e),n&&this.setScale(n),r&&this.updateMatrix(),this}updateMatrix(){const t=this.position,e=this.rotation,n=this.scale;return this.matrix.identity(),this.matrix.translate(t),this.matrix.rotateXYZ(e),this.matrix.scale(n),this}update(t={}){const{position:e,rotation:n,scale:r}=t;return e&&this.setPosition(e),n&&this.setRotation(n),r&&this.setScale(r),this.updateMatrix(),this}getCoordinateUniforms(t,e){(0,b.h)(t),e=e||this.matrix;const n=new v.Z(t).multiplyRight(e),r=n.invert(),i=r.transpose();return{viewMatrix:t,modelMatrix:e,objectMatrix:e,worldMatrix:n,worldInverseMatrix:r,worldInverseTransposeMatrix:i}}_setScenegraphNodeProps(t){"display"in t&&(this.display=t.display),"position"in t&&this.setPosition(t.position),"rotation"in t&&this.setRotation(t.rotation),"scale"in t&&this.setScale(t.scale),"matrix"in t&&this.setMatrix(t.matrix),Object.assign(this.props,t)}}var w=n(3478),x=n(4072);class E extends _{constructor(t={}){t=Array.isArray(t)?{children:t}:t;const{children:e=[]}=t;h.cM.assert(e.every((t=>t instanceof _)),"every child must an instance of ScenegraphNode"),super(t),this.children=e}add(...t){for(const e of t)Array.isArray(e)?this.add(...e):this.children.push(e);return this}remove(t){const e=this.children,n=e.indexOf(t);return n>-1&&e.splice(n,1),this}removeAll(){return this.children=[],this}
1delete(){this.children.forEach((t=>t.delete())),this.removeAll(),super.delete()}traverse(t,{worldMatrix:e=new v.Z}={}){const n=new v.Z(e).multiplyRight(this.matrix);for(const r of this.children)r instanceof E?r.traverse(t,{worldMatrix:n}):t(r,{worldMatrix:n})}}var T=n(6357),P=n(6281),A=n(394),S=n(9685);var M=n(7160),O=n(8333);function C(){var t=new S.WT(4);return S.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function L(t,e,n){n*=.5;var r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function k(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+s*a+i*c-o*u,t[1]=i*l+s*u+o*a-r*c,t[2]=o*l+s*c+r*u-i*a,t[3]=s*l-r*a-i*u-o*c,t}function R(t,e,n,r){var i,o,s,a,u,c=e[0],l=e[1],h=e[2],f=e[3],d=n[0],p=n[1],g=n[2],m=n[3];return(o=c*d+l*p+h*g+f*m)<0&&(o=-o,d=-d,p=-p,g=-g,m=-m),1-o>S.Ib?(i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-r)*i)/s,u=Math.sin(r*i)/s):(a=1-r,u=r),t[0]=a*c+u*d,t[1]=a*l+u*p,t[2]=a*h+u*g,t[3]=a*f+u*m,t}function I(t,e){var n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;n=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*s+s]+1),t[i]=.5*n,n=.5/n,t[3]=(e[3*o+s]-e[3*s+o])*n,t[o]=(e[3*o+i]+e[3*i+o])*n,t[s]=(e[3*s+i]+e[3*i+s])*n}return t}O.d9,O.al,O.JG,O.t8;var j=O.IH,D=O.bA,N=O.AK,F=O.t7,B=O.kE,U=O.we,z=O.Fv,V=(O.I6,O.fS,function(){var t=M.Ue(),e=M.al(1,0,0),n=M.al(0,1,0);return function(r,i,o){var s=M.AK(i,o);return s<-.999999?(M.kC(t,e,i),M.Zh(t)<1e-6&&M.kC(t,n,i),M.Fv(t,t),L(r,t,Math.PI),r):s>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(M.kC(t,i,o),r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=1+s,z(r,r))}}());(function(){var t=C(),e=C()})(),function(){var t=function(){var t=new S.WT(9);return S.WT!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}()}();const Z=[0,0,0,1];class G extends T.Z{constructor(t=0,e=0,n=0,r=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,n,r)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,n,r){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this.check()}fromMatrix3(t){return I(this,t),this.check()}identity(){var t;return(t=this)[0]=0,t[1]=0,t[2]=0,t[3]=1,this.check()}fromAxisRotation(t,e){return L(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=(0,P.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,P.u5)(t)}get z(){return this[2]}set z(t){this[2]=(0,P.u5)(t)}get w(){return this[3]}set w(t){this[3]=(0,P.u5)(t)}len(){return B(this)}lengthSquared(){return U(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return N(this,t)}rotationTo(t,e){return V(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return j(this,this,t),this.check()}calculateW(){return function(t,e){var n=e[0],r=e[1],i=e[2];t[0]=n,t[1]=r,t[2]=i,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-i*i))}(this,this),this.check()}conjugate(){var t,e;return e=this,(t=this)[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],this.check()}invert(){return function(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n*n+r*r+i*i+o*o,a=s?1/s:0;t[0]=-n*a,t[1]=-r*a,t[2]=-i*a,t[3]=o*a}(this,this),this.check()}lerp(t,e,n){return F(this,t,e,n),this.check()}multiplyRight(t,e){return(0,A.Z)(!e),k(this,this,t),this.check()}multiplyLeft(t,e){return(0,A.Z)(!e),k(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(n),u=Math.cos(n);t[0]=r*u+s*a,t[1]=i*u+o*a,t[2]=o*u-i*a,t[3]=s*u-r*a}(this,this,t),this.check()}rotateY(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(n),u=Math.cos(n);t[0]=r*u-o*a,t[1]=i*u+s*a,t[2]=o*u+r*a,t[3]=s*u-i*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,n){n*=.5;var r=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(n),u=Math.cos(n);t[0]=r*u+i*a,t[1]=i*u-r*a,t[2]=o*u+s*a,t[3]=s*u-o*a}(this,this,t),this.check()}scale(t){return D(this,this,t),this.check()}slerp(t,e,n){switch(arguments.length){case 1:({start:t=Z,target:e,ratio:n}=arguments[0]);break;case 2:[e,n]=arguments,t=this}return R(this,t,e,n),this.check()}transformVector4(t,e=t){return O.VC(e,t,this),(0,P.IL)(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}const H={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},W={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function $(t){if(!t._animation){const e=W[t.componentType],n=H[t.type],r=n*t.count,{buffer:i,byteOffset:o}=t.bufferView.data,s=new e(i,o+(t.byteOffset||0),r);if(1===n)t._animation=Array.from(s);else{const e=[];for(let t=0;t<s.length;t+=n)e.push(Array.from(s.slice(t,t+n)));t._animation=e}}return t._animation}const q=new v.Z;const X=new G;function Y(t,{input:e,interpolation:n,output:r},i,o){const s=t%e[e.length-1],a=e.findIndex((t=>t>=s)),u=Math.max(0,a-1);if(!Array.isArray(i[o]))switch(o){case"translation":i[o]=[0,0,0];break;case"rotation":i[o]=[0,0,0,1];break;case"scale":i[o]=[1,1,1];break;default:h.cM.warn(`Bad animation path ${o}`)()}(0,b.h)(i[o].length===r[u].length);const c=e[u],l=e[a];switch(n){case"STEP":!function(t,e,n){for(let r=0;r<n.length;r++)t[e][r]=n[r]}(i,o,r[u]);break;case"LINEAR":if(l>c){const t=(s-c)/(l-c);!function(t,e,n,r,i){if("rotation"===e){X.slerp({start:n,target:r,ratio:i});for(let n=0;n<X.length;n++)t[e][n]=X[n]}else for(let o=0;o<n.length;o++)t[e][o]=i*r[o]+(1-i)*n[o]}(i,o,r[u],r[a],t)}break;case"CUBICSPLINE":if(l>c){const t=(s-c)/(l-c),e=l-c;!function(t,e,{p0:n,outTangent0:r,inTangent1:i,p1:o,tDiff:s,ratio:a}){for(let u=0;u<t[e].length;u++){const c=r[u]*s,l=i[u]*s;t[e][u]=(2*Math.pow(a,3)-3*Math.pow(a,2)+1)*n[u]+(Math.pow(a,3)-2*Math.pow(a,2)+a)*c+(-2*Math.pow(a,3)+3*Math.pow(a,2))*o[u]+(Math.pow(a,3)-Math.pow(a,2))*l}}(i,o,{p0:r[3*u+1],outTangent0:r[3*u+2],inTangent1:r[3*a+0],p1:r[3*a+1],tDiff:e,ratio:t})}break;default:h.cM.warn(`Interpolation ${n} not supported`)()}}class K{constructor(t){this.startTime=0,this.playing=!0,this.speed=1,this.channels=[],Object.assign(this,t)}animate(t){if(!this.playing)return;const e=(t/1e3-this.startTime)*this.speed;
1this.channels.forEach((({sampler:t,target:n,path:r})=>{Y(e,t,n,r),function(t,e){if(e.matrix.identity(),t.translation&&e.matrix.translate(t.translation),t.rotation){const n=q.fromQuaternion(t.rotation);e.matrix.multiplyRight(n)}t.scale&&e.matrix.scale(t.scale)}(n,n._node)}))}}class Q{constructor(t){this.animations=t.animations.map(((e,n)=>{const r=e.name||`Animation-${n}`,i=e.samplers.map((({input:e,interpolation:n="LINEAR",output:r})=>({input:$(t.accessors[e]),interpolation:n,output:$(t.accessors[r])}))),o=e.channels.map((({sampler:e,target:n})=>({sampler:i[e],target:t.nodes[n.node],path:n.path})));return new K({name:r,channels:o})}))}animate(t){this.setTime(t)}setTime(t){this.animations.forEach((e=>e.animate(t)))}getAnimations(){return this.animations}}var J=n(1113);class tt extends _{constructor(t,e={}){super(e),this.onBeforeRender=null,this.AfterRender=null,t instanceof J.Z?(this.model=t,this._setModelNodeProps(e)):this.model=new J.Z(t,e),this.managedResources=e.managedResources||[]}setProps(t){return super.setProps(t),this._setModelNodeProps(t),this}delete(){this.model&&(this.model.delete(),this.model=null),this.managedResources.forEach((t=>t.delete())),this.managedResources=[]}draw(...t){return this.model.draw(...t)}setUniforms(...t){return this.model.setUniforms(...t),this}setAttributes(...t){return this.model.setAttributes(...t),this}updateModuleSettings(...t){return this.model.updateModuleSettings(...t),this}_setModelNodeProps(t){this.model.setProps(t)}}var et=n(4211),nt=n(6948),rt=n(4912);class it{constructor(t,{attributes:e,material:n,pbrDebug:r,imageBasedLightingEnvironment:i,lights:o,useTangents:s}){this.gl=t,this.defines={MANUAL_SRGB:1,SRGB_FAST_APPROXIMATION:1},(0,et.U6)(t,nt.h.GLSL_TEXTURE_LOD)&&(this.defines.USE_TEX_LOD=1),this.uniforms={u_Camera:[0,0,0],u_MetallicRoughnessValues:[1,1]},this.parameters={},this.generatedTextures=[],i&&(this.uniforms.u_DiffuseEnvSampler=i.getDiffuseEnvSampler(),this.uniforms.u_SpecularEnvSampler=i.getSpecularEnvSampler(),this.uniforms.u_brdfLUT=i.getBrdfTexture(),this.uniforms.u_ScaleIBLAmbient=[1,1]),r&&(this.uniforms.u_ScaleDiffBaseMR=[0,0,0,0],this.uniforms.u_ScaleFGDSpec=[0,0,0,0]),this.defineIfPresent(e.NORMAL,"HAS_NORMALS"),this.defineIfPresent(e.TANGENT&&s,"HAS_TANGENTS"),this.defineIfPresent(e.TEXCOORD_0,"HAS_UV"),this.defineIfPresent(i,"USE_IBL"),this.defineIfPresent(o,"USE_LIGHTS"),this.defineIfPresent(r,"PBR_DEBUG"),n&&this.parseMaterial(n)}defineIfPresent(t,e){t&&(this.defines[e]=1)}parseTexture(t,e,n=null){const r=t.texture&&t.texture.sampler&&t.texture.sampler.parameters||{},i=t.texture.source.image;let o,s={};i.compressed?(o=i,s={[this.gl.TEXTURE_MIN_FILTER]:i.data.length>1?this.gl.LINEAR_MIPMAP_NEAREST:this.gl.LINEAR}):o={data:i};const a=new rt.Z(this.gl,{id:t.name||t.id,parameters:{...r,...s},pixelStore:{[this.gl.UNPACK_FLIP_Y_WEBGL]:!1},...o});this.uniforms[e]=a,this.defineIfPresent(n,n),this.generatedTextures.push(a)}parsePbrMetallicRoughness(t){t.baseColorTexture&&this.parseTexture(t.baseColorTexture,"u_BaseColorSampler","HAS_BASECOLORMAP"),this.uniforms.u_BaseColorFactor=t.baseColorFactor||[1,1,1,1],t.metallicRoughnessTexture&&this.parseTexture(t.metallicRoughnessTexture,"u_MetallicRoughnessSampler","HAS_METALROUGHNESSMAP");const{metallicFactor:e=1,roughnessFactor:n=1}=t;this.uniforms.u_MetallicRoughnessValues=[e,n]}parseMaterial(t){if(this.uniforms.pbr_uUnlit=Boolean(t.unlit),t.pbrMetallicRoughness&&this.parsePbrMetallicRoughness(t.pbrMetallicRoughness),t.normalTexture){this.parseTexture(t.normalTexture,"u_NormalSampler","HAS_NORMALMAP");const{scale:e=1}=t.normalTexture;this.uniforms.u_NormalScale=e}if(t.occlusionTexture){this.parseTexture(t.occlusionTexture,"u_OcclusionSampler","HAS_OCCLUSIONMAP");const{strength:e=1}=t.occlusionTexture;this.uniforms.u_OcclusionStrength=e}if(t.emissiveTexture&&(this.parseTexture(t.emissiveTexture,"u_EmissiveSampler","HAS_EMISSIVEMAP"),this.uniforms.u_EmissiveFactor=t.emissiveFactor||[0,0,0]),"MASK"===t.alphaMode){const{alphaCutoff:e=.5}=t;this.defines.ALPHA_CUTOFF=1,this.uniforms.u_AlphaCutoff=e}else"BLEND"===t.alphaMode&&(h.cM.warn("BLEND alphaMode might not work well because it requires mesh sorting")(),Object.assign(this.parameters,{blend:!0,blendEquation:this.gl.FUNC_ADD,blendFunc:[this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA,this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA]}))}}
1function ot(t,e){return(0,h.D0)(t)?`#version 300 es\n${e}`:e}const st={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},at={modelOptions:{},pbrDebug:!1,imageBasedLightingEnvironment:null,lights:!0,useTangents:!1};class ut{constructor(t,e={}){this.gl=t,this.options=Object.assign({},at,e)}instantiate(t){this.gltf=t;return(t.scenes||[]).map((t=>this.createScene(t)))}createAnimator(){return Array.isArray(this.gltf.animations)?new Q(this.gltf):null}createScene(t){const e=(t.nodes||[]).map((t=>this.createNode(t)));return new E({id:t.name||t.id,children:e})}createNode(t){if(!t._node){const e=(t.children||[]).map((t=>this.createNode(t)));t.mesh&&e.push(this.createMesh(t.mesh));const n=new E({id:t.name||t.id,children:e});if(t.matrix)n.setMatrix(t.matrix);else{if(n.matrix.identity(),t.translation&&n.matrix.translate(t.translation),t.rotation){const e=(new v.Z).fromQuaternion(t.rotation);n.matrix.multiplyRight(e)}t.scale&&n.matrix.scale(t.scale)}t._node=n}return t._node}createMesh(t){if(!t._mesh){const e=(t.primitives||[]).map(((e,n)=>this.createPrimitive(e,n,t))),n=new E({id:t.name||t.id,children:e});t._mesh=n}return t._mesh}getVertexCount(t){h.cM.warn("getVertexCount() not found")()}createPrimitive(t,e,n){return function(t,e){const{id:n,drawMode:r,vertexCount:i,attributes:o,modelOptions:s}=e,a=new it(t,e);h.cM.info(4,"createGLTFModel defines: ",a.defines)();const u=[];u.push(...a.generatedTextures),u.push(...Object.values(o).map((t=>t.buffer)));const c=new tt(t,Object.assign({id:n,drawMode:r,vertexCount:i,modules:[g],defines:a.defines,parameters:a.parameters,vs:ot(t,"\n#if (__VERSION__ < 300)\n #define _attr attribute\n#else\n #define _attr in\n#endif\n\n _attr vec4 POSITION;\n\n #ifdef HAS_NORMALS\n _attr vec4 NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _attr vec4 TANGENT;\n #endif\n\n #ifdef HAS_UV\n _attr vec2 TEXCOORD_0;\n #endif\n\n void main(void) {\n vec4 _NORMAL = vec4(0.);\n vec4 _TANGENT = vec4(0.);\n vec2 _TEXCOORD_0 = vec2(0.);\n\n #ifdef HAS_NORMALS\n _NORMAL = NORMAL;\n #endif\n\n #ifdef HAS_TANGENTS\n _TANGENT = TANGENT;\n #endif\n\n #ifdef HAS_UV\n _TEXCOORD_0 = TEXCOORD_0;\n #endif\n\n pbr_setPositionNormalTangentUV(POSITION, _NORMAL, _TANGENT, _TEXCOORD_0);\n gl_Position = u_MVPMatrix * POSITION;\n }\n"),fs:ot(t,"\n#if (__VERSION__ < 300)\n #define fragmentColor gl_FragColor\n#else\n out vec4 fragmentColor;\n#endif\n\n void main(void) {\n fragmentColor = pbr_filterColor(vec4(0));\n }\n"),managedResources:u},s));return c.setProps({attributes:o}),c.setUniforms(a.uniforms),c}(this.gl,Object.assign({id:t.name||`${n.name||n.id}-primitive-${e}`,drawMode:t.mode||4,vertexCount:t.indices?t.indices.count:this.getVertexCount(t.attributes),attributes:this.createAttributes(t.attributes,t.indices),material:t.material},this.options))}createAttributes(t,e){const n={};return Object.keys(t).forEach((e=>{n[e]=this.createAccessor(t[e],this.createBuffer(t[e],this.gl.ARRAY_BUFFER))})),e&&(n.indices=this.createAccessor(e,this.createBuffer(e,this.gl.ELEMENT_ARRAY_BUFFER))),h.cM.info(4,"glTF Attributes",{attributes:t,indices:e,generated:n})(),n}createBuffer(t,e){t.bufferView||(t.bufferView={});const{bufferView:n}=t;return n.lumaBuffers||(n.lumaBuffers={}),n.lumaBuffers[e]||(n.lumaBuffers[e]=new w.Z(this.gl,{id:`from-${n.id}`,data:n.data||t.value,target:e})),n.lumaBuffers[e]}createAccessor(t,e){return new x.Z({buffer:e,offset:t.byteOffset||0,stride:t.bufferView.byteStride||0,type:t.componentType,size:st[t.type]})}createSampler(t){return t}needsPOT(){return!1}}var ct=n(2378);function lt(t,e,n){if(t.byteLength<=e+n)return"";const r=new DataView(t);let i="";for(let o=0;o<n;o++)i+=String.fromCharCode(r.getUint8(e+o));return i}function ht(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${function(t,e=5){if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return lt(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer)return lt(t,0,e);return""}(t)}"`)}}var ft=n(5680);function dt(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function pt(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const n=e.baseUri||e.uri;if(!n)throw new Error(`'baseUri' must be provided to resolve relative url ${t}`);return n.substr(0,n.lastIndexOf("/")+1)+t}function gt(t,e,n){const r=t.bufferViews[n];dt(r);const i=e[r.buffer];dt(i);const o=(r.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,o,r.byteLength)}const mt={name:"Draco",id:"draco",module:"draco",version:"3.0.12",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"===typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};var vt=n(4942);class yt{constructor(t,e){(0,vt.Z)(this,"fields",void 0),(0,vt.Z)(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const n of t)e[n.name]&&console.warn("Schema: duplicated field name",n.name,n),e[n.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const n=this.fields.filter((t=>e[t.name]));return new yt(n,this.metadata)}selectAt(...t){const e=t.map((t=>
1this.fields[t])).filter(Boolean);return new yt(e,this.metadata)}assign(t){let e,n=this.metadata;if(t instanceof yt){const r=t;e=r.fields,n=bt(bt(new Map,this.metadata),r.metadata)}else e=t;const r=Object.create(null);for(const o of this.fields)r[o.name]=o;for(const o of e)r[o.name]=o;const i=Object.values(r);return new yt(i,n)}}function bt(t,e){return new Map([...t||new Map,...e||new Map])}let _t,wt,xt,Et,Tt,Pt,At,St;!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(_t||(_t={}));class Mt{static isNull(t){return t&&t.typeId===_t.Null}static isInt(t){return t&&t.typeId===_t.Int}static isFloat(t){return t&&t.typeId===_t.Float}static isBinary(t){return t&&t.typeId===_t.Binary}static isUtf8(t){return t&&t.typeId===_t.Utf8}static isBool(t){return t&&t.typeId===_t.Bool}static isDecimal(t){return t&&t.typeId===_t.Decimal}static isDate(t){return t&&t.typeId===_t.Date}static isTime(t){return t&&t.typeId===_t.Time}static isTimestamp(t){return t&&t.typeId===_t.Timestamp}static isInterval(t){return t&&t.typeId===_t.Interval}static isList(t){return t&&t.typeId===_t.List}static isStruct(t){return t&&t.typeId===_t.Struct}static isUnion(t){return t&&t.typeId===_t.Union}static isFixedSizeBinary(t){return t&&t.typeId===_t.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===_t.FixedSizeList}static isMap(t){return t&&t.typeId===_t.Map}static isDictionary(t){return t&&t.typeId===_t.Dictionary}get typeId(){return _t.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;wt=Symbol.toStringTag;class Ot extends Mt{constructor(t,e){super(),(0,vt.Z)(this,"isSigned",void 0),(0,vt.Z)(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return _t.Int}get[wt](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class Ct extends Ot{constructor(){super(!0,8)}}class Lt extends Ot{constructor(){super(!0,16)}}class kt extends Ot{constructor(){super(!0,32)}}class Rt extends Ot{constructor(){super(!1,8)}}class It extends Ot{constructor(){super(!1,16)}}class jt extends Ot{constructor(){super(!1,32)}}const Dt=32,Nt=64;xt=Symbol.toStringTag;class Ft extends Mt{constructor(t){super(),(0,vt.Z)(this,"precision",void 0),this.precision=t}get typeId(){return _t.Float}get[xt](){return"Float"}toString(){return`Float${this.precision}`}}class Bt extends Ft{constructor(){super(Dt)}}class Ut extends Ft{constructor(){super(Nt)}}Symbol.toStringTag;Symbol.toStringTag;Et=Symbol.toStringTag;Tt=Symbol.toStringTag;Pt=Symbol.toStringTag;At=Symbol.toStringTag;St=Symbol.toStringTag;class zt extends Mt{constructor(t,e){super(),(0,vt.Z)(this,"listSize",void 0),(0,vt.Z)(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return _t.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[St](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}class Vt{constructor(t,e,n=!1,r=new Map){(0,vt.Z)(this,"name",void 0),(0,vt.Z)(this,"type",void 0),(0,vt.Z)(this,"nullable",void 0),(0,vt.Z)(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=n,this.metadata=r}get typeId(){return this.type&&this.type.typeId}clone(){return new Vt(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?`, metadata: ${this.metadata}`:""}`}}function Zt(t,e,n){const r=n?Gt(n.metadata):void 0,i=function(t){switch(t.constructor){case Int8Array:return new Ct;case Uint8Array:return new Rt;case Int16Array:return new Lt;case Uint16Array:return new It;case Int32Array:return new kt;case Uint32Array:return new jt;case Float32Array:return new Bt;case Float64Array:return new Ut;default:throw new Error("array type not supported")}}(e.value);return new Vt(t,new zt(e.size,new Vt("value",i)),!1,r)}function Gt(t){const e=new Map;for(const n in t)e.set(`${n}.string`,JSON.stringify(t[n]));return e}const Ht={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},Wt={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class $t{constructor(t){(0,vt.Z)(this,"draco",void 0),(0,vt.Z)(this,"decoder",void 0),(0,vt.Z)(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const n=new this.draco.DecoderBuffer;n.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const r=this.decoder.GetEncodedGeometryType(n),i=r===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(r){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(n,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(n,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e=`DRACO decompression failed: ${t.error_msg()}`;throw new Error(e)}const o=this._getDracoLoaderData(i,r,e),s=this._getMeshData(i,o,e),a=function(t){let e=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,s=-1/0;const a=t.POSITION?t.POSITION.value:[],u=a&&a.length;for(let c=0;c<u;c+=3){const t=a[c],u=a[c+1],l=a[c+2];e=t<e?t:e,n=u<n?u:n,r=l<r?l:r,i=t>i?t:i,o=u>o?u:o,s=l>s?l:s}return[[e,n,r],[i,o,s]]}(s.attributes),u=function(t,e,n){const r=Gt(e.metadata),i=[],o=function(t){const e={};for(const n in t){const r=t[n];e[r.name||"undefined"]=r}return e}(e.attributes);for(const s in t){const e=Zt(s,t[s],o[s]);i.push(e)}if(n){const t=Zt("indices",n);i.push(t)}return new yt(i,r)}(s.attributes,o,s.indices);return{loader:"draco",loaderData:o,header:{vertexCount:i.num_points(),boundingBox:a},...s,schema:u}}finally{this.draco.destroy(n),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,n){const r=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,n);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:r,attributes:i}}_getDracoAttributes(t,e){const n={};for(let r=0;r<t.num_attributes();r++){const i=this.decoder.GetAttribute(t,r),o=this._getAttributeMetadata(t,r);n[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_c
1omponents(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:r,metadata:o};const s=this._getQuantizationTransform(i,e);s&&(n[i.unique_id()].quantization_transform=s);const a=this._getOctahedronTransform(i,e);a&&(n[i.unique_id()].octahedron_transform=a)}return n}_getMeshData(t,e,n){const r=this._getMeshAttributes(e,t,n);if(!r.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(n.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:r,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:r,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:r}}_getMeshAttributes(t,e,n){const r={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,n);i.name=t;const{value:o,size:s}=this._getAttributeValues(e,i);r[t]={value:o,size:s,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return r}_getTriangleListIndices(t){const e=3*t.num_faces(),n=4*e,r=this.draco._malloc(n);try{return this.decoder.GetTrianglesUInt32Array(t,n,r),new Uint32Array(this.draco.HEAPF32.buffer,r,e).slice()}finally{this.draco._free(r)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),n=new Int32Array(e);for(let r=0;r<e;r++)n[r]=t.GetValue(r);return n}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const n=Wt[e.data_type],r=e.num_components,i=t.num_points()*r,o=i*n.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,n);let a;const u=this.draco._malloc(o);try{const r=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,r,s,o,u),a=new n(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:a,size:r}}_deduceAttributeName(t,e){const n=t.unique_id;for(const[o,s]of Object.entries(e.extraAttributes||{}))if(s===n)return o;const r=t.attribute_type;for(const o in Ht){if(this.draco[o]===r)return Ht[o]}const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:`CUSTOM_ATTRIBUTE_${n}`}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const n=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(n)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},n=this.metadataQuerier.NumEntries(t);for(let r=0;r<n;r++){const n=this.metadataQuerier.GetEntryName(t,r);e[n]=this._getDracoMetadataField(t,n)}return e}_getDracoMetadataField(t,e){const n=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,n);const r=function(t){const e=t.size(),n=new Int32Array(e);for(let r=0;r<e;r++)n[r]=t.GetValue(r);return n}(n);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:r}}finally{this.draco.destroy(n)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:n=[]}=t,r=[...e,...n];for(const i of r)this.decoder.SkipAttributeTransform(this.draco[i])}_getQuantizationTransform(t,e){const{quantizedAttributes:n=[]}=e,r=t.attribute_type();if(n.map((t=>this.decoder[t])).includes(r)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map((t=>e.min_value(t)))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:n=[]}=e,r=t.attribute_type();if(n.map((t=>this.decoder[t])).includes(r)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var qt=n(6013),Xt=n(9125),Yt=n(6040);const Kt={};async function Qt(t,e=null,n={}){return e&&(t=function(t,e,n){if(t.startsWith("http"))return t;const r=n.modules||{};if(r[t])return r[t];if(!qt.jU)return`modules/${e}/dist/libs/${t}`;if(n.CDN)return(0,Yt.h)(n.CDN.startsWith("http")),`${n.CDN}/${e}@3.0.12/dist/libs/${t}`;if(qt.hJ)return`../src/libs/${t}`;return`modules/${e}/src/libs/${t}`}(t,e,n)),Kt[t]=Kt[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!qt.jU)return Xt.requireFromFile&&await Xt.requireFromFile(t);if(qt.hJ)return importScripts(t);const e=await fetch(t);return function(t,e){if(!qt.jU)return Xt.requireFromString&&Xt.requireFromString(t,e);if(qt.hJ)return eval.call(qt.CO,t),null;const n=document.createElement("script");n.id=e;try{n.appendChild(document.createTextNode(t))}catch(r){n.text=t}return document.body.appendChild(n),null}(await e.text(),t)}(t),await Kt[t]}
1const Jt="https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js",te="https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js",ee="https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm";let ne;async function re(t){const e=t.modules||{};return ne=e.draco3d?ne||e.draco3d.createDecoderModule({}).then((t=>({draco:t}))):ne||async function(t){let e,n;switch(t.draco&&t.draco.decoderType){case"js":e=await Qt(Jt,"draco",t);break;case"wasm":default:[e,n]=await Promise.all([await Qt(te,"draco",t),await Qt(ee,"draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const n={};e&&(n.wasmBinary=e);return new Promise((e=>{t({...n,onModuleLoaded:t=>e({draco:t})})}))}(e,n)}(t),await ne}const ie={...mt,parse:async function(t,e){const{draco:n}=await re(e),r=new $t(n);try{return r.parseSync(t,null===e||void 0===e?void 0:e.draco)}finally{r.destroy()}}};var oe=n(9105),se=n(6269);function ae(t,e){return(0,se.h)(t>=0),(0,se.h)(e>0),t+(e-1)&~(e-1)}function ue(t,e,n){let r;if(t instanceof ArrayBuffer)r=new Uint8Array(t);else{const e=t.byteOffset,n=t.byteLength;r=new Uint8Array(t.buffer||t.arrayBuffer,e,n)}return e.set(r,n),n+ae(r.byteLength,4)}const ce=["SCALAR","VEC2","VEC3","VEC4"],le=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],he=new Map(le),fe={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},de={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},pe={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function ge(t){return ce[t-1]||ce[0]}function me(t){const e=he.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function ve(t,e){const n=pe[t.componentType],r=fe[t.type],i=de[t.componentType],o=t.count*r,s=t.count*r*i;return dt(s>=0&&s<=e.byteLength),{ArrayType:n,length:o,byteLength:s}}const ye={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class be{constructor(t){(0,vt.Z)(this,"gltf",void 0),(0,vt.Z)(this,"sourceBuffers",void 0),(0,vt.Z)(this,"byteLength",void 0),this.gltf=t||{json:{...ye},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find((e=>e===t)),n=this.json.extensions||{};return e?n[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find((e=>e===t))?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"===typeof e)return e;const n=this.json[t]&&this.json[t][e];if(!n)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return n}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,n=this.gltf.buffers[e];dt(n);const r=(t.byteOffset||0)+n.byteOffset;return new Uint8Array(n.arrayBuffer,r,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),n=this.getBuffer(e.buffer).data,{ArrayType:r,length:i}=ve(t,e);return new r(n,e.byteOffset+t.byteOffset,i)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),n=this.getBuffer(e.buffer).data,r=e.byteOffset||0;return new Uint8Array(n,r,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,n){return t.extensions=t.extensions||{},t.extensions[e]=n,this.registerUsedExtension(e),this}setObjectExtension(t,e,n){(t.extensions||{})[e]=n}removeObjectExtension(t,e){const n=t.extensions||{},r=n[e];return delete n[e],r}addExtension(t,e={}){return dt(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}
1addRequiredExtension(t,e={}){return dt(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find((e=>e===t))||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find((e=>e===t))||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:n}=t;this.json.nodes=this.json.nodes||[];const r={mesh:e};return n&&(r.matrix=n),this.json.nodes.push(r),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:n,material:r,mode:i=4}=t,o={primitives:[{attributes:this._addAttributes(e),mode:i}]};if(n){const t=this._addIndices(n);o.primitives[0].indices=t}return Number.isFinite(r)&&(o.primitives[0].material=r),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const n=(0,oe.I)(t),r=e||(null===n||void 0===n?void 0:n.mimeType),i={bufferView:this.addBufferView(t),mimeType:r};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(t){const e=t.byteLength;dt(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const n={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=ae(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(n),this.json.bufferViews.length-1}addAccessor(t,e){const n={bufferView:t,type:ge(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(n),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const n=this.addBufferView(t);let r={min:e.min,max:e.max};r.min&&r.max||(r=this._getAccessorMinMax(t,e.size));const i={size:e.size,componentType:me(t),count:Math.round(t.length/e.size),min:r.min,max:r.max};return this.addAccessor(n,Object.assign(i,e))}addTexture(t){const{imageIndex:e}=t,n={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(n),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const n=this.byteLength,r=new ArrayBuffer(n),i=new Uint8Array(r);let o=0;for(const s of this.sourceBuffers||[])o=ue(s,i,o);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=n:this.json.buffers=[{byteLength:n}],this.gltf.binary=r,this.sourceBuffers=[r]}_removeStringFromArray(t,e){let n=!0;for(;n;){const r=t.indexOf(e);r>-1?t.splice(r,1):n=!1}}_addAttributes(t={}){const e={};for(const n in t){const r=t[n],i=this._getGltfAttributeName(n),o=this.addBinaryBuffer(r.value,r);e[i]=o}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const n={min:null,max:null};if(t.length<e)return n;n.min=[],n.max=[];const r=t.subarray(0,e);for(const i of r)n.min.push(i),n.max.push(i);for(let i=e;i<t.length;i+=e)for(let r=0;r<e;r++)n.min[0+r]=Math.min(n.min[0+r],t[i+r]),n.max[0+r]=Math.max(n.max[0+r],t[i+r]);return n}}const _e="KHR_binary_glTF",we="KHR_draco_mesh_compression",xe="KHR_lights_punctual",Ee="KHR_materials_unlit",Te="KHR_techniques_webgl";function Pe(t){const{buffer:e,size:n,count:r}=function(t){let e=t,n=1,r=0;t&&t.value&&(e=t.value,n=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,n=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(n&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),r=e.length/n);return{buffer:e,size:n,count:r}}(t);return{value:e,size:n,byteOffset:0,count:r,type:ge(n),componentType:me(e)}}async function Ae(t,e,n){var r;if(null===e||void 0===e||null===(r=e.gltf)||void 0===r||!r.decompressMeshes)return;const i=new be(t),o=[];for(const s of function*(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}(i))i.getObjectExtension(s,we)&&o.push(Me(i,s,e,n));await Promise.all(o),i.removeExtension(we)}function Se(t,e={}){const n=new be(t);for(const r of n.json.meshes||[])Oe(r,e),n.addRequiredExtension(we)}async function Me(t,e,n,r){const i=t.getObjectExtension(e,we);if(!i)return;const o=t.getTypedArrayForBufferView(i.bufferView),s=(0,ft.qv)(o.buffer,o.byteOffset),{parse:a}=r,u={...n};delete u["3d-tiles"];const c=await a(s,ie,u,r),l=function(t){const e={};for(const n in t){const r=t[n];if("indices"!==n){const t=Pe(r);e[n]=t}}return e}(c.attributes);for(const[h,f]of Object.entries(l))if(h in e.attributes){const n=e.attributes[h],r=t.getAccessor(n);null!==r&&void 0!==r&&r.min&&null!==r&&void 0!==r&&r.max&&(f.min=r.min,f.max=r.max)}e.attributes=l,c.indices&&(e.indices=Pe(c.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function Oe(t,e,n=4,r,i){var o;if(!r.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const s=r.DracoWriter.encodeSync({attributes:t}),a=null===i||void 0===i||null===(o=i.parseSync)||void 0===o?void 0:o.call(i,{attributes:t}),u=r._addFauxAttributes(a.attributes),c=r.addBufferView(s);return{primitives:[{attributes:u,mode:n,extensions:{[we]:{bufferView:c,attributes:u}}}]}}async function Ce(t){const e=new be(t),{json:n}=e;e.removeExtension(Ee);for(const r of n.materials||[]){r.extensions&&r.extensions.KHR_materials_unlit&&(r.unlit=!0),e.removeObjectExtension(r,Ee)}}function Le(t){const e=new be(t),{json:n}=e;if(e.materials)for(const r of n.materials||[])r.unlit&&(delete r.unlit,e.addObjectExtension(r,Ee,{}),e.addExtension(Ee))}async function ke(t){const e=new be(t),{json:n}=e,r=e.getExtension(xe);r&&(e.json.lights=r.lights,e.removeExtension(xe));for(const i of n.nodes||[]){const t=e.getObjectExtension(i,xe);t&&(i.light=t.light),e.removeObjectExtension(i,xe)}}async function Re(t){const e=new be(t),{json:n}=e;if(n.lights){const t=e.addExtension(xe);dt(!t.lights),t.lights=n.lights,delete n.lights}if(e.json.lights){for(const t of e.json.lights){const n=t.node;e.addObjectExtension(n,xe,t)}delete e.json.lights}}async function Ie(t){const e=new be(t),{json:n}=e,r=e.getExtension(Te);if(r){const t=function(t,e){const{programs:n=[],shaders:r=[],techniques:i=[]}=t,o=new TextDecoder;return r.forEach((t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=o.decode(e.getTypedArrayForBufferView(t.bufferView))}
1)),n.forEach((t=>{t.fragmentShader=r[t.fragmentShader],t.vertexShader=r[t.vertexShader]})),i.forEach((t=>{t.program=n[t.program]})),i}(r,e);for(const r of n.materials||[]){const n=e.getObjectExtension(r,Te);n&&(r.technique=Object.assign({},n,t[n.technique]),r.technique.values=De(r.technique,e)),e.removeObjectExtension(r,Te)}e.removeExtension(Te)}}async function je(t,e){}function De(t,e){const n=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach((e=>{t.uniforms[e].value&&!(e in n)&&(n[e]=t.uniforms[e].value)})),Object.keys(n).forEach((t=>{"object"===typeof n[t]&&void 0!==n[t].index&&(n[t].texture=e.getTexture(n[t].index))})),n}const Ne={KHR_draco_mesh_compression:r,KHR_materials_unlit:i,KHR_lights_punctual:o,KHR_techniques_webgl:s};const Fe={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},Be={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class Ue{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const n=t.json;switch(n.asset&&n.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn(`glTF: Unknown version ${n.asset.version}`)}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(n),this._convertTopLevelObjectsToArrays(n),function(t){const e=new be(t),{json:n}=e;for(const r of n.images||[]){const t=e.removeObjectExtension(r,_e);t&&Object.assign(r,t)}n.buffers&&n.buffers[0]&&delete n.buffers[0].uri,e.removeExtension(_e)}(t),this._convertObjectIdsToArrayIndices(n),this._updateObjects(n),this._updateMaterial(n)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in Fe)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const n=t[e];if(n&&!Array.isArray(n)){t[e]=[];for(const r in n){const i=n[r];i.id=i.id||r;const o=t[e].length;t[e].push(i),this.idToIndexMap[e][r]=o}}}_convertObjectIdsToArrayIndices(t){for(const e in Fe)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:n,material:r}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");n&&(e.indices=this._convertIdToIndex(n,"accessor")),r&&(e.material=this._convertIdToIndex(r,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map((t=>this._convertIdToIndex(t,"node")))),t.meshes&&(t.meshes=t.meshes.map((t=>this._convertIdToIndex(t,"mesh"))))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map((t=>this._convertIdToIndex(t,"node"))))}_convertIdsToIndices(t,e){t[e]||(console.warn(`gltf v1: json doesn't contain attribute ${e}`),t[e]=[]);for(const n of t[e])for(const t in n){const e=n[t],r=this._convertIdToIndex(e,t);n[t]=r}}_convertIdToIndex(t,e){const n=Be[e];if(n in this.idToIndexMap){const r=this.idToIndexMap[n][t];if(!Number.isFinite(r))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return r}return t}_updateObjects(t){for(const e of this.json.buffers)delete e.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const n=e.values&&e.values.tex,r=t.textures.findIndex((t=>t.id===n));-1!==r&&(e.pbrMetallicRoughness.baseColorTexture={index:r})}}}const ze={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Ve={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Ze={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},Ge={magFilter:Ze.TEXTURE_MAG_FILTER,minFilter:Ze.TEXTURE_MIN_FILTER,wrapS:Ze.TEXTURE_WRAP_S,wrapT:Ze.TEXTURE_WRAP_T},He={[Ze.TEXTURE_MAG_FILTER]:Ze.LINEAR,[Ze.TEXTURE_MIN_FILTER]:Ze.NEAREST_MIPMAP_LINEAR,[Ze.TEXTURE_WRAP_S]:Ze.REPEAT,[Ze.TEXTURE_WRAP_]:Ze.REPEAT};class We{postProcess(t,e={}){const{json:n,buffers:r=[],images:i=[],baseUri:o=""}=t;return dt(n),this.baseUri=o,this.json=n,this.buffers=r,this.images=i,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map(((t,e)=>this._resolveBufferView(t,e)))),t.images&&(t.images=t.images.map(((t,e)=>
1this._resolveImage(t,e)))),t.samplers&&(t.samplers=t.samplers.map(((t,e)=>this._resolveSampler(t,e)))),t.textures&&(t.textures=t.textures.map(((t,e)=>this._resolveTexture(t,e)))),t.accessors&&(t.accessors=t.accessors.map(((t,e)=>this._resolveAccessor(t,e)))),t.materials&&(t.materials=t.materials.map(((t,e)=>this._resolveMaterial(t,e)))),t.meshes&&(t.meshes=t.meshes.map(((t,e)=>this._resolveMesh(t,e)))),t.nodes&&(t.nodes=t.nodes.map(((t,e)=>this._resolveNode(t,e)))),t.skins&&(t.skins=t.skins.map(((t,e)=>this._resolveSkin(t,e)))),t.scenes&&(t.scenes=t.scenes.map(((t,e)=>this._resolveScene(t,e)))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"===typeof e)return e;const n=this.json[t]&&this.json[t][e];return n||console.warn(`glTF file error: Could not find ${t}[${e}]`),n}_resolveScene(t,e){return t.id=t.id||`scene-${e}`,t.nodes=(t.nodes||[]).map((t=>this.getNode(t))),t}_resolveNode(t,e){return t.id=t.id||`node-${e}`,t.children&&(t.children=t.children.map((t=>this.getNode(t)))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce(((t,e)=>{const n=this.getMesh(e);return t.id=n.id,t.primitives=t.primitives.concat(n.primitives),t}),{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||`skin-${e}`,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||`mesh-${e}`,t.primitives&&(t.primitives=t.primitives.map((t=>{const e=(t={...t}).attributes;t.attributes={};for(const n in e)t.attributes[n]=this.getAccessor(e[n]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t}))),t}_resolveMaterial(t,e){if(t.id=t.id||`material-${e}`,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var n,r;if(t.id=t.id||`accessor-${e}`,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(n=t.componentType,Ve[n]),t.components=(r=t.type,ze[r]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:n,byteLength:r}=ve(t,t.bufferView),i=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,o=e.arrayBuffer.slice(i,i+r);t.value=new n(o)}return t}_resolveTexture(t,e){return t.id=t.id||`texture-${e}`,t.sampler="sampler"in t?this.getSampler(t.sampler):He,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||`sampler-${e}`,t.parameters={};for(const n in t){const e=this._enumSamplerParameter(n);void 0!==e&&(t.parameters[e]=t[n])}return t}_enumSamplerParameter(t){return Ge[t]}_resolveImage(t,e){t.id=t.id||`image-${e}`,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const n=this.images[e];return n&&(t.image=n),t}_resolveBufferView(t,e){t.id=t.id||`bufferView-${e}`;const n=t.buffer;t.buffer=this.buffers[n];const r=this.buffers[n].arrayBuffer;let i=this.buffers[n].byteOffset||0;return"byteOffset"in t&&(i+=t.byteOffset),t.data=new Uint8Array(r,i,t.byteLength),t}
1_resolveCamera(t,e){return t.id=t.id||`camera-${e}`,t.perspective,t.orthographic,t}}const $e=1735152710,qe=1313821514,Xe=5130562,Ye=!0;function Ke(t,e,n=0,r={}){const i=new DataView(e),o=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(i,n+0),s=i.getUint32(n+4,Ye),a=i.getUint32(n+8,Ye);switch(Object.assign(t,{header:{byteOffset:n,byteLength:a,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),n+=12,t.version){case 1:return function(t,e,n){(0,se.h)(t.header.byteLength>20);const r=e.getUint32(n+0,Ye),i=e.getUint32(n+4,Ye);return n+=8,(0,se.h)(0===i),Qe(t,e,n,r),n+=r,n+=Je(t,e,n,t.header.byteLength)}(t,i,n);case 2:return function(t,e,n,r){return(0,se.h)(t.header.byteLength>20),function(t,e,n,r){for(;n+8<=t.header.byteLength;){const i=e.getUint32(n+0,Ye),o=e.getUint32(n+4,Ye);switch(n+=8,o){case qe:Qe(t,e,n,i);break;case Xe:Je(t,e,n,i);break;case 0:r.strict||Qe(t,e,n,i);break;case 1:r.strict||Je(t,e,n,i)}n+=ae(i,4)}}(t,e,n,r),n+t.header.byteLength}(t,i,n,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function Qe(t,e,n,r){const i=new Uint8Array(e.buffer,n,r),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),ae(r,4)}function Je(t,e,n,r){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:n,byteLength:r,arrayBuffer:e.buffer}),ae(r,4)}async function tn(t,e,n=0,r,i){var o,s,a,u;!function(t,e,n,r){r.uri&&(t.baseUri=r.uri);if(e instanceof ArrayBuffer&&!function(t,e=0,n={}){const r=new DataView(t),{magic:i=$e}=n,o=r.getUint32(e,!1);return o===i||o===$e}(e,n,r)){e=(new TextDecoder).decode(e)}if("string"===typeof e)t.json=ht(e);else if(e instanceof ArrayBuffer){const i={};n=Ke(i,e,n,r.glb),dt("glTF"===i.type,`Invalid GLB magic string ${i.type}`),t._glb=i,t.json=i.json}else dt(!1,"GLTF: must be ArrayBuffer or string");const i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}(t,e,n,r),function(t,e={}){(new Ue).normalize(t,e)}(t,{normalize:null===r||void 0===r||null===(o=r.gltf)||void 0===o?void 0:o.normalize});const c=[];if(null!==r&&void 0!==r&&null!==(s=r.gltf)&&void 0!==s&&s.loadBuffers&&t.json.buffers&&await async function(t,e,n){for(let o=0;o<t.json.buffers.length;++o){const s=t.json.buffers[o];if(s.uri){var r,i;const{fetch:a}=n;dt(a);const u=pt(s.uri,e),c=await(null===n||void 0===n||null===(r=n.fetch)||void 0===r?void 0:r.call(n,u)),l=await(null===c||void 0===c||null===(i=c.arrayBuffer)||void 0===i?void 0:i.call(c));t.buffers[o]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete s.uri}}}(t,r,i),null!==r&&void 0!==r&&null!==(a=r.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,n){const r=t.json.images||[],i=[];for(let o=0;o<r.length;++o)i.push(en(t,r[o],o,e,n));return await Promise.all(i)}(t,r,i);c.push(e)}const l=async function(t,e={},n){for(const i in Ne){var r;const o=(null===e||void 0===e||null===(r=e.gltf)||void 0===r?void 0:r.excludeExtensions)||{};if(!(i in o)||o[i]){const r=Ne[i];await r.decode(t,e,n)}}}(t,r,i);return c.push(l),await Promise.all(c),null!==r&&void 0!==r&&null!==(u=r.gltf)&&void 0!==u&&u.postProcess?function(t,e){return(new We).postProcess(t,e)}(t,r):t}async function en(t,e,n,r,i){const{fetch:o,parse:s}=i;let a;if(e.uri){const t=pt(e.uri,r),n=await o(t);a=await n.arrayBuffer()}if(Number.isFinite(e.bufferView)){const n=gt(t.json,t.buffers,e.bufferView);a=(0,ft.qv)(n.buffer,n.byteOffset,n.byteLength)}dt(a,"glTF image has no data");const u=await s(a,ct.S,{},i);t.images[n]=u}const nn={name:"glTF",id:"gltf",module:"gltf",version:"3.0.12",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},n){(e={...nn.options,...e}).gltf={...nn.options.gltf,...e.gltf};const{byteOffset:r=0}=e;return await tn({},t,r,e,n)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};async function rn(t){const e=[];
vendor: 3,990 bytes, line 1
1return t.scenes.forEach((t=>{t.traverse((t=>{Object.values(t.model.getUniforms()).forEach((t=>{!1===t.loaded&&e.push(t)}))}))})),await async function(t){for(;t();)await new Promise((t=>requestAnimationFrame(t)))}((()=>e.some((t=>!t.loaded))))}var on=n(8550),sn=n(4088);const an=Math.PI/180,un=new Float32Array(16),cn=new Float32Array(12);function ln(t,e,n){const r=e[0]*an,i=e[1]*an,o=e[2]*an,s=Math.sin(o),a=Math.sin(r),u=Math.sin(i),c=Math.cos(o),l=Math.cos(r),h=Math.cos(i),f=n[0],d=n[1],p=n[2];t[0]=f*h*l,t[1]=f*u*l,t[2]=f*-a,t[3]=d*(-u*c+h*a*s),t[4]=d*(h*c+u*a*s),t[5]=d*l*s,t[6]=p*(u*s+h*a*c),t[7]=p*(-h*s+u*a*c),t[8]=p*l*c}function hn(t){return t[0]=t[0],t[1]=t[1],t[2]=t[2],t[3]=t[4],t[4]=t[5],t[5]=t[6],t[6]=t[8],t[7]=t[9],t[8]=t[10],t[9]=t[12],t[10]=t[13],t[11]=t[14],t.subarray(0,12)}const fn={size:12,accessor:["getOrientation","getScale","getTranslation","getTransformMatrix"],shaderAttributes:{instanceModelMatrix__LOCATION_0:{size:3,elementOffset:0},instanceModelMatrix__LOCATION_1:{size:3,elementOffset:3},instanceModelMatrix__LOCATION_2:{size:3,elementOffset:6},instanceTranslation:{size:3,elementOffset:9}},update(t,{startRow:e,endRow:n}){const{data:r,getOrientation:i,getScale:o,getTranslation:s,getTransformMatrix:a}=this.props,u=Array.isArray(a),c=u&&16===a.length,l=Array.isArray(o),h=Array.isArray(i),f=Array.isArray(s),d=c||!u&&Boolean(a(r[0]));t.constant=d?c:h&&l&&f;const p=t.value;if(t.constant){let e;if(d)un.set(a),e=hn(un);else{e=cn;ln(e,i,o),e.set(s,9)}t.value=new Float32Array(e)}else{let u=e*t.size;const{iterable:g,objectInfo:m}=(0,on.jB)(r,e,n);for(const t of g){let e;if(m.index++,d)un.set(c?a:a(t,m)),e=hn(un);else{e=cn;ln(e,h?i:i(t,m),l?o:o(t,m)),e.set(f?s:s(t,m),9)}p[u++]=e[0],p[u++]=e[1],p[u++]=e[2],p[u++]=e[3],p[u++]=e[4],p[u++]=e[5],p[u++]=e[6],p[u++]=e[7],p[u++]=e[8],p[u++]=e[9],p[u++]=e[10],p[u++]=e[11]}}}};function dn(t,e){return e===sn.Df.CARTESIAN||e===sn.Df.METER_OFFSETS||e===sn.Df.DEFAULT&&!t.isGeospatial}const pn=[255,255,255,255],gn={scenegraph:{type:"object",value:null,async:!0},getScene:t=>t&&t.scenes?"object"===typeof t.scene?t.scene:t.scenes[t.scene||0]:t,getAnimator:t=>t&&t.animator,_animations:null,sizeScale:{type:"number",value:1,min:0},sizeMinPixels:{type:"number",min:0,value:0},sizeMaxPixels:{type:"number",min:0,value:Number.MAX_SAFE_INTEGER},getPosition:{type:"accessor",value:t=>t.position},getColor:{type:"accessor",value:pn},_lighting:"flat",_imageBasedLightingEnvironment:null,getOrientation:{type:"accessor",value:[0,0,0]},getScale:{type:"accessor",value:[1,1,1]},getTranslation:{type:"accessor",value:[0,0,0]},getTransformMatrix:{type:"accessor",value:[]},loaders:[nn]};class mn extends a.Z{getShaders(){const t=[u.Z,c.Z];return"pbr"===this.props._lighting&&t.push(g),{vs:"#version 300 es\nin vec3 instancePositions;\nin vec3 instancePositions64Low;\nin vec4 instanceColors;\nin vec3 instancePickingColors;\nin mat3 instanceModelMatrix;\nin vec3 instanceTranslation;\nuniform float sizeScale;\nuniform float sizeMinPixels;\nuniform float sizeMaxPixels;\nuniform mat4 sceneModelMatrix;\nuniform bool composeModelMatrix;\nin vec4 POSITION;\n\n#ifdef HAS_UV\n in vec2 TEXCOORD_0;\n#endif\n\n#ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n in vec4 NORMAL;\n #endif\n#endif\nout vec4 vColor;\n#ifndef MODULE_PBR\n #ifdef HAS_UV\n out vec2 vTEXCOORD_0;\n #endif\n#endif\nvoid main(void) {\n #if defined(HAS_UV) && !defined(MODULE_PBR)\n vTEXCOORD_0 = TEXCOORD_0;\n geometry.uv = vTEXCOORD_0;\n #endif\n\n geometry.worldPosition = instancePositions;\n geometry.pickingColor = instancePickingColors;\n\n #ifdef MODULE_PBR\n #ifdef HAS_NORMALS\n pbr_vNormal = project_normal(instanceModelMatrix * (sceneModelMatrix * vec4(NORMAL.xyz, 0.0)).xyz);\n geometry.normal = pbr_vNormal;\n #endif\n\n #ifdef HAS_UV\n pbr_vUV = TEXCOORD_0;\n #else\n pbr_vUV = vec2(0., 0.);\n #endif\n geometry.uv = pbr_vUV;\n #endif\n\n float originalSize = project_size_to_pixel(sizeScale);
1\n float clampedSize = clamp(originalSize, sizeMinPixels, sizeMaxPixels);\n\n vec3 pos = (instanceModelMatrix * (sceneModelMatrix * POSITION).xyz) * sizeScale * (clampedSize / originalSize) + instanceTranslation;\n if(composeModelMatrix) {\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(pos + instancePositions, instancePositions64Low, vec3(0.0), geometry.position);\n }\n else {\n pos = project_size(pos);\n DECKGL_FILTER_SIZE(pos, geometry);\n gl_Position = project_position_to_clipspace(instancePositions, instancePositions64Low, pos, geometry.position);\n }\n DECKGL_FILTER_GL_POSITION(gl_Position, geometry);\n\n #ifdef MODULE_PBR\n pbr_vPosition = geometry.position.xyz;\n #endif\n\n vColor = instanceColors;\n DECKGL_FILTER_COLOR(vColor, geometry);\n}\n",fs:"#version 300 es\nuniform float opacity;\nin vec4 vColor;\n\nout vec4 fragmentColor;\n#ifndef MODULE_PBR\n #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n in vec2 vTEXCOORD_0;\n uniform sampler2D u_BaseColorSampler;\n #endif\n#endif\n\nvoid main(void) {\n #ifdef MODULE_PBR\n fragmentColor = vColor * pbr_filterColor(vec4(0));\n geometry.uv = pbr_vUV;\n #else\n #if defined(HAS_UV) && defined(HAS_BASECOLORMAP)\n fragmentColor = vColor * texture2D(u_BaseColorSampler, vTEXCOORD_0);\n geometry.uv = vTEXCOORD_0;\n #else\n fragmentColor = vColor;\n #endif\n #endif\n\n fragmentColor.a *= opacity;\n DECKGL_FILTER_COLOR(fragmentColor, geometry);\n}\n",modules:t}}initializeState(){this.getAttributeManager().addInstanced({instancePositions:{size:3,type:5130,fp64:this.use64bitPositions(),accessor:"getPosition",transition:!0},instanceColors:{type:5121,size:this.props.colorFormat.length,accessor:"getColor",normalized:!0,defaultValue:pn,transition:!0},instanceModelMatrix:fn})}updateState(t){super.updateState(t);const{props:e,oldProps:n}=t;e.scenegraph!==n.scenegraph?this._updateScenegraph(e):e._animations!==n._animations&&this._applyAnimationsProp(this.state.scenegraph,this.state.animator,e._animations)}finalizeState(){super.finalizeState(),this._deleteScenegraph()}_updateScenegraph(t){const{gl:e}=this.context;let n=null;if(t.scenegraph instanceof _)n={scenes:[t.scenegraph]};else if(t.scenegraph&&!t.scenegraph.gltf){const r=t.scenegraph,i=function(t,e,n){const r=new ut(t,n);return{scenes:r.instantiate(e),animator:r.createAnimator()}}(e,r,this._getModelOptions());n={gltf:r,...i},rn(i).then((()=>this.setNeedsRedraw()))}else t.scenegraph&&(l.Z.deprecated("ScenegraphLayer.props.scenegraph","Use GLTFLoader instead of GLTFScenegraphLoader")(),n=t.scenegraph);const r={layer:this,gl:e},i=t.getScene(n,r),o=t.getAnimator(n,r);i instanceof _?(this._deleteScenegraph(),this._applyAllAttributes(i),this._applyAnimationsProp(i,o,t._animations),this.setState({scenegraph:i,animator:o})):null!==i&&l.Z.warn("invalid scenegraph:",i)()}_applyAllAttributes(t){if(this.state.attributesAvailable){const e=this.getAttributeManager().getAttributes();t.traverse((t=>{this._setModelAttributes(t.model,e)}))}}_applyAnimationsProp(t,e,n){if(!t||!e||!n)return;const r=e.getAnimations();Object.keys(n).sort().forEach((t=>{const e=n[t];if("*"===t)r.forEach((t=>{Object.assign(t,e)}));else if(Number.isFinite(Number(t))){const n=Number(t);n>=0&&n<r.length?Object.assign(r[n],e):l.Z.warn("animation ".concat(t," not found"))()}else{const n=r.find((({name:e})=>e===t));n?Object.assign(n,e):l.Z.warn("animation ".concat(t," not found"))()}}))}_deleteScenegraph(){const{scenegraph:t}=this.state;t instanceof _&&t.delete()}_getModelOptions(){const{_imageBasedLightingEnvironment:t}=this.props;let e=null;return t&&(e="function"===typeof t?t({gl:this.context.gl,layer:this}):t),{gl:this.context.gl,waitForFullLoad:!0,imageBasedLightingEnvironment:e,modelOptions:{isInstanced:!0,transpileToGLSL100:!(0,h.D0)(this.context.gl),...this.getShaders()},useTangents:!1}}updateAttributes(t){this.setState({attributesAvailable:!0}),this.state.scenegraph&&this.state.scenegraph.traverse((e=>{this._setModelAttributes(e.model,t)}))}draw({moduleParameters:t=null,parameters:e={},context:n}){if(!this.state.scenegraph)return;this.props._animations&&this.state.animator&&(this.state.animator.animate(n.timeline.getTime()),this.setNeedsRedraw());const{viewport:r}
1=this.context,{sizeScale:i,sizeMinPixels:o,sizeMaxPixels:s,opacity:a,coordinateSystem:u}=this.props,c=this.getNumInstances();this.state.scenegraph.traverse(((n,{worldMatrix:l})=>{n.model.setInstanceCount(c),n.updateModuleSettings(t),n.draw({parameters:e,uniforms:{sizeScale:i,opacity:a,sizeMinPixels:o,sizeMaxPixels:s,composeModelMatrix:dn(r,u),sceneModelMatrix:l,u_Camera:n.model.getUniforms().project_uCameraPosition}})}))}}mn.layerName="ScenegraphLayer",mn.defaultProps=gn},65:function(t,e,n){"use strict";n.d(e,{Z:function(){return Mt}});var r=n(7294),i=n(5697),o=n.n(i);let s=1,a=1;class u{constructor(){this.time=0,this.channels=new Map,this.animations=new Map,this.playing=!1,this.lastEngineTime=-1}addChannel(t){const{delay:e=0,duration:n=Number.POSITIVE_INFINITY,rate:r=1,repeat:i=1}=t,o=s++,a={time:0,delay:e,duration:n,rate:r,repeat:i};return this._setChannelTime(a,this.time),this.channels.set(o,a),o}removeChannel(t){this.channels.delete(t);for(const[e,n]of this.animations)n.channel===t&&this.detachAnimation(e)}isFinished(t){const e=this.channels.get(t);return void 0!==e&&this.time>=e.delay+e.duration*e.repeat}getTime(t){if(void 0===t)return this.time;const e=this.channels.get(t);return void 0===e?-1:e.time}setTime(t){this.time=Math.max(0,t);const e=this.channels.values();for(const r of e)this._setChannelTime(r,this.time);const n=this.animations.values();for(const r of n){const{animation:t,channel:e}=r;t.setTime(this.getTime(e))}}play(){this.playing=!0}pause(){this.playing=!1,this.lastEngineTime=-1}reset(){this.setTime(0)}attachAnimation(t,e){const n=a++;return this.animations.set(n,{animation:t,channel:e}),t.setTime(this.getTime(e)),n}detachAnimation(t){this.animations.delete(t)}update(t){this.playing&&(-1===this.lastEngineTime&&(this.lastEngineTime=t),this.setTime(this.time+(t-this.lastEngineTime)),this.lastEngineTime=t)}_setChannelTime(t,e){const n=e-t.delay;n>=t.duration*t.repeat?t.time=t.duration*t.rate:(t.time=Math.max(0,n)%t.duration,t.time*=t.rate)}}var c=n(5409),l=n(744),h=n(3803),f=n(1855),d=n(6203),p=n(3079);class g{constructor(t,e,n){this.id=t,this.context=n,this._loadCount=0,this._subscribers=new Set,this.setData(e)}subscribe(t){this._subscribers.add(t)}unsubscribe(t){this._subscribers.delete(t)}inUse(){return this._subscribers.size>0}delete(){}getData(){return this.isLoaded?this._error?Promise.reject(this._error):this._content:this._loader.then((()=>this.getData()))}setData(t,e){if(t===this._data&&!e)return;this._data=t;const n=++this._loadCount;let r=t;"string"===typeof t&&(r=(0,p.z)(t)),r instanceof Promise?(this.isLoaded=!1,this._loader=r.then((t=>{this._loadCount===n&&(this.isLoaded=!0,this._error=null,this._content=t)})).catch((t=>{this._loadCount===n&&(this.isLoaded=!0,this._error=t||!0)}))):(this.isLoaded=!0,this._error=null,this._content=t);for(const i of this._subscribers)i.onChange(this.getData())}}class m{constructor({gl:t,protocol:e}){this.protocol=e||"resource://",this._context={gl:t,resourceManager:this},this._resources={},this._consumers={},this._pruneRequest=null}contains(t){return!!t.startsWith(this.protocol)||t in this._resources}add({resourceId:t,data:e,forceUpdate:n=!1,persistent:r=!0}){let i=this._resources[t];i?i.setData(e,n):(i=new g(t,e,this._context),this._resources[t]=i),i.persistent=r}remove(t){const e=this._resources[t];e&&(e.delete(),delete this._resources[t])}unsubscribe({consumerId:t}){const e=this._consumers[t];if(e){for(const t in e){const n=e[t];n.resource&&n.resource.unsubscribe(n)}delete this._consumers[t],this.prune()}}subscribe({resourceId:t,onChange:e,consumerId:n,requestId:r="default"}){const{_resources:i,protocol:o}=this;t.startsWith(o)&&(i[t=t.replace(o,"")]||this.add({resourceId:t,data:null,persistent:!1}));const s=i[t];if(this._track(n,r,s,e),s)return s.getData()}prune(){this._pruneRequest||(this._pruneRequest=setTimeout((()=>this._prune()),0))}finalize(){for(const t in this._resources)this._resources[t].delete()}_track(t,e,n,r){const i=this._consumers,o=i[t]=i[t]||{},s=o[e]||{};s.resource&&(s.resource.unsubscribe(s),s.resource=null,this.prune()),n&&(o[e]=s,s.onChange=r,s.resource=n,n.subscribe(s))}_prune(){this._pruneRequest=null;for(const t of Object.keys(this._resources)){const e=this._resources[t];e.persistent||e.inUse()||(e.delete(),delete this._resources[t])}}}var v=n(9225),y=n(358);const b=[n(6084).Z],_=["vs:DECKGL_FILTER_SIZE(inout vec3 size, VertexGeometry geometry)","vs:DECKGL_FILTER_GL_POSITION(inout vec4 position, VertexGeometry geometry)","vs:DECKGL_FILTER_COLOR(inout vec4 color, VertexGeometry geometry)","fs:DECKGL_FILTER_COLOR(inout vec4 color, FragmentGeometry geometry)"];function w(t){const e=y.Z.getDefaultProgramManager(t);for(const n of b)e.addDefaultModule(n);for(const n of _)e.addShaderHook(n);return e}
1const x=Object.seal({layerManager:null,resourceManager:null,deck:null,gl:null,stats:null,shaderCache:null,pickingFBO:null,mousePosition:null,userData:{}});class E{constructor(t,{deck:e,stats:n,viewport:r,timeline:i}={}){this.lastRenderedLayers=[],this.layers=[],this.resourceManager=new m({gl:t,protocol:"deck://"}),this.context={...x,layerManager:this,gl:t,deck:e,programManager:t&&w(t),stats:n||new d.jk({id:"deck.gl"}),viewport:r||new v.Z({id:"DEFAULT-INITIAL-VIEWPORT"}),timeline:i||new u,resourceManager:this.resourceManager},this._nextLayers=null,this._needsRedraw="Initial render",this._needsUpdate=!1,this._debug=!1,this.activateViewport=this.activateViewport.bind(this),Object.seal(this)}finalize(){this.resourceManager.finalize();for(const t of this.layers)this._finalizeLayer(t)}needsRedraw(t={clearRedrawFlags:!1}){let e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);for(const n of this.layers){const r=n.getNeedsRedraw(t);e=e||r}return e}needsUpdate(){return this._nextLayers&&this._nextLayers!==this.lastRenderedLayers?"layers changed":this._needsUpdate}setNeedsRedraw(t){this._needsRedraw=this._needsRedraw||t}setNeedsUpdate(t){this._needsUpdate=this._needsUpdate||t}getLayers({layerIds:t=null}={}){return t?this.layers.filter((e=>t.find((t=>0===e.id.indexOf(t))))):this.layers}setProps(t){"debug"in t&&(this._debug=t.debug),"userData"in t&&(this.context.userData=t.userData),"layers"in t&&(this._nextLayers=t.layers),"onError"in t&&(this.context.onError=t.onError)}setLayers(t,e){(0,h.Z)("layerManager.setLayers",this,e,t),this.lastRenderedLayers=t,t=(0,f.x)(t,Boolean);for(const n of t)n.context=this.context;return this._updateLayers(this.layers,t),this}updateLayers(){const t=this.needsUpdate();t&&(this.setNeedsRedraw("updating layers: ".concat(t)),this.setLayers(this._nextLayers||this.lastRenderedLayers,t)),this._nextLayers=null}activateViewport(t){return(0,h.Z)("layerManager.activateViewport",this,t),t&&(this.context.viewport=t),this}_handleError(t,e,n){n.raiseError(e,"".concat(t," of ").concat(n))}_updateLayers(t,e){const n={};for(const o of t)n[o.id]?l.Z.warn("Multiple old layers with same id ".concat(o.id))():n[o.id]=o;const r=[];this._updateSublayersRecursively(e,n,r),this._finalizeOldLayers(n);let i=!1;for(const o of r)if(o.hasUniformTransition()){i=!0;break}this._needsUpdate=i,this.layers=r}_updateSublayersRecursively(t,e,n){for(const i of t){i.context=this.context;const t=e[i.id];null===t&&l.Z.warn("Multiple new layers with same id ".concat(i.id))(),e[i.id]=null;let o=null;try{this._debug&&t!==i&&i.validateProps(),t?(this._transferLayerState(t,i),this._updateLayer(i)):this._initializeLayer(i),n.push(i),o=i.isComposite&&i.getSubLayers()}catch(r){this._handleError("matching",r,i)}o&&this._updateSublayersRecursively(o,e,n)}}_finalizeOldLayers(t){for(const e in t){const n=t[e];n&&this._finalizeLayer(n)}}_initializeLayer(t){try{t._initialize(),t.lifecycle=c.d.INITIALIZED}catch(e){this._handleError("initialization",e,t)}}_transferLayerState(t,e){e._transferState(t),e.lifecycle=c.d.MATCHED,e!==t&&(t.lifecycle=c.d.AWAITING_GC)}_updateLayer(t){try{t._update()}catch(e){this._handleError("update",e,t)}}_finalizeLayer(t){this._needsRedraw=this._needsRedraw||"finalized ".concat(t),t.lifecycle=c.d.AWAITING_FINALIZATION;try{t._finalize(),t.lifecycle=c.d.FINALIZED}catch(e){this._handleError("finalization",e,t)}}}var T=n(6871);class P{constructor(t={}){this.views=[],this.width=100,this.height=100,this.viewState={},this.controllers={},this.timeline=t.timeline,this._viewports=[],this._viewportMap={},this._isUpdating=!1,this._needsRedraw="Initial render",this._needsUpdate=!0,this._eventManager=t.eventManager,this._eventCallbacks={onViewStateChange:t.onViewStateChange,onInteractionStateChange:t.onInteractionStateChange},Object.seal(this),this.setProps(t)}finalize(){for(const t in this.controllers)this.controllers[t]&&this.controllers[t].finalize();this.controllers={}}needsRedraw(t={clearRedrawFlags:!1}){const e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}setNeedsUpdate(t){this._needsUpdate=this._needsUpdate||t,this._needsRedraw=this._needsRedraw||t}updateViewStates(){for(const t in this.controllers){const e=this.controllers[t];e&&e.updateTransition()}}getViewports(t){return t?this._viewports.filter((e=>e.containsPixel(t))):this._viewports}getViews(){const t={};return this.views.forEach((e=>{t[e.id]=e})),t}getView(t){return"string"===typeof t?this.views.find((e=>e.id===t)):t}getViewState(t){const e=this.getView(t),n=e&&this.viewState[e.getViewStateId()]||this.viewState;return e?e.filterViewState(n):n}getViewport(t){return this._viewportMap[t]}unproject(t,e){const n=this.getViewports(),r={x:t[0],y:t[1]};for(let i=n.length-1;i>=0;--i){const o=n[i];if(o.containsPixel(r)){const n=t.slice();return n[0]-=o.x,n[1]-=o.y,o.unproject(n,e)}}return null}
1setProps(t){"views"in t&&this._setViews(t.views),"viewState"in t&&this._setViewState(t.viewState),("width"in t||"height"in t)&&this._setSize(t.width,t.height),this._isUpdating||this._update()}_update(){this._isUpdating=!0,this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._needsUpdate&&(this._needsUpdate=!1,this._rebuildViewports()),this._isUpdating=!1}_setSize(t,e){t===this.width&&e===this.height||(this.width=t,this.height=e,this.setNeedsUpdate("Size changed"))}_setViews(t){t=(0,f.x)(t,Boolean);this._diffViews(t,this.views)&&this.setNeedsUpdate("views changed"),this.views=t}_setViewState(t){if(t){!(0,T.v)(t,this.viewState)&&this.setNeedsUpdate("viewState changed"),this.viewState=t}else l.Z.warn("missing `viewState` or `initialViewState`")()}_onViewStateChange(t,e){e.viewId=t,this._eventCallbacks.onViewStateChange&&this._eventCallbacks.onViewStateChange(e)}_createController(t,e){return new(0,e.type)({timeline:this.timeline,eventManager:this._eventManager,onViewStateChange:this._onViewStateChange.bind(this,e.id),onStateChange:this._eventCallbacks.onInteractionStateChange,makeViewport:e=>t._getViewport(e,{width:e.width,height:e.height}),...e})}_updateController(t,e,n,r){let i=t.controller;return i?(i={...e,...t.props,...i,id:t.id,x:n.x,y:n.y,width:n.width,height:n.height},r?r.setProps(i):r=this._createController(t,i),r):null}_rebuildViewports(){const{width:t,height:e,views:n}=this,r=this.controllers;this._viewports=[],this.controllers={};let i=!1;for(let o=n.length;o--;){const s=n[o],a=this.getViewState(s),u=s.makeViewport({width:t,height:e,viewState:a});let c=r[s.id];s.controller&&!c&&(i=!0),!i&&s.controller||!c||(c.finalize(),c=null),this.controllers[s.id]=this._updateController(s,a,u,c),this._viewports.unshift(u)}for(const o in r)r[o]&&!this.controllers[o]&&r[o].finalize();this._buildViewportMap()}_buildViewportMap(){this._viewportMap={},this._viewports.forEach((t=>{t.id&&(this._viewportMap[t.id]=this._viewportMap[t.id]||t)}))}_diffViews(t,e){return t.length!==e.length||t.some(((n,r)=>!t[r].equals(e[r])))}}var A=n(937),S=n(4739);const M=new S.Z;class O{constructor(){this.effects=[],this._internalEffects=[],this._needsRedraw="Initial render",this.setEffects()}setProps(t){"effects"in t&&(t.effects.length===this.effects.length&&(0,T.v)(t.effects,this.effects)||(this.setEffects(t.effects),this._needsRedraw="effects changed"))}needsRedraw(t={clearRedrawFlags:!1}){const e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}getEffects(){return this._internalEffects}finalize(){this.cleanup()}setEffects(t=[]){this.cleanup(),this.effects=t,this._createInternalEffects()}cleanup(){for(const t of this.effects)t.cleanup();for(const t of this._internalEffects)t.cleanup();this.effects.length=0,this._internalEffects.length=0}_createInternalEffects(){this._internalEffects=this.effects.slice(),this.effects.some((t=>t instanceof S.Z))||this._internalEffects.push(M)}}var C=n(1215),L=n(1961);class k extends L.Z{}var R=n(9450);const I={blendFunc:[1,0,32771,0],blendEquation:32774};class j extends L.Z{render(t){return t.pickingFBO?this._drawPickingBuffer(t):super.render(t)}_drawPickingBuffer({layers:t,layerFilter:e,views:n,viewports:r,onViewportActive:i,pickingFBO:o,deviceRect:{x:s,y:a,width:u,height:c},pass:l="picking",redrawReason:h,pickZ:f}){const d=this.gl;this.pickZ=f;const p=!f&&{byLayer:new Map,byAlpha:[]};this._colors=p;const g=(0,R.s8)(d,{scissorTest:!0,scissor:[s,a,u,c],clearColor:[0,0,0,0],depthMask:!0,depthTest:!0,depthRange:[0,1],colorMask:[!0,!0,!0,!0],...I,blend:!f},(()=>super.render({target:o,layers:t,layerFilter:e,views:n,viewports:r,onViewportActive:i,pass:l,redrawReason:h})));this._colors=null;return{decodePickingColor:p&&D.bind(null,p),stats:g}}shouldDrawLayer(t){return t.props.pickable}getModuleParameters(){return{pickingActive:1,pickingAttribute:this.pickZ,lightSources:{}}}getLayerParameters(t,e,n){const r={...t.props.parameters};return this.pickZ?r.blend=!1:(Object.assign(r,I),r.blend=!0,r.blendColor=function(t,e,n){const{byLayer:r,byAlpha:i}=t;let o;if(r.has(e)){const t=r.get(e);t.viewports.push(n),o=t.a}else if(o=r.size+1,o<=255){const t={a:o,layer:e,viewports:[n]};r.set(e,t),i[o]=t}else l.Z.warn("Too many pickable layers, only picking the first 255")(),o=0;return[0,0,0,o/255]}(this._colors,t,n)),r}}function D(t,e){const n=t.byAlpha[e[3]];return n&&{pickedLayer:n.layer,pickedViewports:n.viewports,pickedObjectIndex:n.layer.decodePickingColor(e)}}var N=n(3849);class F{constructor(t){this.gl=t,this.layerFilter=null,this.drawPickingColors=!1,this.drawLayersPass=new k(t),this.pickLayersPass=new j(t),this.renderCount=0,this._needsRedraw="Initial render",this.renderBuffers=[],this.lastPostProcessEffect=null}setProps(t){"layerFilter"in t&&this.layerFilter!==t.layerFilter&&(this.layerFilter=t.layerFilter,this._needsRedraw="layerFilter changed"),"drawPickingColors"in t&&this.drawPickingColors!==t.drawPickingColors&&(this.drawPickingColors=t.drawPickingColors,this._needsRedraw="drawPickingColors changed")}renderLayers(t){const e=this.drawPickingColors?this.pickLayersPass:this.drawLayersPass;t.layerFilter=t.layerFilter||this.layerFilter,t.effects=t.effects||[],t.target=t.target||N.Z.getDefaultFramebuffer(this.gl),this._preRender(t.effects,t);const n=this.lastPostProcessEffect?this.renderBuffers[0]:t.target,r=e.render({...t,target:n});this._postRender(t.effects,t),this.renderCount++,(0,h.Z)("deckRenderer.renderLayers",this,r,t)}needsRedraw(t={clearRedrawFlags:!1}){const e=this._needsRedraw;return t.clearRedrawFlags&&(this._needsRedraw=!1),e}finalize(){const{renderBuffers:t}=this;for(const e of t)e.delete();t.length=0}_preRender(t,e){let n=null;for(const r of t)r.preRender(this.gl,e),r.postRender&&(n=r);n&&this._resizeRenderBuffers(),this.lastPostProcessEffect=n}_resizeRenderBuffers(){const{renderBuffers:t}=this;0===t.length&&t.push(new N.Z(this.gl),new N.Z(this.gl));for(const e of t)e.resize()}_postRender(t,e){const{renderBuffers:n}=this,r={inputBuffer:n[0],swapBuffer:n[1],target:null};for(const i of t)if(i.postRender){if(i===this.lastPostProcessEffect){r.target=e.target,i.postRender(this.gl,r);break}const t=i.postRender(this.gl,r);r.inputBuffer=t,r.swapBuffer=t===n[0]?n[1]:n[0]}}}var B=n(4912),U=n(1953);const z={pickedColor:null,pickedLayer:null,pickedObjectIndex:-1};function V({pickedColors:t,decodePickingColor:e,deviceX:n,deviceY:r,deviceRadius:i,deviceRect:o}){if(t){const{x:s,y:a,width:u,height:c}=o;let h=i*i,f=-1,d=0;for(let e=0;e<c;e++){const i=e+a-r,o=i*i;if(o>h)d+=4*u;else for(let e=0;e<u;e++){if(t[d+3]-1>
1=0){const t=e+s-n,r=t*t+o;r<=h&&(h=r,f=d)}d+=4}}if(f>=0){const n=t.slice(f,f+4),r=e(n);if(r){const t=Math.floor(f/4/u),e=f/4-t*u;return{...r,pickedColor:n,pickedX:s+e,pickedY:a+t}}l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return z}function Z({pickInfo:t,viewports:e,pixelRatio:n,x:r,y:i,z:o}){let s=e[0];e.length>1&&(s=function(t,e){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.containsPixel(e))return r}return t[0]}((null===t||void 0===t?void 0:t.pickedViewports)||e,{x:r,y:i}));const a=s&&s.unproject([r-s.x,i-s.y],{targetZ:o});return{color:null,layer:null,viewport:s,index:-1,picked:!1,x:r,y:i,pixel:[r,i],coordinate:a,devicePixel:t&&[t.pickedX,t.pickedY],pixelRatio:n}}function G(t){const{pickInfo:e,lastPickedInfo:n,mode:r,layers:i}=t,{pickedColor:o,pickedLayer:s,pickedObjectIndex:a}=e,u=s?[s]:[];if("hover"===r){const t=n.index,e=n.layerId,r=s&&s.props.id;if(r!==e||a!==t){if(r!==e){const t=i.find((t=>t.props.id===e));t&&u.unshift(t)}n.layerId=r,n.index=a,n.info=null}}const c=Z(t),l=new Map;return l.set(null,c),u.forEach((t=>{let e={...c};t===s&&(e.color=o,e.index=a,e.picked=!0),e=H({layer:t,info:e,mode:r}),t===s&&"hover"===r&&(n.info=e),l.set(e.layer.id,e),"hover"===r&&e.layer.updateAutoHighlight(e)})),l}function H({layer:t,info:e,mode:n}){for(;t&&e;){const r=e.layer||null;e.sourceLayer=r,e.layer=t,e=t.getPickingInfo({info:e,mode:n,sourceLayer:r}),t=t.parent}return e}class W{constructor(t){this.gl=t,this.pickingFBO=null,this.pickLayersPass=new j(t),this.layerFilter=null,this.lastPickedInfo={index:-1,layerId:null,info:null}}setProps(t){"layerFilter"in t&&(this.layerFilter=t.layerFilter),"_pickable"in t&&(this._pickable=t._pickable)}finalize(){this.pickingFBO&&this.pickingFBO.delete(),this.depthFBO&&(this.depthFBO.color.delete(),this.depthFBO.delete())}
1pickObject(t){return this._pickClosestObject(t)}pickObjects(t){return this._pickVisibleObjects(t)}getLastPickedObject({x:t,y:e,layers:n,viewports:r},i=this.lastPickedInfo.info){const o=i&&i.layer&&i.layer.id,s=i&&i.viewport&&i.viewport.id,a=o?n.find((t=>t.id===o)):null,u=s&&r.find((t=>t.id===s))||r[0],c=u&&u.unproject([t-u.x,e-u.y]),l={x:t,y:e,viewport:u,coordinate:c,layer:a};return a?{...i,...l}:Object.assign(l,{color:null,object:null,index:-1})}_resizeBuffer(){const{gl:t}=this;return this.pickingFBO||(this.pickingFBO=new N.Z(t),N.Z.isSupported(t,{colorBufferFloat:!0})&&(this.depthFBO=new N.Z(t),this.depthFBO.attach({36064:new B.Z(t,{format:(0,R.D0)(t)?34836:6408,type:5126})}))),this.pickingFBO.resize({width:t.canvas.width,height:t.canvas.height}),this.depthFBO&&this.depthFBO.resize({width:t.canvas.width,height:t.canvas.height}),this.pickingFBO}_getPickable(t){if(!1===this._pickable)return null;const e=t.filter((t=>t.isPickable()&&!t.isComposite));return e.length?e:null}_pickClosestObject({layers:t,views:e,viewports:n,x:r,y:i,radius:o=0,depth:s=1,mode:a="query",unproject3D:u,onViewportActive:c}){if(!(t=this._getPickable(t)))return{result:[],emptyInfo:Z({viewports:n,x:r,y:i})};this._resizeBuffer();const l=(0,R.w)(this.gl),h=(0,R.JY)(this.gl,[r,i],!0),f=[h.x+Math.floor(h.width/2),h.y+Math.floor(h.height/2)],d=Math.round(o*l),{width:p,height:g}=this.pickingFBO,m=this._getPickingRect({deviceX:f[0],deviceY:f[1],deviceRadius:d,deviceWidth:p,deviceHeight:g});let v;const y=[],b={};for(let _=0;_<s;_++){const o=V({...m&&this._drawAndSample({layers:t,views:e,viewports:n,onViewportActive:c,deviceRect:m,pass:"picking:".concat(a),redrawReason:a}),deviceX:f[0],deviceY:f[1],deviceRadius:d,deviceRect:m});let h;if(o.pickedLayer&&u&&this.depthFBO){h=this._drawAndSample({layers:[o.pickedLayer],views:e,viewports:n,onViewportActive:c,deviceRect:{x:o.pickedX,y:o.pickedY,width:1,height:1},pass:"picking:".concat(a),redrawReason:"pick-z",pickZ:!0}).pickedColors[0]*n[0].distanceScales.metersPerUnit[2]+n[0].position[2]}if(o.pickedColor&&_+1<s){const e=o.pickedColor[3]-1;b[e]=!0,t[e].disablePickingIndex(o.pickedObjectIndex)}v=G({pickInfo:o,lastPickedInfo:this.lastPickedInfo,mode:a,layers:t,viewports:n,x:r,y:i,z:h,pixelRatio:l});for(const t of v.values())t.layer&&y.push(t);if(!o.pickedColor)break}for(const _ in b)t[_].restorePickingColors();return{result:y,emptyInfo:v&&v.get(null)}}_pickVisibleObjects({layers:t,views:e,viewports:n,x:r,y:i,width:o=1,height:s=1,mode:a="query",maxObjects:u=null,onViewportActive:c}){if(!(t=this._getPickable(t)))return[];this._resizeBuffer();const h=(0,R.w)(this.gl),f=(0,R.JY)(this.gl,[r,i],!0),d=f.x,p=f.y+f.height,g=(0,R.JY)(this.gl,[r+o,i+s],!0),m=g.x+g.width,v=g.y,y={x:d,y:v,width:m-d,height:p-v},b=function({pickedColors:t,decodePickingColor:e}){const n=new Map;if(t)for(let r=0;r<t.length;r+=4)if(t[r+3]-1>=0){const i=t.slice(r,r+4),o=i.join(",");if(!n.has(o)){const t=e(i);t?n.set(o,{...t,pickedColor:i}):l.Z.error("Picked non-existent layer. Is picking buffer corrupt?")()}}return Array.from(n.values())}(this._drawAndSample({layers:t,views:e,viewports:n,onViewportActive:c,deviceRect:y,pass:"picking:".concat(a),redrawReason:a})),_=new Map,w=Number.isFinite(u);for(let l=0;l<b.length&&!(w&&_.size>=u);l++){const t=b[l];let e={color:t.pickedColor,layer:null,index:t.pickedObjectIndex,picked:!0,x:r,y:i,width:o,height:s,pixelRatio:h};e=H({layer:t.pickedLayer,info:e,mode:a}),_.has(e.object)||_.set(e.object,e)}return Array.from(_.values())}_drawAndSample({layers:t,views:e,viewports:n,onViewportActive:r,deviceRect:i,pass:o,redrawReason:s,pickZ:a}){const u=a?this.depthFBO:this.pickingFBO,{decodePickingColor:c}=this.pickLayersPass.render({layers:t,layerFilter:this.layerFilter,views:e,viewports:n,onViewportActive:r,pickingFBO:u,deviceRect:i,pass:o,redrawReason:s,pickZ:a}),{x:l,y:h,width:f,height:d}=i,p=new(a?Float32Array:Uint8Array)(f*d*4);return(0,U.z6)(u,{sourceX:l,sourceY:h,sourceWidth:f,sourceHeight:d,target:p}),{pickedColors:p,decodePickingColor:c}}_getPickingRect({deviceX:t,deviceY:e,deviceRadius:n,deviceWidth:r,deviceHeight:i}){const o=Math.max(0,t-n),s=Math.max(0,e-n),a=Math.min(r,t+n+1)-o,u=Math.min(i,e+n+1)-s;return a<=0||u<=0?null:{x:o,y:s,width:a,height:u}}}const $={zIndex:1,position:"absolute",pointerEvents:"none",color:"#a0a7b4",backgroundColor:"#29323c",padding:"10px",top:0,left:0,display:"none"};class q{constructor(t){const e=t.parentElement;e&&(this.el=document.createElement("div"),this.el.className="deck-tooltip",Object.assign(this.el.style,$),e.appendChild(this.el)),this.isVisible=!1}setTooltip(t,e,n){const r=this.el;if("string"===typeof t)r.innerText=t;else{if(!t)return this.isVisible=!1,void(r.style.display="none");"text"in t&&(r.innerText=t.text),"html"in t&&(r.innerHTML=t.html),"className"in t&&(r.className=t.className),Object.assign(r.style,t.style)}
1this.isVisible=!0,r.style.display="block",r.style.transform="translate(".concat(e,"px, ").concat(n,"px)")}remove(){this.el&&this.el.remove()}}var X=n(6610),Y=n(6228),K=n(2378),Q=n(9718);var J={name:"JSON",extensions:["json","geojson"],mimeTypes:["application/json","application/geo+json"],testText:function(t){const e=t[0],n=t[t.length-1];return"{"===e&&"}"===n||"["===e&&"]"===n},parseTextSync:JSON.parse};const tt="8.6.0",et=Q.CO.deck&&Q.CO.deck.VERSION;if(et&&et!==tt)throw new Error("deck.gl - multiple versions detected: ".concat(et," vs ").concat(tt));et||(l.Z.log(1,"deck.gl ".concat(tt))(),Q.CO.deck=Object.assign(Q.CO.deck||{},{VERSION:tt,version:tt,log:l.Z,_registerLoggers:h.z}),(0,Y.fh)([J,[K.S,{imagebitmap:{premultiplyAlpha:"none"}}]]));var nt=Q.CO.deck,rt=n(9835),it=n(2525),ot=n(7577),st=n(4211),at=n(6948);class ut extends ot.Z{static isSupported(t,e=[]){const n=(0,R.D0)(t),r=(0,st.ag)(t,at.h.TIMER_QUERY);let i=n||r;for(const o of e)switch(o){case"queries":i=i&&n;break;case"timers":i=i&&r;break;default:(0,it.h)(!1)}return i}constructor(t,e={}){super(t,e),this.target=null,this._queryPending=!1,this._pollingPromise=null,Object.seal(this)}beginTimeElapsedQuery(){return this.begin(35007)}beginOcclusionQuery({conservative:t=!1}={}){return this.begin(t?36202:35887)}beginTransformFeedbackQuery(){return this.begin(35976)}begin(t){return this._queryPending||(this.target=t,this.gl2.beginQuery(this.target,this.handle)),this}end(){return this._queryPending||this.target&&(this.gl2.endQuery(this.target),this.target=null,this._queryPending=!0),this}isResultAvailable(){if(!this._queryPending)return!1;const t=this.gl2.getQueryParameter(this.handle,34919);return t&&(this._queryPending=!1),t}isTimerDisjoint(){return this.gl2.getParameter(36795)}getResult(){return this.gl2.getQueryParameter(this.handle,34918)}getTimerMilliseconds(){return this.getResult()/1e6}createPoll(t=Number.POSITIVE_INFINITY){if(this._pollingPromise)return this._pollingPromise;let e=0;return this._pollingPromise=new Promise(((n,r)=>{const i=()=>{this.isResultAvailable()?(n(this.getResult()),this._pollingPromise=null):e++>t?(r("Timed out"),this._pollingPromise=null):requestAnimationFrame(i)};requestAnimationFrame(i)})),this._pollingPromise}_createHandle(){return ut.isSupported(this.gl)?this.gl2.createQuery():null}_deleteHandle(){this.gl2.deleteQuery(this.handle)}}const ct=(0,Q.jU)()&&"undefined"!==typeof document;let lt=0;class ht{constructor(t={}){const{onCreateContext:e=(t=>(0,R.s9)(t)),onAddHTML:n=null,onInitialize:r=(()=>{}),onRender:i=(()=>{}),onFinalize:o=(()=>{}),onError:s,gl:a=null,glOptions:u={},debug:c=!1,createFramebuffer:l=!1,autoResizeViewport:h=!0,autoResizeDrawingBuffer:f=!0,stats:d=rt.l.get("animation-loop-"+lt++)}=t;let{useDevicePixels:p=!0}=t;"useDevicePixelRatio"in t&&(R.cM.deprecated("useDevicePixelRatio","useDevicePixels")(),p=t.useDevicePixelRatio),this.props={onCreateContext:e,onAddHTML:n,onInitialize:r,onRender:i,onFinalize:o,onError:s,gl:a,glOptions:u,debug:c,createFramebuffer:l},this.gl=a,this.needsRedraw=null,this.timeline=null,this.stats=d,this.cpuTime=this.stats.get("CPU Time"),this.gpuTime=this.stats.get("GPU Time"),this.frameRate=this.stats.get("Frame Rate"),this._initialized=!1,this._running=!1,this._animationFrameId=null,this._nextFramePromise=null,this._resolveNextFrame=null,this._cpuStartTime=0,this.setProps({autoResizeViewport:h,autoResizeDrawingBuffer:f,useDevicePixels:p}),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this._pageLoadPromise=null,this._onMousemove=this._onMousemove.bind(this),this._onMouseleave=this._onMouseleave.bind(this)}delete(){this.stop(),this._setDisplay(null)}setNeedsRedraw(t){return(0,it.h)("string"===typeof t),this.needsRedraw=this.needsRedraw||t,this}setProps(t){return"autoResizeViewport"in t&&(this.autoResizeViewport=t.autoResizeViewport),"autoResizeDrawingBuffer"in t&&(this.autoResizeDrawingBuffer=t.autoResizeDrawingBuffer),"useDevicePixels"in t&&(this.useDevicePixels=t.useDevicePixels),this}start(t={}){if(this._running)return this;this._running=!0;const e=this._getPageLoadPromise().then((()=>!this._running||this._initialized?null:(this._createWebGLContext(t),this._createFramebuffer(),this._startEventHandling(),this._initializeCallbackData(),this._updateCallbackData(),this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._gpuTimeQuery=ut.isSupported(this.gl,["timers"])?new ut(this.gl):null,this._initialized=!0,this.onInitialize(this.animationProps)))).then((t=>{this._running&&(this._addCallbackData(t||{}),!1!==t&&this._startLoop())}));return this.props.onError&&e.catch(this.props.onError),this}redraw(){return this.isContextLost()||(this._beginTimers(),this._setupFrame(),this._updateCallbackData(),this._renderFrame(this.animationProps),this._clearNeedsRedraw(),this.offScreen&&this.gl.commit&&this.gl.commit(),this._resolveNextFrame&&(this._resolveNextFrame(this),this._nextFramePromise=null,this._resolveNextFrame=null),this._endTimers()),this}stop(){return this._running&&(this._finalizeCallbackData(),this._cancelAnimationFrame(this._animationFrameId),this._nextFramePromise=null,this._resolveNextFrame=null,this._animationFrameId=null,this._running=!1),this}attachTimeline(t){return this.timeline=t,this.timeline}detachTimeline(){this.timeline=null}waitForRender(){return this.setNeedsRedraw("waitForRender"),this._nextFramePromise||(this._nextFramePromise=new Promise((t=>{this._resolveNextFrame=t}))),this._nextFramePromise}async toDataURL(){return this.setNeedsRedraw("toDataURL"),await this.waitForRender(),this.gl.canvas.toDataURL()}isContextLost(){return this.gl.isContextLost()}onCreateContext(...t){return this.props.onCreateContext(...t)}onInitialize(...t){return this.props.onInitialize(...t)}onRender(...t){return this.props.onRender(...t)}onFinalize(...t){return this.props.onFinalize(...t)}getHTMLControlValue(t,e=1){const n=document.getElementById(t);return n?Number(n.value):e}
1setViewParameters(){return R.cM.removed("AnimationLoop.setViewParameters","AnimationLoop.setProps")(),this}_startLoop(){const t=()=>{this._running&&(this.redraw(),this._animationFrameId=this._requestAnimationFrame(t))};this._cancelAnimationFrame(this._animationFrameId),this._animationFrameId=this._requestAnimationFrame(t)}_getPageLoadPromise(){return this._pageLoadPromise||(this._pageLoadPromise=ct?new Promise(((t,e)=>{ct&&"complete"===document.readyState?t(document):window.addEventListener("load",(()=>{t(document)}))})):Promise.resolve({})),this._pageLoadPromise}_setDisplay(t){this.display&&(this.display.delete(),this.display.animationLoop=null),t&&(t.animationLoop=this),this.display=t}_cancelAnimationFrame(t){return this.display&&this.display.cancelAnimationFrame?this.display.cancelAnimationFrame(t):(e=t,"undefined"!==typeof window&&window.cancelAnimationFrame?window.cancelAnimationFrame(e):clearTimeout(e));var e}_requestAnimationFrame(t){if(this._running)return this.display&&this.display.requestAnimationFrame?this.display.requestAnimationFrame(t):(e=t,"undefined"!==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame(e):setTimeout(e,1e3/60));var e}_renderFrame(...t){this.display?this.display._renderFrame(...t):this.onRender(...t)}_clearNeedsRedraw(){this.needsRedraw=null}_setupFrame(){this._resizeCanvasDrawingBuffer(),this._resizeViewport(),this._resizeFramebuffer()}_initializeCallbackData(){this.animationProps={gl:this.gl,stop:this.stop,canvas:this.gl.canvas,framebuffer:this.framebuffer,useDevicePixels:this.useDevicePixels,needsRedraw:null,startTime:Date.now(),engineTime:0,tick:0,tock:0,time:0,_timeline:this.timeline,_loop:this,_animationLoop:this,_mousePosition:null}}_updateCallbackData(){const{width:t,height:e,aspect:n}=this._getSizeAndAspect();t===this.animationProps.width&&e===this.animationProps.height||this.setNeedsRedraw("drawing buffer resized"),n!==this.animationProps.aspect&&this.setNeedsRedraw("drawing buffer aspect changed"),this.animationProps.width=t,this.animationProps.height=e,this.animationProps.aspect=n,this.animationProps.needsRedraw=this.needsRedraw,this.animationProps.engineTime=Date.now()-this.animationProps.startTime,this.timeline&&this.timeline.update(this.animationProps.engineTime),this.animationProps.tick=Math.floor(this.animationProps.time/1e3*60),this.animationProps.tock++,this.animationProps.time=this.timeline?this.timeline.getTime():this.animationProps.engineTime,this.animationProps._offScreen=this.offScreen}_finalizeCallbackData(){this.onFinalize(this.animationProps)}_addCallbackData(t){"object"===typeof t&&null!==t&&(this.animationProps=Object.assign({},this.animationProps,t))}_createWebGLContext(t){if(this.offScreen=t.canvas&&"undefined"!==typeof OffscreenCanvas&&t.canvas instanceof OffscreenCanvas,t=Object.assign({},t,this.props.glOptions),this.gl=this.props.gl?(0,R.yW)(this.props.gl,t):this.onCreateContext(t),!(0,R.UF)(this.gl))throw new Error("AnimationLoop.onCreateContext - illegal context returned");(0,R.kL)(this.gl),this._createInfoDiv()}_createInfoDiv(){if(this.gl.canvas&&this.props.onAddHTML){const t=document.createElement("div");document.body.appendChild(t),t.style.position="relative";const e=document.createElement("div");e.style.position="absolute",e.style.left="10px",e.style.bottom="10px",e.style.width="300px",e.style.background="white",t.appendChild(this.gl.canvas),t.appendChild(e);const n=this.props.onAddHTML(e);n&&(e.innerHTML=n)}}_getSizeAndAspect(){const t=this.gl.drawingBufferWidth,e=this.gl.drawingBufferHeight;let n=1;const{canvas:r}=this.gl;return r&&r.clientHeight?n=r.clientWidth/r.clientHeight:t>0&&e>0&&(n=t/e),{width:t,height:e,aspect:n}}_resizeViewport(){this.autoResizeViewport&&this.gl.viewport(0,0,this.gl.drawingBufferWidth,this.gl.drawingBufferHeight)}_resizeCanvasDrawingBuffer(){this.autoResizeDrawingBuffer&&(0,R.aQ)(this.gl,{useDevicePixels:this.useDevicePixels})}_createFramebuffer(){this.props.createFramebuffer&&(this.framebuffer=new N.Z(this.gl))}_resizeFramebuffer(){this.framebuffer&&this.framebuffer.resize({width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight})}_beginTimers(){this.frameRate.timeEnd(),this.frameRate.timeStart(),this._gpuTimeQuery&&this._gpuTimeQuery.isResultAvailable()&&!this._gpuTimeQuery.isTimerDisjoint(
1)&&this.stats.get("GPU Time").addTime(this._gpuTimeQuery.getTimerMilliseconds()),this._gpuTimeQuery&&this._gpuTimeQuery.beginTimeElapsedQuery(),this.cpuTime.timeStart()}_endTimers(){this.cpuTime.timeEnd(),this._gpuTimeQuery&&this._gpuTimeQuery.end()}_startEventHandling(){const{canvas:t}=this.gl;t&&(t.addEventListener("mousemove",this._onMousemove),t.addEventListener("mouseleave",this._onMouseleave))}_onMousemove(t){this.animationProps._mousePosition=[t.offsetX,t.offsetY]}_onMouseleave(t){this.animationProps._mousePosition=null}}var ft=n(2317),dt=n(5304),pt=n(4088);function gt(){}const mt={id:"",width:"100%",height:"100%",pickingRadius:0,layerFilter:null,glOptions:{},gl:null,layers:[],effects:[],views:null,controller:null,useDevicePixels:!0,touchAction:"none",eventRecognizerOptions:{},_framebuffer:null,_animate:!1,_pickable:!0,_typedArrayManagerProps:{},onWebGLInitialized:gt,onResize:gt,onViewStateChange:gt,onInteractionStateChange:gt,onBeforeRender:gt,onAfterRender:gt,onLoad:gt,onError:(t,e)=>l.Z.error(t)(),_onMetrics:null,getCursor:({isDragging:t})=>t?"grabbing":"grab",debug:!1,drawPickingColors:!1};class vt{constructor(t){t={...mt,...t},this.props={},this.width=0,this.height=0,this.viewManager=null,this.layerManager=null,this.effectManager=null,this.deckRenderer=null,this.deckPicker=null,this._needsRedraw=!0,this._pickRequest={},this._lastPointerDownInfo=null,this.viewState=null,this.interactiveState={isHovering:!1,isDragging:!1},this._onEvent=this._onEvent.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._onPointerMove=this._onPointerMove.bind(this),t.viewState&&t.initialViewState&&l.Z.warn("View state tracking is disabled. Use either `initialViewState` for auto update or `viewState` for manual update.")(),"IE"===(0,Q.qs)()&&l.Z.warn("IE 11 support will be deprecated
1in v8.0")(),t.gl||"undefined"!==typeof document&&(this.canvas=this._createCanvas(t)),this.animationLoop=this._createAnimationLoop(t),this.stats=new d.jk({id:"deck.gl"}),this.metrics={fps:0,setPropsTime:0,updateAttributesTime:0,framesRedrawn:0,pickTime:0,pickCount:0,gpuTime:0,gpuTimePerFrame:0,cpuTime:0,cpuTimePerFrame:0,bufferMemory:0,textureMemory:0,renderbufferMemory:0,gpuMemory:0},this._metricsCounter=0,this.setProps(t),t._typedArrayManagerProps&&X.Z.setProps(t._typedArrayManagerProps),this.animationLoop.start()}finalize(){this.animationLoop.stop(),this.animationLoop=null,this._lastPointerDownInfo=null,this.layerManager&&(this.layerManager.finalize(),this.layerManager=null,this.viewManager.finalize(),this.viewManager=null,this.effectManager.finalize(),this.effectManager=null,this.deckRenderer.finalize(),this.deckRenderer=null,this.deckPicker.finalize(),this.deckPicker=null,this.eventManager.destroy(),this.eventManager=null,this.tooltip.remove(),this.tooltip=null),this.props.canvas||this.props.gl||!this.canvas||(this.canvas.parentElement.removeChild(this.canvas),this.canvas=null)}setProps(t){this.stats.get("setProps Time").timeStart(),"onLayerHover"in t&&l.Z.removed("onLayerHover","onHover")(),"onLayerClick"in t&&l.Z.removed("onLayerClick","onClick")(),t.initialViewState&&!(0,T.v)(this.props.initialViewState,t.initialViewState)&&(this.viewState=t.initialViewState),Object.assign(this.props,t),this._setCanvasSize(this.props);const e=Object.create(this.props);Object.assign(e,{views:this._getViews(),width:this.width,height:this.height,viewState:this._getViewState()}),this.animationLoop.setProps(e),this.layerManager&&(this.viewManager.setProps(e),this.layerManager.activateViewport(this.getViewports()[0]),this.layerManager.setProps(e),this.effectManager.setProps(e),this.deckRenderer.setProps(e),this.deckPicker.setProps(e)),this.stats.get("setProps Time").timeEnd()}needsRedraw(t={clearRedrawFlags:!1}){if(this.props._animate)return"Deck._animate";let e=this._needsRedraw;t.clearRedrawFlags&&(this._needsRedraw=!1);const n=this.viewManager.needsRedraw(t),r=this.layerManager.needsRedraw(t),i=this.effectManager.needsRedraw(t),o=this.deckRenderer.needsRedraw(t);return e=e||n||r||i||o,e}redraw(t){if(!this.layerManager)return;const e=t||this.needsRedraw({clearRedrawFlags:!0});e&&(this.stats.get("Redraw Count").incrementCount(),this.props._customRender?this.props._customRender(e):this._drawLayers(e))}getViews(){return this.viewManager.views}getViewports(t){return this.viewManager.getViewports(t)}pickObject(t){const e=this._pick("pickObject","pickObject Time",t).result;return e.length?e[0]:null}pickMultipleObjects(t){return t.depth=t.depth||10,this._pick("pickObject","pickMultipleObjects Time",t).result}pickObjects(t){return this._pick("pickObjects","pickObjects Time",t)}_addResources(t,e=!1){for(const n in t)this.layerManager.resourceManager.add({resourceId:n,data:t[n],forceUpdate:e})}_removeResources(t){for(const e of t)this.layerManager.resourceManager.remove(e)}_pick(t,e,n){const{stats:r}=this;r.get("Pick Count").incrementCount(),r.get(e).timeStart();const i=this.deckPicker[t]({layers:this.layerManager.getLayers(n),views:this.viewManager.getViews(),viewports:this.getViewports(n),onViewportActive:this.layerManager.activateViewport,...n});return r.get(e).timeEnd(),i}_createCanvas(t){let e=t.canvas;if("string"===typeof e&&(e=document.getElementById(e),(0,dt.Z)(e)),!e){e=document.createElement("canvas"),e.id=t.id||"deckgl-overlay";(t.parent||document.body).appendChild(e)}return Object.assign(e.style,t.style),e}_setCanvasSize(t){if(!this.canvas)return;let{width:e,height:n}=t;(e||0===e)&&(e=Number.isFinite(e)?"".concat(e,"px"):e,this.canvas.style.width=e),(n||0===n)&&(n=Number.isFinite(n)?"".concat(n,"px"):n,this.canvas.style.position="absolute",this.canvas.style.height=n)}_updateCanvasSize(){if(this._checkForCanvasSizeChange()){const{width:t,height:e}=this;this.viewManager.setProps({width:t,height:e}),this.props.onResize({width:this.width,height:this.height})}}_checkForCanvasSizeChange(){const{canvas:t}=this;if(!t)return!1;const e=t.clientWidth||t.width,n=t.clientHeight||t.height;return(e!==this.width||n!==this.height)&&(this.width=e,this.height=n,!0)}_createAnimationLoop(t){const{width:e,height:n,gl:r,glOptions:i,debug:o,onError:s,onBeforeRender:a,onAfterRender:u,useDevicePixels:c,autoResizeDrawingBuffer:l}=t;return new ht({width:e,height:n,useDevicePixels:c,autoResizeDrawingBuffer:l,autoResizeViewport:!1,gl:r,onCreateContext:t=>(0,R.s9)({...i,...t,canvas:this.canvas,debug:o,onContextLost:()=>this._onContextLost()}),onInitialize:t=>this._setGLContext(t.gl),onRender:this._onRenderFrame.bind(this),onBeforeRender:a,onAfterRender:u,onError:s})}_getViewState(){return this.props.viewState||this.viewState}_getViews(){let t=this.props.views||[new A.Z({id:"default-view"})];return t=Array.isArray(t)?t:[t],t.length&&this.props.controller&&(t[0].props.controller=this.props.controller),t}_onContextLost(){const{onError:t}=this.props;this.animationLoop&&t&&t(new Error("WebGL context is lost"))}_onPointerMove(t){const{_pickRequest:e}=this;if("pointerleave"===t.type)e.x=-1,e.y=-1,e.radius=0;else{if(t.leftButton||t.rightButton)return;{const n=t.offsetCenter;if(!n)return;e.x=n.x,e.y=n.y,e.radius=this.props.pickingRadius}}this.layerManager&&(this.layerManager.context.mousePosition={x:e.x,y:e.y}),e.event=t,e.mode="hover"}_pickAndCallback(){const{_pickRequest:t}=this;if(t.event){const{result:e,emptyInfo:n}=this._pick("pickObject","pickObject Time",t);this.interactiveState.isHovering=e.length>0;let r=n,i=!1;for(const o of e)r=o,i=o.layer.onHover(o,t.event);if(!i&&this.props.onHover&&this.props.onHover(r,t.event),this.props.getTooltip){const t=this.props.getTooltip(r);this.tooltip.setTooltip(t,r.x,r.y)}t.event=null}}
1_updateCursor(){const t=this.props.parent||this.canvas;t&&(t.style.cursor=this.props.getCursor(this.interactiveState))}_setGLContext(t){if(this.layerManager)return;this.canvas||(this.canvas=t.canvas,(0,R.yW)(t,{enable:!0,copyState:!0})),this.tooltip=new q(this.canvas),(0,R.dR)(t,{blend:!0,blendFunc:[770,771,1,771],polygonOffsetFill:!0,depthTest:!0,depthFunc:515}),this.props.onWebGLInitialized(t);const e=new u;e.play(),this.animationLoop.attachTimeline(e),this.eventManager=new ft.Q(this.props.parent||t.canvas,{touchAction:this.props.touchAction,recognizerOptions:this.props.eventRecognizerOptions,events:{pointerdown:this._onPointerDown,pointermove:this._onPointerMove,pointerleave:this._onPointerMove}});for(const r in pt.FP)this.eventManager.on(r,this._onEvent);this.viewManager=new P({timeline:e,eventManager:this.eventManager,onViewStateChange:this._onViewStateChange.bind(this),onInteractionStateChange:this._onInteractionStateChange.bind(this),views:this._getViews(),viewState:this._getViewState(),width:this.width,height:this.height});const n=this.viewManager.getViewports()[0];this.layerManager=new E(t,{deck:this,stats:this.stats,viewport:n,timeline:e}),this.effectManager=new O,this.deckRenderer=new F(t),this.deckPicker=new W(t),this.setProps(this.props),this._updateCanvasSize(),this.props.onLoad()}_drawLayers(t,e){const{gl:n}=this.layerManager.context;(0,R.dR)(n,this.props.parameters),this.props.onBeforeRender({gl:n}),this.deckRenderer.renderLayers({target:this.props._framebuffer,layers:this.layerManager.getLayers(),viewports:this.viewManager.getViewports(),onViewportActive:this.layerManager.activateViewport,views:this.viewManager.getViews(),pass:"screen",redrawReason:t,effects:this.effectManager.getEffects(),...e}),this.props.onAfterRender({gl:n})}_onRenderFrame(t){this._getFrameStats(),this._metricsCounter++%60===0&&(this._getMetrics(),this.stats.reset(),l.Z.table(4,this.metrics)(),this.props._onMetrics&&this.props._onMetrics(this.metrics)),this._updateCanvasSize(),this._updateCursor(),this.tooltip.isVisible&&this.viewManager.needsRedraw()&&this.tooltip.setTooltip(null),this.layerManager.updateLayers(),this._pickAndCallback(),this.redraw(!1),this.viewManager&&this.viewManager.updateViewStates()}_onViewStateChange(t){const e=this.props.onViewStateChange(t)||t.viewState;this.viewState&&(this.viewState={...this.viewState,[t.viewId]:e},this.props.viewState||this.viewManager&&this.viewManager.setProps({viewState:this.viewState}))}_onInteractionStateChange(t){this.interactiveState.isDragging=t.isDragging,this.props.onInteractionStateChange(t)}_onEvent(t){const e=pt.FP[t.type],n=t.offsetCenter;if(!e||!n)return;const r=this.layerManager.getLayers(),i=this.deckPicker.getLastPickedObject({x:n.x,y:n.y,layers:r,viewports:this.getViewports(n)},this._lastPointerDownInfo),{layer:o}=i,s=o&&(o[e.handler]||o.props[e.handler]),a=this.props[e.handler];let u=!1;s&&(u=s.call(o,i,t)),!u&&a&&a(i,t)}_onPointerDown(t){const e=t.offsetCenter;this._lastPointerDownInfo=this.pickObject({x:e.x,y:e.y,radius:this.props.pickingRadius})}_getFrameStats(){const{stats:t}=this;t.get("frameRate").timeEnd(),t.get("frameRate").timeStart();const e=this.animationLoop.stats;t.get("GPU Time").addTime(e.get("GPU Time").lastTiming),t.get("CPU Time").addTime(e.get("CPU Time").lastTiming)}_getMetrics(){const{metrics:t,stats:e}=this;t.fps=e.get("frameRate").getHz(),t.setPropsTime=e.get("setProps Time").time,t.updateAttributesTime=e.get("Update Attributes").time,t.framesRedrawn=e.get("Redraw Count").count,t.pickTime=e.get("pickObject Time").time+e.get("pickMultipleObjects Time").time+e.get("pickObjects Time").time,t.pickCount=e.get("Pick Count").count,t.gpuTime=e.get("GPU Time").time,t.cpuTime=e.get("CPU Time").time,t.gpuTimePerFrame=e.get("GPU Time").getAverageTime(),t.cpuTimePerFrame=e.get("CPU Time").getAverageTime();const n=rt.l.get("Memory Usage");t.bufferMemory=n.get("Buffer Memory").count,t.textureMemory=n.get("Texture Memory").count,t.renderbufferMemory=n.get("Renderbuffer Memory").count,t.gpuMemory=n.get("GPU Memory").count}}vt.getPropTypes=function(t){return{id:t.string,width:t.oneOfType([t.number,t.string]),height:t.oneOfType([t.number,t.string]),layers:t.oneOfType([t.object,t.array]),layerFilter:t.func,views:t.oneOfType([t.object,t.array]),viewState:t.object,effects:t.arrayOf(t.instanceOf(C.Z)),c
1ontroller:t.oneOfType([t.func,t.bool,t.object]),gl:t.object,glOptions:t.object,parameters:t.object,pickingRadius:t.number,useDevicePixels:t.oneOfType([t.bool,t.number]),touchAction:t.string,eventRecognizerOptions:t.object,onWebGLInitialized:t.func,onResize:t.func,onViewStateChange:t.func,onInteractionStateChange:t.func,onBeforeRender:t.func,onAfterRender:t.func,onLoad:t.func,onError:t.func,debug:t.bool,drawPickingColors:t.bool,_framebuffer:t.object,_animate:t.bool,_pickable:t.bool,_typedArrayManagerProps:t.object}},vt.defaultProps=mt,vt.VERSION=nt.VERSION;var yt="undefined"!==typeof window?r.useLayoutEffect:r.useEffect;function bt(t,e){for(;t;){if(t===e)return!0;t=Object.getPrototypeOf(t)}return!1}var _t=n(4897),wt=n(1069);function xt(t){return t?"function"===typeof t?(0,r.createElement)(_t.Z,{},t):Array.isArray(t)?t.map(xt):t.type===r.Fragment?xt(t.props.children):(bt(t.type,_t.Z),t):t}const Et={position:"absolute",zIndex:-1};function Tt(t,e){return t?"function"===typeof t?t(e):Array.isArray(t)?t.map((t=>Tt(t,e))):function(t){const e=t&&t.type,n=e&&e.defaultProps;return n&&n.mapStyle}(t)?(e.style=Et,(0,r.cloneElement)(t,e)):function(t){const e=t&&t.type;return e&&e.deckGLViewProps}(t)?(0,r.cloneElement)(t,e):t:t}const Pt={mixBlendMode:null};function At(t){t.redrawReason&&(t.deck._drawLayers(t.redrawReason),t.redrawReason=null)}const St=(0,r.forwardRef)(((t,e)=>{const n=(0,r.useRef)({}).current,[i,o]=(0,r.useState)(0);n.forceUpdate=o;const s=(0,r.useRef)(null),a=(0,r.useRef)(null),u=(0,r.useMemo)((()=>function({children:t,layers:e,views:n}){const i=[],o=[],s={};return r.Children.forEach(xt(t),(t=>{if(t){const e=t.type;if(bt(e,wt.Z)){const n=function(t,e){const n={},r=t.defaultProps||{};for(const i in e)r[i]!==e[i]&&(n[i]=e[i]);return new t(n)}(e,t.props);o.push(n)}else i.push(t);if(e!==_t.Z&&bt(e,_t.Z)&&t.props.id){const n=new e(t.props);s[n.id]=n}}})),Object.keys(s).length>0&&(Array.isArray(n)?n.forEach((t=>{s[t.id]=t})):n&&(s[n.id]=n),n=Object.values(s)),{layers:e=o.length>0?[...o,...e]:e,children:i,views:n}}(t)),[t.layers,t.views,t.children]);let c=!0;const l=e=>c&&t.viewState?(n.viewStateUpdateRequested=e,null):(n.viewStateUpdateRequested=null,t.onViewStateChange(e)),h=e=>{c?n.interactionStateUpdateRequested=e:(n.interactionStateUpdateRequested=null,t.onInteractionStateChange(e))},f=(0,r.useMemo)((()=>{const e={...t,style:null,width:"100%",height:"100%",layers:u.layers,views:u.views,onViewStateChange:l,onInteractionStateChange:h};return n.deck&&n.deck.setProps(e),e}),[t]);(0,r.useEffect)((()=>(n.deck=function(t,e){const n=new(e.Deck||vt)({...e,style:null,width:"100%",height:"100%",_customRender:e=>{t.redrawReason=e;const r=n.viewManager.getViewports();t.lastRenderedViewports!==r?t.forceUpdate((t=>t+1)):At(t)}});return n}(n,{...f,parent:s.current,canvas:a.current}),()=>n.deck.finalize())),[]),yt((()=>{At(n);const{viewStateUpdateRequested:t,interactionStateUpdateRequested:e}=n;t&&l(t),e&&h(e)})),(0,r.useImperativeHandle)(e,(()=>function(t){const e={pickObject:e=>t.deck.pickObject(e),pickMultipleObjects:e=>t.deck.pickMultipleObjects(e),pickObjects:e=>t.deck.pickObjects(e)};return Object.defineProperty(e,"deck",{get:()=>t.deck}),e}(n)),[]);const{viewManager:d}=n.deck||{},p=d&&d.getViewports(),{ContextProvider:g,width:m,height:v,id:y,style:b}=t,{containerStyle:_,canvasStyle:w}=(0,r.useMemo)((()=>function({width:t,height:e,style:n}){const r={position:"absolute",zIndex:0,left:0,top:0,width:t,height:e},i={left:0,top:0};if(n)for(const o in n)o in Pt?i[o]=n[o]:r[o]=n[o];return{containerStyle:r,canvasStyle:i}}({width:m,height:v,style:b})),[m,v,b]);if(!n.viewStateUpdateRequested&&n.lastRenderedViewports===p||n.version!==i){n.lastRenderedViewports=p,n.version=i;const t=function({children:t,deck:e,ContextProvider:n}){const{viewManager:i}=e||{};if(!i||!i.views.length)return[];const o={},s=i.views[0].id;for(const r of t){let t=s,e=r;bt(r.type,_t.Z)&&(t=r.props.id||s,e=r.props.children);const n=i.getViewport(t),a=i.getViewState(t);if(n){const{x:r,y:i,width:s,height:u}=n;e=Tt(e,{x:r,y:i,width:s,height:u,viewport:n,viewState:a}),o[t]||(o[t]={viewport:n,children:[]}),o[t].children.push(e)}}return Object.keys(o).map((t=>{const{viewport:i,children:s}=o[t],{x:a,y:u,width:c,height:l}=i,h={position:"absolute",left:a,top:u,width:c,height:l},f="view-".concat(t),d=(0,r.createElement)("div",{key:f,id:f,style:h},...s);if(n){const o={viewport:i,container:e.canvas.offsetParent,eventManager:e.eventManager,onViewStateChange:n=>{n.viewId=t,e._onViewStateChange(n)}};return(0,r.createElement)(n,{key:f,value:o},d)}return d}))}
1({children:u.children,deck:n.deck,ContextProvider:g}),e=(0,r.createElement)("canvas",{key:"canvas",id:y||"deckgl-overlay",ref:a,style:w});n.control=(0,r.createElement)("div",{id:"".concat(y||"deckgl","-wrapper"),ref:s,style:_},[e,t])}return c=!1,n.control}));St.propTypes=vt.getPropTypes(o()),St.defaultProps=vt.defaultProps;var Mt=St},6600:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=function(t){var e={};return function(n){return void 0===e[n]&&(e[n]=t(n)),e[n]}}((function(t){return r.test(t)||111===t.charCodeAt(0)&&110===t.charCodeAt(1)&&t.charCodeAt(2)<91}))},6255:function(t,e,n){"use strict";n.d(e,{Kn:function(){return o},Ss:function(){return s},TW:function(){return a},D0:function(){return u},Ew:function(){return c},Lj:function(){return l},zH:function(){return h},Os:function(){return f}});const r=t=>"boolean"===typeof t,i=t=>"function"===typeof t,o=t=>null!==t&&"object"===typeof t,s=t=>o(t)&&t.constructor==={}.constructor,a=t=>t&&"function"===typeof t[Symbol.iterator],u=t=>t&&"function"===typeof t[Symbol.asyncIterator],c=t=>"undefined"!==typeof Response&&t instanceof Response||t&&t.arrayBuffer&&t.text&&t.json,l=t=>"undefined"!==typeof Blob&&t instanceof Blob,h=t=>t&&"object"===typeof t&&t.isBuffer,f=t=>(t=>"undefined"!==typeof ReadableStream&&t instanceof ReadableStream||o(t)&&i(t.tee)&&i(t.cancel)&&i(t.getReader))(t)||(t=>o(t)&&i(t.read)&&i(t.pipe)&&r(t.readable))(t)},3079:function(t,e,n){"use strict";n.d(e,{z:function(){return z}});var r=n(6255),i=n(2033),o=n(7504),s=n(6040);var a=n(4942),u=n(6013);const c=new Map;function l(t){(0,s.h)(t.source&&!t.url||!t.source&&t.url);let e=c.get(t.source||t.url);return e||(t.url&&(e=function(t){if(!t.startsWith("http"))return t;return h((e=t,`try {\n importScripts('${e}');\n} catch (error) {\n console.error(error);\n throw error;\n}`));var e}(t.url),c.set(t.url,e)),t.source&&(e=h(t.source),c.set(t.source,e))),(0,s.h)(e),e}function h(t){const e=new Blob([t],{type:"application/javascript"});return URL.createObjectURL(e)}function f(t,e=!0,n){const r=n||new Set;if(t){if(d(t))r.add(t);else if(d(t.buffer))r.add(t.buffer);else if(ArrayBuffer.isView(t));else if(e&&"object"===typeof t)for(const i in t)f(t[i],e,r)}else;return void 0===n?Array.from(r):[]}function d(t){return!!t&&(t instanceof ArrayBuffer||("undefined"!==typeof MessagePort&&t instanceof MessagePort||("undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!==typeof OffscreenCanvas&&t instanceof OffscreenCanvas)))}const p=()=>{};class g{static isSupported(){return"undefined"!==typeof Worker}constructor(t){(0,a.Z)(this,"name",void 0),(0,a.Z)(this,"source",void 0),(0,a.Z)(this,"url",void 0),(0,a.Z)(this,"terminated",!1),(0,a.Z)(this,"worker",void 0),(0,a.Z)(this,"onMessage",void 0),(0,a.Z)(this,"onError",void 0),(0,a.Z)(this,"_loadableURL","");const{name:e,source:n,url:r}=t;(0,s.h)(n||r),this.name=e,this.source=n,this.url=r,this.onMessage=p,this.onError=t=>console.log(t),this.worker=this._createBrowserWorker()}destroy(){this.onMessage=p,this.onError=p,this.worker.terminate(),this.terminated=!0}get isRunning(){return Boolean(this.onMessage)}postMessage(t,e){e=e||f(t),this.worker.postMessage(t,e)}_getErrorFromErrorEvent(t){let e="Failed to load ";return e+=`worker ${this.name}. `,t.message&&(e+=`${t.message} in `),t.lineno&&(e+=`:${t.lineno}:${t.colno}`),new Error(e)}_createBrowserWorker(){this._loadableURL=l({source:this.source,url:this.url});const t=new Worker(this._loadableURL,{name:this.name});return t.onmessage=t=>{t.data?this.onMessage(t.data):this.onError(new Error("No data received"))},t.onerror=t=>{this.onError(this._getErrorFromErrorEvent(t)),this.terminated=!0},t.onmessageerror=t=>console.error(t),t}}class m{constructor(t,e){(0,a.Z)(this,"name",void 0),(0,a.Z)(this,"workerThread",void 0),(0,a.Z)(this,"isRunning",void 0),(0,a.Z)(this,"result",void 0),(0,a.Z)(this,"_resolve",void 0),(0,a.Z)(this,"_reject",void 0),this.name=t,this.workerThread=e,this.isRunning=!0,this._resolve=()=>{},this._reject=()=>{},this.result=new Promise(((t,e)=>{this._resolve=t,this._reject=e}))}postMessage(t,e){this.workerThread.postMessage({source:"loaders.gl",type:t,payload:e})}done(t){(0,s.h)(this.isRunning),this.isRunning=!1,this._resolve(t)}error(t){(0,s.h)(this.isRunning),this.isRunning=!1,this._reject(t)}}class v{constructor(t){(0,a.Z)(this,"name","unnamed"),(0,a.Z)(this,"source",void 0),(0,a.Z)(this,"url",void 0),(0,a.Z)(this,"maxConcurrency",1),(0,a.Z)(this,"maxMobileConcurrency",1),(0,a.Z)(this,"onDebug",(()=>{})),(0,a.Z)(this,"reuseWorkers",!0),(0,a.Z)(this,"props",{}),(0,a.Z)(this,"jobQueue",[]),(0,a.Z)(this,"idleQueue",[]),(0,a.Z)(this,"count",0),(0,a.Z)(this,"isDestroyed",!1),this.source=t.source,this.url=t.url,this.setProps(t)}destroy(){this.idleQueue.forEach((t=>t.destroy())),this.isDestroyed=!0}setProps(t){this.props={...this.props,...t},void 0!==t.name&&(this.name=t.name),void 0!==t.maxConcurrency&&(this.maxConcurrency=t.maxConcurrency),void 0!==t.maxMobileConcurrency&&(this.maxMobileConcurrency=t.maxMobileConcurrency),void 0!==t.reuseWorkers&&(this.reuseWorkers=t.reuseWorkers),void 0!==t.onDebug&&(this.onDebug=t.onDebug)}async startJob(t,e=((t,e,n)=>t.done(n)),n=((t,e)=>t.error(e))){const r=new Promise((r=>(this.jobQueue.push({name:t,onMessage:e,onError:n,onStart:r}),this)));return this._startQueuedJob(),await r}async _startQueuedJob(){if(!this.jobQueue.length)return;const t=this._getAvailableWorker();if(!t)return;const e=this.jobQueue.shift();if(e){this.onDebug({message:"Starting job",name:e.name,workerThread:t,backlog:this.jobQueue.length});const n=new m(e.name,t);t.onMessage=t=>e.onMessage(n,t.type,t.payload),t.onError=t=>e.onError(n,t),e.onStart(n);try{await n.result}
1finally{this.returnWorkerToQueue(t)}}}returnWorkerToQueue(t){this.isDestroyed||!this.reuseWorkers||this.count>this._getMaxConcurrency()?(t.destroy(),this.count--):this.idleQueue.push(t),this.isDestroyed||this._startQueuedJob()}_getAvailableWorker(){if(this.idleQueue.length>0)return this.idleQueue.shift()||null;if(this.count<this._getMaxConcurrency()){this.count++;const t=`${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;return new g({name:t,source:this.source,url:this.url})}return null}_getMaxConcurrency(){return u.tq?this.maxMobileConcurrency:this.maxConcurrency}}const y={maxConcurrency:3,maxMobileConcurrency:1,onDebug:()=>{},reuseWorkers:!0};class b{static isSupported(){return g.isSupported()}static getWorkerFarm(t={}){return b._workerFarm=b._workerFarm||new b({}),b._workerFarm.setProps(t),b._workerFarm}constructor(t){(0,a.Z)(this,"props",void 0),(0,a.Z)(this,"workerPools",new Map),this.props={...y},this.setProps(t),this.workerPools=new Map}destroy(){for(const t of this.workerPools.values())t.destroy()}setProps(t){this.props={...this.props,...t};for(const e of this.workerPools.values())e.setProps(this._getWorkerPoolProps())}getWorkerPool(t){const{name:e,source:n,url:r}=t;let i=this.workerPools.get(e);return i||(i=new v({name:e,source:n,url:r}),i.setProps(this._getWorkerPoolProps()),this.workerPools.set(e,i)),i}_getWorkerPoolProps(){return{maxConcurrency:this.props.maxConcurrency,maxMobileConcurrency:this.props.maxMobileConcurrency,reuseWorkers:this.props.reuseWorkers,onDebug:this.props.onDebug}}}(0,a.Z)(b,"_workerFarm",void 0);async function _(t,e,n,r,i){const o=t.id,a=function(t,e={}){const n=e[t.id]||{},r=`${t.id}-worker.js`;let i=n.workerUrl;if("test"===e._workerType&&(i=`modules/${t.module}/dist/${r}`),!i){let e=t.version;"latest"===e&&(e="latest");const n=e?`@${e}`:"";i=`https://unpkg.com/@loaders.gl/${t.module}${n}/dist/${r}`}return(0,s.h)(i),i}(t,n),u=b.getWorkerFarm(n).getWorkerPool({name:o,url:a});n=JSON.parse(JSON.stringify(n));const c=await u.startJob("process-on-worker",w.bind(null,i));c.postMessage("process",{input:e,options:n});const l=await c.result;return await l.result}async function w(t,e,n,r){switch(n){case"done":e.done(r);break;case"error":e.error(r.error);break;case"process":const{id:o,input:s,options:a}=r;try{const n=await t(s,a);e.postMessage("done",{id:o,result:n})}catch(i){const t=i instanceof Error?i.message:"unknown error";e.postMessage("error",{id:o,error:t})}break;default:console.warn(`parse-with-worker unknown message ${n}`)}}var x=n(5680);const E=262144;var T=n(4959);function P(t,e){return T.jU?async function*(t,e){const n=t.getReader();let r;try{for(;;){const t=r||n.read();null!==e&&void 0!==e&&e._streamReadAhead&&(r=n.read());const{done:i,value:o}=await t;if(i)return;yield(0,x.rJ)(o)}}catch(i){n.releaseLock()}}(t,e):async function*(t,e){for await(const n of t)yield(0,x.rJ)(n)}(t)}function A(t,e){if("string"===typeof t)return function*(t,e){const n=(null===e||void 0===e?void 0:e.chunkSize)||262144;let r=0;const i=new TextEncoder;for(;r<t.length;){const e=Math.min(t.length-r,n),o=t.slice(r,r+e);r+=e,yield i.encode(o)}}(t,e);if(t instanceof ArrayBuffer)return function*(t,e={}){const{chunkSize:n=E}=e;let r=0;for(;r<t.byteLength;){const e=Math.min(t.byteLength-r,n),i=new ArrayBuffer(e),o=new Uint8Array(t,r,e);new Uint8Array(i).set(o),r+=e,yield i}}(t,e);if((0,r.Lj)(t))return async function*(t,e){const n=(null===e||void 0===e?void 0:e.chunkSize)||1048576;let r=0;for(;r<t.size;){const e=r+n,i=await t.slice(r,e).arrayBuffer();r=e,yield i}}(t,e);if((0,r.Os)(t))return P(t,e);if((0,r.Ew)(t)){return P(t.body,e)}throw new Error("makeIterator")}var S=n(7927);const M="Cannot convert supplied data type";async function O(t,e,n){const i=t instanceof ArrayBuffer||ArrayBuffer.isView(t);if("string"===typeof t||i)return function(t,e,n){if(e.text&&"string"===typeof t)return t;if((0,r.zH)(t)&&(t=t.buffer),t instanceof ArrayBuffer){const n=t;return e.text&&!e.binary?new TextDecoder("utf8").decode(n):n}if(ArrayBuffer.isView(t)){if(e.text&&!e.binary)return new TextDecoder("utf8").decode(t);let n=t.buffer;const r=t.byteLength||t.length;return 0===t.byteOffset&&r===n.byteLength||(n=n.slice(t.byteOffset,t.byteOffset+r)),n}throw new Error(M)}(t,e);if((0,r.Lj)(t)&&(t=await(0,S.L1)(t)),(0,r.Ew)(t)){const n=t;return await(0,S.mm)(n),e.binary?await n.arrayBuffer():await n.text()}if((0,r.Os)(t)&&(t=A(t,n)),(0,r.TW)(t)||(0,r.D0)(t))return async function(t){const e=[];for await(const n of t)e.push(n);return(0,x.JY)(...e)}(t);throw new Error(M)}var C=n(9752),L=n(6228);const k=/\.([^.]+)$/;function R(t,e=[],n,r){if(!I(t))return null;if(e&&!Array.isArray(e))return(0,i.T)(e);let o=[];e&&(o=o.concat(e)),null!==n&&void 0!==n&&n.ignoreRegisteredLoaders||o.push(...(0,L.kO)()),function(t){for(const e of t)(0,i.T)(e)}(o);const s=function(t,e,n,r){const{url:i,type:o}=(0,C.l)(t),s=i||(null===r||void 0===r?void 0:r.url);let a=null;null!==n&&void 0!==n&&n.mimeType&&(a=D(e,null===n||void 0===n?void 0:n.mimeType));return a=a||function(t,e){const n=e&&k.exec(e),r=n&&n[1];return r?function(t,e){e=e.toLowerCase();for(const n of t)for(const t of n.extensions)if(t.toLowerCase()===e)return n;return null}(t,r):null}(e,s),a=a||D(e,o),a=a||function(t,e){if(!e)return null;for(const n of t)if("string"===typeof e){if(N(e,n))return n}else if(ArrayBuffer.isView(e)){if(F(e.buffer,e.byteOffset,n))return n}else if(e instanceof ArrayBuffer){if(F(e,0,n))return n}return null}(e,t),a=a||D(e,null===n||void 0===n?void 0:n.fallbackMimeType),a}(t,o,n,r);if(!s&&(null===n||void 0===n||!n.nothrow))throw new Error(j(t));return s}function I(t){return!(t instanceof Response&&204===t.status)}function j(t){const{url:e,type:n}=(0,C.l)(t);let r="No valid loader found";
1return t&&(r+=` data: "${function(t,e=5){if("string"===typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return B(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return B(t,0,e)}return""}(t)}", contentType: "${n}"`),e&&(r+=` url: ${e}`),r}function D(t,e){for(const n of t){if(n.mimeTypes&&n.mimeTypes.includes(e))return n;if(e===`application/x.${n.id}`)return n}return null}function N(t,e){if(e.testText)return e.testText(t);return(Array.isArray(e.tests)?e.tests:[e.tests]).some((e=>t.startsWith(e)))}function F(t,e,n){return(Array.isArray(n.tests)?n.tests:[n.tests]).some((r=>function(t,e,n,r){if(r instanceof ArrayBuffer)return(0,x.Xq)(r,t,r.byteLength);switch(typeof r){case"function":return r(t,n);case"string":return r===B(t,e,r.length);default:return!1}}(t,e,n,r)))}function B(t,e,n){if(t.byteLength<e+n)return"";const r=new DataView(t);let i="";for(let o=0;o<n;o++)i+=String.fromCharCode(r.getUint8(e+o));return i}async function U(t,e,n,a){(0,s.h)(!a||"object"===typeof a),!e||Array.isArray(e)||(0,i.C)(e)||(a=void 0,n=e,e=void 0),t=await t,n=n||{};const{url:u}=(0,C.l)(t),c=function(t,e){if(!e&&t&&!Array.isArray(t))return t;let n;if(t&&(n=Array.isArray(t)?t:[t]),e&&e.loaders){const t=Array.isArray(e.loaders)?e.loaders:[e.loaders];n=n?[...n,...t]:t}return n&&n.length?n:null}(e,a),l=await async function(t,e=[],n,i){if(!I(t))return null;let o=R(t,e,{...n,nothrow:!0},i);if(o)return o;if((0,r.Lj)(t)&&(o=R(t=await t.slice(0,10).arrayBuffer(),e,n,i)),!o&&(null===n||void 0===n||!n.nothrow))throw new Error(j(t));return o}(t,c,n);return l?(a=function(t,e,n=null){if(n)return n;const r={fetch:(0,o.bV)(e,t),...t};return Array.isArray(r.loaders)||(r.loaders=null),r}({url:u,parse:U,loaders:c},n=(0,o.GR)(n,l,c,u),a),await async function(t,e,n,r){if(function(t,e="3.0.12"){(0,s.h)(t,"no worker provided");const n=t.version}(t),e=await O(e,t,n),t.parseTextSync&&"string"===typeof e)return n.dataType="text",t.parseTextSync(e,n,r,t);if(function(t,e){return!!b.isSupported()&&t.worker&&(null===e||void 0===e?void 0:e.worker)}(t,n))return await _(t,e,n,0,U);if(t.parseText&&"string"===typeof e)return await t.parseText(e,n,r,t);if(t.parse)return await t.parse(e,n,r,t);throw(0,s.h)(!t.parseSync),new Error(`${t.id} loader - no parser found and worker is disabled`)}(l,t,n,a)):null}async function z(t,e,n,s){Array.isArray(e)||(0,i.C)(e)||(void 0,n=e,e=void 0);const a=(0,o.bV)(n);let u=t;return"string"===typeof t&&(u=await a(t)),(0,r.Lj)(t)&&(u=await a(t)),await U(u,e,n)}},6228:function(t,e,n){"use strict";n.d(e,{fh:function(){return s},kO:function(){return a}});var r=n(2033),i=n(7504);const o=()=>{const t=(0,i.rx)();return t.loaderRegistry=t.loaderRegistry||[],t.loaderRegistry};function s(t){const e=o();t=Array.isArray(t)?t:[t];for(const n of t){const t=(0,r.T)(n);e.find((e=>t===e))||e.unshift(t)}}function a(){return o()}},2033:function(t,e,n){"use strict";n.d(e,{C:function(){return i},T:function(){return o}});var r=n(6269);function i(t){var e;if(!t)return!1;Array.isArray(t)&&(t=t[0]);return Array.isArray(null===(e=t)||void 0===e?void 0:e.extensions)}function o(t){var e,n;let o;return(0,r.h)(t,"null loader"),(0,r.h)(i(t),"invalid loader"),Array.isArray(t)&&(o=t[1],t=t[0],t={...t,options:{...t.options,...o}}),(null!==(e=t)&&void 0!==e&&e.parseTextSync||null!==(n=t)&&void 0!==n&&n.parseText)&&(t.text=!0),t.text||(t.binary=!0),t}},7504:function(t,e,n){"use strict";n.d(e,{bV:function(){return v},rx:function(){return p},GR:function(){return m}});var r=n(4959),i=n(6255);let o="";const s={};var a=n(7927);async function u(t,e){if("string"===typeof t){t=function(t){for(const e in s)if(t.startsWith(e)){const n=s[e];t=t.replace(e,n)}return t.startsWith("http://")||t.startsWith("https://")||(t=`${o}${t}`),t}(t);let n=e;return null!==e&&void 0!==e&&e.fetch&&"function"!==typeof(null===e||void 0===e?void 0:e.fetch)&&(n=e.fetch),await fetch(t,n)}return await(0,a.L1)(t)}var c=n(4942);const l=new(n(4708).Z)({id:"loaders.gl"});class h{log(){return()=>{}}info(){return()=>{}}warn(){return()=>{}}error(){return()=>{}}}const f={fetch:null,mimeType:void 0,nothrow:!1,log:new class{constructor(){(0,c.Z)(this,"console",void 0),this.console=console}log(...t){return this.console.log.bind(this.console,...t)}info(...t){return this.console.info.bind(this.console,...t)}warn(...t){return this.console.warn.bind(this.console,...t)}error(...t){return this.console.error.bind(this.console,...t)}},CDN:"https://unpkg.com/@loaders.gl",worker:!0,maxConcurrency:3,maxMobileConcurrency:1,reuseWorkers:!0,_workerType:"",limit:0,_limitMB:0,batchSize:"auto",batchDebounceMs:0,metadata:!1,transforms:[]},d={throws:"nothrow",dataType:"(no longer used)",uri:"baseUri",method:"fetch.method",headers:"fetch.headers",body:"fetch.body",mode:"fetch.mode",credentials:"fetch.credentials",cache:"fetch.cache",redirect:"fetch.redirect",referrer:"fetch.referrer",referrerPolicy:"fetch.referrerPolicy",integrity:"fetch.integrity",keepalive:"fetch.keepalive",signal:"fetch.signal"};function p(){r.CO.loaders=r.CO.loaders||{};const{loaders:t}=r.CO;return t._state=t._state||{},t._state}const g=()=>{const t=p();return t.globalOptions=t.globalOptions||{...f},t.globalOptions};function m(t,e,n,r){return n=n||[],function(t,e){y(t,null,f,d,e);for(const n of e){const r=t&&t[n.id]||{},i=n.options&&n.options[n.id]||{},o=n.deprecatedOptions&&n.deprecatedOptions[n.id]||{};y(r,n.id,i,o,e)}}(t,n=Array.isArray(n)?n:[n]),_(e,t,r)}
1function v(t,e){const n=g(),r=t||n;return"function"===typeof r.fetch?r.fetch:(0,i.Kn)(r.fetch)?t=>u(t,r):null!==e&&void 0!==e&&e.fetch?null===e||void 0===e?void 0:e.fetch:u}function y(t,e,n,r,o){const s=e||"Top level",a=e?`${e}.`:"";for(const u in t){const c=!e&&(0,i.Kn)(t[u]),h="baseUri"===u&&!e,f="workerUrl"===u&&e;if(!(u in n)&&!h&&!f)if(u in r)l.warn(`${s} loader option '${a}${u}' no longer supported, use '${r[u]}'`)();else if(!c){const t=b(u,o);l.warn(`${s} loader option '${a}${u}' not recognized. ${t}`)()}}}function b(t,e){const n=t.toLowerCase();let r="";for(const i of e)for(const e in i.options){if(t===e)return`Did you mean '${i.id}.${e}'?`;const o=e.toLowerCase();(n.startsWith(o)||o.startsWith(n))&&(r=r||`Did you mean '${i.id}.${e}'?`)}return r}function _(t,e,n){const r={...t.options||{}};return function(t,e){e&&!("baseUri"in t)&&(t.baseUri=e)}(r,n),null===r.log&&(r.log=new h),w(r,g()),w(r,e),r}function w(t,e){for(const n in e)if(n in e){const r=e[n];(0,i.Ss)(r)&&(0,i.Ss)(t[n])?t[n]={...t[n],...e[n]}:t[n]=e[n]}}},9752:function(t,e,n){"use strict";n.d(e,{C:function(){return l},l:function(){return c}});var r=n(6255);const i=/^data:([-\w.]+\/[-\w.+]+)(;|,)/,o=/^([-\w.]+\/[-\w.+]+)/;function s(t){const e=o.exec(t);return e?e[1]:t}function a(t){const e=i.exec(t);return e?e[1]:""}const u=/\?.*/;function c(t){if((0,r.Ew)(t)){const e=h(t.url||"");return{url:e,type:s(t.headers.get("content-type")||"")||a(e)}}return(0,r.Lj)(t)?{url:h(t.name||""),type:t.type||""}:"string"===typeof t?{url:h(t),type:a(t)}:{url:"",type:""}}function l(t){return(0,r.Ew)(t)?t.headers["content-length"]||-1:(0,r.Lj)(t)?t.size:"string"===typeof t?t.length:t instanceof ArrayBuffer||ArrayBuffer.isView(t)?t.byteLength:-1}function h(t){return t.replace(u,"")}},7927:function(t,e,n){"use strict";n.d(e,{L1:function(){return o},mm:function(){return s}});var r=n(6255),i=n(9752);async function o(t){if((0,r.Ew)(t))return t;const e={},n=(0,i.C)(t);n>=0&&(e["content-length"]=String(n));const{url:o,type:s}=(0,i.l)(t);s&&(e["content-type"]=s);const a=await async function(t){const e=5;if("string"===typeof t)return`data:,${t.slice(0,e)}`;if(t instanceof Blob){const e=t.slice(0,5);return await new Promise((t=>{const n=new FileReader;n.onload=e=>{var n;return t(null===e||void 0===e||null===(n=e.target)||void 0===n?void 0:n.result)},n.readAsDataURL(e)}))}if(t instanceof ArrayBuffer){return`data:base64,${function(t){let e="";const n=new Uint8Array(t);for(let r=0;r<n.byteLength;r++)e+=String.fromCharCode(n[r]);return btoa(e)}(t.slice(0,e))}`}return null}(t);a&&(e["x-first-bytes"]=a),"string"===typeof t&&(t=(new TextEncoder).encode(t));const u=new Response(t,{headers:e});return Object.defineProperty(u,"url",{value:o}),u}async function s(t){if(!t.ok){const e=await async function(t){let e=`Failed to fetch resource ${t.url} (${t.status}): `;try{const n=t.headers.get("Content-Type");let r=t.statusText;n.includes("application/json")&&(r+=` ${await t.text()}`),e+=r,e=e.length>60?`${e.slice(60)}...`:e}catch(n){}return e}(t);throw new Error(e)}}},2378:function(t,e,n){"use strict";n.d(e,{S:function(){return A}});function r(t,e){if(!t)throw new Error(e)}var i=n(4155);const o={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document},s=o.global||o.self||o.window,a="object"!==typeof i||"[object process]"!==String(i)||!0,u="undefined"!==typeof i&&i.version&&/v([0-9]*)/.exec(i.version),{_parseImageNode:c}=(u&&parseFloat(u[1]),s),l="undefined"!==typeof Image,h="undefined"!==typeof ImageBitmap,f=Boolean(c),d=!!a||f;function p(t){const e=m(t);if(!e)throw new Error("Not an image");return e}function g(t){switch(p(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),n=e.getContext("2d");if(!n)throw new Error("getImageData");return e.width=t.width,e.height=t.height,n.drawImage(t,0,0),n.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function m(t){return"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!==typeof Image&&t instanceof Image?"image":t&&"object"===typeof t&&t.data&&t.width&&t.height?"data":null}const v=/^data:image\/svg\+xml/,y=/\.svg((\?|#).*)?$/;function b(t){return t&&(v.test(t)||y.test(t))}function _(t,e){if(b(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function w(t,e,n){const r=function(t,e){if(b(e)){let e=(new TextDecoder).decode(t);try{"function"===typeof unescape&&"function"===typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(n){throw new Error(n.message)}return`data:image/svg+xml;base64,${btoa(e)}`}return _(t,e)}
1(t,n),i=self.URL||self.webkitURL,o="string"!==typeof r&&i.createObjectURL(r);try{return await async function(t,e){const n=new Image;if(n.src=t,e.image&&e.image.decode&&n.decode)return await n.decode(),n;return await new Promise(((e,r)=>{try{n.onload=()=>e(n),n.onerror=e=>r(new Error(`Could not load image ${t}: ${e}`))}catch(i){r(i)}}))}(o||r,e)}finally{o&&i.revokeObjectURL(o)}}const x={};let E=!0;async function T(t,e,n){let r;if(b(n)){r=await w(t,e,n)}else r=_(t,n);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||x)return!1;return!0}(e)&&E||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(n){console.warn(n),E=!1}return await createImageBitmap(t)}(r,i)}var P=n(9105);const A={id:"image",module:"images",name:"Images",version:"3.0.12",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,n){const i=((e=e||{}).image||{}).type||"auto",{url:o}=n||{};let a;switch(function(t){switch(t){case"auto":case"data":return function(){if(h)return"imagebitmap";if(l)return"image";if(d)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return h||l||d;case"imagebitmap":return h;case"image":return l;case"data":return d;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(i)){case"imagebitmap":a=await T(t,e,o);break;case"image":a=await w(t,e,o);break;case"data":a=await function(t,e){const{mimeType:n}=(0,P.I)(t)||{},{_parseImageNode:i}=s;return r(i),i(t,n,e)}(t,e);break;default:r(!1)}return"data"===i&&(a=g(a)),a},tests:[t=>Boolean((0,P.I)(new DataView(t)))],options:{image:{type:"auto",decode:!0}}}},9105:function(t,e,n){"use strict";n.d(e,{I:function(){return o}});const r=!1,i=!0;function o(t){const e=s(t);return function(t){const e=s(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,r)))return null;return{mimeType:"image/png",width:e.getUint32(16,r),height:e.getUint32(20,r)}}(e)||function(t){const e=s(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,r)&&255===e.getUint8(2)))return null;const{tableMarkers:n,sofMarkers:i}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let n=65504;n<65520;++n)t.add(n);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let o=2;for(;o+9<e.byteLength;){const t=e.getUint16(o,r);if(i.has(t))return{mimeType:"image/jpeg",height:e.getUint16(o+5,r),width:e.getUint16(o+7,r)};if(!n.has(t))return null;o+=2,o+=e.getUint16(o,r)}return null}(e)||function(t){const e=s(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,r)))return null;return{mimeType:"image/gif",width:e.getUint16(6,i),height:e.getUint16(8,i)}}(e)||function(t){const e=s(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,r)&&e.getUint32(2,i)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,i),height:e.getUint32(22,i)}}(e)}function s(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}},5680:function(t,e,n){"use strict";n.d(e,{Xq:function(){return o},JY:function(){return s},qv:function(){return a},rJ:function(){return i}});var r=n(9521);function i(t){var e;if((e=t)&&"object"===typeof e&&e.isBuffer&&(t=function(t){return r.toArrayBuffer?r.toArrayBuffer(t):t}(t)),t instanceof ArrayBuffer)return t;if(ArrayBuffer.isView(t))return 0===t.byteOffset&&t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength);if("string"===typeof t){const e=t;return(new TextEncoder).encode(e).buffer}if(t&&"object"===typeof t&&t._toArrayBuffer)return t._toArrayBuffer();throw new Error("toArrayBuffer")}function o(t,e,n){if(n=n||t.byteLength,t.byteLength<n||e.byteLength<n)return!1;const r=new Uint8Array(t),i=new Uint8Array(e);for(let o=0;o<r.length;++o)if(r[o]!==i[o])return!1;return!0}function s(...t){const e=t.map((t=>t instanceof ArrayBuffer?new Uint8Array(t):t)),n=e.reduce(((t,e)=>
1t+e.byteLength),0),r=new Uint8Array(n);let i=0;for(const o of e)r.set(o,i),i+=o.byteLength;return r.buffer}function a(t,e,n){const r=void 0!==n?new Uint8Array(t).subarray(e,e+n):new Uint8Array(t).subarray(e);return new Uint8Array(r).buffer}},6269:function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loader assertion failed.")}n.d(e,{h:function(){return r}})},4959:function(t,e,n){"use strict";n.d(e,{CO:function(){return o},jU:function(){return s}});var r=n(4155);const i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window||{},s="object"!==typeof r||"[object process]"!==String(r)||!0,a="undefined"!==typeof r&&r.version&&/v([0-9]*)/.exec(r.version);a&&parseFloat(a[1])},6040:function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}n.d(e,{h:function(){return r}})},6013:function(t,e,n){"use strict";n.d(e,{CO:function(){return o},jU:function(){return s},hJ:function(){return a},tq:function(){return u}});var r=n(4155);const i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document},o=i.global||i.self||i.window||{},s="object"!==typeof r||"[object process]"!==String(r)||!0,a="function"===typeof importScripts,u="undefined"!==typeof window&&"undefined"!==typeof window.orientation,c="undefined"!==typeof r&&r.version&&/v([0-9]*)/.exec(r.version);c&&parseFloat(c[1])},1113:function(t,e,n){"use strict";n.d(e,{Z:function(){return D}});var r=n(9450),i=n(358),o=n(4072),s=n(3478),a=n(7577);let u=null;function c(t,e){var n;return new t((n=t.BYTES_PER_ELEMENT*e,(!u||u.byteLength<n)&&(u=new ArrayBuffer(n)),u),0,e)}var l=n(2525),h=n(6073),f=n(5989),d=n(1202);class p extends a.Z{static isSupported(t,e={}){return!e.constantAttributeZero||((0,r.D0)(t)||"Chrome"===function(t){if(!t&&!(0,f.Z)())return"Node";if((0,d.Z)(t))return"Electron";const e="undefined"!==typeof navigator?navigator:{},n=t||e.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";const r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");
1return r||i?"IE":h.u9.chrome?"Chrome":h.u9.safari?"Safari":h.u9.mozInnerScreenX?"Firefox":"Unknown"}())}static getDefaultArray(t){return t.luma=t.luma||{},t.luma.defaultVertexArray||(t.luma.defaultVertexArray=new p(t,{handle:null,isDefaultArray:!0})),t.luma.defaultVertexArray}static getMaxAttributes(t){return p.MAX_ATTRIBUTES=p.MAX_ATTRIBUTES||t.getParameter(34921),p.MAX_ATTRIBUTES}static setConstant(t,e,n){switch(n.constructor){case Float32Array:p._setConstantFloatArray(t,e,n);break;case Int32Array:p._setConstantIntArray(t,e,n);break;case Uint32Array:p._setConstantUintArray(t,e,n);break;default:(0,l.h)(!1)}}constructor(t,e={}){const n=e.id||e.program&&e.program.id;super(t,Object.assign({},e,{id:n})),this.buffer=null,this.bufferValue=null,this.isDefaultArray=e.isDefaultArray||!1,this.gl2=t,this.initialize(e),Object.seal(this)}delete(){return super.delete(),this.buffer&&this.buffer.delete(),this}get MAX_ATTRIBUTES(){return p.getMaxAttributes(this.gl)}initialize(t={}){return this.setProps(t)}setProps(t){return this}setElementBuffer(t=null,e={}){return(0,l.h)(!t||34963===t.target,"elements must be GL.ELEMENT_ARRAY_BUFFER"),this.bind((()=>{this.gl.bindBuffer(34963,t?t.handle:null)})),this}setBuffer(t,e,n){if(34963===e.target)return this.setElementBuffer(e,n);const{size:i,type:o,stride:s,offset:a,normalized:u,integer:c,divisor:h}=n,{gl:f,gl2:d}=this;return t=Number(t),this.bind((()=>{f.bindBuffer(34962,e.handle),c?((0,l.h)((0,r.D0)(f)),d.vertexAttribIPointer(t,i,o,s,a)):f.vertexAttribPointer(t,i,o,u,s,a),f.enableVertexAttribArray(t),d.vertexAttribDivisor(t,h||0)})),this}enable(t,e=!0){return!e&&0===t&&!p.isSupported(this.gl,{constantAttributeZero:!0})||(t=Number(t),this.bind((()=>e?this.gl.enableVertexAttribArray(t):this.gl.disableVertexAttribArray(t)))),this}getConstantBuffer(t,e){const n=this._normalizeConstantArrayValue(e),r=n.byteLength*t,i=n.length*t;let o=!this.buffer;if(this.buffer=this.buffer||new s.Z(this.gl,r),o=o||this.buffer.reallocate(r),o=o||!this._compareConstantArrayValues(n,this.bufferValue),o){const t=c(e.constructor,i);!function({target:t,source:e,start:n=0,count:r=1}){const i=e.length,o=r*i;let s=0;for(let a=n;s<i;s++)t[a++]=e[s];for(;s<o;)s<o-s?(t.copyWithin(n+s,n,n+s),s*=2):(t.copyWithin(n+s,n,n+o-s),s=o)}({target:t,source:n,start:0,count:i}),this.buffer.subData(t),this.bufferValue=e}return this.buffer}_normalizeConstantArrayValue(t){return Array.isArray(t)?new Float32Array(t):t}_compareConstantArrayValues(t,e){if(!t||!e||t.length!==e.length||t.constructor!==e.constructor)return!1;for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}static _setConstantFloatArray(t,e,n){switch(n.length){case 1:t.vertexAttrib1fv(e,n);break;case 2:t.vertexAttrib2fv(e,n);break;case 3:t.vertexAttrib3fv(e,n);break;case 4:t.vertexAttrib4fv(e,n);break;default:(0,l.h)(!1)}}static _setConstantIntArray(t,e,n){switch((0,l.h)((0,r.D0)(t)),n.length){case 1:t.vertexAttribI1iv(e,n);break;case 2:t.vertexAttribI2iv(e,n);break;case 3:t.vertexAttribI3iv(e,n);break;case 4:t.vertexAttribI4iv(e,n);break;default:(0,l.h)(!1)}}static _setConstantUintArray(t,e,n){switch((0,l.h)((0,r.D0)(t)),n.length){case 1:t.vertexAttribI1uiv(e,n);break;case 2:t.vertexAttribI2uiv(e,n);break;case 3:t.vertexAttribI3uiv(e,n);break;case 4:t.vertexAttribI4uiv(e,n);break;default:(0,l.h)(!1)}}_createHandle(){return this.gl.createVertexArray()}_deleteHandle(t){return this.gl2.deleteVertexArray(t),[this.elements]}_bindHandle(t){this.gl2.bindVertexArray(t)}_getParameter(t,{location:e}){return(0,l.h)(Number.isFinite(e)),this.bind((()=>{switch(t){case 34373:return this.gl.getVertexAttribOffset(e,t);default:return this.gl.getVertexAttrib(e,t)}}))}}var g=n(7469);const m=/^(.+)__LOCATION_([0-9]+)$/,v=["setBuffers","setGeneric","clearBindings","setLocations","setGenericValues","setDivisor","enable","disable"];class y{constructor(t,e={}){const n=e.id||e.program&&e.program.id;this.id=n,this.gl=t,this.configuration=null,this.elements=null,this.elementsAccessor=null,this.values=null,this.accessors=null,this.unused=null,this.drawParams=null,this.buffer=null,this.attributes={}
1,this.vertexArrayObject=new p(t),(0,g.F)(this,"VertexArray","v6.0",v),this.initialize(e),Object.seal(this)}delete(){this.buffer&&this.buffer.delete(),this.vertexArrayObject.delete()}initialize(t={}){return this.reset(),this.configuration=null,this.bindOnUse=!1,this.setProps(t)}reset(){this.elements=null,this.elementsAccessor=null;const{MAX_ATTRIBUTES:t}=this.vertexArrayObject;return this.values=new Array(t).fill(null),this.accessors=new Array(t).fill(null),this.unused={},this.drawParams=null,this}setProps(t){return"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"attributes"in t&&this.setAttributes(t.attributes),"elements"in t&&this.setElementBuffer(t.elements),"bindOnUse"in t&&(t=t.bindOnUse),this}clearDrawParams(){this.drawParams=null}getDrawParams(){return this.drawParams=this.drawParams||this._updateDrawParams(),this.drawParams}setAttributes(t){return Object.assign(this.attributes,t),this.vertexArrayObject.bind((()=>{for(const e in t){const n=t[e];this._setAttribute(e,n)}this.gl.bindBuffer(34962,null)})),this}setElementBuffer(t=null,e={}){return this.elements=t,this.elementsAccessor=e,this.clearDrawParams(),this.vertexArrayObject.setElementBuffer(t,e),this}setBuffer(t,e,n={}){if(34963===e.target)return this.setElementBuffer(e,n);const{location:r,accessor:i}=this._resolveLocationAndAccessor(t,e,e.accessor,n);return r>=0&&(this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.setBuffer(r,e,i)),this}setConstant(t,e,n={}){const{location:r,accessor:i}=this._resolveLocationAndAccessor(t,e,Object.assign({size:e.length},n));return r>=0&&(e=this.vertexArrayObject._normalizeConstantArrayValue(e),this.values[r]=e,this.accessors[r]=i,this.clearDrawParams(),this.vertexArrayObject.enable(r,!1)),this}unbindBuffers(){return this.vertexArrayObject.bind((()=>{this.elements&&this.vertexArrayObject.setElementBuffer(null),this.buffer=this.buffer||new s.Z(this.gl,{accessor:{size:4}});for(let t=0;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++)this.values[t]instanceof s.Z&&(this.gl.disableVertexAttribArray(t),this.gl.bindBuffer(34962,this.buffer.handle),this.gl.vertexAttribPointer(t,1,5126,!1,0,0))})),this}bindBuffers(){return this.vertexArrayObject.bind((()=>{this.elements&&this.setElementBuffer(this.elements);for(let t=0;t<this.vertexArrayObject.MAX_ATTRIBUTES;t++){const e=this.values[t];e instanceof s.Z&&this.setBuffer(t,e)}})),this}bindForDraw(t,e,n){let r;return this.vertexArrayObject.bind((()=>{this._setConstantAttributes(t,e),r=n()})),r}_resolveLocationAndAccessor(t,e,n,i){const s={location:-1,accessor:null},{location:a,name:u}=this._getAttributeIndex(t);if(!Number.isFinite(a)||a<0)return this.unused[t]=e,r.cM.once(3,(()=>`unused value ${t} in ${this.id}`))(),s;const c=this._getAttributeInfo(u||a);if(!c)return s;const h=this.accessors[a]||{},f=o.Z.resolve(c.accessor,h,n,i),{size:d,type:p}=f;return(0,l.h)(Number.isFinite(d)&&Number.isFinite(p)),{location:a,accessor:f}}_getAttributeInfo(t){return this.configuration&&this.configuration.getAttributeInfo(t)}_getAttributeIndex(t){const e=Number(t);if(Number.isFinite(e))return{location:e};const n=m.exec(t),r=n?n[1]:t,i=n?Number(n[2]):0;return this.configuration?{location:this.configuration.getAttributeLocation(r)+i,name:r}:{location:-1}}_setAttribute(t,e){if(e instanceof s.Z)this.setBuffer(t,e);else if(Array.isArray(e)&&e.length&&e[0]instanceof s.Z){const n=e[0],r=e[1];this.setBuffer(t,n,r)}else if(ArrayBuffer.isView(e)||Array.isArray(e)){const n=e;this.setConstant(t,n)}else{if(!(e.buffer instanceof s.Z))throw new Error("VertexArray: attributes must be Buffers or constants (i.e. typed array)");{const n=e;this.setBuffer(t,n.buffer,n)}}}_setConstantAttributes(t,e){const n=Math.max(0|t,0|e);let r=this.values[0];ArrayBuffer.isView(r)&&this._setConstantAttributeZero(r,n);for(let i=1;i<this.vertexArrayObject.MAX_ATTRIBUTES;i++)r=this.values[i],ArrayBuffer.isView(r)&&this._setConstantAttribute(i,r)}_setConstantAttributeZero(t,e){if(p.isSupported(this.gl,{constantAttributeZero:!0}))return void this._setConstantAttribute(0,t);const n=this.vertexArrayObject.getConstantBuffer(e,t);
1this.vertexArrayObject.setBuffer(0,n,this.accessors[0])}_setConstantAttribute(t,e){p.setConstant(this.gl,t,e)}_updateDrawParams(){const t={isIndexed:!1,isInstanced:!1,indexCount:1/0,vertexCount:1/0,instanceCount:1/0};for(let e=0;e<this.vertexArrayObject.MAX_ATTRIBUTES;e++)this._updateDrawParamsForLocation(t,e);return this.elements&&(t.elementCount=this.elements.getElementCount(this.elements.accessor),t.isIndexed=!0,t.indexType=this.elementsAccessor.type||this.elements.accessor.type,t.indexOffset=this.elementsAccessor.offset||0),t.indexCount===1/0&&(t.indexCount=0),t.vertexCount===1/0&&(t.vertexCount=0),t.instanceCount===1/0&&(t.instanceCount=0),t}_updateDrawParamsForLocation(t,e){const n=this.values[e],r=this.accessors[e];if(!n)return;const{divisor:i}=r,o=i>0;if(t.isInstanced=t.isInstanced||o,n instanceof s.Z){const e=n;if(o){const n=e.getVertexCount(r);t.instanceCount=Math.min(t.instanceCount,n)}else{const n=e.getVertexCount(r);t.vertexCount=Math.min(t.vertexCount,n)}}}setElements(t=null,e={}){return r.cM.deprecated("setElements","setElementBuffer")(),this.setElementBuffer(t,e)}}var b=n(4538),_=n(6047),w=n(7944),x=n(1053),E=n(9579),T=n(8522);function P(t,e={}){const{isInteger:n=!1}=e;if(Array.isArray(t)||ArrayBuffer.isView(t))return function(t,e){const{maxElts:n=16,size:r=1}=e;let i="[";for(let o=0;o<t.length&&o<n;++o)o>0&&(i+=","+(o%r===0?" ":"")),i+=P(t[o],e);return`${i}${t.length>n?"...":"]"}`}(t,e);if(!Number.isFinite(t))return String(t);if(Math.abs(t)<1e-16)return n?"0":"0.";if(n)return t.toFixed(0);if(Math.abs(t)>100&&Math.abs(t)<1e4)return t.toFixed(0);const r=t.toPrecision(2);return r.indexOf(".0")===r.length-2?r.slice(0,-1):r}function A(t,e,n,r){const{gl:i}=t;if(!e)return{[r]:"null","Format ":"N/A"};let o,a,u,c="NOT PROVIDED",l=1,h=0,f=0;if(n&&(c=n.type,l=n.size,c=String(c).replace("Array",""),o=-1!==c.indexOf("nt")),e instanceof s.Z){const t=e,{data:s,changed:d}=t.getDebugData();let p;if(a=d?"*":"",u=s,f=t.byteLength,h=f/s.BYTES_PER_ELEMENT/l,n){p=`${n.divisor>0?"I ":"P "} ${h} (x${l}=${f} bytes ${(0,E.km)(i,c)})`}else o=!0,p=`${f} bytes`;return{[r]:`${a}${P(u,{size:l,isInteger:o})}`,"Format ":p}}return u=e,l=e.length,c=String(e.constructor.name).replace("Array",""),o=-1!==c.indexOf("nt"),{[r]:`${P(u,{size:l,isInteger:o})} (constant)`,"Format ":`${l}x${c} (constant)`}}function S(t,e){const{type:n,size:r}=e,i=(0,T.jG)(n,r);return i?`${t} (${i.name})`:t}function M({header:t="Uniforms",program:e,uniforms:n,undefinedOnly:r=!1}){(0,l.h)(e);const i=".*Matrix",o=e._uniformSetters,s={},a=Object.keys(o).sort();let u=0;for(const l of a)l.match(".*_.*")||l.match(i)||O({table:s,header:t,uniforms:n,uniformName:l,undefinedOnly:r})&&u++;for(const l of a)l.match(i)&&O({table:s,header:t,uniforms:n,uniformName:l,undefinedOnly:r})&&u++;for(const l of a)s[l]||O({table:s,header:t,uniforms:n,uniformName:l,undefinedOnly:r})&&u++;let c=0;const h={};if(!r)for(const l in n){const e=n[l];s[l]||(c++,h[l]={Type:`NOT USED: ${e}`,[t]:P(e)})}return{table:s,count:u,unusedTable:h,unusedCount:c}}function O({table:t,header:e,uniforms:n,uniformName:r,undefinedOnly:i}){const o=n[r],s=function(t){return void 0!==t&&null!==t}(o);return(!i||!s)&&(t[r]={[e]:s?P(o):"N/A","Uniform Type":s?o:"NOT PROVIDED"},!0)}function C(t){const{type:e,size:n}=t.accessor,r=(0,T.jG)(e,n);return r?`${r.name} ${t.name}`:t.name}const L={POSITION:"positions",NORMAL:"normals",COLOR_0:"colors",TEXCOORD_0:"texCoords",TEXCOORD_1:"texCoords1",TEXCOORD_2:"texCoords2"};function k(t,e){const{attributeMap:n=L}=e||{};return n&&n[t]||t}function R(t,e){let n;switch(t){case"texCoords":case"texCoord1":case"texCoord2":case"texCoord3":n="uvs";break;case"vertices":case"positions":case"normals":case"pickingColors":n="vectors"}switch(n){case"vectors":e.size=e.size||3;break;case"uvs":e.size=e.size||2}(0,l.h)(Number.isFinite(e.size),`attribute ${t} needs size`)}const I=()=>{},j={};class D{constructor(t,e={}){const{id:n=(0,b.hQ)("model")}=e;(0,l.h)((0,r.UF)(t)),this.id=n,this.gl=t,this.id=e.id||(0,b.hQ)("Model"),this.lastLogTime=0,this.animated=!1,this.initialize(e)}initialize(t){this.props={},this.programManager=t.programManager||i.Z.getDefaultProgramManager(this.gl),this._programManagerState=-1,this._managedProgram=!1;const{program:e=null,vs:n,fs:r,modules:o,defines:s,inject:a,varyings:u,bufferMode:c,transpileToGLSL100:h}=t;this.programProps={program:e,vs:n,fs:r,modules:o,defines:s,inject:a,varyings:u,bufferMode:c,transpileToGLSL100:h},this.program=null,this.vertexArray=null,this._programDirty=!0,this.userData={},this.needsRedraw=!0,this._attributes={},this.attributes={},this.uniforms={},this.pickable=!0,this._checkProgram(),this.setUniforms(Object.assign({},this.getModuleUniforms(t.moduleSettings))),this.drawMode=void 0!==t.drawMode?t.drawMode:4,this.vertexCount=t.vertexCount||0,this.geometryBuffers={},this.isInstanced=t.isInstanced||t.instanced||t.instanceCount>0,this._setModelProps(t),this.geometry={},(0,l.h)(void 0!==this.drawMode&&Number.isFinite(this.vertexCount),"Model needs drawMode and vertexCount")}setProps(t){this._setModelProps(t)}delete(){for(const t in this._attributes)this._attributes[t]!==this.attributes[t]&&this._attributes[t].delete();this._managedProgram&&(this.programManager.release(this.program),this._managedProgram=!1),this.vertexArray.delete(),this._deleteGeometryBuffers()}getDrawMode(){return this.drawMode}getVertexCount(){return this.vertexCount}getInstanceCount(){return this.instanceCount}getAttributes(){return this.attributes}getProgram(){return this.program}setProgram(t){const{program:e,vs:n,fs:r,modules:i,defines:o,inject:s,varyings:a,bufferMode:u,transpileToGLSL100:c}=t;this.programProps={program:e,vs:n,fs:r,modules:i,defines:o,inject:s,varyings:a,bufferMode:u,transpileToGLSL100:c},this._programDirty=!0}getUniforms(){return this.uniforms}setDrawMode(t){return this.drawMode=t,this}setVertexCount(t){return(0,l.h)(Number.isFinite(t)),this.vertexCount=t,this}setInstanceCount(t){return(0,l.h)(Number.isFinite(t)),this.instanceCount=t,this}setGeometry(t){return this.drawMode=t.drawMode,this.vertexCount=t.getVertexCount(),this._deleteGeometryBuffers(),this.geometryBuffers=function(t,e,n){const r={};let i=e.indices;for(const o in e.attributes){const a=e.attributes[o],u=k(o,n);if("indices"===o)i=a;else if(a.constant)r[u]=a.value;else{const e=a.value,n={...a};delete n.value,r[u]=[new s.Z(t,e),n],R(o,n)}}if(i){const e=i.value||i;(0,l.h)(e instanceof Uint16Array||e instanceof Uint32Array,'attribute array for "indices" must be of integer type');const n={size:1,isIndexed:void 0===i.isIndexed||i.isIndexed};r.indices=[new s.Z(t,{data:e,target:34963}),n]}return r}(this.gl,t),this.vertexArray.setAttributes(this.geometryBuffers),this}setAttributes(t={}){if((0,b.nK)(t))return this;const e={};for(const n in t){const r=t[n];e[n]=r.getValue?r.getValue():r}return this.vertexArray.setAttributes(e),this}setUniforms(t={}){return Object.assign(this.uniforms,t),this}getModuleUniforms(t){this._checkProgram();const e=this.programManager.getUniforms(this.program);return e?e(t):{}}updateModuleSettings(t){const e=this.getModuleUniforms(t||{});return this.setUniforms(e)}clear(t){return(0,_.Z)(this.program.gl,t),this}draw(t={}){this._checkProgram();const{moduleSettings:e=null,framebuffer:n,uniforms:i={},attributes:o={},transformFeedback:s=this.transformFeedback,parameters:a={},vertexArray:u=this.vertexArray}=t;let c;this.setAttributes(o),this.updateModuleSettings(e),this.setUniforms(i),r.cM.priority>=2&&(c=this._logDrawCallStart(2));const l=this.vertexArray.getDrawParams(),{isIndexed:h=l.isIndexed,indexType:f=l.indexType,indexOffset:d=l.indexOffset,vertexArrayInstanced:p=l.isInstanced}=this.props;p&&!this.isInstanced&&r.cM.warn("Found instanced attributes on non-instanced model",this.id)();const{isInstanced:g,instanceCount:m}=this,{onBeforeRender:v=I,onAfterRender:y=I}=this.props;v(),this.program.setUniforms(this.uniforms);const b=this.program.draw(Object.assign(j,t,{logPriority:c,uniforms:null,framebuffer:n,parameters:a,drawMode:this.getDrawMode(),vertexCount:this.getVertexCount(),vertexArray:u,transformFeedback:s,isIndexed:h,indexType:f,isInstanced:g,instanceCount:m,offset:h?d:0}));return y(),r.cM.priority>=2&&this._logDrawCallEnd(c,u,n),b}transform(t={}){const{discard:e=!0,feedbackBuffers:n,unbindModels:r=[]}=t;let{parameters:i}=t;n&&this._setFeedbackBuffers(n),e&&(i=Object.assign({},i,{35977:e})),r.forEach((t=>t.vertexArray.unbindBuffers()));try{this.draw(Object.assign({},t,{parameters:i}))}finally{r.forEach((t=>t.vertexArray.bindBuffers()))}return this}render(t={}){return r.cM.warn("Model.render() is deprecated. Use Model.setUniforms() and Model.draw()")(),this.setUniforms(t).draw()}_setModelProps(t){Object.assign(this.props,t),"uniforms"in t&&this.setUniforms(t.uniforms),"pickable"in t&&(this.pickable=t.pickable),"instanceCount"in t&&(this.instanceCount=t.instanceCount),"geometry"in t&&this.setGeometry(t.geometry),"attributes"in t&&this.setAttributes(t.attributes),"_feedbackBuffers"in t&&this._setFeedbackBuffers(t._feedbackBuffers)}_checkProgram(){if(!(this._programDirty||this.programManager.stateHash!==this._programManagerState))return;let{program:t}=this.programProps;if(t)this._managedProgram=!1;else{const{vs:e,fs:n,modules:r,inject:i,defines:o,varyings:s,bufferMode:a,transpileToGLSL100:u}=this.programProps;t=this.programManager.get({vs:e,fs:n,modules:r,inject:i,defines:o,varyings:s,bufferMode:a,transpileToGLSL100:u}),this.program&&this._managedProgram&&this.programManager.release(this.program),this._programManagerState=this.programManager.stateHash,this._managedProgram=!0}(0,l.h)(t instanceof w.Z,"Model needs a program"),this._programDirty=!1,t!==this.program&&(this.program=t,this.vertexArray?this.vertexArray.setProps({program:this.program,attributes:this.vertexArray.attributes}):this.vertexArray=new y(this.gl,{program:this.program}),this.setUniforms(Object.assign({},this.getModuleUniforms())))}_deleteGeometryBuffers(){for(const t in this.geometryBuffers){const e=this.geometryBuffers[t][0]||this.geometryBuffers[t];e instanceof s.Z&&e.delete()}}_setAnimationProps(t){this.animated&&(0,l.h)(t,"Model.draw(): animated uniforms but no animationProps")}_setFeedbackBuffers(t={}){if((0,b.nK)(t))return this;const{gl:e}=this.program;return this.transformFeedback=this.transformFeedback||new x.Z(e,{program:this.program}),this.transformFeedback.setBuffers(t),this}_logDrawCallStart(t){const e=t>3?0:1e4;
1if(!(Date.now()-this.lastLogTime<e))return this.lastLogTime=Date.now(),r.cM.group(2,`>>> DRAWING MODEL ${this.id}`,{collapsed:r.cM.level<=2})(),t}_logDrawCallEnd(t,e,n,i){if(void 0===t)return;const o=function({vertexArray:t,header:e="Attributes"}){if(!t.configuration)return{};const n={};t.elements&&(n.ELEMENT_ARRAY_BUFFER=A(t,t.elements,null,e));const r=t.values;for(const i in r){const o=t._getAttributeInfo(i);if(o){let s=`${i}: ${o.name}`;const a=t.accessors[o.location];a&&(s=`${i}: ${S(o.name,a)}`),n[s]=A(t,r[i],a,e)}}return n}({vertexArray:e,header:`${this.id} attributes`,attributes:this._attributes}),{table:s,unusedTable:a,unusedCount:u}=M({header:`${this.id} uniforms`,program:this.program,uniforms:Object.assign({},this.program.uniforms,n)}),{table:c,count:l}=M({header:`${this.id} uniforms`,program:this.program,uniforms:Object.assign({},this.program.uniforms,n),undefinedOnly:!0});l>0&&r.cM.log("MISSING UNIFORMS",Object.keys(c))(),u>0&&r.cM.log("UNUSED UNIFORMS",Object.keys(a))();const h=function(t){const e={},n=`Accessors for ${t.id}`;for(const r of t.attributeInfos)r&&(e[`in ${C(r)}`]={[n]:JSON.stringify(r.accessor)});for(const r of t.varyingInfos)r&&(e[`out ${C(r)}`]={[n]:JSON.stringify(r.accessor)});return e}(this.vertexArray.configuration);r.cM.table(t,o)(),r.cM.table(t,s)(),r.cM.table(t+1,h)(),i&&i.log({logLevel:2,message:`Rendered to ${i.id}`}),r.cM.groupEnd(2,`>>> DRAWING MODEL ${this.id}`)()}}},358:function(t,e,n){"use strict";n.d(e,{Z:function(){return N}});var r=n(5682),i=n(9047);const o={number:{validate:(t,e)=>Number.isFinite(t)&&(!("max"in e)||t<=e.max)&&(!("min"in e)||t>=e.min)},array:{validate:(t,e)=>Array.isArray(t)||ArrayBuffer.isView(t)}};function s(t){let e=a(t);return"object"===e?t?"type"in t?Object.assign({},t,o[t.type]):"value"in t?(e=a(t.value),Object.assign({type:e},t,o[e])):{type:"object",value:t}:{type:"object",value:null}:Object.assign({type:e,value:t},o[e])}function a(t){return Array.isArray(t)||ArrayBuffer.isView(t)?"array":typeof t}class u{constructor({name:t,vs:e,fs:n,dependencies:r=[],uniforms:o,getUniforms:a,deprecations:u=[],defines:c={},inject:l={},vertexShader:h,fragmentShader:f}){(0,i.Z)("string"===typeof t),this.name=t,this.vs=e||h,this.fs=n||f,this.getModuleUniforms=a,this.dependencies=r,this.deprecations=this._parseDeprecationDefinitions(u),this.defines=c,this.injections=function(t){const e={vs:{},fs:{}};for(const n in t){let r=t[n];const i=n.slice(0,2);"string"===typeof r&&(r={order:0,injection:r}),e[i][n]=r}return e}(l),o&&(this.uniforms=function(t){const e={};for(const n in t){const r=s(t[n]);e[n]=r}return e}(o))}getModuleSource(t){let e;switch(t){case"vs":e=this.vs||"";break;case"fs":e=this.fs||"";break;default:(0,i.Z)(!1)}return`#define MODULE_${this.name.toUpperCase().replace(/[^0-9a-z]/gi,"_")}\n${e}// END MODULE_${this.name}\n\n`}getUniforms(t,e){return this.getModuleUniforms?this.getModuleUniforms(t,e):this.uniforms?this._defaultGetUniforms(t):{}}getDefines(){return this.defines}checkDeprecations(t,e){this.deprecations.forEach((n=>{n.regex.test(t)&&(n.deprecated?e.deprecated(n.old,n.new)():e.removed(n.old,n.new)())}))}_parseDeprecationDefinitions(t){return t.forEach((t=>{switch(t.type){case"function":t.regex=new RegExp(`\\b${t.old}\\(`);break;default:t.regex=new RegExp(`${t.type} ${t.old};`)}})),t}_defaultGetUniforms(t={}){const e={},n=this.uniforms;for(const r in n){const o=n[r];r in t&&!o.private?(o.validate&&(0,i.Z)(o.validate(t[r],o),`${this.name}: invalid ${r}`),e[r]=t[r]):e[r]=o.value}return e}}function c(t){return l(f(t))}function l(t){const e={},n={};return h({modules:t,level:0,moduleMap:e,moduleDepth:n}),Object.keys(n).sort(((t,e)=>n[e]-n[t])).map((t=>e[t]))}function h({modules:t,level:e,moduleMap:n,moduleDepth:r}){if(e>=5)throw new Error("Possible loop in shader dependency graph");for(const i of t)n[i.name]=i,(void 0===r[i.name]||r[i.name]<e)&&(r[i.name]=e);for(const i of t)i.dependencies&&h({modules:i.dependencies,level:e+1,moduleMap:n,moduleDepth:r})}function f(t,e){return t.map((t=>(t instanceof u||((0,i.Z)("string"!==typeof t,`Shader module use by name is deprecated. Import shader module '${t}' and use it directly.`),(0,i.Z)(t.name,"shader module has no name"),(t=new u(t)).dependencies=f(t.dependencies)),t)))}const d={GLSL_FRAG_DATA:["WEBGL_draw_buffers",!0],GLSL_FRAG_DEPTH:["EXT_frag_depth",!0],GLSL_DERIVATIVES:["OES_standard_derivatives",!0],GLSL_TEXTURE_LOD:["EXT_shader_texture_lod",!0]},p={};
1Object.keys(d).forEach((t=>{p[t]=t}));const g={};function m(t,e,n={}){const r=d[e];if((0,i.Z)(r,e),!function(t={}){const e="undefined"!==typeof window&&window.navigator||{},n=t.userAgent||e.userAgent||"",r=-1!==n.indexOf("MSIE "),i=-1!==n.indexOf("Trident/");return r||i}(n))return!0;if(e in g)return g[e];const o=`#extension GL_${r[0]} : ${n.behavior||"enable"}\nvoid main(void) {}`,s=t.createShader(35633);t.shaderSource(s,o),t.compileShader(s);const a=t.getShaderParameter(s,35713);return t.deleteShader(s),g[e]=a,a}function v(t,e){const n=d[e];(0,i.Z)(n,e);const r=function(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}(t)&&n[1]||n[0],o="string"===typeof r?Boolean(t.getExtension(r)):r;return(0,i.Z)(!1===o||!0===o),o}function y(t,e){return(e=Array.isArray(e)?e:[e]).every((e=>v(t,e)))}var b=n(6713);function _(t){return new RegExp(`\\b${t}[ \\t]+(\\w+[ \\t]+\\w+(\\[\\w+\\])?;)`,"g")}const w=[[/^(#version[ \t]+(100|300[ \t]+es))?[ \t]*\n/,"#version 300 es\n"],[/\btexture(2D|2DProj|Cube)Lod(EXT)?\(/g,"textureLod("],[/\btexture(2D|2DProj|Cube)(EXT)?\(/g,"texture("]],x=[...w,[_("attribute"),"in $1"],[_("varying"),"out $1"]],E=[...w,[_("varying"),"in $1"]],T=[[/^#version[ \t]+300[ \t]+es/,"#version 100"],[/\btexture(2D|2DProj|Cube)Lod\(/g,"texture$1LodEXT("],[/\btexture\(/g,"texture2D("],[/\btextureLod\(/g,"texture2DLodEXT("]],P=[...T,[_("in"),"attribute $1"],[_("out"),"varying $1"]],A=[...T,[_("in"),"varying $1"]],S="gl_FragColor",M=/\bout[ \t]+vec4[ \t]+(\w+)[ \t]*;\n?/,O=/void\s+main\s*\([^)]*\)\s*\{\n?/;function C(t,e,n){switch(e){case 300:return n?L(t,x):function(t){const e=(t=L(t,E)).match(M);if(e){const n=e[1];t=t.replace(new RegExp("\\bgl_FragColor\\b","g"),n)}else{const e="fragmentColor";t=t.replace(O,(t=>`out vec4 ${e};\n${t}`)).replace(new RegExp("\\bgl_FragColor\\b","g"),e)}return t}(t);case 100:return n?L(t,P):function(t){const e=(t=L(t,A)).match(M);if(e){const n=e[1];t=t.replace(M,"").replace(new RegExp(`\\b${n}\\b`,"g"),S)}return t}(t);default:throw new Error(`unknown GLSL version ${e}`)}}function L(t,e){for(const[n,r]of e)t=t.replace(n,r);return t}const k=`\n\n${b.O_}\n\n`,R={[r.H]:"vertex",[r.Y]:"fragment"};function I(t,{id:e,source:n,type:o,modules:s,defines:a={},hookFunctions:u=[],inject:c={},transpileToGLSL100:l=!1,prologue:h=!0,log:f}){(0,i.Z)("string"===typeof n,"shader source must be a string");const d=o===r.H,g=n.split("\n");let v=100,_="",w=n;0===g[0].indexOf("#version ")?(v=300,_=g[0],w=g.slice(1).join("\n")):_=`#version ${v}`;const x={};s.forEach((t=>{Object.assign(x,t.getDefines())})),Object.assign(x,a);let E=h?`${_}\n${function({id:t,source:e,type:n}){return t&&"string"===typeof t&&-1===e.indexOf("SHADER_NAME")?`\n#define SHADER_NAME ${t}_${R[n]}\n\n`:""}({id:e,source:n,type:o})}\n${function({type:t}){return`\n#define SHADER_TYPE_${R[t].toUpperCase()}\n`}({type:o})}\n${function(t){switch(function(t){const e=t.getExtension("WEBGL_debug_renderer_info"),n=t.getParameter(e&&e.UNMASKED_VENDOR_WEBGL||7936),r=t.getParameter(e&&e.UNMASKED_RENDERER_WEBGL||7937);return{gpuVendor:function(t,e){return t.match(/NVIDIA/i)||e.match(/NVIDIA/i)?"NVIDIA":t.match(/INTEL/i)||e.match(/INTEL/i)?"INTEL":t.match(/AMD/i)||e.match(/AMD/i)||t.match(/ATI/i)||e.match(/ATI/i)?"AMD":"UNKNOWN GPU"}(n,r),vendor:n,renderer:r,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t).gpuVendor.toLowerCase()){case"nvidia":return"#define NVIDIA_GPU\n// Nvidia optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n";case"intel":return"#define INTEL_GPU\n// Intel optimizes away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n";case"amd":return"#define AMD_GPU\n";default:return"#define DEFAULT_GPU\n// Prevent driver from optimizing away the calculation necessary for emulated fp64\n#define LUMA_FP64_CODE_ELIMINATION_WORKAROUND 1\n// Intel's built-in 'tan' function doesn't have acceptable precision\n#define LUMA_FP32_TAN_PRECISION_WORKAROUND 1\n// Intel GPU doesn't have full 32 bits precision in same cases, causes overflow\n#define LUMA_FP64_HIGH_BITS_OVERFLOW_WORKAROUND 1\n"}}(t)}\n${function(t,e,n){let r="#if (__VERSION__ > 120)\n\n# define FEATURE_GLSL_DERIVATIVES\n# define FEATURE_GLSL_DRAW_BUFFERS\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FEATURE_GLSL_TEXTURE_LOD\n\n// DEPRECATED FLAGS, remove in v9\n# define FRAG_DEPTH\n# define DERIVATIVES\n# define DRAW_BUFFERS\n# define TEXTURE_LOD\n\n#endif // __VERSION\n";return y(t,p.GLSL_FRAG_DEPTH)&&(r+="\n// FRAG_DEPTH => gl_FragDepth is available\n#ifdef GL_EXT_frag_depth\n#extension GL_EXT_frag_depth : enable\n# define FEATURE_GLSL_FRAG_DEPTH\n# define FRAG_DEPTH\n# define gl_FragDepth gl_FragDepthEXT\n#endif\n"),y(t,p.GLSL_DERIVATIVES)&&m(t,p.GLSL_DERIVATIVES)&&(r+="\n// DERIVATIVES => dxdF, dxdY and fwidth are available\n#ifdef GL_OES_standard_derivatives\n#extension GL_OES_standard_derivatives : enable\n# define FEATURE_GLSL_DERIVATIVES\n# define DERIVATIVES\n#endif\n"),y(t,p.GLSL_FRAG_DATA)&&m(t,p.GLSL_FRAG_DATA,{behavior:"require"})&&(r+="\n// DRAW_BUFFERS => gl_FragData[] is available\n#ifdef GL_EXT_draw_buffers\n#extension GL_EXT_draw_buffers : require\n#define FEATURE_GLSL_DRAW_BUFFERS\n#define DRAW_BUFFERS\n#endif\n"),y(t,p.GLSL_TEXTURE_LOD)&&(r+="// TEXTURE_LOD => texture2DLod etc are available\n#ifdef GL_EXT_shader_texture_lod\n#extension GL_EXT_shader_texture_lod : enable\n\n# define FEATURE_GLSL_TEXTURE_LOD\n# define TEXTURE_LOD\n\n#endif\n"),r}(t)}\n${function(t={}){let e=0,n="";for(const r in t){0===e&&(n+="\n// APPLICATION DEFINES\n"),e++;const i=t[r];(i||Number.isFinite(i))&&(n+=`#define ${r.toUpperCase()} ${t[r]}\n`)}0===e&&(n+="\n");return n}(x)}\n${d?"":"precision highp float;\n\n"}\n`:`${_}\n`;const T=function(t){const e={vs:{},fs:{}};return t.forEach((t=>{let n;"string"!==typeof t?(n=t,t=n.hook):n={},t=t.trim();const[r,i]=t.split(":"),o=t.replace(/\(.+/,"");e[r][o]=Object.assign(n,{signature:i})}
1)),e}(u),P={},A={},S={};for(const r in c){const t="string"===typeof c[r]?{injection:c[r],order:0}:c[r],e=r.match(/^(v|f)s:(#)?([\w-]+)$/);if(e){const n=e[2],i=e[3];n?"decl"===i?A[r]=[t]:S[r]=[t]:P[r]=[t]}else S[r]=[t]}for(const r of s){f&&r.checkDeprecations(w,f);E+=r.getModuleSource(o,v);const t=r.injections[o];for(const e in t){const n=e.match(/^(v|f)s:#([\w-]+)$/);if(n){const r="decl"===n[2]?A:S;r[e]=r[e]||[],r[e].push(t[e])}else P[e]=P[e]||[],P[e].push(t[e])}}return E+=k,E=(0,b.ZP)(E,o,A),E+=function(t,e){let n="";for(const r in t){const i=t[r];if(n+=`void ${i.signature} {\n`,i.header&&(n+=` ${i.header}`),e[r]){const t=e[r];t.sort(((t,e)=>t.order-e.order));for(const e of t)n+=` ${e.injection}\n`}i.footer&&(n+=` ${i.footer}`),n+="}\n"}return n}(T[o],P),E+=w,E=(0,b.ZP)(E,o,S),E=C(E,l?100:v,d),E}function j(t){return function(e){const n={};for(const r of t){const t=r.getUniforms(e,n);Object.assign(n,t)}return n}}var D=n(7944);class N{static getDefaultProgramManager(t){return t.luma=t.luma||{},t.luma.defaultProgramManager=t.luma.defaultProgramManager||new N(t),t.luma.defaultProgramManager}constructor(t){this.gl=t,this._programCache={},this._getUniforms={},this._registeredModules={},this._hookFunctions=[],this._defaultModules=[],this._hashes={},this._hashCounter=0,this.stateHash=0,this._useCounts={}}addDefaultModule(t){this._defaultModules.find((e=>e.name===t.name))||this._defaultModules.push(t),this.stateHash++}removeDefaultModule(t){const e="string"===typeof t?t:t.name;this._defaultModules=this._defaultModules.filter((t=>t.name!==e)),this.stateHash++}addShaderHook(t,e){e&&(t=Object.assign(e,{hook:t})),this._hookFunctions.push(t),this.stateHash++}get(t={}){const{vs:e="",fs:n="",defines:i={},inject:o={},varyings:s=[],bufferMode:a=35981,transpileToGLSL100:u=!1}=t,l=this._getModuleList(t.modules),h=this._getHash(e),f=this._getHash(n),d=l.map((t=>this._getHash(t.name))).sort(),p=s.map((t=>this._getHash(t))),g=Object.keys(i).sort(),m=Object.keys(o).sort(),v=[],y=[];for(const r of g)v.push(this._getHash(r)),v.push(this._getHash(i[r]));for(const r of m)y.push(this._getHash(r)),y.push(this._getHash(o[r]));const b=`${h}/${f}D${v.join("/")}M${d.join("/")}I${y.join("/")}V${p.join("/")}H${this.stateHash}B${a}${u?"T":""}`;if(!this._programCache[b]){const t=function(t,e){const{vs:n,fs:i}=e,o=c(e.modules||[]);return{gl:t,vs:I(t,Object.assign({},e,{source:n,type:r.H,modules:o})),fs:I(t,Object.assign({},e,{source:i,type:r.Y,modules:o})),getUniforms:j(o)}}(this.gl,{vs:e,fs:n,modules:l,inject:o,defines:i,hookFunctions:this._hookFunctions,transpileToGLSL100:u});this._programCache[b]=new D.Z(this.gl,{hash:b,vs:t.vs,fs:t.fs,varyings:s,bufferMode:a}),this._getUniforms[b]=t.getUniforms||(t=>{}),this._useCounts[b]=0}return this._useCounts[b]++,this._programCache[b]}getUniforms(t){return this._getUniforms[t.hash]||null}release(t){const e=t.hash;this._useCounts[e]--,0===this._useCounts[e]&&(this._programCache[e].delete(),delete this._programCache[e],delete this._getUniforms[e],delete this._useCounts[e])}_getHash(t){return void 0===this._hashes[t]&&(this._hashes[t]=this._hashCounter++),this._hashes[t]}_getModuleList(t=[]){const e=new Array(this._defaultModules.length+t.length),n={};let r=0;for(let i=0,o=this._defaultModules.length;i<o;++i){const t=this._defaultModules[i],o=t.name;e[r++]=t,n[o]=!0}for(let i=0,o=t.length;i<o;++i){const o=t[i],s=o.name;n[s]||(e[r++]=o,n[s]=!0)}return e.length=r,e}}},9450:function(t,e,n){"use strict";n.d(e,{KQ:function(){return l},JD:function(){return c},s9:function(){return J},JY:function(){return $},w:function(){return W},vd:function(){return u},yW:function(){return tt},UF:function(){return s},D0:function(){return a},cM:function(){return r},kL:function(){return G},aQ:function(){return et},dR:function(){return Z},s8:function(){return H}});const r=new(n(4708).Z)({id:"luma.gl"});function i(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}const o="Invalid WebGLRenderingContext";function s(t){return"undefined"!==typeof WebGLRenderingContext&&t instanceof WebGLRenderingContext||("undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&Number.isFinite(t._version)))}function a(t){return"undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext||Boolean(t&&2===t._version)}function u(t){return a(t)?t:null}function c(t){return i(s(t),o),t}function l(t){return i(a(t),"Requires WebGL2"),t}var h=n(9718);const f={};function d(t,e){var n;f[t]=!0,void 0!==e&&(n=e,h.CO.console&&h.CO.console.error&&h.CO.console.error(n))}const p=function t(e){const n=e.gl;this.ext=e,this.isAlive=!0,this.hasBeenBound=!1,this.elementArrayBuffer=null,this.attribs=new Array(e.maxVertexAttribs);for(let r=0;r<this.attribs.length;r++){const e=new t.VertexAttrib(n);this.attribs[r]=e}this.maxAttrib=0};(p.VertexAttrib=function(t){this.enabled=!1,this.buffer=null,this.size=4,this.type=5126,this.normalized=!1,this.stride=16,this.offset=0,this.cached="",this.recache()}).prototype.recache=function(){this.cached=[this.size,this.type,this.normalized,this.stride,this.offset].join(":")};const g=function(t){const e=this;this.gl=t,function(t){const e=t.getError;t.getError=function(){let n;do{n=e.apply(t),0!==n&&(f[n]=!0)}while(0!==n);for(n in f)if(f[n])return delete f[n],parseInt(n,10);return 0}}(t);const n=this.original={getParameter:t.getParameter,enableVertexAttribArray:t.enableVertexAttribArray,disableVertexAttribArray:t.disableVertexAttribArray,bindBuffer:t.bindBuffer,getVertexAttrib:t.getVertexAttrib,vertexAttribPointer:t.vertexAttribPointer};t.getParameter=function(t){return t===e.VERTEX_ARRAY_BINDING_OES?e.currentVertexArrayObject===e.defaultVertexArrayObject?null:e.currentVertexArrayObject:n.getParameter.apply(this,arguments)},t.enableVertexAttribArray=function(t){const r=e.currentVertexArrayObject;r.maxAttrib=Math.max(r.maxAttrib,t);const i=r.attribs[t];return i.enabled=!0,n.enableVertexAttribArray.apply(this,arguments)},t.disableVertexAttribArray=function(t){const r=e.currentVertexArrayObject;r.maxAttrib=Math.max(r.maxAttrib,t);const i=r.attribs[t];return i.enabled=!1,n.disableVertexAttribArray.apply(this,arguments)},t.bindBuffer=function(t,r){switch(t){case 34962:e.currentArrayBuffer=r;break;case 34963:e.currentVertexArrayObject.elementArrayBuffer=r}return n.bindBuffer.apply(this,arguments)},t.getVertexAttrib=function(t,r){const i=e.currentVertexArrayObject,o=i.attribs[t];switch(r){case 34975:return o.buffer;case 34338:return o.enabled;case 34339:return o.size;case 34340:return o.stride;case 34341:return o.type;case 34922:return o.normalized;default:return n.getVertexAttrib.apply(this,arguments)}},t.vertexAttribPointer=function(t,r,i,o,s,a){const u=e.currentVertexArrayObject;u.maxAttrib=Math.max(u.maxAttrib,t);const c=u.attribs[t];return c.buffer=e.currentArrayBuffer,c.size=r,c.type=i,c.normalized=o,c.stride=s,c.offset=a,c.recache(),n.vertexAttribPointer.apply(this,arguments)},t.instrumentExtension&&t.instrumentExtension(this,"OES_vertex_array_object"),t.canvas&&t.canvas.addEventListener("webglcontextrestored",(()=>{var t;t="OESVertexArrayObject emulation library context restored",h.CO.console&&h.CO.console.log&&h.CO.console.log(t),e.reset_()}),!0),this.reset_()};g.prototype.VERTEX_ARRAY_BINDING_OES=34229,g.prototype.reset_=function(){if(void 0!==this.vertexArrayObjects)for(let e=0;e<this.vertexArrayObjects.length;++e)this.vertexArrayObjects.isAlive=!1;const t=this.gl;this.maxVertexAttribs=t.getParameter(34921),this.defaultVertexArrayObject=ne
1w p(this),this.currentVertexArrayObject=null,this.currentArrayBuffer=null,this.vertexArrayObjects=[this.defaultVertexArrayObject],this.bindVertexArrayOES(null)},g.prototype.createVertexArrayOES=function(){const t=new p(this);return this.vertexArrayObjects.push(t),t},g.prototype.deleteVertexArrayOES=function(t){t.isAlive=!1,this.vertexArrayObjects.splice(this.vertexArrayObjects.indexOf(t),1),this.currentVertexArrayObject===t&&this.bindVertexArrayOES(null)},g.prototype.isVertexArrayOES=function(t){return!!(t&&t instanceof p&&t.hasBeenBound&&t.ext===this)},g.prototype.bindVertexArrayOES=function(t){const e=this.gl;if(t&&!t.isAlive)return void d(1282,"bindVertexArrayOES: attempt to bind deleted arrayObject");const n=this.original,r=this.currentVertexArrayObject;this.currentVertexArrayObject=t||this.defaultVertexArrayObject,this.currentVertexArrayObject.hasBeenBound=!0;const i=this.currentVertexArrayObject;if(r===i)return;r&&i.elementArrayBuffer===r.elementArrayBuffer||n.bindBuffer.call(e,34963,i.elementArrayBuffer);let o=this.currentArrayBuffer;const s=Math.max(r?r.maxAttrib:0,i.maxAttrib);for(let a=0;a<=s;a++){const t=i.attribs[a],s=r?r.attribs[a]:null;if(r&&t.enabled===s.enabled||(t.enabled?n.enableVertexAttribArray.call(e,a):n.disableVertexAttribArray.call(e,a)),t.enabled){let i=!1;r&&t.buffer===s.buffer||(o!==t.buffer&&(n.bindBuffer.call(e,34962,t.buffer),o=t.buffer),i=!0),(i||t.cached!==s.cached)&&n.vertexAttribPointer.call(e,a,t.size,t.type,t.normalized,t.stride,t.offset)}}this.currentArrayBuffer!==o&&n.bindBuffer.call(e,34962,this.currentArrayBuffer)};const m="OES_element_index",v="WEBGL_draw_buffers",y="WEBGL_debug_renderer_info",b=t=>a(t)?void 0:0,_={3074:t=>a(t)?void 0:36064,35723:t=>a(t)?void 0:4352,35977:b,32937:b,36795:(t,e)=>{const n=a(t)?t.getExtension("EXT_disjoint_timer_query_webgl2"):t.getExtension("EXT_disjoint_timer_query");return n&&n.GPU_DISJOINT_EXT?e(n.GPU_DISJOINT_EXT):0},37445:(t,e)=>{const n=t.getExtension(y);return e(n&&n.UNMASKED_VENDOR_WEBGL||7936)},37446:(t,e)=>{const n=t.getExtension(y);return e(n&&n.UNMASKED_RENDERER_WEBGL||7937)},34047:(t,e)=>{const n=t.luma.extensions.EXT_texture_filter_anisotropic;return n?e(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT):1},32883:b,35071:b,37447:b,36063:(t,e)=>{if(!a(t)){const n=t.getExtension(v);return n?e(n.MAX_COLOR_ATTACHMENTS_WEBGL):0}},35379:b,35374:b,35377:b,34852:t=>{if(!a(t)){const e=t.getExtension(v);return e?e.MAX_DRAW_BUFFERS_WEBGL:0}},36203:t=>t.getExtension(m)?2147483647:65535,33001:t=>t.getExtension(m)?16777216:65535,33e3:t=>16777216,37157:b,35373:b,35657:b,36183:b,37137:b,34045:b,35978:b,35979:b,35968:b,35376:b,35375:b,35659:b,37154:b,35371:b,35658:b,35076:b,35077:b,35380:b};const w="ANGLE_instanced_arrays";const x={OES_vertex_array_object:{meta:{suffix:"OES"},createVertexArray:()=>{i(!1,"VertexArray requires WebGL2 or OES_vertex_array_object extension")},deleteVertexArray:()=>{},bindVertexArray:()=>{},isVertexArray:()=>!1},[w]:{meta:{suffix:"ANGLE"},vertexAttribDivisor(t,e){i(0===e,"WebGL instanced rendering not supported")},drawElementsInstanced:()=>{},drawArraysInstanced:()=>{}},WEBGL_draw_buffers:{meta:{suffix:"WEBGL"},drawBuffers:()=>{i(!1)}},EXT_disjoint_timer_query:{meta:{suffix:"EXT"},createQuery:()=>{i(!1)},deleteQuery:()=>{i(!1)},beginQuery:()=>{i(!1)},endQuery:()=>{},getQuery(t,e){return this.getQueryObject(t,e)},getQueryParameter(t,e){return this.getQueryObject(t,e)},getQueryObject:()=>{}}},E={readBuffer:(t,e,n)=>{a(t)&&e(n)},getVertexAttrib:(t,e,n,r)=>{const{webgl2:i,ext:o}=function(t,e){return{webgl2:a(t),ext:t.getExtension(e)}}(t,w);let s;switch(r){case 35069:s=!!i&&void 0;break;case 35070:s=i||o?void 0:0}return void 0!==s?s:e(n,r)},getProgramParameter:(t,e,n,r)=>{if(!a(t))switch(r){case 35967:return 35981;case 35971:case 35382:return 0}return e(n,r)},getInternalformatParameter:(t,e,n,r,i)=>{if(!a(t))switch(i){case 32937:return new Int32Array([0])}return t.getInternalformatParameter(n,r,i)},getTexParameter(t,e,n,r){switch(r){case 34046:const{extensions:e}=t.luma,n=e.EXT_texture_filter_anisotropic;r=n&&n.TEXTURE_MAX_ANISOTROPY_EXT||34046}return e(n,r)},getParameter:function(t,e,n){const r=_[n],i="function"===typeof r?r(t,e,n):r;return void 0!==i?i:e(n)},hint:(t,e,n,r)=>e(n,r)};function T(t,{extension:e,target:n,target2:r}){const o=x[e];i(o);const{meta:s={}}=o,{suffix:a=""}=s,u=t.getExtension(e);for(const i of Object.keys(o)){const e=`${i}${a}`;let s=null;"meta"===i||"function"===typeof t[i]||(u&&"function"===typeof u[e]?s=(...t)=>u[e](...t):"function"===typeof o[i]&&(s=o[i].bind(n))),s&&(n[i]=s,r[i]=s)}}("undefined"!==typeof n.g?n.g:window).polyfillContext=function(t){t.luma=t.luma||{};const{luma:e}=t;return e.polyfilled||(!function(t){if("function"===typeof t.createVertexArray)return;
1const e=t.getSupportedExtensions;t.getSupportedExtensions=function(){const t=e.call(this)||[];return t.indexOf("OES_vertex_array_object")<0&&t.push("OES_vertex_array_object"),t};const n=t.getExtension;t.getExtension=function(e){return n.call(this,e)||("OES_vertex_array_object"!==e?null:(t.__OESVertexArrayObject||(this.__OESVertexArrayObject=new g(this)),this.__OESVertexArrayObject))}}(t),function(t){t.luma.extensions={};const e=t.getSupportedExtensions()||[];for(const n of e)t.luma[n]=t.getExtension(n)}(t),function(t,e){for(const n of Object.getOwnPropertyNames(e))"overrides"!==n&&T(t,{extension:n,target:t.luma,target2:t})}(t,x),function(t,{target:e,target2:n}){Object.keys(E).forEach((r=>{if("function"===typeof E[r]){const i=t[r]?t[r].bind(t):()=>{},o=E[r].bind(null,t,i);e[r]=o,n[r]=o}}))}(t,{target:e,target2:t}),e.polyfilled=!0),t};const P={3042:!1,32773:new Float32Array([0,0,0,0]),32777:32774,34877:32774,32969:1,32968:0,32971:1,32970:0,3106:new Float32Array([0,0,0,0]),3107:[!0,!0,!0,!0],2884:!1,2885:1029,2929:!1,2931:1,2932:513,2928:new Float32Array([0,1]),2930:!0,3024:!0,36006:null,2886:2305,33170:4352,2849:1,32823:!1,32824:0,10752:0,32938:1,32939:!1,3089:!1,3088:new Int32Array([0,0,1024,1024]),2960:!1,2961:0,2968:4294967295,36005:4294967295,2962:519,2967:0,2963:4294967295,34816:519,36003:0,36004:4294967295,2964:7680,2965:7680,2966:7680,34817:7680,34818:7680,34819:7680,2978:[0,0,1024,1024],3333:4,3317:4,37440:!1,37441:!1,37443:37444,35723:4352,36010:null,35977:!1,3330:0,3332:0,3331:0,3314:0,32878:0,3316:0,3315:0,32877:0},A=(t,e,n)=>e?t.enable(n):t.disable(n),S=(t,e,n)=>t.hint(n,e),M=(t,e,n)=>t.pixelStorei(n,e);function O(t){return Array.isArray(t)||ArrayBuffer.isView(t)}const C={3042:A,32773:(t,e)=>t.blendColor(...e),32777:"blendEquation",34877:"blendEquation",32969:"blendFunc",32968:"blendFunc",32971:"blendFunc",32970:"blendFunc",3106:(t,e)=>t.clearColor(...e),3107:(t,e)=>t.colorMask(...e),2884:A,2885:(t,e)=>t.cullFace(e),2929:A,2931:(t,e)=>t.clearDepth(e),2932:(t,e)=>t.depthFunc(e),2928:(t,e)=>t.depthRange(...e),2930:(t,e)=>t.depthMask(e),3024:A,35723:S,36006:(t,e)=>{const n=a(t)?36009:36160;return t.bindFramebuffer(n,e)},2886:(t,e)=>t.frontFace(e),33170:S,2849:(t,e)=>t.lineWidth(e),32823:A,32824:"polygonOffset",10752:"polygonOffset",35977:A,32938:"sampleCoverage",32939:"sampleCoverage",3089:A,3088:(t,e)=>t.scissor(...e),2960:A,2961:(t,e)=>t.clearStencil(e),2968:(t,e)=>t.stencilMaskSeparate(1028,e),36005:(t,e)=>t.stencilMaskSeparate(1029,e),2962:"stencilFuncFront",2967:"stencilFuncFront",2963:"stencilFuncFront",34816:"stencilFuncBack",36003:"stencilFuncBack",36004:"stencilFuncBack",2964:"stencilOpFront",2965:"stencilOpFront",2966:"stencilOpFront",34817:"stencilOpBack",34818:"stencilOpBack",34819:"stencilOpBack",2978:(t,e)=>t.viewport(...e),3333:M,3317:M,37440:M,37441:M,37443:M,3330:M,3332:M,3331:M,36010:(t,e)=>t.bindFramebuffer(36008,e),3314:M,32878:M,3316:M,3315:M,32877:M,framebuffer:(t,e)=>{const n=e&&"handle"in e?e.handle:e;return t.bindFramebuffer(36160,n)},blend:(t,e)=>e?t.enable(3042):t.disable(3042),blendColor:(t,e)=>t.blendColor(...e),blendEquation:(t,e)=>{e=O(e)?e:[e,e],t.blendEquationSeparate(...e)},blendFunc:(t,e)=>{e=O(e)&&2===e.length?[...e,...e]:e,t.blendFuncSeparate(...e)},clearColor:(t,e)=>t.clearColor(...e),clearDepth:(t,e)=>t.clearDepth(e),clearStencil:(t,e)=>t.clearStencil(e),colorMask:(t,e)=>t.colorMask(...e),cull:(t,e)=>e?t.enable(2884):t.disable(2884),cullFace:(t,e)=>t.cullFace(e),depthTest:(t,e)=>e?t.enable(2929):t.disable(2929),depthFunc:(t,e)=>t.depthFunc(e),depthMask:(t,e)=>t.depthMask(e),depthRange:(t,e)=>t.depthRange(...e),dither:(t,e)=>e?t.enable(3024):t.disable(3024),derivativeHint:(t,e)=>{t.hint(35723,e)},frontFace:(t,e)=>t.frontFace(e),mipmapHint:(t,e)=>t.hint(33170,e),lineWidth:(t,e)=>t.lineWidth(e),polygonOffsetFill:(t,e)=>e?t.enable(32823):t.disable(32823),polygonOffset:(t,e)=>t.polygonOffset(...e),sampleCoverage:(t,e)=>t.sampleCoverage(...e),scissorTest:(t,e)=>e?t.enable(3089):t.disable(3089),scissor:(t,e)=>t.scissor(...e),stencilTest:(t,e)=>e?t.enable(2960):t.disable(2960),stencilMask:(t,e)=>{e=O(e)?e:[e,e];const[n,r]=e;t.stencilMaskSeparate(1028,n),t.stencilMaskSeparate(1029,r)},stencilFunc:(t,e)=>{e=O(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,s,a]=e;t.stencilFuncSeparate(1028,n,r,i),t.stencilFuncSeparate(1029,o,s,a)},stencilOp:(t,e)=>{e=O(e)&&3===e.length?[...e,...e]:e;const[n,r,i,o,s,a]=e;t.stencilOpSeparate(1028,n,r,i),t.stencilOpSeparate(1029,o,s,a)},viewport:(t,e)=>t.viewport(...e)};function L(t,e,n){return void 0!==e[t]?e[t]:n[t]}const k={blendEquation:(t,e,n)=>t.blendEquationSeparate(L(32777,e,n),L(34877,e,n)),blendFunc:(t,e,n)=>t.blendFuncSeparate(L(32969,e,n),L(32968,e,n),L(32971,e,n),L(32970,e,n)),polygonOffset:(t,e,n)=>t.polygonOffset(L(32824,e,n),L(10752,e,n)),sampleCoverage:(t,e,n)=>
1t.sampleCoverage(L(32938,e,n),L(32939,e,n)),stencilFuncFront:(t,e,n)=>t.stencilFuncSeparate(1028,L(2962,e,n),L(2967,e,n),L(2963,e,n)),stencilFuncBack:(t,e,n)=>t.stencilFuncSeparate(1029,L(34816,e,n),L(36003,e,n),L(36004,e,n)),stencilOpFront:(t,e,n)=>t.stencilOpSeparate(1028,L(2964,e,n),L(2965,e,n),L(2966,e,n)),stencilOpBack:(t,e,n)=>t.stencilOpSeparate(1029,L(34817,e,n),L(34818,e,n),L(34819,e,n))},R={enable:(t,e)=>t({[e]:!0}),disable:(t,e)=>t({[e]:!1}),pixelStorei:(t,e,n)=>t({[e]:n}),hint:(t,e,n)=>t({[e]:n}),bindFramebuffer:(t,e,n)=>{switch(e){case 36160:return t({36006:n,36010:n});case 36009:return t({36006:n});case 36008:return t({36010:n});default:return null}},blendColor:(t,e,n,r,i)=>t({32773:new Float32Array([e,n,r,i])}),blendEquation:(t,e)=>t({32777:e,34877:e}),blendEquationSeparate:(t,e,n)=>t({32777:e,34877:n}),blendFunc:(t,e,n)=>t({32969:e,32968:n,32971:e,32970:n}),blendFuncSeparate:(t,e,n,r,i)=>t({32969:e,32968:n,32971:r,32970:i}),clearColor:(t,e,n,r,i)=>t({3106:new Float32Array([e,n,r,i])}),clearDepth:(t,e)=>t({2931:e}),clearStencil:(t,e)=>t({2961:e}),colorMask:(t,e,n,r,i)=>t({3107:[e,n,r,i]}),cullFace:(t,e)=>t({2885:e}),depthFunc:(t,e)=>t({2932:e}),depthRange:(t,e,n)=>t({2928:new Float32Array([e,n])}),depthMask:(t,e)=>t({2930:e}),frontFace:(t,e)=>t({2886:e}),lineWidth:(t,e)=>t({2849:e}),polygonOffset:(t,e,n)=>t({32824:e,10752:n}),sampleCoverage:(t,e,n)=>t({32938:e,32939:n}),scissor:(t,e,n,r,i)=>t({3088:new Int32Array([e,n,r,i])}),stencilMask:(t,e)=>t({2968:e,36005:e}),stencilMaskSeparate:(t,e,n)=>t({[1028===e?2968:36005]:n}),stencilFunc:(t,e,n,r)=>t({2962:e,2967:n,2963:r,34816:e,36003:n,36004:r}),stencilFuncSeparate:(t,e,n,r,i)=>t({[1028===e?2962:34816]:n,[1028===e?2967:36003]:r,[1028===e?2963:36004]:i}),stencilOp:(t,e,n,r)=>t({2964:e,2965:n,2966:r,34817:e,34818:n,34819:r}),stencilOpSeparate:(t,e,n,r,i)=>t({[1028===e?2964:34817]:n,[1028===e?2965:34818]:r,[1028===e?2966:34819]:i}),viewport:(t,e,n,r,i)=>t({2978:[e,n,r,i]})},I=(t,e)=>t.isEnabled(e),j={3042:I,2884:I,2929:I,3024:I,32823:I,32926:I,32928:I,3089:I,2960:I,35977:I};function D(t){for(const e in t)return!1;return!0}function N(t,e){if(t===e)return!0;const n=Array.isArray(t)||ArrayBuffer.isView(t),r=Array.isArray(e)||ArrayBuffer.isView(e);if(n&&r&&t.length===e.length){for(let n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0}return!1}function F(t,e){const n=t[e].bind(t);t[e]=function(...e){const r=e[0];return r in t.state.cache&&t.state.enable?t.state.cache[r]:n(...e)},Object.defineProperty(t[e],"name",{value:`${e}-from-cache`,configurable:!1})}function B(t,e,n){const r=t[e].bind(t);t[e]=function(...e){const{valueChanged:i,oldValue:o}=n(t.state._updateCache,...e);return i&&r(...e),o},Object.defineProperty(t[e],"name",{value:`${e}-to-cache`,configurable:!1})}class U{constructor(t,{copyState:e=!1,log:n=(()=>{})}={}){this.gl=t,this.program=null,this.stateStack=[],this.enable=!0,this.cache=e?function(t,e){if("number"===typeof(e=e||P)){const n=e,r=j[n];return r?r(t,n):t.getParameter(n)}const n=Array.isArray(e)?e:Object.keys(e),r={};for(const i of n){const e=j[i];r[i]=e?e(t,Number(i)):t.getParameter(Number(i))}return r}(t):Object.assign({},P),this.log=n,this._updateCache=this._updateCache.bind(this),Object.seal(this)}push(t={}){this.stateStack.push({})}pop(){i(this.stateStack.length>0);const t=this.stateStack[this.stateStack.length-1];Z(this.gl,t),this.stateStack.pop()}_updateCache(t){let e,n=!1;const r=this.stateStack.length>0&&this.stateStack[this.stateStack.length-1];for(const o in t){i(void 0!==o);const s=t[o],a=this.cache[o];N(s,a)||(n=!0,e=a,r&&!(o in r)&&(r[o]=a),this.cache[o]=s)}return{valueChanged:n,oldValue:e}}}function z(t,e={}){const{enable:r=!0,copyState:o}=e;if(i(void 0!==o),!t.state){const e="undefined"!==typeof n.g?n.g:window,{polyfillContext:r}=e;r&&r(t),t.state=new U(t,{copyState:o}),function(t){const e=t.useProgram.bind(t);t.useProgram=function(n){t.state.program!==n&&(e(n),t.state.program=n)}}(t);for(const n in R){B(t,n,R[n])}F(t,"getParameter"),F(t,"isEnabled")}return t.state.enable=r,t}function V(t){i(t.state),t.state.pop()}function Z(t,e){if(i(s(t),"setParameters requires a WebGL context"),D(e))return;const n={};for(const i in e){const r=Number(i),o=C[i];o&&("string"===typeof o?n[o]=!0:o(t,e[i],r))}const r=t.state&&t.state.cache;if(r)for(const i in n){(0,k[i])(t,e,r)}}function G(t){Z(t,P)}function H(t,e,n){if(D(e))return n(t);const{nocatch:r=!0}=e;let i;if(function(t){t.state||z(t,{copyState:!1}),t.state.push()}(t),Z(t,e),r)i=n(t),V(t);else try{i=n(t)}finally{V(t)}return i}function W(t){const{luma:e}=t;if(t.canvas&&e){const{clientWidth:n}=e.canvasSizeInfo;return n?t.drawingBufferWidth/n:1}return 1}function $(t,e,n=!0){return function(t,e,n,r,i){const o=q(t[0],e,n);let s=X(t[1],e,r,i),a=q(t[0]+1,e,n);const u=a===n-1?a:a-1;let c;a=X(t[1]+1,e,r,i),i?(a=0===a?a:a+1,c=s,s=a):c=a===r-1?a:a-1;return{x:o,y:s,width:Math.max(u-o+1,1),height:Math.max(c-s+1,1)}}(e,W(t),t.drawingBufferWidth,t.drawingBufferHeight,n)}function q(t,e,n){return Math.min(Math.round(t*e),n-1)}function X(t,e,n,r){return r?Math.max(0,n-1-Math.round(t*e)):Math.min(Math.round(t*e),n-1)}const Y=(0,h.jU)(),K=Y&&"undefined"!==typeof document,Q={webgl2:!0,webgl1:!0,throwOnError:!0,manageState:!0,canvas:null,debug:!1,width:800,height:600};function J(t={}){i(Y,"createGLContext only available in the browser.\nCreate your own headless context or use 'createHeadlessContext' from @luma.gl/test-utils"),t=Object.assign({},Q,t);const{width:e,height:n}=t;function o(e){if(t.throwOnError)throw new Error(e);return console.error(e),null}let s;t.onError=o;const{canvas:u}=t;return s=function(t,e){const{onError:n}=e;let r=null;const i=t=>r=t.statusMessage||r;t.addEventListener("webglcontextcreationerror",i,!1);const{webgl1:o=!0,webgl2:s=!0}
1=e;let a=null;s&&(a=a||t.getContext("webgl2",e),a=a||t.getContext("experimental-webgl2",e));o&&(a=a||t.getContext("webgl",e),a=a||t.getContext("experimental-webgl",e));if(t.removeEventListener("webglcontextcreationerror",i,!1),!a)return n(`Failed to create ${s&&!o?"WebGL2":"WebGL"} context: ${r||"Unknown error"}`);e.onContextLost&&t.addEventListener("webglcontextlost",e.onContextLost,!1);e.onContextRestored&&t.addEventListener("webglcontextrestored",e.onContextRestored,!1);return a}(function({canvas:t,width:e=800,height:n=600,onError:r}){let i;if("string"===typeof t){K&&"complete"===document.readyState||r(`createGLContext called on canvas '${t}' before page was loaded`),i=document.getElementById(t)}else t?i=t:(i=document.createElement("canvas"),i.id="lumagl-canvas",i.style.width=Number.isFinite(e)?`${e}px`:"100%",i.style.height=Number.isFinite(n)?`${n}px`:"100%",document.body.insertBefore(i,document.body.firstChild));return i}({canvas:u,width:e,height:n,onError:o}),t),s?(s=tt(s,t),function(t){const e=a(t)?"WebGL2":"WebGL1",n=function(t){const e=t.getParameter(7936),n=t.getParameter(7937),r=t.getExtension("WEBGL_debug_renderer_info"),i=r&&t.getParameter(r.UNMASKED_VENDOR_WEBGL||7936),o=r&&t.getParameter(r.UNMASKED_RENDERER_WEBGL||7937);return{vendor:i||e,renderer:o||n,vendorMasked:e,rendererMasked:n,version:t.getParameter(7938),shadingLanguageVersion:t.getParameter(35724)}}(t),i=n?`(${n.vendor},${n.renderer})`:"",o=t.debug?" debug":"";r.info(1,`${e}${o} context ${i}`)()}(s),s):null}function tt(t,e={}){if(!t||t._instrumented)return t;t._version=t._version||function(t){if("undefined"!==typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext)return 2;return 1}(t),t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{},e=Object.assign({},Q,e);const{manageState:n,debug:i}=e;return n&&z(t,{copyState:!1,log:(...t)=>r.log(1,...t)()}),Y&&i&&(h.CO.makeDebugContext?(t=h.CO.makeDebugContext(t,e),r.level=Math.max(r.level,1)):r.warn('WebGL debug mode not activated. import "@luma.gl/debug" to enable.')()),t._instrumented=!0,t}function et(t,e={}){if(t.canvas){return void function(t,e,n){let i="width"in n?n.width:t.canvas.clientWidth,o="height"in n?n.height:t.canvas.clientHeight;i&&o||(r.log(1,"Canvas clientWidth/clientHeight is 0")(),e=1,i=t.canvas.width||1,o=t.canvas.height||1);t.luma=t.luma||{},t.luma.canvasSizeInfo=t.luma.canvasSizeInfo||{};const s=t.luma.canvasSizeInfo;if(s.clientWidth!==i||s.clientHeight!==o||s.devicePixelRatio!==e){let n=e;const s=Math.floor(i*n),a=Math.floor(o*n);t.canvas.width=s,t.canvas.height=a,t.drawingBufferWidth===s&&t.drawingBufferHeight===a||(r.warn("Device pixel ratio clamped")(),n=Math.min(t.drawingBufferWidth/i,t.drawingBufferHeight/o),t.canvas.width=Math.floor(i*n),t.canvas.height=Math.floor(o*n)),Object.assign(t.luma.canvasSizeInfo,{clientWidth:i,clientHeight:o,devicePixelRatio:e})}}(t,function(t){const e="undefined"===typeof window?1:window.devicePixelRatio||1;return Number.isFinite(t)?t<=0?1:t:t?e:1}(e.useDevicePixels),e)}const n=t.getExtension("STACKGL_resize_drawingbuffer");n&&"width"in e&&"height"in e&&n.resize(e.width,e.height)}},5682:function(t,e,n){"use strict";n.d(e,{H:function(){return r},Y:function(){return i}});const r="vs",i="fs"},6713:function(t,e,n){"use strict";n.d(e,{O_:function(){return s},Lm:function(){return h},ZP:function(){return l}});var r=n(5682),i=n(9047);const o={[r.H]:"#ifdef MODULE_LOGDEPTH\n logdepth_adjustPosition(gl_Position);\n#endif\n",[r.Y]:"#ifdef MODULE_MATERIAL\n gl_FragColor = material_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LIGHTING\n gl_FragColor = lighting_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_FOG\n gl_FragColor = fog_filterColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_PICKING\n gl_FragColor = picking_filterHighlightColor(gl_FragColor);\n gl_FragColor = picking_filterPickingColor(gl_FragColor);\n#endif\n\n#ifdef MODULE_LOGDEPTH\n logdepth_setFragDepth();\n#endif\n"},s="__LUMA_INJECT_DECLARATIONS__",a=/void\s+main\s*\([^)]*\)\s*\{\n?/,u=/}\n?[^{}]*$/,c=[];function l(t,e,n,i=!1){const l=e===r.H;for(const r in n){const e=n[r];e.sort(((t,e)=>t.order-e.order)),c.length=e.length;for(let t=0,n=e.length;t<n;++t)c[t]=e[t].injection;const i=`${c.join("\n")}\n`;switch(r){case"vs:#decl":l&&(t=t.replace(s,i));break;case"vs:#main-start":l&&(t=t.replace(a,(t=>t+i)));break;case"vs:#main-end":l&&(t=t.replace(u,(t=>i+t)));break;case"fs:#decl":l||(t=t.replace(s,i));break;case"fs:#main-start":l||(t=t.replace(a,(t=>t+i)));break;case"fs:#main-end":l||(t=t.replace(u,(t=>i+t)));break;default:t=t.replace(r,(t=>t+i))}}return t=t.replace(s,""),i&&(t=t.replace(/\}\s*$/,(t=>t+o[e]))),t}function h(t){const e={};return(0,i.Z)(Array.isArray(t)&&t.length>1),t.forEach((t=>{for(const n in t)e[n]=e[n]?`${e[n]}\n${t[n]}`:t[n]})),e}},9047:function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"shadertools: assertion failed.")}n.d(e,{Z:function(){return r}})},4072:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(9335),i=n(2525),o=n(2610);const s={offset:0,stride:0,type:5126,size:1,divisor:0,normalized:!1,integer:!1},a={deprecatedProps:{instanced:"divisor",isInstanced:"divisor"}};class u{static getBytesPerElement(t){return(0,r.vN)(t.type||5126).BYTES_PER_ELEMENT}static getBytesPerVertex(t){(0,i.h)(t.size);return(0,r.vN)(t.type||5126).BYTES_PER_ELEMENT*t.size}static resolve(...t){return new u(...[s,...t])}constructor(...t){t.forEach((t=>this._assign(t))),Object.freeze(this)}toString(){return JSON.stringify(this)}get BYTES_PER_ELEMENT(){return u.getBytesPerElement(this)}get BYTES_PER_VERTEX(){return u.getBytesPerVertex(this)}_assign(t={}
1){return void 0!==(t=(0,o.k)("Accessor",t,a)).type&&(this.type=t.type,5124!==t.type&&5125!==t.type||(this.integer=!0)),void 0!==t.size&&(this.size=t.size),void 0!==t.offset&&(this.offset=t.offset),void 0!==t.stride&&(this.stride=t.stride),void 0!==t.normalized&&(this.normalized=t.normalized),void 0!==t.integer&&(this.integer=t.integer),void 0!==t.divisor&&(this.divisor=t.divisor),void 0!==t.buffer&&(this.buffer=t.buffer),void 0!==t.index&&("boolean"===typeof t.index?this.index=t.index?1:0:this.index=t.index),void 0!==t.instanced&&(this.divisor=t.instanced?1:0),void 0!==t.isInstanced&&(this.divisor=t.isInstanced?1:0),this}}},3478:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(7577),i=n(4072),o=n(9335),s=n(9450),a=n(2525),u=n(2610);const c={offset:"accessor.offset",stride:"accessor.stride",type:"accessor.type",size:"accessor.size",divisor:"accessor.divisor",normalized:"accessor.normalized",integer:"accessor.integer",instanced:"accessor.divisor",isInstanced:"accessor.divisor"},l={removedProps:{},replacedProps:{bytes:"byteLength"},deprecatedProps:c},h={removedProps:c};class f extends r.Z{constructor(t,e={}){super(t,e),this.stubRemovedMethods("Buffer","v6.0",["layout","setLayout","getIndexedParameter"]),this.target=e.target||(this.gl.webgl2?36662:34962),this.initialize(e),Object.seal(this)}getElementCount(t=this.accessor){return Math.round(this.byteLength/i.Z.getBytesPerElement(t))}getVertexCount(t=this.accessor){return Math.round(this.byteLength/i.Z.getBytesPerVertex(t))}initialize(t={}){return ArrayBuffer.isView(t)&&(t={data:t}),Number.isFinite(t)&&(t={byteLength:t}),t=(0,u.k)("Buffer",t,l),this.usage=t.usage||35044,this.debugData=null,this.setAccessor(Object.assign({},t,t.accessor)),t.data?this._setData(t.data,t.offset,t.byteLength):this._setByteLength(t.byteLength||0),this}setProps(t){return"accessor"in(t=(0,u.k)("Buffer",t,h))&&this.setAccessor(t.accessor),this}setAccessor(t){return delete(t=Object.assign({},t)).buffer,this.accessor=new i.Z(t),this}reallocate(t){return t>this.byteLength?(this._setByteLength(t),!0):(this.bytesUsed=t,!1)}setData(t){return this.initialize(t)}subData(t){ArrayBuffer.isView(t)&&(t={data:t});const{data:e,offset:n=0,srcOffset:r=0}=t,i=t.byteLength||t.length;(0,a.h)(e);const o=this.gl.webgl2?36663:this.target;return this.gl.bindBuffer(o,this.handle),0!==r||void 0!==i?((0,s.KQ)(this.gl),this.gl.bufferSubData(this.target,n,e,r,i)):this.gl.bufferSubData(o,n,e),this.gl.bindBuffer(o,null),this.debugData=null,this._inferType(e),this}copyData({sourceBuffer:t,readOffset:e=0,writeOffset:n=0,size:r}){const{gl:i}=this;return(0,s.KQ)(i),i.bindBuffer(36662,t.handle),i.bindBuffer(36663,this.handle),i.copyBufferSubData(36662,36663,e,n,r),i.bindBuffer(36662,null),i.bindBuffer(36663,null),this.debugData=null,this}getData({dstData:t=null,srcByteOffset:e=0,dstOffset:n=0,length:r=0}={}){(0,s.KQ)(this.gl);const i=(0,o.vN)(this.accessor.type||5126,{clamped:!1}),u=this._getAvailableElementCount(e),c=n;let l,h;t?(h=t.length,l=h-c):(l=Math.min(u,r||u),h=c+l);const f=Math.min(u,l);return r=r||f,(0,a.h)(r<=f),t=t||new i(h),this.gl.bindBuffer(36662,this.handle),this.gl.getBufferSubData(36662,e,t,n,r),this.gl.bindBuffer(36662,null),t}bind({target:t=this.target,index:e=this.accessor&&this.accessor.index,offset:n=0,size:r}={}){return 35345===t||35982===t?void 0!==r?this.gl.bindBufferRange(t,e,this.handle,n,r):((0,a.h)(0===n),this.gl.bindBufferBase(t,e,this.handle)):this.gl.bindBuffer(t,this.handle),this}unbind({target:t=this.target,index:e=this.accessor&&this.accessor.index}={}){return 35345===t||35982===t?this.gl.bindBufferBase(t,e,null):this.gl.bindBuffer(t,null),this}getDebugData(){return this.debugData?{data:this.debugData,changed:!1}:(this.debugData=this.getData({length:Math.min(10,this.byteLength)}),{data:this.debugData,changed:!0})}invalidateDebugData(){this.debugData=null}_setData(t,e=0,n=t.byteLength+e){(0,a.h)(ArrayBuffer.isView(t)),this._trackDeallocatedMemory();const r=this._getTarget();this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,this.usage),this.gl.bufferSubData(r,e,t),this.gl.bindBuffer(r,null),this.debugData=t.slice(0,10),this.bytesUsed=n,this._trackAllocatedMemory(n);const s=(0,o.O)(t);return(0,a.h)(s),this.setAccessor(new i.Z(this.accessor,{type:s})),this}_setByteLength(t,e=this.usage){(0,a.h)(t>=0),this._trackDeallocatedMemory();let n=t;0===t&&(n=new Float32Array(0));const r=this._getTarget();return this.gl.bindBuffer(r,this.handle),this.gl.bufferData(r,n,e),this.gl.bindBuffer(r,null),this.usage=e,this.debugData=null,this.bytesUsed=t,this._trackAllocatedMemory(t),this}_getTarget(){return this.gl.webgl2?36663:this.target}_getAvailableElementCount(t){const e=t/(0,o.vN)(this.accessor.type||5126,{clamped:!1}).BYTES_PER_ELEMENT;return this.getElementCount()-e}_inferType(t){this.accessor.type||this.setAccessor(new i.Z(this.accessor,{type:(0,o.O)(t)}))}_createHandle(){return this.gl.createBuffer()}_deleteHandle(){this.gl.deleteBuffer(this.handle),this._trackDeallocatedMemory()}_getParameter(t){this.gl.bindBuffer(this.target,this.handle);const e=this.gl.getBufferParameter(this.target,t);return this.gl.bindBuffer(this.target,null),e}get type(){return s.cM.deprecated("Buffer.type","Buffer.accessor.type")(),this.accessor.type}get bytes(){return s.cM.deprecated("Buffer.bytes","Buffer.byteLength")(),this.byteLength}setByteLength(t){return s.cM.deprecated("setByteLength","reallocate")(),this.reallocate(t)}updateAccessor(t){return s.cM.deprecated("updateAccessor(...)","setAccessor(new Accessor(buffer.accessor, ...)")(),this.accessor=new i.Z(this.accessor,t),this}}},6047:function(t,e,n){"use strict";n.d(e,{Z:function(){return s},$:function(){return a}});var r=n(9450),i=n(2525);const o="clear: bad arguments";function s(t,{framebuffer:e=null,color:n=null,depth:s=null,stencil:a=null}={}){const u={};e&&(u.framebuffer=e);let c=0;n&&(c|=16384,!0!==n&&(u.clearColor=n)),s&&(c|=256,!0!==s&&(u.clearDepth=s)),a&&(c|=1024,!0!==s&&(u.clearStencil=s)),(0,i.h)(0!==c,o),(0,r.s8)(t,u,(()=>{t.clear(c)}))}function a(t,{framebuffer:e=null,buffer:n=6144,drawBuffer:s=0,value:a=[0,0,0,0]}={}){(0,r.KQ)(t),(0,r.s8)(t,{framebuffer:e},(()=>{switch(n){case 6144:switch(a.constructor){case Int32Array:t.clearBufferiv(n,s,a);break;case Uint32Array:t.clearBufferuiv(n,s,a);break;
1case Float32Array:default:t.clearBufferfv(n,s,a)}break;case 6145:t.clearBufferfv(6145,0,[a]);break;case 6146:t.clearBufferiv(6146,0,[a]);break;case 34041:const[e,r]=a;t.clearBufferfi(34041,0,e,r);break;default:(0,i.h)(!1,o)}}))}},1953:function(t,e,n){"use strict";n.d(e,{Km:function(){return u},z6:function(){return a}});var r=n(3849),i=(n(9450),n(9335)),o=n(2525);var s=n(5432);function a(t,e={}){const{sourceX:n=0,sourceY:r=0,sourceFormat:s=6408}=e;let{sourceAttachment:a=36064,target:u=null,sourceWidth:l,sourceHeight:h,sourceType:f}=e;const{framebuffer:d,deleteFramebuffer:p}=c(t);(0,o.h)(d);const{gl:g,handle:m,attachments:v}=d;l=l||d.width,h=h||d.height,36064===a&&null===m&&(a=1028),(0,o.h)(v[a]),f=f||v[a].type,u=function(t,e,n,r,s){if(t)return t;e=e||5121;const a=(0,i.vN)(e,{clamped:!1}),u=function(t){switch(t){case 6406:case 33326:case 6403:return 1;case 33328:case 33319:return 2;case 6407:case 34837:return 3;case 6408:case 34836:return 4;default:return(0,o.h)(!1),0}}(n);return new a(r*s*u)}(u,f,s,l,h),f=f||(0,i.O)(u);const y=g.bindFramebuffer(36160,m);return g.readPixels(n,r,l,h,s,f,u),g.bindFramebuffer(36160,y||null),p&&d.delete(),u}function u(t,{sourceAttachment:e=36064,targetMaxHeight:n=Number.MAX_SAFE_INTEGER}={}){let r=a(t,{sourceAttachment:e}),{width:o,height:s}=t;for(;s>n;)({data:r,width:o,height:s}=(0,i.KS)({data:r,width:o,height:s}));(0,i.c$)({data:r,width:o,height:s});const u=document.createElement("canvas");u.width=o,u.height=s;const c=u.getContext("2d"),l=c.createImageData(o,s);return l.data.set(r),c.putImageData(l,0,0),u.toDataURL()}function c(t){return t instanceof r.Z?{framebuffer:t,deleteFramebuffer:!1}:{framebuffer:(0,s.Y)(t),deleteFramebuffer:!0}}},3849:function(t,e,n){"use strict";n.d(e,{Z:function(){return d}});var r=n(9450),i=n(7577),o=n(4912),s=n(9830),a=n(6047),u=n(1953),c=n(4211),l=n(9579),h=n(2525);const f="Multiple render targets not supported";class d extends i.Z{static isSupported(t,e={}){const{colorBufferFloat:n,colorBufferHalfFloat:r}=e;let i=!0;return n&&(i=Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("WEBGL_color_buffer_float")||t.getExtension("OES_texture_float"))),r&&(i=i&&Boolean(t.getExtension("EXT_color_buffer_float")||t.getExtension("EXT_color_buffer_half_float"))),i}static getDefaultFramebuffer(t){return t.luma=t.luma||{},t.luma.defaultFramebuffer=t.luma.defaultFramebuffer||new d(t,{id:"default-framebuffer",handle:null,attachments:{}}),t.luma.defaultFramebuffer}get MAX_COLOR_ATTACHMENTS(){const t=(0,r.KQ)(this.gl);return t.getParameter(t.MAX_COLOR_ATTACHMENTS)}get MAX_DRAW_BUFFERS(){const t=(0,r.KQ)(this.gl);return t.getParameter(t.MAX_DRAW_BUFFERS)}constructor(t,e={}){super(t,e),this.width=null,this.height=null,this.attachments={},this.readBuffer=36064,this.drawBuffers=[36064],this.ownResources=[],this.initialize(e),Object.seal(this)}get color(){return this.attachments[36064]||null}get texture(){return this.attachments[36064]||null}get depth(){return this.attachments[36096]||this.attachments[33306]||null}get stencil(){return this.attachments[36128]||this.attachments[33306]||null}initialize({width:t=1,height:e=1,attachments:n=null,color:r=!0,depth:i=!0,stencil:o=!1,check:s=!0,readBuffer:a,drawBuffers:u}){if((0,h.h)(t>=0&&e>=0,"Width and height need to be integers"),this.width=t,this.height=e,n)for(const c in n){const r=n[c];(Array.isArray(r)?r[0]:r).resize({width:t,height:e})}else n=this._createDefaultAttachments(r,i,o,t,e);this.update({clearAttachments:!0,attachments:n,readBuffer:a,drawBuffers:u}),n&&s&&this.checkStatus()}delete(){for(const t of this.ownResources)t.delete();return super.delete(),this}update({attachments:t={},readBuffer:e,drawBuffers:n,clearAttachments:r=!1,resizeAttachments:i=!0}){this.attach(t,{clearAttachments:r,resizeAttachments:i});const{gl:o}=this,s=o.bindFramebuffer(36160,this.handle);return e&&this._setReadBuffer(e),n&&this._setDrawBuffers(n),o.bindFramebuffer(36160,s||null),this}resize(t={}){let{width:e,height:n}=t;if(null===this.handle)return(0,h.h)(void 0===e&&void 0===n),this.width=this.gl.drawingBufferWidth,this.height=this.gl.drawingBufferHeight,this;void 0===e&&(e=this.gl.drawingBufferWidth),void 0===n&&(n=this.gl.drawingBufferHeight),e!==this.width&&n!==this.height&&r.cM.log(2,`Resizing framebuffer ${this.id} to ${e}x${n}`)();for(const r in this.attachments)this.attachments[r].resize({width:e,height:n});return this.width=e,this.height=n,this}attach(t,{clearAttachments:e=!1,resizeAttachments:n=!0}={}){const r={};
1e&&Object.keys(this.attachments).forEach((t=>{r[t]=null})),Object.assign(r,t);const i=this.gl.bindFramebuffer(36160,this.handle);for(const o in r){(0,h.h)(void 0!==o,"Misspelled framebuffer binding point?");const t=Number(o),e=r[t];let i=e;if(i)if(i instanceof s.Z)this._attachRenderbuffer({attachment:t,renderbuffer:i});else if(Array.isArray(e)){const[n,r=0,o=0]=e;i=n,this._attachTexture({attachment:t,texture:n,layer:r,level:o})}else this._attachTexture({attachment:t,texture:i,layer:0,level:0});else this._unattach(t);n&&i&&i.resize({width:this.width,height:this.height})}this.gl.bindFramebuffer(36160,i||null),Object.assign(this.attachments,t),Object.keys(this.attachments).filter((t=>!this.attachments[t])).forEach((t=>{delete this.attachments[t]}))}checkStatus(){const{gl:t}=this,e=this.getStatus();if(36053!==e)throw new Error(function(t){return(d.STATUS||{})[t]||`Framebuffer error ${t}`}(e));return this}getStatus(){const{gl:t}=this,e=t.bindFramebuffer(36160,this.handle),n=t.checkFramebufferStatus(36160);return t.bindFramebuffer(36160,e||null),n}clear(t={}){const{color:e,depth:n,stencil:r,drawBuffers:i=[]}=t,o=this.gl.bindFramebuffer(36160,this.handle);return(e||n||r)&&(0,a.Z)(this.gl,{color:e,depth:n,stencil:r}),i.forEach(((t,e)=>{(0,a.$)(this.gl,{drawBuffer:e,value:t})})),this.gl.bindFramebuffer(36160,o||null),this}readPixels(t={}){return r.cM.error("Framebuffer.readPixels() is no logner supported, use readPixelsToArray(framebuffer)")(),null}readPixelsToBuffer(t={}){return r.cM.error("Framebuffer.readPixelsToBuffer()is no logner supported, use readPixelsToBuffer(framebuffer)")(),null}copyToDataUrl(t={}){return r.cM.error("Framebuffer.copyToDataUrl() is no logner supported, use copyToDataUrl(framebuffer)")(),null}copyToImage(t={}){return r.cM.error("Framebuffer.copyToImage() is no logner supported, use copyToImage(framebuffer)")(),null}copyToTexture(t={}){return r.cM.error("Framebuffer.copyToTexture({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}blit(t={}){return r.cM.error("Framebuffer.blit({...}) is no logner supported, use blit(source, target, opts)")(),null}invalidate({attachments:t=[],x:e=0,y:n=0,width:i,height:o}){const s=(0,r.KQ)(this.gl),a=s.bindFramebuffer(36008,this.handle);return 0===e&&0===n&&void 0===i&&void 0===o?s.invalidateFramebuffer(36008,t):s.invalidateFramebuffer(36008,t,e,n,i,o),s.bindFramebuffer(36008,a),this}getAttachmentParameter(t,e,n){let r=this._getAttachmentParameterFallback(e);return null===r&&(this.gl.bindFramebuffer(36160,this.handle),r=this.gl.getFramebufferAttachmentParameter(36160,t,e),this.gl.bindFramebuffer(36160,null)),n&&r>1e3&&(r=(0,l.km)(this.gl,r)),r}getAttachmentParameters(t=36064,e,n=this.constructor.ATTACHMENT_PARAMETERS||[]){const r={};for(const i of n){r[e?(0,l.km)(this.gl,i):i]=this.getAttachmentParameter(t,i,e)}return r}getParameters(t=!0){const e=Object.keys(this.attachments),n={};for(const r of e){const e=Number(r);n[t?(0,l.km)(this.gl,e):e]=this.getAttachmentParameters(e,t)}return n}show(){return"undefined"!==typeof window&&window.open((0,u.Km)(this),"luma-debug-texture"),this}log(t=0,e=""){if(t>r.cM.level||"undefined"===typeof window)return this;e=e||`Framebuffer ${this.id}`;const n=(0,u.Km)(this,{targetMaxHeight:100});return r.cM.image({logLevel:t,message:e,image:n},e)(),this}bind({target:t=36160}={}){return this.gl.bindFramebuffer(t,this.handle),this}unbind({target:t=36160}={}){return this.gl.bindFramebuffer(t,null),this}_createDefaultAttachments(t,e,n,r,i){let a=null;return t&&(a=a||{},a[36064]=new o.Z(this.gl,{id:`${this.id}-color0`,pixels:null,format:6408,type:5121,width:r,height:i,mipmaps:!1,parameters:{10241:9729,10240:9729,10242:33071,10243:33071}}),this.ownResources.push(a[36064])),e&&n?(a=a||{},a[33306]=new s.Z(this.gl,{id:`${this.id}-depth-stencil`,format:35056,width:r,height:111}),this.ownResources.push(a[33306])):e?(a=a||{},a[36096]=new s.Z(this.gl,{id:`${this.id}-depth`,format:33189,width:r,height:i}),this.ownResources.push(a[36096])):n&&(0,h.h)(!1),a}_unattach(t){const e=this.attachments[t];e&&(e instanceof s.Z?this.gl.framebufferRenderbuffer(36160,t,36161,null):this.gl.framebufferTexture2D(36160,t,3553,null,0),delete this.attachments[t])}_attachRenderbuffer({attachment:t=36064,renderbuffer:e}){const{gl:n}=this;n.framebufferRenderbuffer(36160,t,36161,e.handle),this.attachments[t]=e}_attachTexture({attachment:t=36064,texture:e,layer:n,level:i}){const{gl:o}=this;switch(o.bindTexture(e.target,e.handle),e.target){case 35866:case 32879:(0,r.KQ)(o).framebufferTextureLayer(36160,t,e.target,i,n);break;case 34067:const s=function(t){return t<34069?t+34069:t}(n);o.framebufferTexture2D(36160,t,s,e.handle,i);break;case 3553:o.framebufferTexture2D(36160,t,3553,e.handle,i);break;default:(0,h.h)(!1,"Illegal texture type")}o.bindTexture(e.target,null),this.attachments[t]=e}_setReadBuffer(t){const e=(0,r.vd)(this.gl);e?e.readBuffer(t):(0,h.h)(36064===t||1029===t,f),this.readBuffer=t}_setDrawBuffers(t){const{gl:e}=this,n=(0,r.KQ)(e);if(n)n.drawBuffers(t);else{const n=e.getExtension("WEBGL_draw_buffers");n?n.drawBuffersWEBGL(t):(0,h.h)(1===t.length&&(36064===t[0]||1029===t[0]),f)}this.drawBuffers=t}_getAttachmentParameterFallback(t){const e=(0,c.N$)(this.gl);switch(t){case 36052:return e.WEBGL2?null:0;case 33298:case 33299:case 33300:case 33301:case 33302:case 33303:return e.WEBGL2?null:8;case 33297:return e.WEBGL2?null:5125;case 33296:return e.WEBGL2||e.EXT_sRGB?null:9729;default:return null}}_createHandle(){return this.gl.createFramebuffer()}_deleteHandle(){this.gl.deleteFramebuffer(this.handle)}_bindHandle(t){return this.gl.bindFramebuffer(36160,t)}}
1d.ATTACHMENT_PARAMETERS=[36049,36048,33296,33298,33299,33300,33301,33302,33303]},7944:function(t,e,n){"use strict";n.d(e,{Z:function(){return U}});var r=n(7577),i=n(5008),o=n(3849),s=n(9450),a=n(9830),u=n(2525);const c={5126:E.bind(null,"uniform1fv",g,1,T),35664:E.bind(null,"uniform2fv",g,2,T),35665:E.bind(null,"uniform3fv",g,3,T),35666:E.bind(null,"uniform4fv",g,4,T),5124:E.bind(null,"uniform1iv",m,1,T),35667:E.bind(null,"uniform2iv",m,2,T),35668:E.bind(null,"uniform3iv",m,3,T),35669:E.bind(null,"uniform4iv",m,4,T),35670:E.bind(null,"uniform1iv",m,1,T),35671:E.bind(null,"uniform2iv",m,2,T),35672:E.bind(null,"uniform3iv",m,3,T),35673:E.bind(null,"uniform4iv",m,4,T),35674:E.bind(null,"uniformMatrix2fv",g,4,P),35675:E.bind(null,"uniformMatrix3fv",g,9,P),35676:E.bind(null,"uniformMatrix4fv",g,16,P),35678:x,35680:x,5125:E.bind(null,"uniform1uiv",v,1,T),36294:E.bind(null,"uniform2uiv",v,2,T),36295:E.bind(null,"uniform3uiv",v,3,T),36296:E.bind(null,"uniform4uiv",v,4,T),35685:E.bind(null,"uniformMatrix2x3fv",g,6,P),35686:E.bind(null,"uniformMatrix2x4fv",g,8,P),35687:E.bind(null,"uniformMatrix3x2fv",g,6,P),35688:E.bind(null,"uniformMatrix3x4fv",g,12,P),35689:E.bind(null,"uniformMatrix4x2fv",g,8,P),35690:E.bind(null,"uniformMatrix4x3fv",g,12,P),35678:x,35680:x,35679:x,35682:x,36289:x,36292:x,36293:x,36298:x,36299:x,36300:x,36303:x,36306:x,36307:x,36308:x,36311:x},l={},h={},f={},d=[0];function p(t,e,n,r){1===e&&"boolean"===typeof t&&(t=t?1:0),Number.isFinite(t)&&(d[0]=t,t=d);const i=t.length;if(i%e&&s.cM.warn(`Uniform size should be multiples of ${e}`,t)(),t instanceof n)return t;let o=r[i];o||(o=new n(i),r[i]=o);for(let s=0;s<i;s++)o[s]=t[s];return o}function g(t,e){return p(t,e,Float32Array,l)}function m(t,e){return p(t,e,Int32Array,h)}function v(t,e){return p(t,e,Uint32Array,f)}function y(t,e,n){const r=c[n.type];if(!r)throw new Error(`Unknown GLSL uniform type ${n.type}`);return r().bind(null,t,e)}function b(t){if("]"!==t[t.length-1])return{name:t,length:1,isArray:!1};const e=t.match(/([^[]*)(\[[0-9]+\])?/);if(!e||e.length<2)throw new Error(`Failed to parse GLSL uniform name ${t}`);return{name:e[1],length:e[2]||1,isArray:Boolean(e[2])}}function _(t){return Array.isArray(t)||ArrayBuffer.isView(t)?function(t){if(0===t.length)return!1;const e=Math.min(t.length,16);for(let n=0;n<e;++n)if(!Number.isFinite(t[n]))return!1;return!0}(t):!!isFinite(t)||(!0===t||!1===t||(t instanceof i.Z||(t instanceof a.Z||t instanceof o.Z&&Boolean(t.texture))))}function w(t,e,n){if(Array.isArray(n)||ArrayBuffer.isView(n))if(t[e]){const r=t[e];for(let t=0,e=n.length;t<e;++t)r[t]=n[t]}else t[e]=n.slice();else t[e]=n}function x(){let t=null;return(e,n,r)=>{const i=t!==r;return i&&(e.uniform1i(n,r),t=r),i}}function E(t,e,n,r){let i=null,o=null;return(s,a,c)=>{const l=e(c,n),h=l.length;let f=!1;if(null===i)i=new Float32Array(h),o=h,f=!0;else{(0,u.h)(o===h,"Uniform length cannot change.");for(let t=0;t<h;++t)if(l[t]!==i[t]){f=!0;break}}return f&&(r(s,t,a,l),i.set(l)),f}}function T(t,e,n,r){t[e](n,r)}function P(t,e,n,r){t[e](n,!1,r)}function A(t,e="unnamed"){const n=t.match(/#define[\s*]SHADER_NAME[\s*]([A-Za-z0-9_-]+)[\s*]/);return n?n[1]:e}function S(t,e,n,r){const i=t.split(/\r?\n/),o={},s={},a=r||A(e)||"(unnamed)",u=`${function(t){switch(t){case 35632:return"fragment";case 35633:return"vertex";default:return"unknown type"}}(n)} shader ${a}`;for(let l=0;l<i.length;l++){const e=i[l];if(e.length<=1)continue;const n=e.split(":"),r=n[0],a=parseInt(n[2],10);if(isNaN(a))throw new Error(`GLSL compilation error in ${u}: ${t}`);"WARNING"!==r?o[a]=e:s[a]=e}const c=function(t,e=1,n=": "){const r=t.split(/\r?\n/),i=String(r.length+e-1).length;return r.map(((t,r)=>{const o=String(r+e),s=o.length;return O(o,i-s)+n+t}))}(e);return{shaderName:u,errors:M(o,c),warnings:M(s,c)}}function M(t,e){let n="";for(let r=0;r<e.length;r++){const i=e[r];if((t[r+3]||t[r+2]||t[r+1])&&(n+=`${i}\n`,t[r+1])){const e=t[r+1],i=e.split(":",3),o=i[0],s=parseInt(i[1],10)||0;n+=O(`^^^ ${o}: ${e.substring(i.join(":").length+1).trim()}\n\n`,s)}}return n}function O(t,e){let n="";for(let r=0;r<e;++r)n+=" ";return`${n}${t}`}var C=n(4538);class L extends r.Z{static getTypeName(t){switch(t){case 35633:return"vertex-shader";case 35632:return"fragment-shader";default:return(0,u.h)(!1),"unknown"}}constructor(t,e){(0,s.JD)(t),(0,u.h)("string"===typeof e.source,"Shader: GLSL source code must be a JavaScript string");super(t,{id:A(e.source,null)||e.id||(0,C.hQ)(`unnamed ${L.getTypeName(e.shaderType)}`)}),this.shaderType=e.shaderType,this.source=e.source,this.initialize(e)}initialize({source:t}){const e=A(t,null);e&&(this.id=(0,C.hQ)(e)),this._compile(t)}getParameter(t){return this.gl.getShaderParameter(this.handle,t)}toString(){return`${L.getTypeName(this.shaderType)}:${this.id}`}getName(){return A(this.source)||"unnamed-shader"}getSource(){return this.gl.getShaderSource(this.handle)}getTranslatedSource(){const t=this.gl.getExtension("WEBGL_debug_shaders");return t?t.getTranslatedShaderSource(this.handle):"No translated source available. WEBGL_debug_shaders not implemented"}_compile(t=this.source){t.startsWith("#version ")||(t=`#version 100\n${t}`),this.source=t,this.gl.shaderSource(this.handle,this.source),this.gl.compileShader(this.handle);if(!this.getParameter(35713)){const t=this.gl.getShaderInfoLog(this.handle),{shaderName:e,errors:n,warnings:r}=S(t,this.source,this.shaderType,this.id);throw s.cM.error(`GLSL compilation errors in ${e}\n${n}`)(),s.cM.warn(`GLSL compilation warnings in ${e}\n${r}`)(),new Error(`GLSL compilation errors in ${e}`)}}_deleteHandle(){this.gl.deleteShader(this.handle)}_getOptsFromHandle(){return{type:this.getParameter(35663),source:this.getSource()}}}class k extends L{constructor(t,e){"string"===typeof e&&(e={source:e}),super(t,Object.assign({},e,{shaderType:35633}))}_createHandle(){return this.gl.createShader(35633)}}class R extends L{constructor(t,e){"string"===typeof e&&(e={source:e}),super(t,Object.assign({},e,{shaderType:35632}))}_createHandle(){return this.gl.createShader(35632)}}var I=n(4072),j=n(8522);class D{constructor(t){this.id=t.id,this.attributeInfos=[],this.attributeInfosByName={},this.attributeInfosByLocation=[],this.varyingInfos=[],this.varyingInfosByName={},Object.seal(this),this._readAttributesFromProgram(t),this._readVaryingsFromProgram(t)}getAttributeInfo(t){const e=Number(t);return Number.isFinite(e)?this.attributeInfosByLocation[e]:this.attributeInfosByName[t]||null}getAttributeLocation(t){const e=this.getAttributeInfo(t);return e?e.location:-1}
1getAttributeAccessor(t){const e=this.getAttributeInfo(t);return e?e.accessor:null}getVaryingInfo(t){const e=Number(t);return Number.isFinite(e)?this.varyingInfos[e]:this.varyingInfosByName[t]||null}getVaryingIndex(t){const e=this.getVaryingInfo();return e?e.location:-1}getVaryingAccessor(t){const e=this.getVaryingInfo();return e?e.accessor:null}_readAttributesFromProgram(t){const{gl:e}=t,n=e.getProgramParameter(t.handle,35721);for(let r=0;r<n;r++){const{name:n,type:i,size:o}=e.getActiveAttrib(t.handle,r),s=e.getAttribLocation(t.handle,n);s>=0&&this._addAttribute(s,n,i,o)}this.attributeInfos.sort(((t,e)=>t.location-e.location))}_readVaryingsFromProgram(t){const{gl:e}=t;if(!(0,s.D0)(e))return;const n=e.getProgramParameter(t.handle,35971);for(let r=0;r<n;r++){const{name:n,type:i,size:o}=e.getTransformFeedbackVarying(t.handle,r);this._addVarying(r,n,i,o)}this.varyingInfos.sort(((t,e)=>t.location-e.location))}_addAttribute(t,e,n,r){const{type:i,components:o}=(0,j.hJ)(n),s={type:i,size:r*o};this._inferProperties(t,e,s);const a={location:t,name:e,accessor:new I.Z(s)};this.attributeInfos.push(a),this.attributeInfosByLocation[t]=a,this.attributeInfosByName[a.name]=a}_inferProperties(t,e,n){/instance/i.test(e)&&(n.divisor=1)}_addVarying(t,e,n,r){const{type:i,components:o}=(0,j.hJ)(n),s={location:t,name:e,accessor:new I.Z({type:i,size:r*o})};this.varyingInfos.push(s),this.varyingInfosByName[s.name]=s}}var N=n(9579);const F=35981,B=["setVertexArray","setAttributes","setBuffers","unsetBuffers","use","getUniformCount","getUniformInfo","getUniformLocation","getUniformValue","getVarying","getFragDataLocation","getAttachedShaders","getAttributeCount","getAttributeLocation","getAttributeInfo"];class U extends r.Z{constructor(t,e={}){super(t,e),this.stubRemovedMethods("Program","v6.0",B),this._isCached=!1,this.initialize(e),Object.seal(this),this._setId(e.id)}initialize(t={}){const{hash:e,vs:n,fs:r,varyings:i,bufferMode:o=F}=t;return this.hash=e||"",this.vs="string"===typeof n?new k(this.gl,{id:`${t.id}-vs`,source:n}):n,this.fs="string"===typeof r?new R(this.gl,{id:`${t.id}-fs`,source:r}):r,(0,u.h)(this.vs instanceof k),(0,u.h)(this.fs instanceof R),this.uniforms={},this._textureUniforms={},i&&i.length>0&&((0,s.KQ)(this.gl),this.varyings=i,this.gl2.transformFeedbackVaryings(this.handle,i,o)),this._compileAndLink(),this._readUniformLocationsFromLinkedProgram(),this.configuration=new D(this),this.setProps(t)}delete(t={}){return this._isCached?this:super.delete(t)}setProps(t){return"uniforms"in t&&this.setUniforms(t.uniforms),this}draw({logPriority:t,drawMode:e=4,vertexCount:n,offset:r=0,start:i,end:o,isIndexed:a=!1,indexType:c=5123,instanceCount:l=0,isInstanced:h=l>0,vertexArray:f=null,transformFeedback:d,framebuffer:p,parameters:g={},uniforms:m,samplers:v}){if((m||v)&&(s.cM.deprecated("Program.draw({uniforms})","Program.setUniforms(uniforms)")(),this.setUniforms(m||{})),s.cM.priority>=t){const r=p?p.id:"default",i=`mode=${(0,N.km)(this.gl,e)} verts=${n} instances=${l} indexType=${(0,N.km)(this.gl,c)} isInstanced=${h} isIndexed=${a} Framebuffer=${r}`;s.cM.log(t,i)()}return(0,u.h)(f),this.gl.useProgram(this.handle),!(!this._areTexturesRenderable()||0===n||h&&0===l)&&(f.bindForDraw(n,l,(()=>{if(void 0!==p&&(g=Object.assign({},g,{framebuffer:p})),d){const t=(0,j.$Z)(e);d.begin(t)}this._bindTextures(),(0,s.s8)(this.gl,g,(()=>{a&&h?this.gl2.drawElementsInstanced(e,n,c,r,l):a&&(0,s.D0)(this.gl)&&!isNaN(i)&&!isNaN(o)?this.gl2.drawRangeElements(e,i,o,n,c,r):a?this.gl.drawElements(e,n,c,r):h?this.gl2.drawArraysInstanced(e,r,n,l):this.gl.drawArrays(e,r,n)})),d&&d.end()})),!0)}setUniforms(t={}){s.cM.priority>=2&&function(t,e,n){for(const r in t){const i=t[r];if((!n||Boolean(n[r]))&&!_(i))throw e=e?`${e} `:"",console.error(`${e} Bad uniform ${r}`,i),new Error(`${e} Bad uniform ${r}`)}}(t,this.id,this._uniformSetters),this.gl.useProgram(this.handle);for(const e in t){const n=t[e],r=this._uniformSetters[e];if(r){let t=n,s=!1;if(t instanceof o.Z&&(t=t.texture),t instanceof i.Z)if(s=this.uniforms[e]!==n,s){void 0===r.textureIndex&&(r.textureIndex=this._textureIndexCounter++);const n=t,{textureIndex:i}=r;n.bind(i),t=i,this._textureUniforms[e]=n}else t=r.textureIndex;else this._textureUniforms[e]&&delete this._textureUniforms[e];(r(t)||s)&&w(this.uniforms,e,n)}}return this}_areTexturesRenderable(){let t=!0;for(const e in this._textureUniforms){const n=this._textureUniforms[e];
1n.update(),t=t&&n.loaded}return t}_bindTextures(){for(const t in this._textureUniforms){const e=this._uniformSetters[t].textureIndex;this._textureUniforms[t].bind(e)}}_createHandle(){return this.gl.createProgram()}_deleteHandle(){this.gl.deleteProgram(this.handle)}_getOptionsFromHandle(t){const e=this.gl.getAttachedShaders(t),n={};for(const r of e){switch(this.gl.getShaderParameter(this.handle,35663)){case 35633:n.vs=new k({handle:r});break;case 35632:n.fs=new R({handle:r})}}return n}_getParameter(t){return this.gl.getProgramParameter(this.handle,t)}_setId(t){if(!t){const t=this._getName();this.id=(0,C.hQ)(t)}}_getName(){let t=this.vs.getName()||this.fs.getName();return t=t.replace(/shader/i,""),t=t?`${t}-program`:"program",t}_compileAndLink(){const{gl:t}=this;if(t.attachShader(this.handle,this.vs.handle),t.attachShader(this.handle,this.fs.handle),s.cM.time(4,`linkProgram for ${this._getName()}`)(),t.linkProgram(this.handle),s.cM.timeEnd(4,`linkProgram for ${this._getName()}`)(),t.debug||s.cM.level>0){if(!t.getProgramParameter(this.handle,35714))throw new Error(`Error linking: ${t.getProgramInfoLog(this.handle)}`);t.validateProgram(this.handle);if(!t.getProgramParameter(this.handle,35715))throw new Error(`Error validating: ${t.getProgramInfoLog(this.handle)}`)}}_readUniformLocationsFromLinkedProgram(){const{gl:t}=this;this._uniformSetters={},this._uniformCount=this._getParameter(35718);for(let e=0;e<this._uniformCount;e++){const n=this.gl.getActiveUniform(this.handle,e),{name:r}=b(n.name);let i=t.getUniformLocation(this.handle,r);if(this._uniformSetters[r]=y(t,i,n),n.size>1)for(let e=0;e<n.size;e++)i=t.getUniformLocation(this.handle,`${r}[${e}]`),this._uniformSetters[`${r}[${e}]`]=y(t,i,n)}this._textureIndexCounter=0}getActiveUniforms(t,e){return this.gl2.getActiveUniforms(this.handle,t,e)}getUniformBlockIndex(t){return this.gl2.getUniformBlockIndex(this.handle,t)}getActiveUniformBlockParameter(t,e){return this.gl2.getActiveUniformBlockParameter(this.handle,t,e)}uniformBlockBinding(t,e){this.gl2.uniformBlockBinding(this.handle,t,e)}}},9830:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=n(7577);const i="EXT_color_buffer_float";var o={33189:{bpp:2},33190:{gl2:!0,bpp:3},36012:{gl2:!0,bpp:4},36168:{bpp:1},34041:{bpp:4},35056:{gl2:!0,bpp:4},36013:{gl2:!0,bpp:5},32854:{bpp:2},36194:{bpp:2},32855:{bpp:2},33321:{gl2:!0,bpp:1},33330:{gl2:!0,bpp:1},33329:{gl2:!0,bpp:1},33332:{gl2:!0,bpp:2},33331:{gl2:!0,bpp:2},33334:{gl2:!0,bpp:4},33333:{gl2:!0,bpp:4},33323:{gl2:!0,bpp:2},33336:{gl2:!0,bpp:2},33335:{gl2:!0,bpp:2},33338:{gl2:!0,bpp:4},33337:{gl2:!0,bpp:4},33340:{gl2:!0,bpp:8},33339:{gl2:!0,bpp:8},32849:{gl2:!0,bpp:3},32856:{gl2:!0,bpp:4},32857:{gl2:!0,bpp:4},36220:{gl2:!0,bpp:4},36238:{gl2:!0,bpp:4},36975:{gl2:!0,bpp:4},36214:{gl2:!0,bpp:8},36232:{gl2:!0,bpp:8},36226:{gl2:!0,bpp:16},36208:{gl2:!0,bpp:16},33325:{gl2:i,bpp:2},33327:{gl2:i,bpp:4},34842:{gl2:i,bpp:8},33326:{gl2:i,bpp:4},33328:{gl2:i,bpp:8},34836:{gl2:i,bpp:16},35898:{gl2:i,bpp:4}},s=n(9450),a=n(2525);class u extends r.Z{static isSupported(t,{format:e}={format:null}){return!e||function(t,e,n){const r=n[e];if(!r)return!1;const i=(0,s.D0)(t)&&r.gl2||r.gl1;return"string"===typeof i?t.getExtension(i):i}(t,e,o)}static getSamplesForFormat(t,{format:e}){return t.getInternalformatParameter(36161,e,32937)}constructor(t,e={}){super(t,e),this.initialize(e),Object.seal(this)}initialize({format:t,width:e=1,height:n=1,samples:r=0}){return(0,a.h)(t,"Needs format"),this._trackDeallocatedMemory(),this.gl.bindRenderbuffer(36161,this.handle),0!==r&&(0,s.D0)(this.gl)?this.gl.renderbufferStorageMultisample(36161,r,t,e,n):this.gl.renderbufferStorage(36161,t,e,n),this.format=t,this.width=e,this.height=n,this.samples=r,this._trackAllocatedMemory(this.width*this.height*(this.samples||1)*o[this.format].bpp),this}resize({width:t,height:e}){return t!==this.width||e!==this.height?this.initialize({width:t,height:e,format:this.format,samples:this.samples}):this}_createHandle(){return this.gl.createRenderbuffer()}_deleteHandle(){this.gl.deleteRenderbuffer(this.handle),this._trackDeallocatedMemory()}_bindHandle(t){this.gl.bindRenderbuffer(36161,t)}_syncHandle(t){this.format=this.getParameter(36164),this.width=this.getParameter(36162),this.height=this.getParameter(36163),this.samples=this.getParameter(36011)}_getParameter(t){this.gl.bindRenderbuffer(36161,this.handle);return this.gl.getRenderbufferParameter(36161,t)}}},7577:function(t,e,n){"use strict";n.d(e,{Z:function(){return l}});var r=n(9450),i=n(9835),o=n(9579),s=n(2525),a=n(4538),u=n(7469);const c="Resource subclass must define virtual methods";class l{constructor(t,e={}){(0,r.JD)(t);const{id:n,userData:i={}}=e;this.gl=t,this.gl2=t,this.id=n||(0,a.hQ)(this.constructor.name),this.userData=i,this._bound=!1,this._handle=e.handle,void 0===this._handle&&(this._handle=this._createHandle()),this.byteLength=0,this._addStats()}toString(){return`${this.constructor.name}(${this.id})`}get handle(){return this._handle}delete({deleteChildren:t=!1}={}){const e=this._handle&&this._deleteHandle(this._handle);return this._handle&&this._removeStats(),this._handle=null,e&&t&&e.filter(Boolean).forEac
1h((t=>t.delete())),this}bind(t=this.handle){if("function"!==typeof t)return this._bindHandle(t),this;let e;return this._bound?e=t():(this._bindHandle(this.handle),this._bound=!0,e=t(),this._bound=!1,this._bindHandle(null)),e}unbind(){this.bind(null)}getParameter(t,e={}){t=(0,o.sF)(this.gl,t),(0,s.h)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=(0,r.D0)(this.gl);if(!((!("webgl2"in n)||t)&&(!("extension"in n)||this.gl.getExtension(n.extension)))){const e=n.webgl1,r="webgl2"in n?n.webgl2:n.webgl1;return t?r:e}}return this._getParameter(t,e)}getParameters(t={}){const{parameters:e,keys:n}=t,i=this.constructor.PARAMETERS||{},s=(0,r.D0)(this.gl),a={},u=e||Object.keys(i);for(const r of u){const e=i[r];if(e&&(!("webgl2"in e)||s)&&(!("extension"in e)||this.gl.getExtension(e.extension))){const i=n?(0,o.km)(this.gl,r):r;a[i]=this.getParameter(r,t),n&&"GLenum"===e.type&&(a[i]=(0,o.km)(this.gl,a[i]))}}return a}setParameter(t,e){t=(0,o.sF)(this.gl,t),(0,s.h)(t);const n=(this.constructor.PARAMETERS||{})[t];if(n){const t=(0,r.D0)(this.gl);if(!((!("webgl2"in n)||t)&&(!("extension"in n)||this.gl.getExtension(n.extension))))throw new Error("Parameter not available on this platform");"GLenum"===n.type&&(e=(0,o.sF)(e))}return this._setParameter(t,e),this}setParameters(t){for(const e in t)this.setParameter(e,t[e]);return this}stubRemovedMethods(t,e,n){return(0,u.F)(this,t,e,n)}initialize(t){}_createHandle(){throw new Error(c)}_deleteHandle(){throw new Error(c)}_bindHandle(t){throw new Error(c)}_getOptsFromHandle(){throw new Error(c)}_getParameter(t,e){throw new Error(c)}_setParameter(t,e){throw new Error(c)}_context(){return this.gl.luma=this.gl.luma||{},this.gl.luma}_addStats(){const t=this.constructor.name,e=i.l.get("Resource Counts");e.get("Resources Created").incrementCount(),e.get(`${t}s Created`).incrementCount(),e.get(`${t}s Active`).incrementCount()}_removeStats(){const t=this.constructor.name;i.l.get("Resource Counts").get(`${t}s Active`).decrementCount()}_trackAllocatedMemory(t,e=this.constructor.name){const n=i.l.get("Memory Usage");n.get("GPU Memory").addCount(t),n.get(`${e} Memory`).addCount(t),this.byteLength=t}_trackDeallocatedMemory(t=this.constructor.name){const e=i.l.get("Memory Usage");e.get("GPU Memory").subtractCount(this.byteLength),e.get(`${t} Memory`).subtractCount(this.byteLength),this.byteLength=0}}},4912:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(9450),i=n(5008),o=n(2525);let s="";class a extends i.Z{static isSupported(t,e){return i.Z.isSupported(t,e)}constructor(t,e={}){var n,i;(0,r.JD)(t),(e instanceof Promise||"string"===typeof e)&&(e={data:e}),"string"===typeof e.data&&(e=Object.assign({},e,{data:(n=e.data,(0,o.h)("string"===typeof n),n=s+n,new Promise(((t,e)=>{try{const r=new Image;r.onload=()=>t(r),r.onerror=()=>e(new Error(`Could not load image ${n}.`)),r.crossOrigin=i&&i.crossOrigin||"anonymous",r.src=n}catch(r){e(r)}})))})),super(t,Object.assign({},e,{target:3553})),this.initialize(e),Object.seal(this)}}},3889:function(t,e,n){"use strict";n.d(e,{ae:function(){return i},C:function(){return o},pH:function(){return s},br:function(){return a},KR:function(){return u}});var r=n(9450);const i={6407:{dataFormat:6407,types:[5121,33635]},6408:{dataFormat:6408,types:[5121,32819,32820]},6406:{dataFormat:6406,types:[5121]},6409:{dataFormat:6409,types:[5121]},6410:{dataFormat:6410,types:[5121]},33326:{dataFormat:6403,types:[5126],gl2:!0},33328:{dataFormat:33319,types:[5126],gl2:!0},34837:{dataFormat:6407,types:[5126],gl2:!0},34836:{dataFormat:6408,types:[5126],gl2:!0}},o={6403:1,36244:1,33319:2,33320:2,6407:3,36248:3,6408:4,36249:4,6402:1,34041:1,6406:1,6409:1,6410:2},s={5126:4,5125:4,5124:4,5123:2,5122:2,5131:2,5120:1,5121:1};function a(t,e){const n=i[e];if(!n)return!1;if(void 0===n.gl1&&void 0===n.gl2)return!0;const o=(0,r.D0)(t)&&n.gl2||n.gl1;return"string"===typeof o?t.getExtension(o):o}function u(t,e){const n=i[e];switch(n&&n.types[0]){case 5126:return t.getExtension("OES_texture_float_linear");case 5131:return t.getExtension("OES_texture_half_float_linear");default:return!0}}},5008:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(9450),i=n(9718),o=n(7577),s=n(3478),a=n(3889),u=n(2525),c=n(4538);const l=[9729,9728],h=i.CO.WebGLBuffer||function(){};class f extends o.Z{static isSupported(t,e={}){const{format:n,linearFiltering:r}=e;let i=!0;return n&&(i=i&&(0,a.br)(t,n),i=i&&(!r||(0,a.KR)(t,n))),i}constructor(t,e){const{id:n=(0,c.hQ)("texture"),handle:r,target:i}=e;super(t,{id:n,handle:r}),this.target=i,this.textureUnit=void 0,this.loaded=!1,this.width=void 0,this.height=void 0,this.depth=void 0,this.format=void 0,this.type=void 0,this.dataFormat=void 0,this.border=void 0,this.textureUnit=void 0,this.mipmaps=void 0}toString(){return`Texture(${this.id},${this.width}x${this.height})`}initialize(t={}){let e=t.data;if(e instanceof Promise)return e.then((e=>this.initialize(Object.assign({},t,{pixels:e,data:e})))),this;const n="undefined"!==typeof HTMLVideoElement&&e instanceof HTMLVideoElement;if(n&&e.readyState<HTMLVideoElement.HAVE_METADATA)return this._video=null,e.addEventListener("loadeddata",(()=>this.initialize(t))),this;const{pixels:i=null,format:o=6408,border:s=0,recreate:a=!1,parameters:u={},pixelStore:c={},textureUnit:l}=t;e||(e=i);let{width:h,height:f,dataFormat:d,type:p,compressed:g=!1,mipmaps:m=!0}=t;const{depth:v=0}=t;return({width:h,height:f,compressed:g,dataFormat:d,type:p}=this._deduceParameters({format:o,type:p,dataFormat:d,compressed:g,data:e,width:h,height:f})),this.width=h,this.height=f,this.depth=v,this.format=o,this.type=p,this.dataFormat=d,this.border=s,this.textureUnit=l,Number.isFinite(this.textureUnit)&&(this.gl.activeTexture(33984+this.textureUnit),this.gl.bindTexture(this.target,this.handle)),m&&this._isNPOT()&&(r.cM.warn(`texture: ${this} is Non-Power-Of-Two, disabling mipmaping`)(),m=!1,this._updateForNPOT(u)),this.mipmaps=m,this.setImageData({data:e,width:h,height:f,depth:v,format:o,type:p,dataFormat:d,border:s,mipmaps:m,parameters:c,compressed:g}),m&&this.generateMipmap(),this.setParameters(u),a&&(this.data=e),n&&(this._video={video:e,parameters:u,lastTime:e.readyState>=HTMLVideoElement.HAVE_CURRENT_DATA?e.currentTime:-1}),this}update(){if(this._video){const{video:t,parameters:e,lastTime:n}=this._video;
1if(n===t.currentTime||t.readyState<HTMLVideoElement.HAVE_CURRENT_DATA)return;this.setSubImageData({data:t,parameters:e}),this.mipmaps&&this.generateMipmap(),this._video.lastTime=t.currentTime}}resize({height:t,width:e,mipmaps:n=!1}){return e!==this.width||t!==this.height?this.initialize({width:e,height:t,format:this.format,type:this.type,dataFormat:this.dataFormat,border:this.border,mipmaps:n}):this}generateMipmap(t={}){return this._isNPOT()?(r.cM.warn(`texture: ${this} is Non-Power-Of-Two, disabling mipmaping`)(),this):(this.mipmaps=!0,this.gl.bindTexture(this.target,this.handle),(0,r.s8)(this.gl,t,(()=>{this.gl.generateMipmap(this.target)})),this.gl.bindTexture(this.target,null),this)}setImageData(t){this._trackDeallocatedMemory("Texture");const{target:e=this.target,pixels:n=null,level:i=0,format:o=this.format,border:s=this.border,offset:c=0,parameters:l={}}=t;let{data:h=null,type:f=this.type,width:d=this.width,height:p=this.height,dataFormat:g=this.dataFormat,compressed:m=!1}=t;h||(h=n),({type:f,dataFormat:g,compressed:m,width:d,height:p}=this._deduceParameters({format:o,type:f,dataFormat:g,compressed:m,data:h,width:d,height:p}));const{gl:v}=this;v.bindTexture(this.target,this.handle);let y,b=null;if(({data:h,dataType:b}=this._getDataType({data:h,compressed:m})),(0,r.s8)(this.gl,l,(()=>{switch(b){case"null":v.texImage2D(e,i,o,d,p,s,g,f,h);break;case"typed-array":v.texImage2D(e,i,o,d,p,s,g,f,h,c);break;case"buffer":y=(0,r.KQ)(v),y.bindBuffer(35052,h.handle||h),y.texImage2D(e,i,o,d,p,s,g,f,c),y.bindBuffer(35052,null);break;case"browser-object":(0,r.D0)(v)?v.texImage2D(e,i,o,d,p,s,g,f,h):v.texImage2D(e,i,o,g,f,h);break;case"compressed":for(const[t,n]of h.entries())v.compressedTexImage2D(e,t,n.format,n.width,n.height,s,n.data);break;default:(0,u.h)(!1,"Unknown image data type")}})),h&&h.byteLength)this._trackAllocatedMemory(h.byteLength,"Texture");else{const t=a.C[this.dataFormat]||4,e=a.pH[this.type]||1;this._trackAllocatedMemory(this.width*this.height*t*e,"Texture")}return this.loaded=!0,this}setSubImageData({target:t=this.target,pixels:e=null,data:n=null,x:i=0,y:o=0,width:a=this.width,height:c=this.height,level:l=0,format:f=this.format,type:d=this.type,dataFormat:p=this.dataFormat,compressed:g=!1,offset:m=0,border:v=this.border,parameters:y={}}){if(({type:d,dataFormat:p,compressed:g,width:a,height:c}=this._deduceParameters({format:f,type:d,dataFormat:p,compressed:g,data:n,width:a,height:c})),(0,u.h)(0===this.depth,"texSubImage not supported for 3D textures"),n||(n=e),n&&n.data){const t=n;n=t.data,a=t.shape[0],c=t.shape[1]}n instanceof s.Z&&(n=n.handle),this.gl.bindTexture(this.target,this.handle),(0,r.s8)(this.gl,y,(()=>{if(g)this.gl.compressedTexSubImage2D(t,l,i,o,a,c,f,n);else if(null===n)this.gl.texSubImage2D(t,l,i,o,a,c,p,d,null);else if(ArrayBuffer.isView(n))this.gl.texSubImage2D(t,l,i,o,a,c,p,d,n,m);else if(n instanceof h){const e=(0,r.KQ)(this.gl);e.bindBuffer(35052,n),e.texSubImage2D(t,l,i,o,a,c,p,d,m),e.bindBuffer(35052,null)}else if((0,r.D0)(this.gl)){(0,r.KQ)(this.gl).texSubImage2D(t,l,i,o,a,c,p,d,n)}else this.gl.texSubImage2D(t,l,i,o,p,d,n)})),this.gl.bindTexture(this.target,null)}copyFramebuffer(t={}){return r.cM.error("Texture.copyFramebuffer({...}) is no logner supported, use copyToTexture(source, target, opts})")(),null}getActiveUnit(){return this.gl.getParameter(34016)-33984}bind(t=this.textureUnit){const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,this.handle),t}unbind(t=this.textureUnit){const{gl:e}=this;return void 0!==t&&(this.textureUnit=t,e.activeTexture(33984+t)),e.bindTexture(this.target,null),t}_getDataType({data:t,compressed:e=!1}){return e?{data:t,dataType:"compressed"}:null===t?{data:t,dataType:"null"}:ArrayBuffer.isView(t)?{data:t,dataType:"typed-array"}:t instanceof s.Z?{data:t.handle,dataType:"buffer"}:t instanceof h?{data:t,dataType:"buffer"}:{data:t,dataType:"browser-object"}}_deduceParameters(t){const{format:e,data:n}=t;let{width:r,height:i,dataFormat:o,type:s,compressed:u}=t;const c=a.ae[e];return o=o||c&&c.dataFormat,s=s||c&&c.types[0],u=u||c&&c.compressed,({width:r,height:i}=this._deduceImageSize(n,r,i)),{dataFormat:o,type:s,compressed:u,width:r,height:i,format:e,data:n}}_deduceImageSize(t,e,n){let r;return r="undefined"!==typeof ImageData&&t instanceof ImageData?{width:t.width,height:t.height}:"undefined"!==typeof HTMLImageElement&&t instanceof HTMLImageElement?{width:t.naturalWi
1dth,height:t.naturalHeight}:"undefined"!==typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!==typeof ImageBitmap&&t instanceof ImageBitmap?{width:t.width,height:t.height}:"undefined"!==typeof HTMLVideoElement&&t instanceof HTMLVideoElement?{width:t.videoWidth,height:t.videoHeight}:t?{width:e,height:n}:{width:e>=0?e:1,height:n>=0?n:1},(0,u.h)(r,"Could not deduced texture size"),(0,u.h)(void 0===e||r.width===e,"Deduced texture width does not match supplied width"),(0,u.h)(void 0===n||r.height===n,"Deduced texture height does not match supplied height"),r}_createHandle(){return this.gl.createTexture()}_deleteHandle(){this.gl.deleteTexture(this.handle),this._trackDeallocatedMemory("Texture")}_getParameter(t){switch(t){case 4096:return this.width;case 4097:return this.height;default:this.gl.bindTexture(this.target,this.handle);const e=this.gl.getTexParameter(this.target,t);return this.gl.bindTexture(this.target,null),e}}_setParameter(t,e){switch(this.gl.bindTexture(this.target,this.handle),e=this._getNPOTParam(t,e),t){case 33082:case 33083:this.gl.texParameterf(this.handle,t,e);break;case 4096:case 4097:(0,u.h)(!1);break;default:this.gl.texParameteri(this.target,t,e)}return this.gl.bindTexture(this.target,null),this}_isNPOT(){return!(0,r.D0)(this.gl)&&(!(!this.width||!this.height)&&(!(0,c.wt)(this.width)||!(0,c.wt)(this.height)))}_updateForNPOT(t){void 0===t[this.gl.TEXTURE_MIN_FILTER]&&(t[this.gl.TEXTURE_MIN_FILTER]=this.gl.LINEAR),void 0===t[this.gl.TEXTURE_WRAP_S]&&(t[this.gl.TEXTURE_WRAP_S]=this.gl.CLAMP_TO_EDGE),void 0===t[this.gl.TEXTURE_WRAP_T]&&(t[this.gl.TEXTURE_WRAP_T]=this.gl.CLAMP_TO_EDGE)}_getNPOTParam(t,e){if(this._isNPOT())switch(t){case 10241:-1===l.indexOf(e)&&(e=9729);break;case 10242:case 10243:33071!==e&&(e=33071)}return e}}},1053:function(t,e,n){"use strict";n.d(e,{Z:function(){return a}});var r=n(9450),i=n(7577),o=n(3478),s=n(4538);class a extends i.Z{static isSupported(t){return(0,r.D0)(t)}constructor(t,e={}){(0,r.KQ)(t),super(t,e),this.initialize(e),this.stubRemovedMethods("TransformFeedback","v6.0",["pause","resume"]),Object.seal(this)}initialize(t={}){return this.buffers={},this.unused={},this.configuration=null,this.bindOnUse=!0,(0,s.nK)(this.buffers)||this.bind((()=>this._unbindBuffers())),this.setProps(t),this}setProps(t){"program"in t&&(this.configuration=t.program&&t.program.configuration),"configuration"in t&&(this.configuration=t.configuration),"bindOnUse"in t&&(t=t.bindOnUse),"buffers"in t&&this.setBuffers(t.buffers)}setBuffers(t={}){return this.bind((()=>{for(const e in t)this.setBuffer(e,t[e])})),this}setBuffer(t,e){const n=this._getVaryingIndex(t),{buffer:i,byteSize:o,byteOffset:s}=this._getBufferParams(e);return n<0?(this.unused[t]=i,r.cM.warn((()=>`${this.id} unused varying buffer ${t}`))(),this):(this.buffers[n]=e,this.bindOnUse||this._bindBuffer(n,i,s,o),this)}begin(t=0){return this.gl.bindTransformFeedback(36386,this.handle),this._bindBuffers(),this.gl.beginTransformFeedback(t),this}end(){return this.gl.endTransformFeedback(),this._unbindBuffers(),this.gl.bindTransformFeedback(36386,null),this}_getBufferParams(t){let e,n,r;return t instanceof o.Z===!1?(r=t.buffer,n=t.byteSize,e=t.byteOffset):r=t,void 0===e&&void 0===n||(e=e||0,n=n||r.byteLength-e),{buffer:r,byteOffset:e,byteSize:n}}_getVaryingInfo(t){return this.configuration&&this.configuration.getVaryingInfo(t)}_getVaryingIndex(t){if(this.configuration)return this.configuration.getVaryingInfo(t).location;const e=Number(t);return Number.isFinite(e)?e:-1}_bindBuffers(){if(this.bindOnUse)for(const t in this.buffers){const{buffer:e,byteSize:n,byteOffset:r}=this._getBufferParams(this.buffers[t]);this._bindBuffer(t,e,r,n)}}_unbindBuffers(){if(this.bindOnUse)for(const t in this.buffers)this._bindBuffer(t,null)}_bindBuffer(t,e,n=0,r){const i=e&&e.handle;return i&&void 0!==r?this.gl.bindBufferRange(35982,t,i,n,r):this.gl.bindBufferBase(35982,t,i),this}_createHandle(){return this.gl.createTransformFeedback()}_deleteHandle(){this.gl.deleteTransformFeedback(this.handle)}_bindHandle(t){this.gl.bindTransformFeedback(36386,this.handle)}}},4211:function(t,e,n){"use strict";n.d(e,{U6:function(){return s},ag:function(){return a},N$:function(){return u}});var r=n(6948),i=n(9450),o=n(2525);function s(t,e){return a(t,e)}function a(t,e){return(e=Array.isArray(e)?e:[e]).every((e=>c(t,e)))}function u(t){t.luma=t.luma||{},t.luma.caps=t.luma.caps||{};for(const e in r.Z)void 0===t.luma.caps[e]&&(t.luma.caps[e]=c(t,e));return t.luma.caps}function c(t,e){return t.luma=t.luma||{},t.luma.caps=t.luma.caps||{},void 0===t.luma.caps[e]&&(t.luma.caps[e]=function(t,e){const n=r.Z[e];let s;(0,o.h)(n,e);const a=(0,i.D0)(t)&&n[1]||n[0];if("function"===typeof a)s=a(t);else if(Array.isArray(a)){s=!0;for(const e of a)s=s&&Boolean(t.getExtension(e))}else"string"===typeof a?s=Boolean(t.getExtension(a)):"boolean"===typeof a?s=a:(0,o.h)(!1);return s}(t,e)),t.luma.caps[e]||i.cM.log(2,`Feature: ${e} not supported`)(),t.luma.caps[e]}},6948:function(t,e,n){"use strict";n.d(e,{h:function(){return o}});var r=n(3849),i=n(4912);const o={WEBGL2:"WEBGL2",VERTEX_ARRAY_OBJECT:"VERTEX_ARRAY_OBJECT",TIMER_QUERY:"TIMER_QUERY",INSTANCED_RENDERING:"INSTANCED_RENDERING",MULTIPLE_RENDER_TARGETS:"MULTIPLE_RENDER_TARGETS",ELEMENT_INDEX_UINT32:"ELEMENT_INDEX_UINT32",BLEND_EQUATION_MINMAX:"BLEND_EQUATION_MINMAX",FLOAT_BLEND:"FLOAT_BLEND",COLOR_ENCODING_SRGB:"COLOR_ENCODING_SRGB",TEXTURE_DEPTH:"TEXTURE_DEPTH",TEXTURE_FLOAT:"TEXTURE_FLOAT",TEXTURE_HALF_FLOAT:"TEXTURE_HALF_FLOAT",TEXTURE_FILTER_LINEAR_FLOAT:"TEXTURE_FILTER_LINEAR_FLOAT",TEXTURE_FILTER_LINEAR_HALF_FLOAT:"TEXTURE_FILTER_LINEAR_HALF_FLOAT",TEXTURE_FILTER_ANISOTROPIC:"TEXTURE_FILTER_ANISOTROPIC",COLOR_ATTACHMENT_RGBA32F:"COLOR_ATTACHMENT_RGBA32F",COLOR_ATTACHMENT_FLOAT:"COLOR_ATTACHMENT_FLOAT",COLOR_ATTACHMENT_HALF_FLOAT:"COLOR_ATTACHMENT_HALF_FLOAT",GLSL_FRAG_DATA:"GLSL_FRAG_DATA",GLSL_FRAG_DEPTH:"GLSL_FRAG_DEPTH",GLSL_DERIVATIVES:"GLSL_DERIVATIVES",GLSL_TEXTURE_LOD:"GLSL_TEXTURE_LOD"};e.Z={[o.WEBGL2]:[!1,!0],[o.VERTEX_ARRAY_OBJECT]:["OES_vertex_array_object",!0],[o.TIMER_QUERY]:["EXT_disjoint_timer_query","EXT_disjoint_timer_query_webgl2"],[o.INSTANCED_RENDERING]:["ANGLE_instanced_arrays",!0],[o.MULTIPLE_RENDER_TARGETS]:["WEBGL_draw_buffers",!0],[o.ELEMENT_INDEX_UINT32]:["OES_element_index_uint",!0],[o.BLEND_EQUATION_MINMAX]:["EXT_blend_minmax",!0],[o.FLOAT_BLEND]:["EXT_float_blend"],[o.COLOR_ENCODING_SRGB]:["EXT_sRGB",!0],[o.TEXTURE_DEPTH]:["WEBGL_depth_texture",!0],[o.TEXTURE_FLOAT]:["OES_texture_float",!0],[o.TEXTURE_HALF_FLOAT]:["OES_texture_half_float",!0],[o.TEXTURE_FILTER_LINEAR_FLOAT]:["OES_texture_float_linear"],[o.TEXTURE_FILTER_LINEAR_HALF_FLOAT]:["OES_texture_half_float_linear"],[o.TEXTURE_FILTER_ANISOTROPIC]:["EXT_texture_filter_anisotropic"],[o.COLOR_ATTACHMENT_RGBA32F]:[function(t){const e=new i.Z(t,{format:6408,type:5126,dataFormat:6408}),n=new r.Z(t,{id:"test-framebuffer",check:!1,attachments:{36064:e}}
1),o=n.getStatus();return e.delete(),n.delete(),36053===o},"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_FLOAT]:[!1,"EXT_color_buffer_float"],[o.COLOR_ATTACHMENT_HALF_FLOAT]:["EXT_color_buffer_half_float"],[o.GLSL_FRAG_DATA]:["WEBGL_draw_buffers",!0],[o.GLSL_FRAG_DEPTH]:["EXT_frag_depth",!0],[o.GLSL_DERIVATIVES]:["OES_standard_derivatives",!0],[o.GLSL_TEXTURE_LOD]:["EXT_shader_texture_lod",!0]}},9835:function(t,e,n){"use strict";n.d(e,{l:function(){return a}});var r=n(9450),i=n(6203),o=n(9718);const s="8.5.10";const a=new class{constructor(){this.stats=new Map}get(t){return this.stats.has(t)||this.stats.set(t,new i.jk({id:t})),this.stats.get(t)}};if(o.CO.luma&&o.CO.luma.VERSION!==s)throw new Error(`luma.gl - multiple VERSIONs detected: ${o.CO.luma.VERSION} vs 8.5.10`);o.CO.luma||((0,o.jU)()&&r.cM.log(1,"luma.gl 8.5.10 - set luma.log.level=1 (or higher) to trace rendering")(),o.CO.luma=o.CO.luma||{VERSION:s,version:s,log:r.cM,stats:a,globals:{modules:{},nodeIO:{}}});o.CO.luma},2525:function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}n.d(e,{h:function(){return r}})},2610:function(t,e,n){"use strict";n.d(e,{k:function(){return i}});var r=n(9450);function i(t,e,n){const{removedProps:i={},deprecatedProps:o={},replacedProps:s={}}=n;for(const u in i)if(u in e){const e=i[u]?`${t}.${i[u]}`:"N/A";r.cM.removed(`${t}.${u}`,e)()}for(const u in o)if(u in e){const e=o[u];r.cM.deprecated(`${t}.${u}`,`${t}.${e}`)()}let a=null;for(const u in s)if(u in e){const n=s[u];r.cM.deprecated(`${t}.${u}`,`${t}.${n}`)(),a=a||Object.assign({},e),a[n]=e[u],delete a[u]}return a||e}},7469:function(t,e,n){"use strict";n.d(e,{F:function(){return i}});var r=n(9450);function i(t,e,n,i){const o=`See luma.gl ${n} Upgrade Guide at https://luma.gl/docs/upgrade-guide`,s=Object.getPrototypeOf(t);i.forEach((t=>{s.methodName||(s[t]=()=>{throw r.cM.removed(`Calling removed method ${e}.${t}: `,o)(),new Error(t)})}))}},4538:function(t,e,n){"use strict";n.d(e,{hQ:function(){return o},wt:function(){return s},nK:function(){return a}});var r=n(2525);const i={};function o(t="id"){i[t]=i[t]||1;return`${t}-${i[t]++}`}function s(t){return(0,r.h)("number"===typeof t,"Input must be a number"),t&&0===(t&t-1)}function a(t){let e=!0;for(const n in t){e=!1;break}return e}},8522:function(t,e,n){"use strict";n.d(e,{$Z:function(){return u},hJ:function(){return c},jG:function(){return l}});var r=n(2525);const i=5126,o=5124,s=5125,a={[i]:[i,1,"float"],35664:[i,2,"vec2"],35665:[i,3,"vec3"],35666:[i,4,"vec4"],[o]:[o,
11,"int"],35667:[o,2,"ivec2"],35668:[o,3,"ivec3"],35669:[o,4,"ivec4"],[s]:[s,1,"uint"],36294:[s,2,"uvec2"],36295:[s,3,"uvec3"],36296:[s,4,"uvec4"],35670:[i,1,"bool"],35671:[i,2,"bvec2"],35672:[i,3,"bvec3"],35673:[i,4,"bvec4"],35674:[i,8,"mat2"],35685:[i,8,"mat2x3"],35686:[i,8,"mat2x4"],35675:[i,12,"mat3"],35687:[i,12,"mat3x2"],35688:[i,12,"mat3x4"],35676:[i,16,"mat4"],35689:[i,16,"mat4x2"],35690:[i,16,"mat4x3"]};function u(t){switch(t){case 0:return 0;case 1:case 3:case 2:return 1;case 4:case 5:case 6:return 4;default:return(0,r.h)(!1),0}}function c(t){const e=a[t];if(!e)return null;const[n,r]=e;return{type:n,components:r}}function l(t,e){switch(t){case 5120:case 5121:case 5122:case 5123:t=i}for(const n in a){const[r,i,o]=a[n];if(r===t&&i===e)return{glType:n,name:o}}return null}},9579:function(t,e,n){"use strict";n.d(e,{sF:function(){return i},km:function(){return o}});var r=n(2525);function i(t,e){if("string"!==typeof e)return e;const n=Number(e);if(!isNaN(n))return n;const i=t[e=e.replace(/^.*\./,"")];return(0,r.h)(void 0!==i,`Accessing undefined constant GL.${e}`),i}function o(t,e){e=Number(e);for(const n in t)if(t[n]===e)return`GL.${n}`;return String(e)}},5432:function(t,e,n){"use strict";n.d(e,{h:function(){return d},Y:function(){return p}});var r=n(4912),i=n(9450),o=n(5008);const s=[34069,34070,34071,34072,34073,34074];class a extends o.Z{constructor(t,e={}){(0,i.JD)(t),super(t,Object.assign({},e,{target:34067})),this.initialize(e),Object.seal(this)}initialize(t={}){const{mipmaps:e=!0,parameters:n={}}=t;return this.opts=t,this.setCubeMapImageData(t).then((()=>{this.loaded=!0,e&&this.generateMipmap(t),this.setParameters(n)})),this}subImage({face:t,data:e,x:n=0,y:r=0,mipmapLevel:i=0}){return this._subImage({target:t,data:e,x:n,y:r,mipmapLevel:i})}async setCubeMapImageData({width:t,height:e,pixels:n,data:r,border:o=0,format:a=6408,type:u=5121}){const{gl:c}=this,l=n||r,h=await Promise.all(s.map((t=>{const e=l[t];return Promise.all(Array.isArray(e)?e:[e])})));
1this.bind(),s.forEach(((n,r)=>{h[r].length>1&&!1!==this.opts.mipmaps&&i.cM.warn(`${this.id} has mipmap and multiple LODs.`)(),h[r].forEach(((r,i)=>{t&&e?c.texImage2D(n,i,a,t,e,o,a,u,r):c.texImage2D(n,i,a,a,u,r)}))})),this.unbind()}setImageDataForFace(t){const{face:e,width:n,height:r,pixels:i,data:o,border:s=0,format:a=6408,type:u=5121}=t,{gl:c}=this,l=i||o;return this.bind(),l instanceof Promise?l.then((n=>this.setImageDataForFace(Object.assign({},t,{face:e,data:n,pixels:n})))):this.width||this.height?c.texImage2D(e,0,a,n,r,s,a,u,l):c.texImage2D(e,0,a,a,u,l),this}}a.FACES=s;var u=n(3889),c=n(3478);class l extends o.Z{static isSupported(t){return(0,i.D0)(t)}constructor(t,e={}){(0,i.KQ)(t),super(t,e=Object.assign({depth:1},e,{target:32879,unpackFlipY:!1})),this.initialize(e),Object.seal(this)}setImageData({level:t=0,dataFormat:e=6408,width:n,height:r,depth:o=1,border:s=0,format:a,type:l=5121,offset:h=0,data:f,parameters:d={}}){if(this._trackDeallocatedMemory("Texture"),this.gl.bindTexture(this.target,this.handle),(0,i.s8)(this.gl,d,(()=>{ArrayBuffer.isView(f)&&this.gl.texImage3D(this.target,t,e,n,r,o,s,a,l,f),f instanceof c.Z&&(this.gl.bindBuffer(35052,f.handle),this.gl.texImage3D(this.target,t,e,n,r,o,s,a,l,h))})),f&&f.byteLength)this._trackAllocatedMemory(f.byteLength,"Texture");else{const t=u.C[this.dataFormat]||4,e=u.pH[this.type]||1;this._trackAllocatedMemory(this.width*this.height*this.depth*t*e,"Texture")}return this.loaded=!0,this}}var h=n(3849),f=n(2525);function d(t,e){(0,f.h)(t instanceof r.Z||t instanceof a||t instanceof l);const n=t.constructor,{gl:i,width:o,height:s,format:u,type:c,dataFormat:h,border:d,mipmaps:p}=t;return new n(i,Object.assign({width:o,height:s,format:u,type:c,dataFormat:h,border:d,mipmaps:p},e))}function p(t,e){const{gl:n,width:r,height:i,id:o}=t;return new h.Z(n,Object.assign({},e,{id:`framebuffer-for-${o}`,width:r,height:i,attachments:{36064:t}}))}},9335:function(t,e,n){"use strict";n.d(e,{O:function(){return r},vN:function(){return i},c$:function(){return o},KS:function(){return s}});function r(t){switch(ArrayBuffer.isView(t)?t.constructor:t){case Float32Array:return 5126;case Uint16Array:return 5123;case Uint32Array:return 5125;case Uint8Array:case Uint8ClampedArray:return 5121;case Int8Array:return 5120;case Int16Array:return 5122;case Int32Array:return 5124;default:throw new Error("Failed to deduce GL constant from typed array")}}function i(t,{clamped:e=!0}={}){switch(t){case 5126:return Float32Array;case 5123:case 33635:case 32819:case 32820:return Uint16Array;case 5125:return Uint32Array;case 5121:return e?Uint8ClampedArray:Uint8Array;case 5120:return Int8Array;case 5122:return Int16Array;case 5124:return Int32Array;default:throw new Error("Failed to deduce typed array type from GL constant")}}function o({data:t,width:e,height:n,bytesPerPixel:r=4,temp:i}){const o=e*r;i=i||new Uint8Array(o);for(let s=0;s<n/2;++s){const e=s*o,r=(n-s-1)*o;i.set(t.subarray(e,e+o)),t.copyWithin(e,r,r+o),t.set(i,r)}}function s({data:t,width:e,height:n}){const r=Math.round(e/2),i=Math.round(n/2),o=new Uint8Array(r*i*4);for(let s=0;s<i;s++)for(let n=0;n<r;n++)for(let i=0;i<4;i++)o[4*(s*r+n)+i]=t[4*(2*s*e+2*n)+i];return{data:o,width:r,height:i}}},6357:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(4034),i=n(394);class o extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return(0,i.Z)(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let n=0;n<this.ELEMENTS;++n)this[n]=t[n+e];return this.check()}to(t){return t===this?this:(0,r.kJ)(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let n=0;n<this.ELEMENTS;++n)t[e+n]=this[n];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(r.vc)}formatString(t){let e="";for(let n=0;n<this.ELEMENTS;++n)e+=(n>0?", ":"")+(0,r.Bw)(this[n],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!(0,r.fS)(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,n){void 0===n&&(n=e,e=t,t=this);for(let r=0;r<this.ELEMENTS;++r){const i=t[r];this[r]=i+n*(e[r]-i)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t[n]),e[n]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let n=0;n<this.ELEMENTS;++n)this[n]=Math.min(Math.max(this[n],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(r.vc.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invali
1d numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}},7293:function(t,e,n){"use strict";n.d(e,{Z:function(){return v}});var r=n(6281),i=n(6357),o=n(4034),s=n(394);class a extends i.Z{get ELEMENTS(){return(0,s.Z)(!1),0}get RANK(){return(0,s.Z)(!1),0}toString(){let t="[";if(o.vc.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let n=0;n<this.RANK;++n)t+=" ".concat(this[n*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,n){return this[e*this.RANK+t]=(0,r.u5)(n),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const n=t*this.RANK;for(let r=0;r<this.RANK;++r)e[r]=this[n+r];return e}setColumn(t,e){const n=t*this.RANK;for(let r=0;r<this.RANK;++r)this[n+r]=e[r];return this}}var u=n(1031),c=n(5975),l=n(1437),h=n(7160),f=n(8333);const d=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),g=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),m={};class v extends a{static get IDENTITY(){return m.IDENTITY=m.IDENTITY||Object.freeze(new v(d)),m.IDENTITY}static get ZERO(){return m.ZERO=m.ZERO||Object.freeze(new v(p)),m.ZERO}get INDICES(){return g}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,n,r,i,o,s,a,u,c,l,h,f,d,p,g){return this[0]=t,this[1]=e,this[2]=n,this[3]=r,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this[9]=c,this[10]=l,this[11]=h,this[12]=f,this[13]=d,this[14]=p,this[15]=g,this.check()}setRowMajor(t,e,n,r,i,o,s,a,u,c,l,h,f,d,p,g){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=c,this[7]=d,this[8]=n,this[9]=s,this[10]=l,this[11]=p,this[12]=r,this[13]=a,this[14]=h,this[15]=g,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(d)}fromQuaternion(t){return c.en(this,t),this.check()}frustum({left:t,right:e,bottom:n,top:r,near:i,far:o}){return o===1/0?v._computeInfinitePerspectiveOffCenter(this,t,e,n,r,i):c.oy(this,t,e,n,r,i,o),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,n,r,i,o){const s=2*o/(n-e),a=2*o/(i-r),u=(n+e)/(n-e),c=(i+r)/(i-r),l=-2*o;return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=l,t[15]=0,t}lookAt(t,e,n){return 1===arguments.length&&({eye:t,center:e,up:n}=t),e=e||[0,0,0],n=n||[0,1,0],c.zB(this,t,e,n),this.check()}ortho({left:t,right:e,bottom:n,top:r,near:i=.1,far:o=500}){return c.M5(this,t,e,n,r,i,o),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:n=1,near:r=.1,far:i=500}){if(t>2*Math.PI)throw Error("radians");const o=t/2,s=n*Math.tan(o),a=s*e;return(new v).ortho({left:-a,right:a,bottom:-s,top:s,near:r,far:i})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:n=1,near:r=.1,far:i=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return c.G3(this,t,n,r,i),this.check()}determinant(){return c.GH(this)}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const n=this.getScale(e||[-0,-0,-0]),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*r,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*r,t[9]=this[9]*i,t[10]=this[10]*
1o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const n=this.getScale(e||[-0,-0,-0]),r=1/n[0],i=1/n[1],o=1/n[2];return t[0]=this[0]*r,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*r,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*r,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return c.p4(this,this),this.check()}invert(){return c.U_(this,this),this.check()}multiplyLeft(t){return c.Jp(this,t,this),this.check()}multiplyRight(t){return c.Jp(this,this,t),this.check()}rotateX(t){return c.lM(this,this,t),this.check()}rotateY(t){return c.uD(this,this,t),this.check()}rotateZ(t){return c.jI(this,this,t),this.check()}rotateXYZ([t,e,n]){return this.rotateX(t).rotateY(e).rotateZ(n)}rotateAxis(t,e){return c.U1(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?c.bA(this,this,t):c.bA(this,this,[t,t,t]),this.check()}translate(t){return c.Iu(this,this,t),this.check()}transform(t,e){return 4===t.length?(e=f.fF(e||[-0,-0,-0,-0],t,this),(0,r.IL)(e,4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:n}=t;switch(n){case 2:e=l.fF(e||[-0,-0],t,this);break;case 3:e=h.fF(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,r.IL)(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=(0,u.pb)(e||[-0,-0],t,this);break;case 3:e=(0,u.pL)(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return(0,r.IL)(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,n){return this.identity().translate([t,e,n])}transformPoint(t,e){return(0,r.x9)("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return(0,r.x9)("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return(0,r.x9)("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}},1681:function(t,e,n){"use strict";n.d(e,{Z:function(){return f}});var r=n(6357),i=n(6281),o=n(394);class s extends r.Z{get ELEMENTS(){return(0,o.Z)(!1),0}copy(t){return(0,o.Z)(!1),this}get x(){return this[0]}set x(t){this[0]=(0,i.u5)(t)}get y(){return this[1]}set y(t){this[1]=(0,i.u5)(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let n=0;n<this.ELEMENTS;++n){const r=this[n]-t[n];e+=r*r}return(0,i.u5)(e)}dot(t){let e=0;for(let n=0;n<this.ELEMENTS;++n)e+=this[n]*t[n];return(0,i.u5)(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return(0,o.Z)(t>=0&&t<this.ELEMENTS,"index is out of range"),(0,i.u5)(this[t])}setComponent(t,e){return(0,o.Z)(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}var a=n(4034),u=n(7160),c=n(1031);const l=[0,0,0],h={};class f extends s{static get ZERO(){return h.ZERO=h.ZERO||Object.freeze(new f(0,0,0,0))}constructor(t=0,e=0,n=0){super(-0,-0,-0),1===arguments.length&&(0,a.kJ)(t)?this.copy(t):(a.vc.debug&&((0,i.u5)(t),(0,i.u5)(e),(0,i.u5)(n)),this[0]=t,this[1]=e,this[2]=n)}set(t,e,n){return this[0]=t,this[1]=e,this[2]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return a.vc.debug&&((0,i.u5)(t.x),(0,i.u5)(t.y),(0,i.u5)(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=(0,i.u5)(t)}angle(t){return u.EU(this,t)}cross(t){return u.kC(this,this,t),this.check()}rotateX({radians:t,origin:e=l}){return u.lM(this,this,e,t),this.check()}rotateY({radians:t,origin:e=l}){return u.uD(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=l}){return u.jI(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return u.fF(this,this,t),this.check()}transformAsVector(t){return(0,c.pL)(this,this,t),this.check()}transformByMatrix3(t){return u.kK(this,this,t),this.check()}transformByMatrix2(t){return(0,c.eQ)(this,this,t),this.check()}transformByQuaternion(t){return u.VC(this,this,t),this.check()}}},394:function(t,e,n){"use strict";function r(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}n.d(e,{Z:function(){return r}})},4034:function(t,e,n){"use strict";n.d(e,{vc:function(){return r},Bw:function(){return i},kJ:function(){return o},uZ:function(){return a},t7:function(){return u},fS:function(){return c}});Math.PI,Math.PI;const r={};function i(t,{precision:e=r.precision||4}={}){return t=function(t){return Math.round(t/r.EPSILON)*r.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function o(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function s(t,e,n){if(o(t)){n=n||((r=t).clone?r.clone():new Array(r.length));for(let r=0;r<n.length&&r<t.length;++r)n[r]=e(t[r],r,n);return n}var r;return e(t)}function a(t,e,n){return s(t,(t=>Math.max(e,Math.min(n,t))))}function u(t,e,n){return o(t)?t.map(((t,r)=>u(t,e[r],n))):n*e+(1-n)*t}function c(t,e,n){const i=r.EPSILON;n&&(r.EPSILON=n);try{if(t===e)return!0;
1if(o(t)&&o(e)){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!c(t[n],e[n]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=r.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{r.EPSILON=i}}r.EPSILON=1e-12,r.debug=!1,r.precision=4,r.printTypes=!1,r.printDegrees=!1,r.printRowMajor=!0},1031:function(t,e,n){"use strict";function r(t,e,n){const r=e[0],i=e[1],o=n[3]*r+n[7]*i||1;return t[0]=(n[0]*r+n[4]*i)/o,t[1]=(n[1]*r+n[5]*i)/o,t}function i(t,e,n){const r=e[0],i=e[1],o=e[2],s=n[3]*r+n[7]*i+n[11]*o||1;return t[0]=(n[0]*r+n[4]*i+n[8]*o)/s,t[1]=(n[1]*r+n[5]*i+n[9]*o)/s,t[2]=(n[2]*r+n[6]*i+n[10]*o)/s,t}function o(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t[2]=e[2],t}n.d(e,{pb:function(){return r},pL:function(){return i},eQ:function(){return o}})},6281:function(t,e,n){"use strict";n.d(e,{u5:function(){return i},IL:function(){return o},x9:function(){return a}});var r=n(4034);function i(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function o(t,e,n=""){if(r.vc.debug&&!function(t,e){if(t.length!==e)return!1;for(let n=0;n<t.length;++n)if(!Number.isFinite(t[n]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(n," some fields set to invalid numbers'"));return t}const s={};function a(t,e){s[t]||(s[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}},7013:function(t,e,n){"use strict";n.d(e,{DW:function(){return I},eG:function(){return E},Lu:function(){return A},Xg:function(){return C},if:function(){return F},sj:function(){return S},zX:function(){return k},ro:function(){return x},up:function(){return B},Bf:function(){return w},wl:function(){return P},lf:function(){return T},w5:function(){return b},QA:function(){return j},CT:function(){return O},es:function(){return _},aW:function(){return M}});var r=n(8333);function i(t,e){const n=r.fF([],e,t);return r.bA(n,n,1/n[3]),n}function o(t,e){const n=t%e;return n<0?e+n:n}const s=Math.log2||function(t){return Math.log(t)*Math.LOG2E};var a=n(5975),u=n(1437),c=n(7160);function l(t,e){if(!t)throw new Error(e||"@math.gl/web-mercator: assertion failed.")}const h=Math.PI,f=h/4,d=h/180,p=180/h,g=512,m=4003e4;function v(t){return Math.pow(2,t)}function y(t){return s(t)}function b([t,e]){l(Number.isFinite(t)),l(Number.isFinite(e)&&e>=-90&&e<=90,"invalid latitude");const n=e*d;return[g*(t*d+h)/(2*h),g*(h+Math.log(Math.tan(f+.5*n)))/(2*h)]}function _([t,e]){const n=t/g*(2*h)-h,r=2*(Math.atan(Math.exp(e/g*(2*h)-h))-f);return[n*p,r*p]}function w({latitude:t}){l(Number.isFinite(t));const e=Math.cos(t*d);return y(m*e)-9}function x({latitude:t,longitude:e,highPrecision:n=!1}){l(Number.isFinite(t)&&Number.isFinite(e));const r={},i=Math.cos(t*d),o=512/360,s=o/i,a=12790407194604047e-21/i;if(r.unitsPerMeter=[a,a,a],r.metersPerUnit=[1/a,1/a,1/a],r.unitsPerDegree=[o,s,a],r.degreesPerUnit=[.703125,1/s,1/a],n){const e=d*Math.tan(t*d)/i,n=o*e/2,u=12790407194604047e-21*e,c=u/s*a;r.unitsPerDegree2=[0,n,u],r.unitsPerMeter2=[c,0,c]}return r}function E(t,e){const[n,r,i]=t,[o,s,a]=e,{unitsPerMeter:u,unitsPerMeter2:c}=x({longitude:n,latitude:r,highPrecision:!0}),l=b(t);l[0]+=o*(u[0]+c[0]*s),l[1]+=s*(u[1]+c[1]*s);const h=_(l),f=(i||0)+(a||0);return Number.isFinite(i)||Number.isFinite(a)?[h[0],h[1],f]:h}function T({height:t,pitch:e,bearing:n,altitude:r,scale:i,center:o=null}){const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return a.Iu(s,s,[0,0,-r]),a.lM(s,s,-e*d),a.jI(s,s,n*d),i/=t,a.bA(s,s,[i,i,i]),o&&a.Iu(s,s,c.tk([],o)),s}function P({width:t,height:e,fovy:n=A(1.5),altitude:r,pitch:i=0,nearZMultiplier:o=1,farZMultiplier:s=1}){void 0!==r&&(n=A(r));const a=.5*n*d,u=S(n),c=i*d,l=Math.sin(a)*u/Math.sin(Math.min(Math.max(Math.PI/2-c-a,.01),Math.PI-.01));return{fov:2*a,aspect:t/e,focalDistance:u,near:o,far:(Math.sin(c)*l+u)*s}}function A(t){return 2*Math.atan(.5/t)*p}function S(t){return.5/Math.tan(.5*t*d)}function M(t,e){const[n,r,o=0]=t;return l(Number.isFinite(n)&&Number.isFinite(r)&&Number.isFinite(o)),i(e,[n,r,o,1])}function O(t,e,n=0){const[r,o,s]=t;if(l(Number.isFinite(r)&&Number.isFinite(o),"invalid pixel coordinate"),Number.isFinite(s)){return i(e,[r,o,s,1])}const a=i(e,[r,o,0,1]),c=i(e,[r,o,1,1]),h=a[2],f=c[2],d=h===f?0:((n||0)-h)/(f-h);return u.t7([],a,c,d)}function C({width:t,height:e,bounds:n,minExtent:r=0,maxZoom:i=24,padding:o=0,offset:a=[0,0]}){const[[u,c],[h,f]]=n;
1if(Number.isFinite(o)){o={top:o,bottom:o,left:o,right:o}}else l(Number.isFinite(o.top)&&Number.isFinite(o.bottom)&&Number.isFinite(o.left)&&Number.isFinite(o.right));const d=new I({width:t,height:e,longitude:0,latitude:0,zoom:0}),p=d.project([u,f]),g=d.project([h,c]),m=[Math.max(Math.abs(g[0]-p[0]),r),Math.max(Math.abs(g[1]-p[1]),r)],v=[t-o.left-o.right-2*Math.abs(a[0]),e-o.top-o.bottom-2*Math.abs(a[1])];l(v[0]>0&&v[1]>0);const y=v[0]/m[0],b=v[1]/m[1],_=(o.right-o.left)/2/y,w=(o.bottom-o.top)/2/b,x=[(g[0]+p[0])/2+_,(g[1]+p[1])/2+w],E=d.unproject(x),T=Math.min(i,d.zoom+s(Math.abs(Math.min(y,b))));return l(Number.isFinite(T)),{longitude:E[0],latitude:E[1],zoom:T}}const L=Math.PI/180;function k(t,e=0){const{width:n,height:r,unproject:i}=t,o={targetZ:e},s=i([0,r],o),a=i([n,r],o);let u,c;return(t.fovy?.5*t.fovy*L:Math.atan(.5/t.altitude))>(90-t.pitch)*L-.01?(u=R(t,0,e),c=R(t,n,e)):(u=i([0,0],o),c=i([n,0],o)),[s,a,c,u]}function R(t,e,n){const{pixelUnprojectionMatrix:r}=t,o=i(r,[e,0,1,1]),s=i(r,[e,t.height,1,1]),a=(n*t.distanceScales.unitsPerMeter[2]-o[2])/(s[2]-o[2]),c=_(u.t7([],o,s,a));return c[2]=n,c}class I{constructor({width:t,height:e,latitude:n=0,longitude:r=0,zoom:i=0,pitch:o=0,bearing:s=0,altitude:u=null,fovy:l=null,position:h=null,nearZMultiplier:f=.02,farZMultiplier:d=1.01}={width:1,height:1}){t=t||1,e=e||1,null===l&&null===u?l=A(u=1.5):null===l?l=A(u):null===u&&(u=S(l));const p=v(i);u=Math.max(.75,u);const g=x({longitude:r,latitude:n}),m=b([r,n]);m[2]=0,h&&c.IH(m,m,c.dC([],h,g.unitsPerMeter)),this.projectionMatrix=function({width:t,height:e,pitch:n,altitude:r,fovy:i,nearZMultiplier:o,farZMultiplier:s}){const{fov:u,aspect:c,near:l,far:h}=P({width:t,height:e,altitude:r,fovy:i,pitch:n,nearZMultiplier:o,farZMultiplier:s});return a.G3([],u,c,l,h)}({width:t,height:e,pitch:o,fovy:l,nearZMultiplier:f,farZMultiplier:d}),this.viewMatrix=T({height:e,scale:p,center:m,pitch:o,bearing:s,altitude:u}),this.width=t,this.height=e,this.scale=p,this.latitude=n,this.longitude=r,this.zoom=i,this.pitch=o,this.bearing=s,this.altitude=u,this.fovy=l,this.center=m,this.meterOffset=h||[0,0,0],this.distanceScales=g,this._initMatrices(),this.equals=this.equals.bind(this),this.project=this.project.bind(this),this.unproject=this.unproject.bind(this),this.projectPosition=this.projectPosition.bind(this),this.unprojectPosition=this.unprojectPosition.bind(this),Object.freeze(this)}_initMatrices(){const{width:t,height:e,projectionMatrix:n,viewMatrix:r}=this,i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];a.Jp(i,i,n),a.Jp(i,i,r),this.viewProjectionMatrix=i;const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];a.bA(o,o,[t/2,-e/2,1]),a.Iu(o,o,[1,-1,0]),a.Jp(o,o,i);const s=a.U_([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],o);if(!s)throw new Error("Pixel project matrix not invertible");this.pixelProjectionMatrix=o,this.pixelUnprojectionMatrix=s}equals(t){return t instanceof I&&(t.width===this.width&&t.height===this.height&&a.fS(t.projectionMatrix,this.projectionMatrix)&&a.fS(t.viewMatrix,this.viewMatrix))}project(t,{topLeft:e=!0}={}){const n=M(this.projectPosition(t),this.pixelProjectionMatrix),[r,i]=n,o=e?i:this.height-i;return 2===t.length?[r,o]:[r,o,n[2]]}unproject(t,{topLeft:e=!0,targetZ:n}={}){const[r,i,o]=t,s=e?i:this.height-i,a=n&&n*this.distanceScales.unitsPerMeter[2],u=O([r,s,o],this.pixelUnprojectionMatrix,a),[c,l,h]=this.unprojectPosition(u);return Number.isFinite(o)?[c,l,h]:Number.isFinite(n)?[c,l,n]:[c,l]}projectPosition(t){const[e,n]=b(t);return[e,n,(t[2]||0)*this.distanceScales.unitsPerMeter[2]]}unprojectPosition(t){const[e,n]=_(t);return[e,n,(t[2]||0)*this.distanceScales.metersPerUnit[2]]}projectFlat(t){return b(t)}unprojectFlat(t){return _(t)}getMapCenterByLngLatPosition({lngLat:t,pos:e}){const n=O(e,this.pixelUnprojectionMatrix),r=b(t),i=u.IH([],r,u.tk([],n));return _(u.IH([],this.center,i))}getLocationAtPoint({lngLat:t,pos:e}){return this.getMapCenterByLngLatPosition({lngLat:t,pos:e})}fitBounds(t,e={}){const{width:n,height:r}=this,{longitude:i,latitude:o,zoom:s}=C(Object.assign({width:n,height:r,bounds:t},e));return new I({width:n,height:r,longitude:i,latitude:o,zoom:s})}getBounds(t){const e=this.getBoundingRegion(t),n=Math.min(...e.map((t=>t[0]))),r=Math.max(...e.map((t=>t[0])));return[[n,Math.min(...e.map((t=>t[1])))],[r,Math.max(...e.map((t=>t[1])))]]}getBoundingRegion(t={}){return k(this,t.z||0)}}function j({width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:a=0,bearing:u=0}){(n<-180||n>180)&&(n=o(n+180,360)-180),(u<-180||u>180)&&(u=o(u+180,360)-180);const c=s(e/512);if(i<=c)i=c,r=0;else{const t=e/2/Math.pow(2,i),n=_([0,t])[1];if(r<n)r=n;else{const e=_([0,512-t])[1];r>e&&(r=e)}}return{width:t,height:e,longitude:n,latitude:r,zoom:i,pitch:a,bearing:u}}const D=["longitude","latitude","zoom"],N={curve:1.414,speed:1.2};function F(t,e,n,r={}){const i={},{startZoom:o,startCenterXY:s,uDelta:a,w0:c,u1:l,S:h,rho:f,rho2:d,r0:p}=U(t,e,r);
1if(l<.01){for(const r of D){const o=t[r],s=e[r];i[r]=(g=n)*s+(1-g)*o}return i}var g;const m=n*h,v=Math.cosh(p)/Math.cosh(p+f*m),b=c*((Math.cosh(p)*Math.tanh(p+f*m)-Math.sinh(p))/d)/l,w=o+y(1/v),x=u.bA([],a,b);u.IH(x,x,s);const E=_(x);return i.longitude=E[0],i.latitude=E[1],i.zoom=w,i}function B(t,e,n={}){n=Object.assign({},N,n);const{screenSpeed:r,speed:i,maxDuration:o}=n,{S:s,rho:a}=U(t,e,n),u=1e3*s;let c;return c=Number.isFinite(r)?u/(r/a):u/i,Number.isFinite(o)&&c>o?0:c}function U(t,e,n){const r=(n=Object.assign({},N,n)).curve,i=t.zoom,o=[t.longitude,t.latitude],s=v(i),a=e.zoom,c=[e.longitude,e.latitude],l=v(a-i),h=b(o),f=b(c),d=u.lu([],f,h),p=Math.max(t.width,t.height),g=p/l,m=u.kE(d)*s,y=Math.max(m,.01),_=r*r,w=(g*g-p*p+_*_*y*y)/(2*p*_*y),x=(g*g-p*p-_*_*y*y)/(2*g*_*y),E=Math.log(Math.sqrt(w*w+1)-w),T=Math.log(Math.sqrt(x*x+1)-x);return{startZoom:i,startCenterXY:h,uDelta:d,w0:p,u1:m,S:(T-E)/r,rho:r,rho2:_,r0:E,r1:T}}},6203:function(t,e,n){"use strict";n.d(e,{jk:function(){return s}});var r=n(4155);function i(){let t;if("undefined"!==typeof window&&window.performance)t=window.performance.now();else if("undefined"!==typeof r&&r.hrtime){const e=r.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}class o{constructor(t,e){this.name=t,this.type=e,this.sampleSize=1,this.reset()}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=i(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(i()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class s{constructor({id:t,stats:e}){this.id=t,this.stats={},this._initializeStats(e),Object.seal(this)}get(t,e="count"){return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t in this.stats)this.stats[t].reset();return this}forEach(t){for(const e in this.stats)t(this.stats[e])}getTable(){const t={};return this.forEach((e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}})),t}_initializeStats(t=[]){t.forEach((t=>this._getOrCreate(t)))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:n}=t;return this.stats[e]||(this.stats[e]=t instanceof o?t:new o(e,n)),this.stats[e]}}},9839:function(t,e,n){"use strict";n.d(e,{qY:function(){return d},ZP:function(){return b},iW:function(){return p},$B:function(){return y}});var r=1/60*1e3,i="undefined"!==typeof performance?function(){return performance.now()}:function(){return Date.now()},o="undefined"!==typeof window?function(t){return window.requestAnimationFrame(t)}:function(t){return setTimeout((function(){return t(i())}),r)};var s=!0,a=!1,u=!1,c={delta:0,timestamp:0},l=["read","update","preRender","render","postRender"],h=l.reduce((function(t,e){return t[e]=function(t){var e=[],n=[],r=0,i=!1,o=new WeakSet,s={schedule:function(t,s,a){void 0===s&&(s=!1),void 0===a&&(a=!1);var u=a&&i,c=u?e:n;return s&&o.add(t),-1===c.indexOf(t)&&(c.push(t),u&&i&&(r=e.length)),t},cancel:function(t){var e=n.indexOf(t);-1!==e&&n.splice(e,1),o.delete(t)},process:function(a){var u;if(i=!0,e=(u=[n,e])[0],(n=u[1]).length=0,r=e.length)for(var c=0;c<r;c++){var l=e[c];l(a),o.has(l)&&(s.schedule(l),t())}i=!1}};return s}((function(){return a=!0})),t}),{}),f=l.reduce((function(t,e){var n=h[e];return t[e]=function(t,e,r){return void 0===e&&(e=!1),void 0===r&&(r=!1),a||v(),n.schedule(t,e,r)},t}),{}),d=l.reduce((function(t,e){return t[e]=h[e].cancel,t}),{}),p=l.reduce((function(t,e){return t[e]=function(){return h[e].process(c)},t}),{}),g=function(t){return h[t].process(c)},m=function(t){a=!1,c.delta=s?r:Math.max(Math.min(t-c.timestamp,40),1),c.timestamp=t,u=!0,l.forEach(g),u=!1,a&&(s=!1,o(m))},v=function(){a=!0,s=!0,u||o(m)},y=function(){return c},b=f},9685:function(t,e,n){"use strict";n.d(e,{Ib:function(){return r},WT:function(){return i}});var r=1e-6,i="undefined"!==typeof Float32Array?Float32Array:Array;Math.random;Math.PI;Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)})},5975:function(t,e,n){"use strict";n.d(e,{p4:function(){return i},U_:function(){return o},GH:function(){return s},Jp:function(){return a},Iu:function(){return u},bA:function(){return c},U1:function(){return l},lM:function(){return h},uD:function(){return f},jI:function(){return d},en:function(){return p},oy:function(){return g},G3:function(){return m},M5:function(){return v},zB:function(){return y},fS:function(){return b}});var r=n(9685);function i(t,e){if(t===e){var n=e[1],r=e[2],i=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function o(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],v=e[15],y=n*a-r*s,b=n*u-i*s,_=n*c-o*s,w=r*u-i*a,x=r*c-o*a,E=i*c-o*u,T=l*g-h*p,P=l*m-f*p,A=l*v-d*p,S=h*m-f*g,M=h*v-d*g,O=f*v-d*m,C=y*O-b*M+_*S+w*A-x*P+E*T;return C?(C=1/C,t[0]=(a*O-u*M+c*S)*C,t[1]=(i*M-r*O-o*S)*C,t[2]=(g*E-m*x+v*w)*C,t[3]=(f*x-h*E-d*w)*C,t[4]=(u*A-s*O-c*P)*C,t[5]=(n*O-i*A+o*P)*C,t[6]=(m*_-p
1*E-v*b)*C,t[7]=(l*E-f*_+d*b)*C,t[8]=(s*M-a*A+c*T)*C,t[9]=(r*A-n*M-o*T)*C,t[10]=(p*x-g*_+v*y)*C,t[11]=(h*_-l*x-d*y)*C,t[12]=(a*P-s*S-u*T)*C,t[13]=(n*S-r*P+i*T)*C,t[14]=(g*b-p*w-m*y)*C,t[15]=(l*w-h*b+f*y)*C,t):null}function s(t){var e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],g=t[14],m=t[15];return(e*s-n*o)*(h*m-f*g)-(e*a-r*o)*(l*m-f*p)+(e*u-i*o)*(l*g-h*p)+(n*a-r*s)*(c*m-f*d)-(n*u-i*s)*(c*g-h*d)+(r*u-i*a)*(c*p-l*d)}function a(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],g=e[12],m=e[13],v=e[14],y=e[15],b=n[0],_=n[1],w=n[2],x=n[3];return t[0]=b*r+_*a+w*h+x*g,t[1]=b*i+_*u+w*f+x*m,t[2]=b*o+_*c+w*d+x*v,t[3]=b*s+_*l+w*p+x*y,b=n[4],_=n[5],w=n[6],x=n[7],t[4]=b*r+_*a+w*h+x*g,t[5]=b*i+_*u+w*f+x*m,t[6]=b*o+_*c+w*d+x*v,t[7]=b*s+_*l+w*p+x*y,b=n[8],_=n[9],w=n[10],x=n[11],t[8]=b*r+_*a+w*h+x*g,t[9]=b*i+_*u+w*f+x*m,t[10]=b*o+_*c+w*d+x*v,t[11]=b*s+_*l+w*p+x*y,b=n[12],_=n[13],w=n[14],x=n[15],t[12]=b*r+_*a+w*h+x*g,t[13]=b*i+_*u+w*f+x*m,t[14]=b*o+_*c+w*d+x*v,t[15]=b*s+_*l+w*p+x*y,t}function u(t,e,n){var r,i,o,s,a,u,c,l,h,f,d,p,g=n[0],m=n[1],v=n[2];return e===t?(t[12]=e[0]*g+e[4]*m+e[8]*v+e[12],t[13]=e[1]*g+e[5]*m+e[9]*v+e[13],t[14]=e[2]*g+e[6]*m+e[10]*v+e[14],t[15]=e[3]*g+e[7]*m+e[11]*v+e[15]):(r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=r*g+a*m+h*v+e[12],t[13]=i*g+u*m+f*v+e[13],t[14]=o*g+c*m+d*v+e[14],t[15]=s*g+l*m+p*v+e[15]),t}function c(t,e,n){var r=n[0],i=n[1],o=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function l(t,e,n,i){var o,s,a,u,c,l,h,f,d,p,g,m,v,y,b,_,w,x,E,T,P,A,S,M,O=i[0],C=i[1],L=i[2],k=Math.hypot(O,C,L);return k<r.Ib?null:(O*=k=1/k,C*=k,L*=k,o=Math.sin(n),a=1-(s=Math.cos(n)),u=e[0],c=e[1],l=e[2],h=e[3],f=e[4],d=e[5],p=e[6],g=e[7],m=e[8],v=e[9],y=e[10],b=e[11],_=O*O*a+s,w=C*O*a+L*o,x=L*O*a-C*o,E=O*C*a-L*o,T=C*C*a+s,P=L*C*a+O*o,A=O*L*a+C*o,S=C*L*a-O*o,M=L*L*a+s,t[0]=u*_+f*w+m*x,t[1]=c*_+d*w+v*x,t[2]=l*_+p*w+y*x,t[3]=h*_+g*w+b*x,t[4]=u*E+f*T+m*P,t[5]=c*E+d*T+v*P,t[6]=l*E+p*T+y*P,t[7]=h*E+g*T+b*P,t[8]=u*A+f*S+m*M,t[9]=c*A+d*S+v*M,t[10]=l*A+p*S+y*M,t[11]=h*A+g*S+b*M,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function h(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[4],s=e[5],a=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*r,t[5]=s*i+l*r,t[6]=a*i+h*r,t[7]=u*i+f*r,t[8]=c*i-o*r,t[9]=l*i-s*r,t[10]=h*i-a*r,t[11]=f*i-u*r,t}function f(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],a=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*r,t[1]=s*i-l*r,t[2]=a*i-h*r,t[3]=u*i-f*r,t[8]=o*r+c*i,t[9]=s*r+l*i,t[10]=a*r+h*i,t[11]=u*r+f*i,t}function d(t,e,n){var r=Math.sin(n),i=Math.cos(n),o=e[0],s=e[1],a=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*r,t[1]=s*i+l*r,t[2]=a*i+h*r,t[3]=u*i+f*r,t[4]=c*i-o*r,t[5]=l*i-s*r,t[6]=h*i-a*r,t[7]=f*i-u*r,t}function p(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n+n,a=r+r,u=i+i,c=n*s,l=r*s,h=r*a,f=i*s,d=i*a,p=i*u,g=o*s,m=o*a,v=o*u;return t[0]=1-h-p,t[1]=l+v,t[2]=f-m,t[3]=0,t[4]=l-v,t[5]=1-c-p,t[6]=d+g,t[7]=0,t[8]=f+m,t[9]=d-g,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function g(t,e,n,r,i,o,s){var a=1/(n-e),u=1/(i-r),c=1/(o-s);return t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(n+e)*a,t[9]=(i+r)*u,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0,t}function m(t,e,n,r,i){var o,s=1/Math.tan(e/2);return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(r-i),t[10]=(i+r)*o,t[14]=2*i*r*o):(t[10]=-1,t[14]=-2*r),t}function v(t,e,n,r,i,o,s){var a=1/(e-n),u=1/(r-i),c=1/(o-s);return t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+n)*a,t[13]=(i+r)*u,t[14]=(s+o)*c,t[15]=1,t}function y(t,e,n,i){var o,s,a,u,c,l,h,f,d,p,g=e[0],m=e[1],v=e[2],y=i[0],b=i[1],_=i[2],w=n[0],x=n[1],E=n[2];return Math.abs(g-w)<r.Ib&&Math.abs(m-x)<r.Ib&&Math.abs(v-E)<r.Ib?function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}(t):(h=g-w,f=m-x,d=v-E,o=b*(d*=p=1/Math.hypot(h,f,d))-_*(f*=p),s=_*(h*=p)-y*d,a=y*f-b*h,(p=Math.hypot(o,s,a))?(o*=p=1/p,s*=p,a*=p):(o=0,s=0,a=0),u=f*a-d*s,c=d*o-h*a,l=h*s-f*o,(p=Math.hypot(u,c,l))?(u*=p=1/p,c*=p,l*=p):(u=0,c=0,l=0),t[0]=o,t[1]=u,t[2]=h,t[3]=0,t[4]=s,t[5]=c,t[6]=f,t[7]=0,t[8]=a,t[9]=l,t[10]=d,t[11]=0,t[12]=-(o*g+s*m+a*v),t[13]=-(u*g+c*m+l*v),t[14]=-(h*g+f*m+d*v),t[15]=1,t)}function b(t,e){var n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],u=t[5],c=t[6],l=t[7],h=t[8],f=t[9],d=t[10
1],p=t[11],g=t[12],m=t[13],v=t[14],y=t[15],b=e[0],_=e[1],w=e[2],x=e[3],E=e[4],T=e[5],P=e[6],A=e[7],S=e[8],M=e[9],O=e[10],C=e[11],L=e[12],k=e[13],R=e[14],I=e[15];return Math.abs(n-b)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(i-_)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(_))&&Math.abs(o-w)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-x)<=r.Ib*Math.max(1,Math.abs(s),Math.abs(x))&&Math.abs(a-E)<=r.Ib*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(u-T)<=r.Ib*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(c-P)<=r.Ib*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(l-A)<=r.Ib*Math.max(1,Math.abs(l),Math.abs(A))&&Math.abs(h-S)<=r.Ib*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(f-M)<=r.Ib*Math.max(1,Math.abs(f),Math.abs(M))&&Math.abs(d-O)<=r.Ib*Math.max(1,Math.abs(d),Math.abs(O))&&Math.abs(p-C)<=r.Ib*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(g-L)<=r.Ib*Math.max(1,Math.abs(g),Math.abs(L))&&Math.abs(m-k)<=r.Ib*Math.max(1,Math.abs(m),Math.abs(k))&&Math.abs(v-R)<=r.Ib*Math.max(1,Math.abs(v),Math.abs(R))&&Math.abs(y-I)<=r.Ib*Math.max(1,Math.abs(y),Math.abs(I))}},1437:function(t,e,n){"use strict";n.d(e,{IH:function(){return i},bA:function(){return o},kE:function(){return s},tk:function(){return a},t7:function(){return u},fF:function(){return c},lu:function(){return l}});var r=n(9685);function i(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function o(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function s(t){var e=t[0],n=t[1];return Math.hypot(e,n)}function a(t,e){return t[0]=-e[0],t[1]=-e[1],t}function u(t,e,n,r){var i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function c(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}var l=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t};!function(){var t=function(){var t=new r.WT(2);return r.WT!=Float32Array&&(t[0]=0,t[1]=0),t}()}()},7160:function(t,e,n){"use strict";n.d(e,{Ue:function(){return i},al:function(){return o},IH:function(){return s},tk:function(){return a},Fv:function(){return u},AK:function(){return c},kC:function(){return l},fF:function(){return h},kK:function(){return f},VC:function(){return d},lM:function(){return p},uD:function(){return g},jI:function(){return m},EU:function(){return v},dC:function(){return y},Zh:function(){return b}});var r=n(9685);function i(){var t=new r.WT(3);return r.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function o(t,e,n){var i=new r.WT(3);return i[0]=t,i[1]=e,i[2]=n,i}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function a(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function u(t,e){var n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t}function c(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function l(t,e,n){var r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],u=n[2];return t[0]=i*u-o*a,t[1]=o*s-r*u,t[2]=r*a-i*s,t}function h(t,e,n){var r=e[0],i=e[1],o=e[2],s=n[3]*r+n[7]*i+n[11]*o+n[15];return s=s||1,t[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/s,t[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/s,t[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/s,t}function f(t,e,n){var r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function d(t,e,n){var r=n[0],i=n[1],o=n[2],s=n[3],a=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*a-r*c,f=r*u-i*a,d=i*f-o*h,p=o*l-r*f,g=r*h-i*l,m=2*s;return l*=m,h*=m,f*=m,d*=2,p*=2,g*=2,t[0]=a+l+d,t[1]=u+h+p,t[2]=c+f+g,t}function p(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function g(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function m(t,e,n,r){var i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t}function v(t,e){var n=t[0],r=t[1],i=t[2],o=e[0],s=e[1],a=e[2],u=Math.sqrt(n*n+r*r+i*i)*Math.sqrt(o*o+s*s+a*a),l=u&&c(t,e)/u;return Math.acos(Math.min(Math.max(l,-1),1))}var y=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t},b=function(t){var e=t[0],n=t[1],r=t[2];return Math.hypot(e,n,r)};!function(){var t=i()}()},8333:function(t,e,n){"use strict";n.d(e,{d9:function(){return i},al:function(){return o},JG:function(){return s},t8:function(){return a},IH:function(){return u},bA:function(){return c},kE:function(){return l},we:function(){return h},Fv:function(){return f},AK:function(){return d},t7:function(){return p},fF:function(){return g},VC:function(){return m},I6:function(){return v},fS:function(){return y}});var r=n(9685);function i(t){var e=new r.WT(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function o(t,e,n,i){var o=new r.WT(4);return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}function a(t,e,n,r,i){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t}function c(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t}function l(t){var e=t[0],n=t[1],r=t[2],i=t[3];return Math.hypot(e,n,r,i)}function h(t){var e=t[0],n=t[1],r=t[2],i=t[3];return e*e+n*n+r*r+i*i}function f(t,e){var n=e[0],r=e[1],i=e[2],o=e[3],s=n*n+r*r+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=n*s,t[1]=r*s,t[2]=i*s,t[3]=o*s,t}function d(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function p(t,e,n,r){var i=e[0],o=e[1],s=e[2],a=e[3];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=s+r*(n[2]-s),t[3]=a+r*(n[3]-a),t}function g(t,e,n){var r=e[0],i=e[1],o=e[2],s=e[3];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*s,t[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*s,t[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*s,t[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*s,t}function m(t,e,n){var r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],u=n[2],c=n[3],l=c*r+a*o-u*i,h=c*i+u*r-s*o,f=c*o+s*i-a*r,d=-s*r-a*i-u*o;return t[0]=l*c+d*-s+h*-u-f*-a,t[1]=h*c+d*-a+f*-s-l*-u,t[2]=f*c+d*-u+l*-a-h*-s,t[3]=e[3],t}function v(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]}function y(t,e){var n=t[0],i=t[1],o=t[2],s=t[3],a=e[0],u=e[1],c=e[2],l=e[3];
vendor: 16,600 bytes, line 1
1return Math.abs(n-a)<=r.Ib*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(i-u)<=r.Ib*Math.max(1,Math.abs(i),Math.abs(u))&&Math.abs(o-c)<=r.Ib*Math.max(1,Math.abs(o),Math.abs(c))&&Math.abs(s-l)<=r.Ib*Math.max(1,Math.abs(s),Math.abs(l))}!function(){var t=function(){var t=new r.WT(4);return r.WT!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}()},840:function(t,e,n){var r;!function(i,o,s,a){"use strict";var u,c=["","webkit","Moz","MS","ms","o"],l=o.createElement("div"),h=Math.round,f=Math.abs,d=Date.now;function p(t,e,n){return setTimeout(w(t,n),e)}function g(t,e,n){return!!Array.isArray(t)&&(m(t,n[e],n),!0)}function m(t,e,n){var r;if(t)if(t.forEach)t.forEach(e,n);else if(t.length!==a)for(r=0;r<t.length;)e.call(n,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function v(t,e,n){var r="DEPRECATED METHOD: "+e+"\n"+n+" AT \n";return function(){var e=new Error("get-stack-trace"),n=e&&e.stack?e.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",o=i.console&&(i.console.warn||i.console.log);return o&&o.call(i.console,r,n),t.apply(this,arguments)}}u="function"!==typeof Object.assign?function(t){if(t===a||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(r!==a&&null!==r)for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}:Object.assign;var y=v((function(t,e,n){for(var r=Object.keys(e),i=0;i<r.length;)(!n||n&&t[r[i]]===a)&&(t[r[i]]=e[r[i]]),i++;return t}),"extend","Use `assign`."),b=v((function(t,e){return y(t,e,!0)}),"merge","Use `assign`.");function _(t,e,n){var r,i=e.prototype;(r=t.prototype=Object.create(i)).constructor=t,r._super=i,n&&u(r,n)}function w(t,e){return function(){return t.apply(e,arguments)}}function x(t,e){return"function"==typeof t?t.apply(e&&e[0]||a,e):t}function E(t,e){return t===a?e:t}function T(t,e,n){m(M(e),(function(e){t.addEventListener(e,n,!1)}))}function P(t,e,n){m(M(e),(function(e){t.removeEventListener(e,n,!1)}))}function A(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function S(t,e){return t.indexOf(e)>-1}function M(t){return t.trim().split(/\s+/g)}function O(t,e,n){if(t.indexOf&&!n)return t.indexOf(e);for(var r=0;r<t.length;){if(n&&t[r][n]==e||!n&&t[r]===e)return r;r++}return-1}function C(t){return Array.prototype.slice.call(t,0)}function L(t,e,n){for(var r=[],i=[],o=0;o<t.length;){var s=e?t[o][e]:t[o];O(i,s)<0&&r.push(t[o]),i[o]=s,o++}return n&&(r=e?r.sort((function(t,n){return t[e]>n[e]})):r.sort()),r}function k(t,e){for(var n,r,i=e[0].toUpperCase()+e.slice(1),o=0;o<c.length;){if((r=(n=c[o])?n+i:e)in t)return r;o++}return a}var R=1;function I(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||i}var j="ontouchstart"in i,D=k(i,"PointerEvent")!==a,N=j&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),F="touch",B="mouse",U=24,z=["x","y"],V=["clientX","clientY"];function Z(t,e){var n=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){x(t.options.enable,[t])&&n.handler(e)},this.init()}function G(t,e,n){var r=n.pointers.length,i=n.changedPointers.length,o=1&e&&r-i===0,s=12&e&&r-i===0;n.isFirst=!!o,n.isFinal=!!s,o&&(t.session={}),n.eventType=e,function(t,e){var n=t.session,r=e.pointers,i=r.length;n.firstInput||(n.firstInput=H(e));i>1&&!n.firstMultiple?n.firstMultiple=H(e):1===i&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,u=s?s.center:o.center,c=e.center=W(r);e.timeStamp=d(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=Y(u,c),e.distance=X(u,c),function(t,e){var n=e.center,r=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};1!==e.eventType&&4!==o.eventType||(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=t.offsetDelta={x:n.x,y:n.y});e.deltaX=i.x+(n.x-r.x),e.deltaY=i.y+(n.y-r.y)}(n,e),e.offsetDirection=q(e.deltaX,e.deltaY);var l=$(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=f(l.x)>f(l.y)?l.x:l.y,e.scale=s?(h=s.pointers,p=r,X(p[0],p[1],V)/X(h[0],h[1],V)):1,e.rotation=s?function(t,e){return Y(e[1],e[0],V)+Y(t[1],t[0],V)}(s.pointers,r):0,e.maxPointers=n.prevInput?e.pointers.length>n.prevInput.maxPointers?e.pointers.length:n.prevInput.maxPointers:e.pointers.length,function(t,e){var n,r,i,o,s=t.lastInterval||e,u=e.timeStamp-s.timeStamp;if(8!=e.eventType&&(u>25||s.velocity===a)){var c=e.deltaX-s.deltaX,l=e.deltaY-s.deltaY,h=$(u,c,l);r=h.x,i=h.y,n=f(h.x)>f(h.y)?h.x:h.y,o=q(c,l),t.lastInterval=e}else n=s.velocity,r=s.velocityX,i=s.velocityY,o=s.direction;e.velocity=n,e.velocityX=r,e.velocityY=i,e.direction=o}(n,e);var h,p;var g=t.element;A(e.srcEvent.target,g)&&(g=e.srcEvent.target);e.target=g}(t,n),t.emit("hammer.input",n),t.recognize(n),t.session.prevInput=n}function H(t){for(var e=[],n=0;n<t.pointers.length;)e[n]={clientX:h(t.pointers[n].clientX),clientY:h(t.pointers[n].clientY)},n++;return{timeStamp:d(),pointers:e,center:W(e),deltaX:t.deltaX,deltaY:t.deltaY}}function W(t){var e=t.length;if(1===e)return{x:h(t[0].clientX),y:h(t[0].clientY)};for(var n=0,r=0,i=0;i<e;)n+=t[i].clientX,r+=t[i].clientY,i++;return{x:h(n/e),y:h(r/e)}}function $(t,e,n){return{x:e/t||0,y:n/t||0}}function q(t,e){return t===e?1:f(t)>=f(e)?t<0?2:4:e<0?8:16}function X(t,e,n){n||(n=z);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return Math.sqrt(r*r+i*i)}function Y(t,e,n){n||(n=z);var r=e[n[0]]-t[n[0]],i=e[n[1]]-t[n[1]];return 180*Math.atan2(i,r)/Math.PI}Z.prototype={handler:function(){},init:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(I(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&P(this.element,this.evEl,this.domHandler),this.evTarget&&P(this.target,this.evTarget,this.domHandler),this.evWin&&P(I(this.element),this.evWin,this.domHandler)}};var K={mousedown:1,mousemove:2,mouseup:4},Q="mousedown",J="mousemove mouseup";function tt(){this.evEl=Q,this.evWin=J,this.pressed=!1,Z.apply(this,arguments)}_(tt,Z,{handler:function(t){var e=K[t.type];1&e&&0===t.button&&(this.pressed=!0),2&e&&1!==t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:B,srcEvent:t}))}});var et={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},nt={2:F,3:"pen",4:B,5:"kinect"},rt="pointerdown",it="pointermove pointerup pointercancel";function ot(){this.evEl=rt,this.evWin=it,Z.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}i.MSPointerEvent&&!i.PointerEvent&&(rt="MSPointerDown",it="MSPointerMove MSPointerUp MSPointerCancel"),_(ot,Z,{handler:function(t){var e=this.store,n=!1,r=t.type.toLowerCase().replace("ms",""),i=et[r],o=nt[t.pointerType]||t.pointerType,s=o==F,a=O(e,t.pointerId,"pointerId");1&i&&(0===t.button||s)?a<0&&(e.push(t),a=e.length-1):12&i&&(n=!0),a<0||(e[a]=t,this.callback(this.manager,i,{pointers:e,changedPointers:[t],pointerType:o,srcEvent:t}),n&&e.splice(a,1))}});var st={touchstart:1,touchmove:2,touchend:4,touchcancel:8},at="touchstart",ut="touchstart touchmove touchend touchcancel";function ct(){this.evTarget=at,this.evWin=ut,this.started=!1,Z.apply(this,arguments)}function lt(t,e){var n=C(t.touches),r=C(t.changedTouches);return 12&e&&(n=L(n.concat(r),"identifier",!0)),[n,r]}_(ct,Z,{handler:function(t){var e=st[t.type];if(1===e&&(this.started=!0),this.started){var n=lt.call(this,t,e);12&e&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}}});var ht={touchstart:1,touchmove:2,touchend:4,touchcancel:8},ft="touchstart touchmove touchend touchcancel";function dt(){this.evTarget=ft,this.targetIds={},Z.apply(this,arguments)}function pt(t,e){var n=C(t.touches),r=this.targetIds;if(3&e&&1===n.length)return r[n[0].identifier]=!0,[n,n];var i,o,s=C(t.changedTouches),a=[],u=this.target;if(o=n.filter((function(t){return A(t.target,u)})),1===e)for(i=0;i<o.length;)r[o[i].identifier]=!0,i++;for(i=0;i<s.length;)r[s[i].identifier]&&a.push(s[i]),12&e&&delete r[s[i].identifier],i++;return a.length?[L(o.concat(a),"identifier",!0),a]:void 0}_(dt,Z,{handler:function(t){var e=ht[t.type],n=pt.call(this,t,e);n&&this.callback(this.manager,e,{pointers:n[0],changedPointers:n[1],pointerType:F,srcEvent:t})}});function gt(){Z.apply(this,arguments);var t=w(this.handler,this);this.touch=new dt(this.manager,t),this.mouse=new tt(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function mt(t,e){1&t?(this.primaryTouch=e.changedPointers[0].identifier,vt.call(this,e)):12&t&&vt.call(this,e)}function vt(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var n={x:e.clientX,y:e.clientY};this.lastTouches.push(n);var r=this.lastTouches;setTimeout((function(){var t=r.indexOf(n);t>-1&&r.splice(t,1)}),2500)}}function yt(t){for(var e=t.srcEvent.clientX,n=t.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var i=this.lastTouches[r],o=Math.abs(e-i.x),s=Math.abs(n-i.y);if(o<=25&&s<=25)return!0}return!1}_(gt,Z,{handler:function(t,e,n){var r=n.pointerType==F,i=n.pointerType==B;if(!(i&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(r)mt.call(this,e,n);else if(i&&yt.call(this,n))return;this.callback(t,e,n)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var bt=k(l.style,"touchAction"),_t=bt!==a,wt="compute",xt="auto",Et="manipulation",Tt="none",Pt="pan-x",At="pan-y",St=function(){if(!_t)return!1;var t={},e=i.CSS&&i.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach((function(n){t[n]=!e||i.CSS.supports("touch-action",n)})),t}();function Mt(t,e){this.manager=t,this.set(e)}Mt.prototype={set:function(t){t==wt&&(t=this.compute()),_t&&this.manager.element.style&&St[t]&&(this.manager.element.style[bt]=t),this.actions=t.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return m(this.manager.recognizers,(function(e){x(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))})),function(t){if(S(t,Tt))return Tt;var e=S(t,Pt),n=S(t,At);if(e&&n)return Tt;if(e||n)return e?Pt:At;if(S(t,Et))return Et;return xt}(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,n=t.offsetDirection;if(this.manager.session.prevented)e.preventDefault();else{var r=this.actions,i=S(r,Tt)&&!St.none,o=S(r,At)&&!St["pan-y"],s=S(r,Pt)&&!St["pan-x"];if(i){var a=1===t.pointers.length,u=t.distance<2,c=t.deltaTime<250;if(a&&u&&c)return}if(!s||!o)return i||o&&6&n||s&&n&U?this.preventSrc(e):void 0}},preventSrc:function(t){this.manager.session.prevented=!0,t.preventDefault()}};var Ot=32;function Ct(t){this.options=u({},this.defaults,t||{}),this.id=R++,this.manager=null,this.options.enable=E(this.options.enable,!0),this.state=1,this.simultaneous={},this.requireFail=[]}function Lt(t){return 16&t?"cancel":8&t?"end":4&t?"move":2&t?"start":""}function kt(t){return 16==t?"down":8==t?"up":2==t?"left":4==t?"right":""}function Rt(t,e){var n=e.manager;return n?n.get(t):t}function It(){Ct.apply(this,arguments)}function jt(){It.apply(this,arguments),this.pX=null,this.pY=null}function Dt(){It.apply(this,arguments)}function Nt(){Ct.apply(this,arguments),this._timer=null,this._input=null}function Ft(){It.apply(this,arguments)}function Bt(){It.apply(this,arguments)}function Ut(){Ct.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function zt(t,e){return(e=e||{}).recognizers=E(e.recognizers,zt.defaults.preset),new Vt(t,e)}Ct.prototype={defaults:{},set:function(t){return u(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(g(t,"recognizeWith",this))return this;var e=this.simultaneous;return e[(t=Rt(t,this)).id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return g(t,"dropRecognizeWith",this)||(t=Rt(t,this),delete this.simultaneous[t.id]),this},requireFailure:function(t){if(g(t,"requireFailure",this))return this;var e=this.requireFail;return-1===O(e,t=Rt(t,this))&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(g(t,"dropRequireFailure",this))return this;t=Rt(t,this);var e=O(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){var e=this,n=this.state;function r(n){e.manager.emit(n,t)}n<8&&r(e.options.event+Lt(n)),r(e.options.event),t.additionalEvent&&r(t.additionalEvent),n>=8&&r(e.options.event+Lt(n))},tryEmit:function(t){if(this.canEmit())return this.emit(t);this.state=Ot},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(33&this.requireFail[t].state))return!1;t++}return!0},recognize:function(t){var e=u({},t);if(!x(this.options.enable,[this,e]))return this.reset(),void(this.state=Ot);56&this.state&&(this.state=1),this.state=this.process(e),30&this.state&&this.tryEmit(e)},process:function(t){},getTouchAction:function(){},reset:function(){}},_(It,Ct,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,n=t.eventType,r=6&e,i=this.attrTest(t);return r&&(8&n||!i)?16|e:r||i?4&n?8|e:2&e?4|e:2:Ot}}),_(jt,It,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var t=this.options.direction,e=[];return 6&t&&e.push(At),t&U&&e.push(Pt),e},directionTest:function(t){var e=this.options,n=!0,r=t.distance,i=t.direction,o=t.deltaX,s=t.deltaY;return i&e.direction||(6&e.direction?(i=0===o?1:o<0?2:4,n=o!=this.pX,r=Math.abs(t.deltaX)):(i=0===s?1:s<0?8:16,n=s!=this.pY,r=Math.abs(t.deltaY))),t.direction=i,n&&r>e.threshold&&i&e.direction},attrTest:function(t){return It.prototype.attrTest.call(this,t)&&(2&this.state||!(2&this.state)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=kt(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),_(Dt,It,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[Tt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||2&this.state)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),_(Nt,Ct,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[xt]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime>e.time;if(this._input=t,!r||!n||12&t.eventType&&!i)this.reset();else if(1&t.eventType)this.reset(),this._timer=p((function(){this.state=8,this.tryEmit()}),e.time,this);else if(4&t.eventType)return 8;return Ot},reset:function(){clearTimeout(this._timer)},emit:function(t){8===this.state&&(t&&4&t.eventType?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=d(),this.manager.emit(this.options.event,this._input)))}}),_(Ft,It,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[Tt]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||2&this.state)}}),_(Bt,It,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return jt.prototype.getTouchAction.call(this)},attrTest:function(t){var e,n=this.options.direction;return 30&n?e=t.overallVelocity:6&n?e=t.overallVelocityX:n&U&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&f(e)>this.options.velocity&&4&t.eventType},emit:function(t){var e=kt(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),_(Ut,Ct,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Et]},process:function(t){var e=this.options,n=t.pointers.length===e.pointers,r=t.distance<e.threshold,i=t.deltaTime<e.time;if(this.reset(),1&t.eventType&&0===this.count)return this.failTimeout();if(r&&i&&n){if(4!=t.eventType)return this.failTimeout();var o=!this.pTime||t.timeStamp-this.pTime<e.interval,s=!this.pCenter||X(this.pCenter,t.center)<e.posThreshold;if(this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t,0===this.count%e.taps)return this.hasRequireFailures()?(this._timer=p((function(){this.state=8,this.tryEmit()}
1),e.interval,this),2):8}return Ot},failTimeout:function(){return this._timer=p((function(){this.state=Ot}),this.options.interval,this),Ot},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),zt.VERSION="2.0.7",zt.defaults={domEvents:!1,touchAction:wt,enable:!0,inputTarget:null,inputClass:null,preset:[[Ft,{enable:!1}],[Dt,{enable:!1},["rotate"]],[Bt,{direction:6}],[jt,{direction:6},["swipe"]],[Ut],[Ut,{event:"doubletap",taps:2},["tap"]],[Nt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};function Vt(t,e){var n;this.options=u({},zt.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=new((n=this).options.inputClass||(D?ot:N?dt:j?gt:tt))(n,G),this.touchAction=new Mt(this,this.options.touchAction),Zt(this,!0),m(this.options.recognizers,(function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])}),this)}function Zt(t,e){var n,r=t.element;r.style&&(m(t.options.cssProps,(function(i,o){n=k(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""})),e||(t.oldCssProps={}))}Vt.prototype={set:function(t){return u(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?2:1},recognize:function(t){var e=this.session;if(!e.stopped){var n;this.touchAction.preventDefaults(t);var r=this.recognizers,i=e.curRecognizer;(!i||i&&8&i.state)&&(i=e.curRecognizer=null);for(var o=0;o<r.length;)n=r[o],2===e.stopped||i&&n!=i&&!n.canRecognizeWith(i)?n.reset():n.recognize(t),!i&&14&n.state&&(i=e.curRecognizer=n),o++}},get:function(t){if(t instanceof Ct)return t;for(var e=this.recognizers,n=0;n<e.length;n++)if(e[n].options.event==t)return e[n];return null},add:function(t){if(g(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(g(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,n=O(e,t);-1!==n&&(e.splice(n,1),this.touchAction.update())}return this},on:function(t,e){if(t!==a&&e!==a){var n=this.handlers;return m(M(t),(function(t){n[t]=n[t]||[],n[t].push(e)})),this}},off:function(t,e){if(t!==a){var n=this.handlers;return m(M(t),(function(t){e?n[t]&&n[t].splice(O(n[t],e),1):delete n[t]})),this}},emit:function(t,e){this.options.domEvents&&function(t,e){var n=o.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=e,e.target.dispatchEvent(n)}(t,e);var n=this.handlers[t]&&this.handlers[t].slice();if(n&&n.length){e.type=t,e.preventDefault=function(){e.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](e),r++}},destroy:function(){this.element&&Zt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},u(zt,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:Ot,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:U,DIRECTION_ALL:30,Manager:Vt,Input:Z,TouchAction:Mt,TouchInput:dt,MouseInput:tt,PointerEventInput:ot,TouchMouseInput:gt,SingleTouchInput:ct,Recognizer:Ct,AttrRecognizer:It,Tap:Ut,Pan:jt,Swipe:Bt,Pinch:Dt,Rotate:Ft,Press:Nt,on:T,off:P,each:m,merge:b,extend:y,assign:u,inherit:_,bindFn:w,prefixed:k}),("undefined"!==typeof i?i:"undefined"!==typeof self?self:{}).Hammer=zt,(r=function(){return zt}.call(e,n,e,t))===a||(t.exports=r)}(window,document)},3630:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var r=/iPhone/i,i=/iPod/i,o=/iPad/i,s=/\biOS-universal(?:.+)Mac\b/i,a=/\bAndroid(?:.+)Mobile\b/i,u=/Android/i,c=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,l=/Silk/i,h=/Windows Phone/i,f=/\bWindows(?:.+)ARM\b/i,d=/BlackBerry/i,p=/BB10/i,g=/Opera Mini/i,m=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i,y=function(t){return"undefined"!==typeof t&&"MacIntel"===t.platform&&"number"===typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"===typeof MSStream};function b(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"===typeof navigator?"string"===typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=e.userAgent,b=n.split("[FBAN");"undefined"!==typeof b[1]&&(n=b[0]),"undefined"!==typeof(b=n.split("Twitter"))[1]&&(n=b[0]);var _=function(t){return function(e){return e.test(t)}}(n),w={apple:{phone:_(r)&&!_(h),ipod:_(i),tablet:!_(r)&&(_(o)||y(e))&&!_(h),universal:_(s),device:(_(r)||_(i)||_(o)||_(s)||y(e))&&!_(h)},amazon:{phone:_(c),tablet:!_(c)&&_(l),device:_(c)||_(l)},android:{phone:!_(h)&&_(c)||!_(h)&&_(a),tablet:!_(h)&&!_(c)&&!_(a)&&(_(l)||_(u)),device:!_(h)&&(_(c)||_(l)||_(a)||_(u))||_(/\bokhttp\b/i)}
1,windows:{phone:_(h),tablet:_(f),device:_(h)||_(f)},other:{blackberry:_(d),blackberry10:_(p),opera:_(g),firefox:_(v),chrome:_(m),device:_(d)||_(p)||_(g)||_(v)||_(m)},any:!1,phone:!1,tablet:!1};return w.any=w.apple.device||w.android.device||w.windows.device||w.other.device,w.phone=w.apple.phone||w.android.phone||w.windows.phone,w.tablet=w.apple.tablet||w.android.tablet||w.windows.tablet,w}},2317:function(t,e,n){"use strict";n.d(e,{Q:function(){return B}});var r=n(840),i=n.n(r);const o={mousedown:1,mousemove:2,mouseup:4};!function(t){const e=t.prototype.handler;t.prototype.handler=function(t){const n=this.store;t.button>0&&"pointerdown"===t.type&&(function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return!0;return!1}(n,(e=>e.pointerId===t.pointerId))||n.push(t)),e.call(this,t)}}(i().PointerEventInput),i().MouseInput.prototype.handler=function(t){let e=o[t.type];1&e&&t.button>=0&&(this.pressed=!0),2&e&&0===t.which&&(e=4),this.pressed&&(4&e&&(this.pressed=!1),this.callback(this.manager,e,{pointers:[t],changedPointers:[t],pointerType:"mouse",srcEvent:t}))};const s=i().Manager;var a=i();const u=a?[[a.Pan,{event:"tripan",pointers:3,threshold:0,enable:!1}],[a.Rotate,{enable:!1}],[a.Pinch,{enable:!1}],[a.Swipe,{enable:!1}],[a.Pan,{threshold:0,enable:!1}],[a.Press,{enable:!1}],[a.Tap,{event:"doubletap",taps:2,enable:!1}],[a.Tap,{event:"anytap",enable:!1}],[a.Tap,{enable:!1}]]:null,c={tripan:["rotate","pinch","pan"],rotate:["pinch"],pinch:["pan"],pan:["press","doubletap","anytap","tap"],doubletap:["anytap"],anytap:["tap"]},l={doubletap:["tap"]},h={pointerdown:"pointerdown",pointermove:"pointermove",pointerup:"pointerup",touchstart:"pointerdown",touchmove:"pointermove",touchend:"pointerup",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup"},f={KEY_EVENTS:["keydown","keyup"],MOUSE_EVENTS:["mousedown","mousemove","mouseup","mouseover","mouseout","mouseleave"],WHEEL_EVENTS:["wheel","mousewheel"]},d={tap:"tap",anytap:"anytap",doubletap:"doubletap",press:"press",pinch:"pinch",pinchin:"pinch",pinchout:"pinch",pinchstart:"pinch",pinchmove:"pinch",pinchend:"pinch",pinchcancel:"pinch",rotate:"rotate",rotatestart:"rotate",rotatemove:"rotate",rotateend:"rotate",rotatecancel:"rotate",tripan:"tripan",tripanstart:"tripan",tripanmove:"tripan",tripanup:"tripan",tripandown:"tripan",tripanleft:"tripan",tripanright:"tripan",tripanend:"tripan",tripancancel:"tripan",pan:"pan",panstart:"pan",panmove:"pan",panup:"pan",pandown:"pan",panleft:"pan",panright:"pan",panend:"pan",pancancel:"pan",swipe:"swipe",swipeleft:"swipe",swiperight:"swipe",swipeup:"swipe",swipedown:"swipe"},p={click:"tap",anyclick:"anytap",dblclick:"doubletap",mousedown:"pointerdown",mousemove:"pointermove",mouseup:"pointerup",mouseover:"pointerover",mouseout:"pointerout",mouseleave:"pointerleave"},g="undefined"!==typeof navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():"",m="undefined"!==typeof window?window:n.g;"undefined"!==typeof n.g?n.g:window,"undefined"!==typeof document&&document;let v=!1;try{const t={get passive(){return v=!0,!0}};m.addEventListener("test",t,t),m.removeEventListener("test",t,t)}catch(U){}const y=-1!==g.indexOf("firefox"),{WHEEL_EVENTS:b}=f,_="wheel",w=4.000244140625;class x{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.events=b.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((e=>t.addEventListener(e,this.handleEvent,!!v&&{passive:!1})))}destroy(){this.events.forEach((t=>this.element.removeEventListener(t,this.handleEvent)))}enableEventType(t,e){t===_&&(this.options.enable=e)}handleEvent(t){if(!this.options.enable)return;let e=t.deltaY;m.WheelEvent&&(y&&t.deltaMode===m.WheelEvent.DOM_DELTA_PIXEL&&(e/=m.devicePixelRatio),t.deltaMode===m.WheelEvent.DOM_DELTA_LINE&&(e*=40));const n={x:t.clientX,y:t.clientY};0!==e&&e%w===0&&(e=Math.floor(e/w)),t.shiftKey&&e&&(e*=.25),this._onWheel(t,-e,n)}_onWheel(t,e,n){this.callback({type:_,center:n,delta:e,srcEvent:t,pointerType:"mouse",target:t.target})}}const{MOUSE_EVENTS:E}=f,T="pointermove",P="pointerover",A="pointerout",S="pointerleave";class M{constructor(t,e,n={}){this.element=t,this.callback=e,this.pressed=!1,this.options=Object.assign({enable:!0},n),this.enableMoveEvent=this.options.enable,this.enableLeaveEvent=this.options.enable,this.enableOutEvent=this.options.enable,this.enableOverEvent=this.options.enable,this.events=E.
1concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),this.events.forEach((e=>t.addEventListener(e,this.handleEvent)))}destroy(){this.events.forEach((t=>this.element.removeEventListener(t,this.handleEvent)))}enableEventType(t,e){t===T&&(this.enableMoveEvent=e),t===P&&(this.enableOverEvent=e),t===A&&(this.enableOutEvent=e),t===S&&(this.enableLeaveEvent=e)}handleEvent(t){this.handleOverEvent(t),this.handleOutEvent(t),this.handleLeaveEvent(t),this.handleMoveEvent(t)}handleOverEvent(t){this.enableOverEvent&&"mouseover"===t.type&&this.callback({type:P,srcEvent:t,pointerType:"mouse",target:t.target})}handleOutEvent(t){this.enableOutEvent&&"mouseout"===t.type&&this.callback({type:A,srcEvent:t,pointerType:"mouse",target:t.target})}handleLeaveEvent(t){this.enableLeaveEvent&&"mouseleave"===t.type&&this.callback({type:S,srcEvent:t,pointerType:"mouse",target:t.target})}handleMoveEvent(t){if(this.enableMoveEvent)switch(t.type){case"mousedown":t.button>=0&&(this.pressed=!0);break;case"mousemove":0===t.which&&(this.pressed=!1),this.pressed||this.callback({type:T,srcEvent:t,pointerType:"mouse",target:t.target});break;case"mouseup":this.pressed=!1}}}const{KEY_EVENTS:O}=f,C="keydown",L="keyup";class k{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.enableDownEvent=this.options.enable,this.enableUpEvent=this.options.enable,this.events=O.concat(n.events||[]),this.handleEvent=this.handleEvent.bind(this),t.tabIndex=n.tabIndex||0,t.style.outline="none",this.events.forEach((e=>t.addEventListener(e,this.handleEvent)))}destroy(){this.events.forEach((t=>this.element.removeEventListener(t,this.handleEvent)))}enableEventType(t,e){t===C&&(this.enableDownEvent=e),t===L&&(this.enableUpEvent=e)}handleEvent(t){const e=t.target||t.srcElement;"INPUT"===e.tagName&&"text"===e.type||"TEXTAREA"===e.tagName||(this.enableDownEvent&&"keydown"===t.type&&this.callback({type:C,srcEvent:t,key:t.key,target:t.target}),this.enableUpEvent&&"keyup"===t.type&&this.callback({type:L,srcEvent:t,key:t.key,target:t.target}))}}const R="contextmenu";class I{constructor(t,e,n={}){this.element=t,this.callback=e,this.options=Object.assign({enable:!0},n),this.handleEvent=this.handleEvent.bind(this),t.addEventListener("contextmenu",this.handleEvent)}destroy(){this.element.removeEventListener("contextmenu",this.handleEvent)}enableEventType(t,e){t===R&&(this.options.enable=e)}handleEvent(t){this.options.enable&&this.callback({type:R,center:{x:t.clientX,y:t.clientY},srcEvent:t,pointerType:"mouse",target:t.target})}}const j={pointerdown:1,pointermove:2,pointerup:4,mousedown:1,mousemove:2,mouseup:4};const D={srcElement:"root",priority:0};class N{constructor(t){this.eventManager=t,this.handlers=[],this.handlersByElement=new Map,this.handleEvent=this.handleEvent.bind(this),this._active=!1}isEmpty(){return!this._active}add(t,e,n,r=!1,i=!1){const{handlers:o,handlersByElement:s}=this;n&&("object"!==typeof n||n.addEventListener)&&(n={srcElement:n}),n=n?Object.assign({},D,n):D;let a=s.get(n.srcElement);a||(a=[],s.set(n.srcElement,a));const u={type:t,handler:e,srcElement:n.srcElement,priority:n.priority};r&&(u.once=!0),i&&(u.passive=!0),o.push(u),this._active=this._active||!u.passive;let c=a.length-1;for(;c>=0&&!(a[c].priority>=u.priority);)c--;a.splice(c+1,0,u)}remove(t,e){const{handlers:n,handlersByElement:r}=this;for(let i=n.length-1;i>=0;i--){const o=n[i];if(o.type===t&&o.handler===e){n.splice(i,1);const t=r.get(o.srcElement);t.splice(t.indexOf(o),1),0===t.length&&r.delete(o.srcElement)}}this._active=n.some((t=>!t.passive))}handleEvent(t){if(this.isEmpty())return;const e=this._normalizeEvent(t);let n=t.srcEvent.target;for(;n&&n!==e.rootElement;){if(this._emit(e,n),e.handled)return;n=n.parentNode}this._emit(e,"root")}_emit(t,e){const n=this.handlersByElement.get(e);if(n){let e=!1;const r=()=>{t.handled=!0},i=()=>{t.handled=!0,e=!0},o=[];for(let s=0;s<n.length;s++){const{type:a,handler:u,once:c}=n[s];if(u(Object.assign({},t,{type:a,stopPropagation:r,stopImmediatePropagation:i})),c&&o.push(n[s]),e)break}for(let t=0;t<o.length;t++){const{type:e,handler:n}=o[t];this.remove(e,n)}}}_normalizeEvent(t){const e=this.eventManager.element;return Object.assign({},t,function(t){const e=j[t.srcEvent.type];if(!e)return null;const{buttons:n,button:r,which:i}=t.srcEvent;let o=!1,s=!1,a=!1;return 4===e||2===e&&!Number.isFinite(n)?(o=1===i,s=2===i,a=3===i):2===e?(o=Boolean(1&n),s=Boolean(4&n),a=Boolean(2&n)):1===e&&(o=0===r,s=1===r,a=2===r),{leftButton:o,middleButton:s,rightButton:a}}(t),function(t,e){const{srcEvent:n}=t;if(!t.center&&!Number.isFinite(n.clientX))return null;const r=t.center||{x:n.clientX,y:n.clientY},i=e.getBoundingClientRect(),o=i.width/e.offsetWidth||1,s=i.height/e.offsetHeight||1;return{center:r,offsetCenter:{x:(r.x-i.left-e.clientLeft)/o,y:(r.y-i.top-e.clientTop)/s}}}(t,e),{handled:!1,rootElement:e})}}const F={events:null,recognizers:null,recognizerOptions:{},Manager:s,touchAction:"none",tabIndex:0};class B{constructor(t=null,e={}){this.options=Object.assign({},F,e),this.events=new Map,this._onBasicInput=this._onBasicInput.bind(this),this._onOtherEvent=this._onOtherEvent.bind(this),this.setElement(t);const{events:n}=e;n&&this.on(n)}setElement(t){if(this.element&&this.destroy(),this.element=t,!t)return;const{options:e}=this,n=e.Manager;this.manager=new n(t,{touchAction:e.touchAction,recognizers:e.recognizers||u}).on("hammer.input",this._onBasicInput),e.recognizers||Object.keys(c).forEac
1h((t=>{const e=this.manager.get(t);e&&c[t].forEach((t=>{e.recognizeWith(t)}))}));for(const r in e.recognizerOptions){const t=this.manager.get(r);if(t){const n=e.recognizerOptions[r];delete n.enable,t.set(n)}}this.wheelInput=new x(t,this._onOtherEvent,{enable:!1}),this.moveInput=new M(t,this._onOtherEvent,{enable:!1}),this.keyInput=new k(t,this._onOtherEvent,{enable:!1,tabIndex:e.tabIndex}),this.contextmenuInput=new I(t,this._onOtherEvent,{enable:!1});for(const[r,i]of this.events)i.isEmpty()||(this._toggleRecognizer(i.recognizerName,!0),this.manager.on(r,i.handleEvent))}destroy(){this.element&&(this.wheelInput.destroy(),this.moveInput.destroy(),this.keyInput.destroy(),this.contextmenuInput.destroy(),this.manager.destroy(),this.wheelInput=null,this.moveInput=null,this.keyInput=null,this.contextmenuInput=null,this.manager=null,this.element=null)}on(t,e,n){this._addEventHandler(t,e,n,!1)}once(t,e,n){this._addEventHandler(t,e,n,!0)}watch(t,e,n){this._addEventHandler(t,e,n,!1,!0)}off(t,e){this._removeEventHandler(t,e)}_toggleRecognizer(t,e){const{manager:n}=this;if(!n)return;const r=n.get(t);if(r&&r.options.enable!==e){r.set({enable:e});const i=l[t];i&&!this.options.recognizers&&i.forEach((i=>{const o=n.get(i);e?(o.requireFailure(t),r.dropRequireFailure(i)):o.dropRequireFailure(t)}))}this.wheelInput.enableEventType(t,e),this.moveInput.enableEventType(t,e),this.keyInput.enableEventType(t,e),this.contextmenuInput.enableEventType(t,e)}_addEventHandler(t,e,n,r,i){if("string"!==typeof t){n=e;for(const e in t)this._addEventHandler(e,t[e],n,r,i);return}const{manager:o,events:s}=this,a=p[t]||t;let u=s.get(a);u||(u=new N(this),s.set(a,u),u.recognizerName=d[a]||a,o&&o.on(a,u.handleEvent)),u.add(t,e,n,r,i),u.isEmpty()||this._toggleRecognizer(u.recognizerName,!0)}_removeEventHandler(t,e){if("string"!==typeof t){for(const e in t)this._removeEventHandler(e,t[e]);return}const{events:n}=this,r=p[t]||t,i=n.get(r);if(i&&(i.remove(t,e),i.isEmpty())){const{recognizerName:t}=i;let e=!1;for(const r of n.values())if(r.recognizerName===t&&!r.isEmpty()){e=!0;break}e||this._toggleRecognizer(t,!1)}}_onBasicInput(t){const{srcEvent:e}=t,n=h[e.type];n&&this.manager.emit(n,t)}_onOtherEvent(t){this.manager.emit(t.type,t)}}},724:function(){},1163:function(t,e,n){t.exports=n(4651)},8297:function(t,e,n){"use strict";var r=n(5318);Object.defineProperty(e,"__esModule",{value:!0}),e.isMobile=function(){return"undefined"!==typeof i.window.orientation},e.default=function(t){if(!t&&!(0,o.default)())return"Node";if((0,s.default)(t))return"Electron";var e="undefined"!==typeof navigator?navigator:{},n=t||e.userAgent||"";if(n.indexOf("Edge")>-1)return"Edge";var r=-1!==n.indexOf("MSIE "),a=-1!==n.indexOf("Trident/");if(r||a)return"IE";if(i.window.chrome)return"Chrome";if(i.window.safari)return"Safari";if(i.window.mozInnerScreenX)return"Firefox";return"Unknown"};var i=n(2361),o=r(n(2999)),s=r(n(3941))},2361:function(t,e,n){"use strict";var r=n(4155),i=n(5318);Object.defineProperty(e,"__esModule",{value:!0}),e.console=e.process=e.document=e.global=e.window=e.self=void 0;var o=i(n(8)),s={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document,process:"object"===("undefined"===typeof r?"undefined":(0,o.default)(r))&&r},a=s.self||s.window||s.global;e.self=a;var u=s.window||s.self||s.global;e.window=u;var c=s.global||s.self||s.window;e.global=c;var l=s.document||{};e.document=l;var h=s.process||{};e.process=h;var f=console;e.console=f},9718:function(t,e,n){"use strict";var r=n(5318),i=n(8);Object.defineProperty(e,"CO",{enumerable:!0,get:function(){return o.global}}),Object.defineProperty(e,"jU",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(e,"qs",{enumerable:!0,get:function(){return a.default}});var o=n(2361),s=l(n(2999)),a=l(n(8297)),u=r(n(3941));function c(t){if("function"!==typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(c=function(t){return t?n:e})(t)}function l(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!==i(t)&&"function"!==typeof t)return{default:t};var n=c(e);if(n&&n.has(t))return n.get(t);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in t)if("default"!==s&&Object.prototype.hasOwnProperty.call(t,s)){var a=o?Object.getOwnPropertyDescriptor(t,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=t[s]}return r.default=t,n&&n.set(t,r),r}},2999:function(t,e,n){"use strict";var r=n(4155),i=n(5318);
1Object.defineProperty(e,"__esModule",{value:!0}),e.default=a,e.isBrowserMainThread=function(){return a()&&"undefined"!==typeof document};var o=i(n(8)),s=i(n(3941));function a(){return!("object"===("undefined"===typeof r?"undefined":(0,o.default)(r))&&"[object process]"===String(r)&&!1)||(0,s.default)()}},3941:function(t,e,n){"use strict";var r=n(4155),i=n(5318);Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if("undefined"!==typeof window&&"object"===(0,o.default)(window.process)&&"renderer"===window.process.type)return!0;if("undefined"!==typeof r&&"object"===(0,o.default)(r.versions)&&Boolean(r.versions.electron))return!0;var e="object"===("undefined"===typeof navigator?"undefined":(0,o.default)(navigator))&&"string"===typeof navigator.userAgent&&navigator.userAgent,n=t||e;if(n&&n.indexOf("Electron")>=0)return!0;return!1};var o=i(n(8))},6073:function(t,e,n){"use strict";n.d(e,{u9:function(){return o},N4:function(){return s}});var r=n(4155);const i={self:"undefined"!==typeof self&&self,window:"undefined"!==typeof window&&window,global:"undefined"!==typeof n.g&&n.g,document:"undefined"!==typeof document&&document,process:"object"===typeof r&&r},o=i.window||i.self||i.global,s=i.process||{};console},5989:function(t,e,n){"use strict";n.d(e,{Z:function(){return o}});var r=n(1202),i=n(4155);function o(){return!("object"===typeof i&&"[object process]"===String(i)&&!1)||(0,r.Z)()}},1202:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(4155);function i(t){if("undefined"!==typeof window&&"object"===typeof window.process&&"renderer"===window.process.type)return!0;if("undefined"!==typeof r&&"object"===typeof r.versions&&Boolean(r.versions.electron))return!0;const e="object"===typeof navigator&&"string"===typeof navigator.userAgent&&navigator.userAgent,n=t||e;return!!(n&&n.indexOf("Electron")>=0)}},4708:function(t,e,n){"use strict";n.d(e,{Z:function(){return b}});var r=n(5989);const i="undefined"!==typeof __VERSION__?__VERSION__:"untranspiled source",o=(0,r.Z)();class s{constructor(t,e,n="sessionStorage"){this.storage=function(t){try{const e=window[t],n="__storage_test__";return e.setItem(n,n),e.removeItem(n),e}catch(e){return null}}(n),this.id=t,this.config={},Object.assign(this.config,e),this._loadConfiguration()}getConfiguration(){return this.config}setConfiguration(t){return this.config={},this.updateConfiguration(t)}updateConfiguration(t){if(Object.assign(this.config,t),this.storage){const t=JSON.stringify(this.config);this.storage.setItem(this.id,t)}return this}_loadConfiguration(){let t={};if(this.storage){const e=this.storage.getItem(this.id);t=e?JSON.parse(e):{}}return Object.assign(this.config,t),this}}function a(t,e,n,r=600){const i=t.src.replace(/\(/g,"%28").replace(/\)/g,"%29");t.width>r&&(n=Math.min(n,r/t.width));const o=t.width*n,s=t.height*n,a=["font-size:1px;","padding:".concat(Math.floor(s/2),"px ").concat(Math.floor(o/2),"px;"),"line-height:".concat(s,"px;"),"background:url(".concat(i,");"),"background-size:".concat(o,"px ").concat(s,"px;"),"color:transparent;"].join("");return["".concat(e," %c+"),a]}const u={BLACK:30,RED:31,GREEN:32,YELLOW:33,BLUE:34,MAGENTA:35,CYAN:36,WHITE:37,BRIGHT_BLACK:90,BRIGHT_RED:91,BRIGHT_GREEN:92,BRIGHT_YELLOW:93,BRIGHT_BLUE:94,BRIGHT_MAGENTA:95,BRIGHT_CYAN:96,BRIGHT_WHITE:97};function c(t){return"string"===typeof t?u[t.toUpperCase()]||u.WHITE:t}function l(t,e){if(!t)throw new Error(e||"Assertion failed")}var h=n(6073);function f(){let t;if(o&&h.u9.performance)t=h.u9.performance.now();else if(h.N4.hrtime){const e=h.N4.hrtime();t=1e3*e[0]+e[1]/1e6}else t=Date.now();return t}const d={debug:o&&console.debug||console.log,log:console.log,info:console.info,warn:console.warn,error:console.error},p={enabled:!0,level:0};function g(){}const m={},v={once:!0};function y(t){for(const e in t)for(const n in t[e])return n||"untitled";return"empty"}class b{constructor({id:t}={id:""}){this.id=t,this.VERSION=i,this._startTs=f(),this._deltaTs=f(),this.LOG_THROTTLE_TIMEOUT=0,this._storage=new s("__probe-".concat(this.id,"__"),p),this.userData={},this.timeStamp("".concat(this.id," started")),function(t,e=["constructor"]){const n=Object.getPrototypeOf(t),r=Object.getOwnPropertyNames(n);for(const i of r)"function"===typeof t[i]&&(e.find((t=>i===t))||(t[i]=t[i].bind(t)))}
1(this),Object.seal(this)}set level(t){this.setLevel(t)}get level(){return this.getLevel()}isEnabled(){return this._storage.config.enabled}getLevel(){return this._storage.config.level}getTotal(){return Number((f()-this._startTs).toPrecision(10))}getDelta(){return Number((f()-this._deltaTs).toPrecision(10))}set priority(t){this.level=t}get priority(){return this.level}getPriority(){return this.level}enable(t=!0){return this._storage.updateConfiguration({enabled:t}),this}setLevel(t){return this._storage.updateConfiguration({level:t}),this}assert(t,e){l(t,e)}warn(t){return this._getLogFunction(0,t,d.warn,arguments,v)}error(t){return this._getLogFunction(0,t,d.error,arguments)}deprecated(t,e){return this.warn("`".concat(t,"` is deprecated and will be removed in a later version. Use `").concat(e,"` instead"))}removed(t,e){return this.error("`".concat(t,"` has been removed. Use `").concat(e,"` instead"))}probe(t,e){return this._getLogFunction(t,e,d.log,arguments,{time:!0,once:!0})}log(t,e){return this._getLogFunction(t,e,d.debug,arguments)}info(t,e){return this._getLogFunction(t,e,console.info,arguments)}once(t,e){return this._getLogFunction(t,e,d.debug||d.info,arguments,v)}table(t,e,n){return e?this._getLogFunction(t,e,console.table||g,n&&[n],{tag:y(e)}):g}image({logLevel:t,priority:e,image:r,message:i="",scale:s=1}){return this._shouldLog(t||e)?o?function({image:t,message:e="",scale:n=1}){if("string"===typeof t){const r=new Image;return r.onload=()=>{const t=a(r,e,n);console.log(...t)},r.src=t,g}const r=t.nodeName||"";if("img"===r.toLowerCase())return console.log(...a(t,e,n)),g;if("canvas"===r.toLowerCase()){const r=new Image;return r.onload=()=>console.log(...a(r,e,n)),r.src=t.toDataURL(),g}return g}({image:r,message:i,scale:s}):function({image:t,message:e="",scale:r=1}){let i=null;try{i=n(5307)}catch(o){}if(i)return()=>i(t,{fit:"box",width:"".concat(Math.round(80*r),"%")}).then((t=>console.log(t)));return g}({image:r,message:i,scale:s}):g}settings(){console.table?console.table(this._storage.config):console.log(this._storage.config)}get(t){return this._storage.config[t]}set(t,e){this._storage.updateConfiguration({[t]:e})}time(t,e){return this._getLogFunction(t,e,console.time?console.time:console.info)}timeEnd(t,e){return this._getLogFunction(t,e,console.timeEnd?console.timeEnd:console.info)}timeStamp(t,e){return this._getLogFunction(t,e,console.timeStamp||g)}group(t,e,n={collapsed:!1}){n=w({logLevel:t,message:e,opts:n});const{collapsed:r}=n;return n.method=(r?console.groupCollapsed:console.group)||console.info,this._getLogFunction(n)}groupCollapsed(t,e,n={}){return this.group(t,e,Object.assign({},n,{collapsed:!0}))}groupEnd(t){return this._getLogFunction(t,"",console.groupEnd||g)}withGroup(t,e,n){this.group(t,e)();try{n()}finally{this.groupEnd(t)()}}trace(){console.trace&&console.trace()}_shouldLog(t){return this.isEnabled()&&this.getLevel()>=_(t)}_getLogFunction(t,e,n,r=[],i){if(this._shouldLog(t)){i=w({logLevel:t,message:e,args:r,opts:i}),l(n=n||i.method),i.total=this.getTotal(),i.delta=this.getDelta(),this._deltaTs=f();const s=i.tag||i.message;if(i.once){if(m[s])return g;m[s]=f()}return e=function(t,e,n){if("string"===typeof e){const a=n.time?function(t,e=8){const n=Math.max(e-t.length,0);return"".concat(" ".repeat(n)).concat(t)}(function(t){let e;return e=t<10?"".concat(t.toFixed(2),"ms"):t<100?"".concat(t.toFixed(1),"ms"):t<1e3?"".concat(t.toFixed(0),"ms"):"".concat((t/1e3).toFixed(2),"s"),e}(n.total)):"";e=n.time?"".concat(t,": ").concat(a," ").concat(e):"".concat(t,": ").concat(e),r=e,i=n.color,s=n.background,o||"string"!==typeof r||(i&&(i=c(i),r="\x1b[".concat(i,"m").concat(r,"\x1b[39m")),s&&(i=c(s),r="\x1b[".concat(s+10,"m").concat(r,"\x1b[49m"))),e=r}var r,i,s;return e}(this.id,i.message,i),n.bind(console,e,...i.args)}return g}}function _(t){if(!t)return 0;let e;switch(typeof t){case"number":e=t;break;case"object":e=t.logLevel||t.priority||0;break;default:return 0}return l(Number.isFinite(e)&&e>=0),e}function w(t){const{logLevel:e,message:n}=t;t.logLevel=_(e);const r=t.args?Array.from(t.args):[];for(;r.length&&r.shift()!==n;);switch(t.args=r,typeof e){case"string":case"function":void 0!==n&&r.unshift(n),t.message=e;break;case"object":Object.assign(t,e)}"function"===typeof t.message&&(t.message=t.message());const i=typeof t.message;
1return l("string"===i||"object"===i),Object.assign(t,t.opts)}b.VERSION=i},4155:function(t){var e,n,r=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(n){try{return e.call(null,t,0)}catch(n){return e.call(this,t,0)}}}!function(){try{e="function"===typeof setTimeout?setTimeout:i}catch(t){e=i}try{n="function"===typeof clearTimeout?clearTimeout:o}catch(t){n=o}}();var a,u=[],c=!1,l=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&f())}function f(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(a=u,u=[];++l<e;)a&&a[l].run();l=-1,e=u.length}a=null,c=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===o||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}r.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new d(t,e)),1!==u.length||c||s(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=p,r.addListener=p,r.once=p,r.off=p,r.removeListener=p,r.removeAllListeners=p,r.emit=p,r.prependListener=p,r.prependOnceListener=p,r.listeners=function(t){return[]},r.binding=function(t){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(t){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},4405:function(t,e,n){"use strict";n.d(e,{w_:function(){return c}});var r=n(7294),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=r.createContext&&r.createContext(i),s=function(){return(s=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},a=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n};function u(t){return t&&t.map((function(t,e){return r.createElement(t.tag,s({key:e},t.attr),u(t.child))}))}function c(t){return function(e){return r.createElement(l,s({attr:s({},t.attr)},e),u(t.child))}}function l(t){var e=function(e){var n,i=t.attr,o=t.size,u=t.title,c=a(t,["attr","size","title"]),l=o||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),r.createElement("svg",s({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,c,{className:n,style:s(s({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),u&&r.createElement("title",null,u),t.children)};return void 0!==o?r.createElement(o.Consumer,null,(function(t){return e(t)})):e(i)}},934:function(t,e,n){"use strict";n.d(e,{X$:function(){return pt},Z3:function(){return At}});var r=n(7462);function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function o(t,e){if(t){if("string"===typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function s(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||o(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var a=n(4942),u=n(7294),c=n(5697);function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o=[],s=!0,a=!1;try{for(n=n.call(t);!(s=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);s=!0);}catch(u){a=!0,i=u}finally{try{s||null==n.return||n.return()}finally{if(a)throw i}}return o}}(t,e)||o(t,e)||function(){throw new TypeError("Invalid attempt to de
1structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var h=n(7013),f=function(){if("undefined"!==typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),d="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,p="undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")(),g="function"===typeof requestAnimationFrame?requestAnimationFrame.bind(p):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var m=["top","right","bottom","left","width","height","size","weight"],v="undefined"!==typeof MutationObserver,y=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&a()}function s(){g(o)}function a(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(s,e);i=t}return a}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){d&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),v?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){d&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;m.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),b=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},_=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||p},w=S(0,0,0,0);function x(t){return parseFloat(t)||0}function E(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+x(t["border-"+n+"-width"])}),0)}function T(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return w;var r=_(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=x(o)}return e}(r),o=i.left+i.right,s=i.top+i.bottom,a=x(r.width),u=x(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==e&&(a-=E(r,"left","right")+o),Math.round(u+s)!==n&&(u-=E(r,"top","bottom")+s)),!function(t){return t===_(t).document.documentElement}(t)){var c=Math.round(a+o)-e,l=Math.round(u+s)-n;1!==Math.abs(c)&&(a-=c),1!==Math.abs(l)&&(u-=l)}return S(i.left,i.top,a,u)}var P="undefined"!==typeof SVGGraphicsElement?function(t){return t instanceof _(t).SVGGraphicsElement}:function(t){return t instanceof _(t).SVGElement&&"function"===typeof t.getBBox};function A(t){return d?P(t)?function(t){var e=t.getBBox();return S(0,0,e.width,e.height)}(t):T(t):w}function S(t,e,n,r){return{x:t,y:e,width:n,height:r}}var M=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=S(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=A(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),O=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,s=Object.create(o.prototype);
vendor: 9,284 bytes, line 1
1return b(s,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),s}(e);b(this,{target:t,contentRect:n})},C=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new f,"function"!==typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof _(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new M(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(t instanceof _(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new O(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),L="undefined"!==typeof WeakMap?new WeakMap:new f,k=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=y.getInstance(),r=new C(e,n,this);L.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){k.prototype[t]=function(){var e;return(e=L.get(this))[t].apply(e,arguments)}}));var R="undefined"!==typeof p.ResizeObserver?p.ResizeObserver:k;function I(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function D(t,e,n){return e&&j(t.prototype,e),n&&j(t,n),t}"undefined"!==typeof window?window:n.g,"undefined"!==typeof n.g?n.g:window;var N="undefined"!==typeof document?document:{};function F(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function B(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?F(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function U(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return z(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return z(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var V=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Z(t){if(!t)return null;if("string"===typeof t)return t;t.toJS&&(t=t.toJS());var e,n={},r=U(t.layers);try{for(r.s();!(e=r.n()).done;){var i=e.value;n[i.id]=i}}catch(s){r.e(s)}finally{r.f()}var o=t.layers.map((function(t){var e=n[t.ref],r=null;if("interactive"in t&&delete(r=B({},t)).interactive,e){delete(r=r||B({},t)).ref;var i,o=U(V);try{for(o.s();!(i=o.n()).done;){var a=i.value;a in e&&(r[a]=e[a])}}catch(s){o.e(s)}finally{o.f()}}return r||t}));return B(B({},t),{},{layers:o})}var G=n(4155);var H={container:c.object,gl:c.object,mapboxApiAccessToken:c.string,mapboxApiUrl:c.string,attributionControl:c.bool,preserveDrawingBuffer:c.bool,reuseMaps:c.bool,transformRequest:c.func,mapOptions:c.object,mapStyle:c.oneOfType([c.string,c.object]),preventStyleDiffing:c.bool,visible:c.bool,asyncRender:c.bool,onLoad:c.func,onError:c.func,width:c.number,height:c.number,viewState:c.object,longitude:c.number,latitude:c.number,zoom:c.number,bearing:c.number,pitch:c.number,altitude:c.number},W={container:N.body,mapboxApiAccessToken:function(){var t=null;if("undefined"!==typeof window&&window.location){var e=window.location.search.match(/access_token=([^&\/]*)/);t=e&&e[1]}t||"undefined"===typeof G||(t=t||G.env.MapboxAccessToken||G.env.REACT_APP_MAPBOX_ACCESS_TOKEN);return t||"no-token"}(),mapboxApiUrl:"https://api.mapbox.com",preserveDrawingBuffer:!1,attributionControl:!0,reuseMaps:!1,mapOptions:{},mapStyle:"mapbox://styles/mapbox/light-v8",preventStyleDiffing:!1,visible:!0,asyncRender:!1,onLoad:function(){},onError:function(t){t&&console.error(t.error)},width:0,height:0,longitude:0,latitude:0,zoom:0,bearing:0,pitch:0,altitude:1.5};function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"component";t.debug&&c.checkPropTypes(H,t,"prop",e)}var q=function(){function t(e){var n=this;if(I(this,t),(0,a.Z)(this,"props",W),(0,a.Z)(this,"width",0),(0,a.Z)(this,"height",0),(0,a.Z)(this,"_fireLoadEvent",(function(){n.props.onLoad({type:"load",target:n._map})})),(0,a.Z)(this,"_handleError",(function(t){n.props.onError(t)})),!e.mapboxgl)throw new Error("Mapbox not available");this.mapboxgl=e.mapboxgl,t.initialized||(t.initialized=!0,this._checkStyleSheet(this.mapboxgl.version)),this._initialize(e)}return D(t,[{key:"finalize",value:function(){return this._destroy(),this}},{key:"setProps",value:function(t){return this._update(this.props,t),this}},{key:"redraw",value:function(){var t=this._map;t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}},{key:"getMap",value:function(){return this._map}},{key:"_reuse",value:function(e){this._map=t.savedMap;var n=this._map.getContainer(),r=e.container;for(r.classList.add("mapboxgl-map");n.childNodes.length>0;)r.appendChild(n.childNodes[0]);this._map._container=r,t.savedMap=null,e.mapStyle&&this._map.setStyle(Z(e.mapStyle),{diff:!1}),this._map.isStyleLoaded()?this._fireLoadEvent():this._map.once("styledata",this._fireLoadEvent)}},{key:"_create",value:function(e){if(e.reuseMaps&&t.savedMap)this._reuse(e);else{if(e.gl){var n=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=function(){return HTMLCanvasElement.prototype.getContext=n,e.gl}}var r={container:e.container,center:[0,0],zoom:8,pitch:0,bearing:0,maxZoom:24,style:Z(e.mapStyle),interactive:!1,trackResize:!1,attributionControl:e.attributionControl,preserveDrawingBuffer:e.preserveDrawingBuffer};e.transformRequest&&(r.transformRequest=e.transformRequest),this._map=new this.mapboxgl.Map(Object.assign({},r,e.mapOptions)),this._map.once("load",this._fireLoadEvent),this._map.on("error",this._handleError)}return this}},{key:"_destroy",value:function(){this._map&&(this.props.reuseMaps&&!t.savedMap?(t.savedMap=this._map,this._map.off("load",this._fireLoadEvent),this._map.off("error",this._handleError),this._map.off("styledata",this._fireLoadEvent)):this._map.remove(),this._map=null)}},{key:"_initialize",value:function(t){var e=this;$(t=Object.assign({},W,t),"Mapbox"),this.mapboxgl.accessToken=t.mapboxApiAccessToken||W.mapboxApiAccessToken,this.mapboxgl.baseApiUrl=t.mapboxApiUrl,this._create(t);var n=t.container;Object.defineProperty(n,"offsetWidth",{get:function(){return e.width}}),Object.defineProperty(n,"clientWidth",{get:function(){return e.width}}),Object.defineProperty(n,"offsetHeight",{get:function(){return e.height}}),Object.defineProperty(n,"clientHeight",{get:function(){return e.height}});var r=this._map.getCanvas();r&&(r.style.outline="none"),this._updateMapViewport({},t),this._updateMapSize({},t),this.props=t}},{key:"_update",value:function(t,e){if(this._map){$(e=Object.assign({},this.props,e),"Mapbox");var n=this._updateMapViewport(t,e),r=this._updateMapSize(t,e);this._updateMapStyle(t,e),e.asyncRender||!n&&!r||this.redraw(),this.props=e}}},{key:"_updateMapStyle",value:function(t,e){t.mapStyle!==e.mapStyle&&this._map.setStyle(Z(e.mapStyle),{diff:!e.preventStyleDiffing})}}
1,{key:"_updateMapSize",value:function(t,e){var n=t.width!==e.width||t.height!==e.height;return n&&(this.width=e.width,this.height=e.height,this._map.resize()),n}},{key:"_updateMapViewport",value:function(t,e){var n=this._getViewState(t),r=this._getViewState(e),i=r.latitude!==n.latitude||r.longitude!==n.longitude||r.zoom!==n.zoom||r.pitch!==n.pitch||r.bearing!==n.bearing||r.altitude!==n.altitude;return i&&(this._map.jumpTo(this._viewStateToMapboxProps(r)),r.altitude!==n.altitude&&(this._map.transform.altitude=r.altitude)),i}},{key:"_getViewState",value:function(t){var e=t.viewState||t,n=e.longitude,r=e.latitude,i=e.zoom,o=e.pitch,s=void 0===o?0:o,a=e.bearing,u=void 0===a?0:a,c=e.altitude;return{longitude:n,latitude:r,zoom:i,pitch:s,bearing:u,altitude:void 0===c?1.5:c}}},{key:"_checkStyleSheet",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"0.47.0";if("undefined"!==typeof N)try{var e=N.createElement("div");e.className="mapboxgl-map",e.style.display="none",N.body.appendChild(e);var n="static"!==window.getComputedStyle(e).position;if(!n){var r=N.createElement("link");r.setAttribute("rel","stylesheet"),r.setAttribute("type","text/css"),r.setAttribute("href","https://api.tiles.mapbox.com/mapbox-gl-js/v".concat(t,"/mapbox-gl.css")),N.head.appendChild(r)}}catch(i){}}},{key:"_viewStateToMapboxProps",value:function(t){return{center:[t.longitude,t.latitude],zoom:t.zoom,bearing:t.bearing,pitch:t.pitch}}}]),t}();(0,a.Z)(q,"initialized",!1),(0,a.Z)(q,"propTypes",H),(0,a.Z)(q,"defaultProps",W),(0,a.Z)(q,"savedMap",null);var X=n(6158),Y=n.n(X);function K(t){return Array.isArray(t)||ArrayBuffer.isView(t)}function Q(t,e){if(t===e)return!0;if(K(t)&&K(e)){if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(!Q(t[n],e[n]))return!1;return!0}return Math.abs(t-e)<=1e-7}function J(t,e,n){return Math.max(e,Math.min(n,t))}function tt(t,e,n){return K(t)?t.map((function(t,r){return tt(t,e[r],n)})):n*e+(1-n)*t}function et(t,e){if(!t)throw new Error(e||"react-map-gl: assertion failed.")}function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function rt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?nt(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var it={minZoom:0,maxZoom:24,minPitch:0,maxPitch:85},ot=0,st=0,at=1.5,ut=function(){function t(e){var n=e.width,r=e.height,i=e.latitude,o=e.longitude,s=e.zoom,a=e.bearing,u=void 0===a?st:a,c=e.pitch,l=void 0===c?ot:c,h=e.altitude,f=void 0===h?at:h,d=e.maxZoom,p=void 0===d?it.maxZoom:d,g=e.minZoom,m=void 0===g?it.minZoom:g,v=e.maxPitch,y=void 0===v?it.maxPitch:v,b=e.minPitch,_=void 0===b?it.minPitch:b,w=e.transitionDuration,x=e.transitionEasing,E=e.transitionInterpolator,T=e.transitionInterruption,P=e.startPanLngLat,A=e.startZoomLngLat,S=e.startRotatePos,M=e.startBearing,O=e.startPitch,C=e.startZoom;I(this,t),et(Number.isFinite(n),"`width` must be supplied"),et(Number.isFinite(r),"`height` must be supplied"),et(Number.isFinite(o),"`longitude` must be supplied"),et(Number.isFinite(i),"`latitude` must be supplied"),et(Number.isFinite(s),"`zoom` must be supplied"),this._viewportProps=this._applyConstraints({width:n,height:r,latitude:i,longitude:o,zoom:s,bearing:u,pitch:l,altitude:f,maxZoom:p,minZoom:m,maxPitch:y,minPitch:_,transitionDuration:w,transitionEasing:x,transitionInterpolator:E,transitionInterruption:T}),this._state={startPanLngLat:P,startZoomLngLat:A,startRotatePos:S,startBearing:M,startPitch:O,startZoom:C}}return D(t,[{key:"getViewportProps",value:function(){return this._viewportProps}},{key:"getState",value:function(){return this._state}},{key:"panStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startPanLngLat:this._unproject(e)})}},{key:"pan",value:function(t){var e=t.pos,n=t.startPos,r=this._state.startPanLngLat||this._unproject(n);if(!r)return this;var i=l(this._calculateNewLngLat({startPanLngLat:r,pos:e}),2),o=i[0],s=i[1];
1return this._getUpdatedMapState({longitude:o,latitude:s})}},{key:"panEnd",value:function(){return this._getUpdatedMapState({startPanLngLat:null})}},{key:"rotateStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startRotatePos:e,startBearing:this._viewportProps.bearing,startPitch:this._viewportProps.pitch})}},{key:"rotate",value:function(t){var e,n=t.pos,r=t.deltaAngleX,i=void 0===r?0:r,o=t.deltaAngleY,s=void 0===o?0:o,a=this._state,u=a.startRotatePos,c=a.startBearing,l=a.startPitch;return Number.isFinite(c)&&Number.isFinite(l)?(e=n?this._calculateNewPitchAndBearing(rt(rt({},this._getRotationParams(n,u)),{},{startBearing:c,startPitch:l})):{bearing:c+i,pitch:l+s},this._getUpdatedMapState(e)):this}},{key:"rotateEnd",value:function(){return this._getUpdatedMapState({startBearing:null,startPitch:null})}},{key:"zoomStart",value:function(t){var e=t.pos;return this._getUpdatedMapState({startZoomLngLat:this._unproject(e),startZoom:this._viewportProps.zoom})}},{key:"zoom",value:function(t){var e=t.pos,n=t.startPos,r=t.scale;et(r>0,"`scale` must be a positive number");var i=this._state,o=i.startZoom,s=i.startZoomLngLat;Number.isFinite(o)||(o=this._viewportProps.zoom,s=this._unproject(n)||this._unproject(e)),et(s,"`startZoomLngLat` prop is required for zoom behavior to calculate where to position the map.");var a=this._calculateNewZoom({scale:r,startZoom:o||0}),u=l(new h.DW(Object.assign({},this._viewportProps,{zoom:a})).getMapCenterByLngLatPosition({lngLat:s,pos:e}),2),c=u[0],f=u[1];return this._getUpdatedMapState({zoom:a,longitude:c,latitude:f})}},{key:"zoomEnd",value:function(){return this._getUpdatedMapState({startZoomLngLat:null,startZoom:null})}},{key:"_getUpdatedMapState",value:function(e){return new t(Object.assign({},this._viewportProps,this._state,e))}},{key:"_applyConstraints",value:function(t){var e=t.maxZoom,n=t.minZoom,r=t.zoom;t.zoom=J(r,n,e);var i=t.maxPitch,o=t.minPitch,s=t.pitch;return t.pitch=J(s,o,i),Object.assign(t,(0,h.QA)(t)),t}},{key:"_unproject",value:function(t){var e=new h.DW(this._viewportProps);return t&&e.unproject(t)}},{key:"_calculateNewLngLat",value:function(t){var e=t.startPanLngLat,n=t.pos;return new h.DW(this._viewportProps).getMapCenterByLngLatPosition({lngLat:e,pos:n})}},{key:"_calculateNewZoom",value:function(t){var e=t.scale,n=t.startZoom,r=this._viewportProps,i=r.maxZoom,o=r.minZoom;return J(n+Math.log2(e),o,i)}},{key:"_calculateNewPitchAndBearing",value:function(t){var e=t.deltaScaleX,n=t.deltaScaleY,r=t.startBearing,i=t.startPitch;n=J(n,-1,1);var o=this._viewportProps,s=o.minPitch,a=o.maxPitch,u=i;return n>0?u=i+n*(a-i):n<0&&(u=i-n*(s-i)),{pitch:u,bearing:r+180*e}}},{key:"_getRotationParams",value:function(t,e){var n=t[0]-e[0],r=t[1]-e[1],i=t[1],o=e[1],s=this._viewportProps,a=s.width,u=s.height,c=n/a,l=0;return r>0?Math.abs(u-o)>5&&(l=r/(o-u)*1.2):r<0&&o>5&&(l=1-i/o),{deltaScaleX:c,deltaScaleY:l=Math.min(1,Math.max(-1,l))}}}]),t}();function ct(t){return t[0].toLowerCase()+t.slice(1)}function lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ht(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?lt(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ft=(0,u.createContext)({viewport:null,map:null,container:null,onViewportChange:null,onViewStateChange:null,eventManager:null}),dt=ft.Provider;ft.Provider=function(t){var e=t.value,n=t.children,r=l((0,u.useState)(null),2),i=r[0],o=r[1],s=(0,u.useContext)(ft);return e=ht(ht({setMap:o},s),{},{map:s&&s.map||i},e),u.createElement(dt,{value:e},n)};var pt=ft,gt="undefined"!==typeof window?u.useLayoutEffect:u.useEffect;function mt(t,e){var n=e.longitude,r=e.latitude;return t&&t.queryTerrainElevation&&t.queryTerrainElevation([n,r])||0}function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function yt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
vendor: 4,376 bytes, line 1
1e%2?vt(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var bt="A valid API access token is required to use Mapbox data";function _t(t){var e=t.map,n=t.props,r=t.width,i=t.height,o=yt(yt(yt({},n),n.viewState),{},{width:r,height:i});return o.position=[0,0,mt(e,o)],new h.DW(o)}var wt={position:"absolute",width:"100%",height:"100%",overflow:"hidden"},xt=Object.assign({},q.propTypes,{width:c.oneOfType([c.number,c.string]),height:c.oneOfType([c.number,c.string]),onResize:c.func,disableTokenWarning:c.bool,visible:c.bool,className:c.string,style:c.object,visibilityConstraints:c.object}),Et=Object.assign({},q.defaultProps,{disableTokenWarning:!1,visible:!0,onResize:function(){},className:"",style:null,visibilityConstraints:it});function Tt(){return u.createElement("div",{key:"warning",id:"no-token-warning",style:{position:"absolute",left:0,top:0}},u.createElement("h3",{key:"header"},bt),u.createElement("div",{key:"text"},"For information on setting up your basemap, read"),u.createElement("a",{key:"link",href:"https://visgl.github.io/react-map-gl/docs/get-started/mapbox-tokens"},"Note on Map Tokens"))}var Pt=(0,u.forwardRef)((function(t,e){var n=l((0,u.useState)(!0),2),r=n[0],i=n[1],o=l((0,u.useState)({width:0,height:0}),2),s=o[0],a=o[1],c=(0,u.useRef)(null),h=(0,u.useRef)(null),f=(0,u.useRef)(null),d=(0,u.useRef)(null),p=(0,u.useContext)(pt);gt((function(){if(Pt.supported()){var e=new q(yt(yt(yt({},t),s),{},{mapboxgl:Y(),container:h.current,onError:function(e){401===(e.error&&e.error.status||e.status)&&r&&(console.error(bt),i(!1)),t.onError(e)}}));c.current=e,p&&p.setMap&&p.setMap(e.getMap());var n=new R((function(e){if(e[0].contentRect){var n=e[0].contentRect,r=n.width,i=n.height;a({width:r,height:i}),t.onResize({width:r,height:i})}}));return n.observe(f.current),function(){e.finalize(),c.current=null,n.disconnect()}}}),[]),gt((function(){c.current&&c.current.setProps(yt(yt({},t),s))}));var g=c.current&&c.current.getMap();(0,u.useImperativeHandle)(e,(function(){return function(t){return{getMap:function(){return t.current&&t.current.getMap()},queryRenderedFeatures:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.current&&t.current.getMap();return r&&r.queryRenderedFeatures(e,n)}}}(c)}),[]);var m=(0,u.useCallback)((function(t){var e=t.target;e===d.current&&e.scrollTo(0,0)}),[]),v=g&&u.createElement(dt,{value:yt(yt({},p),{},{viewport:p.viewport||_t(yt({map:g,props:t},s)),map:g,container:p.container||f.current})},u.createElement("div",{key:"map-overlays",className:"overlays",ref:d,style:wt,onScroll:m},t.children)),y=t.className,b=t.width,_=t.height,w=t.style,x=t.visibilityConstraints,E=Object.assign({position:"relative"},w,{width:b,height:_}),T=t.visible&&function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it;for(var n in e){var r=n.slice(0,3),i=ct(n.slice(3));if("min"===r&&t[i]<e[n])return!1;if("max"===r&&t[i]>e[n])return!1}return!0}(t.viewState||t,x),P=Object.assign({},wt,{visibility:T?"inherit":"hidden"});return u.createElement("div",{key:"map-container",ref:f,style:E},u.createElement("div",{key:"map-mapbox",ref:h,style:P,className:y}),v,!r&&!t.disableTokenWarning&&u.createElement(Tt,null))}));Pt.supported=function(){return Y()&&Y().supported()},Pt.propTypes=xt,Pt.defaultProps=Et;var At=Pt;function St(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Mt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mt(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t}
1,f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ot=function(){function t(){I(this,t),(0,a.Z)(this,"propNames",[])}return D(t,[{key:"arePropsEqual",value:function(t,e){var n,r=St(this.propNames||[]);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(!Q(t[i],e[i]))return!1}}catch(o){r.e(o)}finally{r.f()}return!0}},{key:"initializeProps",value:function(t,e){return{start:t,end:e}}},{key:"interpolateProps",value:function(t,e,n){et(!1,"interpolateProps is not implemented")}},{key:"getDuration",value:function(t,e){return e.transitionDuration}}]),t}();function Ct(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Lt(t,e){return(Lt=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function kt(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Lt(t,e)}function Rt(t){return(Rt="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})(t)}function It(t,e){if(e&&("object"===Rt(e)||"function"===typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Ct(t)}function jt(t){return(jt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Dt={longitude:1,bearing:1};function Nt(t){return Number.isFinite(t)||Array.isArray(t)}function Ft(t,e,n){return function(t){return t in Dt}(t)&&Math.abs(n-e)>180&&(n=n<0?n+360:n-360),n}function Bt(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return Ut(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ut(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Ut(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function zt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jt(t);if(e){var i=jt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return It(this,n)}}var Vt=["longitude","latitude","zoom","bearing","pitch"],Zt=["latitude","longitude","zoom","width","height"],Gt=["bearing","pitch"],Ht={speed:1.2,curve:1.414};!function(t){kt(n,t);var e=zt(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I(this,n),t=e.call(this),(0,a.Z)(Ct(t),"propNames",Vt),t.props=Object.assign({},Ht,r),t}D(n,[{key:"initializeProps",value:function(t,e){var n,r={},i={},o=Bt(Zt);try{for(o.s();!(n=o.n()).done;){var s=n.value,a=t[s],u=e[s];et(Nt(a)&&Nt(u),"".concat(s," must be supplied for transition")),r[s]=a,i[s]=Ft(s,a,u)}}catch(p){o.e(p)}finally{o.f()}var c,l=Bt(Gt);try{for(l.s();!(c=l.n()).done;){var h=c.value,f=t[h]||0,d=e[h]||0;r[h]=f,i[h]=Ft(h,f,d)}}catch(p){l.e(p)}finally{l.f()}return{start:r,end:i}}},{key:"interpolateProps",value:function(t,e,n){var r,i=(0,h.if)(t,e,n,this.props),o=Bt(Gt);try{for(o.s();!(r=o.n()).done;){var s=r.value;i[s]=tt(t[s],e[s],n)}}catch(a){o.e(a)}finally{o.f()}return i}},{key:"getDuration",value:function(t,e){var n=e.transitionDuration;return"auto"===n&&(n=(0,h.up)(t,e,this.props)),n}}])}(Ot);function Wt(t,e){var n;if("undefined"===typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"===typeof t)return $t(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $t(t,e)}(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,o=t}
vendor: 28,826 bytes, line 1
1,f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function $t(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qt(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jt(t);if(e){var i=jt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return It(this,n)}}var Xt=["longitude","latitude","zoom","bearing","pitch"],Yt=function(t){kt(n,t);var e=qt(n);function n(){var t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I(this,n),t=e.call(this),Array.isArray(r)&&(r={transitionProps:r}),t.propNames=r.transitionProps||Xt,r.around&&(t.around=r.around),t}return D(n,[{key:"initializeProps",value:function(t,e){var n={},r={};if(this.around){n.around=this.around;var i=new h.DW(t).unproject(this.around);Object.assign(r,e,{around:new h.DW(e).project(i),aroundLngLat:i})}var o,s=Wt(this.propNames);try{for(s.s();!(o=s.n()).done;){var a=o.value,u=t[a],c=e[a];et(Nt(u)&&Nt(c),"".concat(a," must be supplied for transition")),n[a]=u,r[a]=Ft(a,u,c)}}catch(l){s.e(l)}finally{s.f()}return{start:n,end:r}}},{key:"interpolateProps",value:function(t,e,n){var r,i={},o=Wt(this.propNames);try{for(o.s();!(r=o.n()).done;){var s=r.value;i[s]=tt(t[s],e[s],n)}}catch(f){o.e(f)}finally{o.f()}if(e.around){var a=l(new h.DW(Object.assign({},e,i)).getMapCenterByLngLatPosition({lngLat:e.aroundLngLat,pos:tt(t.around,e.around,n)}),2),u=a[0],c=a[1];i.longitude=u,i.latitude=c}return i}}]),n}(Ot),Kt=function(){};var Qt=1,Jt=2,te=3,ee=4,ne={transitionDuration:0,transitionEasing:function(t){return t},transitionInterpolator:new Yt,transitionInterruption:Qt,onTransitionStart:Kt,onTransitionInterrupt:Kt,onTransitionEnd:Kt},re=function(){function t(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};I(this,t),(0,a.Z)(this,"_animationFrame",null),(0,a.Z)(this,"_onTransitionFrame",(function(){e._animationFrame=requestAnimationFrame(e._onTransitionFrame),e._updateViewport()})),this.props=null,this.onViewportChange=n.onViewportChange||Kt,this.onStateChange=n.onStateChange||Kt,this.time=n.getTime||Date.now}return D(t,[{key:"getViewportInTransition",value:function(){return this._animationFrame?this.state.propsInTransition:null}},{key:"processViewportChange",value:function(t){var e=this.props;if(this.props=t,!e||this._shouldIgnoreViewportChange(e,t))return!1;if(this._isTransitionEnabled(t)){var n=Object.assign({},e),r=Object.assign({},t);if(this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this.state.interruption===Jt?Object.assign(n,this.state.endProps):Object.assign(n,this.state.propsInTransition),this.state.interruption===ee)){var i=this.time(),o=(i-this.state.startTime)/this.state.duration;r.transitionDuration=this.state.duration-(i-this.state.startTime),r.transitionEasing=function(t,e){var n=t(e);return function(r){return 1/(1-n)*(t(r*(1-e)+e)-n)}}(this.state.easing,o),r.transitionInterpolator=n.transitionInterpolator}return r.onTransitionStart(),this._triggerTransition(n,r),!0}return this._isTransitionInProgress()&&(e.onTransitionInterrupt(),this._endTransition()),!1}},{key:"_isTransitionInProgress",value:function(){return Boolean(this._animationFrame)}},{key:"_isTransitionEnabled",value:function(t){var e=t.transitionDuration,n=t.transitionInterpolator;return(e>0||"auto"===e)&&Boolean(n)}},{key:"_isUpdateDueToCurrentTransition",value:function(t){return!!this.state.propsInTransition&&this.state.interpolator.arePropsEqual(t,this.state.propsInTransition)}},{key:"_shouldIgnoreViewportChange",value:function(t,e){return!t||(this._isTransitionInProgress()?this.state.interruption===te||this._isUpdateDueToCurrentTransition(e):!this._isTransitionEnabled(e)||e.transitionInterpolator.arePropsEqual(t,e))}},{key:"_triggerTransition",value:function(t,e){et(this._isTransitionEnabled(e)),this._animationFrame&&cancelAnimationFrame(this._animationFrame);var n=e.transitionInterpolator,r=n.getDuration?n.getDuration(t,e):e.transitionDuration;if(0!==r){var i=e.transitionInterpolator.initializeProps(t,e),o={inTransition:!0,isZooming:t.zoom!==e.zoom,isPanning:t.longitude!==e.longitude||t.latitude!==e.latitude,isRotating:t.bearing!==e.bearing||t.pitch!==e.pitch};this.state={duration:r,easing:e.transitionEasing,interpolator:e.transitionInterpolator,interruption:e.transitionInterruption,startTime:this.time(),startProps:i.start,endProps:i.end,animation:null,propsInTransition:{}},this._onTransitionFrame(),this.onStateChange(o)}}},{key:"_endTransition",value:function(){this._animationFrame&&(cancelAnimationFrame(this._animationFrame),this._animationFrame=null),this.onStateChange({inTransition:!1,isZooming:!1,isPanning:!1,isRotating:!1})}},{key:"_updateViewport",value:function(){var t=this.time(),e=this.state,n=e.startTime,r=e.duration,i=e.easing,o=e.interpolator,s=e.startProps,a=e.endProps,u=!1,c=(t-n)/r;c>=1&&(c=1,u=!0),c=i(c);var l=o.interpolateProps(s,a,c),h=new ut(Object.assign({},this.props,l));this.state.propsInTransition=h.getViewportProps(),this.onViewportChange(this.state.propsInTransition,this.props),u&&(this._endTransition(),this.props.onTransitionEnd())}}]),t}();(0,a.Z)(re,"defaultProps",ne);var ie=n(2317);function oe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function se(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?oe(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):oe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var ae={transitionDuration:0},ue={transitionDuration:300,transitionEasing:function(t){return t},transitionInterpolator:new Yt,transitionInterruption:Qt},ce=300,le=function(t){return 1-(1-t)*(1-t)},he=["wheel"],fe=["panstart","panmove","panend"],de=["pinchstart","pinchmove","pinchend"],pe=["tripanstart","tripanmove","tripanend"],ge=["doubletap"],me=["keydown"],ve=function(){function t(){var e=this;I(this,t),(0,a.Z)(this,"events",[]),(0,a.Z)(this,"scrollZoom",!0),(0,a.Z)(this,"dragPan",!0),(0,a.Z)(this,"dragRotate",!0),(0,a.Z)(this,"doubleClickZoom",!0),(0,a.Z)(this,"touchZoom",!0),(0,a.Z)(this,"touchRotate",!1),(0,a.Z)(this,"keyboard",!0),(0,a.Z)(this,"_interactionState",{isDragging:!1}),(0,a.Z)(this,"_events",{}),(0,a.Z)(this,"_setInteractionState",(function(t){Object.assign(e._interactionState,t),e.onStateChange&&e.onStateChange(e._interactionState)})),(0,a.Z)(this,"_onTransition",(function(t,n){e.onViewportChange(t,e._interactionState,n)})),this.handleEvent=this.handleEvent.bind(this),this._transitionManager=new re({onViewportChange:this._onTransition,onStateChange:this._setInteractionState})}return D(t,[{key:"handleEvent",value:function(t){this.mapState=this.getMapState();var e=this._eventStartBlocked;switch(t.type){case"panstart":return!e&&this._onPanStart(t);case"panmove":return this._onPan(t);case"panend":return this._onPanEnd(t);case"pinchstart":return!e&&this._onPinchStart(t);case"pinchmove":return this._onPinch(t);case"pinchend":return this._onPinchEnd(t);case"tripanstart":return!e&&this._onTriplePanStart(t);case"tripanmove":return this._onTriplePan(t);case"tripanend":return this._onTriplePanEnd(t);case"doubletap":return this._onDoubleTap(t);case"wheel":return this._onWheel(t);case"keydown":return this._onKeyDown(t);default:return!1}}},{key:"getCenter",value:function(t){var e=t.offsetCenter;return[e.x,e.y]}},{key:"isFunctionKeyPressed",value:function(t){var e=t.srcEvent;return Boolean(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}},{key:"blockEvents",value:function(t){var e=this,n=setTimeout((function(){e._eventStartBlocked===n&&(e._eventStartBlocked=null)}),t);this._eventStartBlocked=n}},{key:"updateViewport",value:function(t,e,n){var r=this.mapState instanceof ut?this.mapState.getViewportProps():this.mapState,i=se(se({},t.getViewportProps()),e),o=Object.keys(i).some((function(t){return r[t]!==i[t]}));this._state=t.getState(),this._setInteractionState(n),o&&this.onViewportChange(i,this._interactionState,r)}},{key:"getMapState",value:function(t){return new ut(se(se(se({},this.mapStateProps),this._state),t))}},{key:"isDragging",value:function(){return this._interactionState.isDragging}},{key:"setOptions",value:function(t){var e=t.onViewportChange,n=t.onStateChange,r=t.eventManager,i=void 0===r?this.eventManager:r,o=t.isInteractive,s=void 0===o||o,a=t.scrollZoom,u=void 0===a?this.scrollZoom:a,c=t.dragPan,l=void 0===c?this.dragPan:c,h=t.dragRotate,f=void 0===h?this.dragRotate:h,d=t.doubleClickZoom,p=void 0===d?this.doubleClickZoom:d,g=t.touchZoom,m=void 0===g?this.touchZoom:g,v=t.touchRotate,y=void 0===v?this.touchRotate:v,b=t.keyboard,_=void 0===b?this.keyboard:b;this.onViewportChange=e,this.onStateChange=n;var w=this.mapStateProps||{},x=w.height!==t.height||w.width!==t.width;this.mapStateProps=t,x&&(this.mapState=w,this.updateViewport(new ut(t))),this._transitionManager.processViewportChange(t),this.eventManager!==i&&(this.eventManager=i,this._events={},this.toggleEvents(this.events,!0)),this.toggleEvents(he,s&&Boolean(u)),this.toggleEvents(fe,s&&Boolean(l||f)),this.toggleEvents(de,s&&Boolean(m||y)),this.toggleEvents(pe,s&&Boolean(y)),this.toggleEvents(ge,s&&Boolean(p)),this.toggleEvents(me,s&&Boolean(_)),this.scrollZoom=u,this.dragPan=l,this.dragRotate=f,this.doubleClickZoom=p,this.touchZoom=m,this.touchRotate=y,this.keyboard=_}},{key:"toggleEvents",value:function(t,e){var n=this;this.eventManager&&t.forEach((function(t){n._events[t]!==e&&(n._events[t]=e,e?n.eventManager.on(t,n.handleEvent):n.eventManager.off(t,n.handleEvent))}))}},{key:"_onPanStart",value:function(t){var e=this.getCenter(t);this._panRotate=this.isFunctionKeyPressed(t)||t.rightButton;var n=this._panRotate?this.mapState.rotateStart({pos:e}):this.mapState.panStart({pos:e});return this.updateViewport(n,ae,{isDragging:!0}),!0}},{key:"_onPan",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotate(t):this._onPanMove(t))}},{key:"_onPanEnd",value:function(t){return!!this.isDragging()&&(this._panRotate?this._onPanRotateEnd(t):this._onPanMoveEnd(t))}},{key:"_onPanMove",value:function(t){if(!this.dragPan)return!1;var e=this.getCenter(t),n=this.mapState.pan({pos:e});return this.updateViewport(n,ae,{isPanning:!0}),!0}},{key:"_onPanMoveEnd",value:function(t){if(this.dragPan){var e=this.dragPan.inertia,n=void 0===e?ce:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.pan({pos:i}).panEnd();return this.updateViewport(o,se(se({},ue),{},{transitionDuration:n,transitionEasing:le}),{isDragging:!1,isPanning:!0}),!0}}var s=this.mapState.panEnd();return this.updateViewport(s,null,{isDragging:!1,isPanning:!1}),!0}},{key:"_onPanRotate",value:function(t){if(!this.dragRotate)return!1;var e=this.getCenter(t),n=this.mapState.rotate({pos:e});return this.updateViewport(n,ae,{isRotating:!0}),!0}},{key:"_onPanRotateEnd",value:function(t){if(this.dragRotate){var e=this.dragRotate.inertia,n=void 0===e?ce:e;if(n&&t.velocity){var r=this.getCenter(t),i=[r[0]+t.velocityX*n/2,r[1]+t.velocityY*n/2],o=this.mapState.rotate({pos:i}).rotateEnd();return this.updateViewport(o,se(se({},ue),{},{transitionDuration:n,transitionEasing:le}),{isDragging:!1,isRotating:!0}),!0}}var s=this.mapState.panEnd();return this.updateViewport(s,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onWheel",value:function(t){if(!this.scrollZoom)return!1;var e=this.scrollZoom,n=e.speed,r=void 0===n?.01:n,i=e.smooth,o=void 0!==i&&i;t.preventDefault();var s=this.getCenter(t),a=t.delta,u=2/(1+Math.exp(-Math.abs(a*r)));a<0&&0!==u&&(u=1/u);var c=this.mapState.zoom({pos:s,scale:u});return c.getViewportProps().zoom!==this.mapStateProps.zoom&&(this.updateViewport(c,se(se({},ue),{},{transitionInterpolator:new Yt({around:s}),transitionDuration:o?250:1}),{isPanning:!0,isZooming:!0}),!0)}},{key:"_onPinchStart",value:function(t){var e=this.getCenter(t),n=this.mapState.zoomStart({pos:e}).rotateStart({pos:e});return this._startPinchRotation=t.rotation,this._lastPinchEvent=t,this.updateViewport(n,ae,{isDragging:!0}),!0}},{key:"_onPinch",value:function(t){if(!this.isDragging())return!1;if(!this.touchZoom&&!this.touchRotate)return!1;var e=this.mapState;if(this.touchZoom){var n=t.scale,r=this.getCenter(t);e=e.zoom({pos:r,scale:n})}if(this.touchRotate){var i=t.rotation;e=e.rotate({deltaAngleX:this._startPinchRotation-i})}return this.updateViewport(e,ae,{isDragging:!0,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:Boolean(this.touchRotate)}),this._lastPinchEvent=t,!0}},{key:"_onPinchEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchZoom){var e=this.touchZoom.inertia,n=void 0===e?ce:e,r=this._lastPinchEvent;if(n&&r&&t.scale!==r.scale){var i=this.getCenter(t),o=this.mapState.rotateEnd(),s=Math.log2(t.scale),a=(s-Math.log2(r.scale))/(t.deltaTime-r.deltaTime),u=Math.pow(2,s+a*n/2);return o=o.zoom({pos:i,scale:u}).zoomEnd(),this.updateViewport(o,se(se({},ue),{},{transitionInterpolator:new Yt({around:i}),transitionDuration:n,transitionEasing:le}),{isDragging:!1,isPanning:Boolean(this.touchZoom),isZooming:Boolean(this.touchZoom),isRotating:!1}),this.blockEvents(n),!0}}var c=this.mapState.zoomEnd().rotateEnd();return this._state.startPinchRotation=0,this.updateViewport(c,null,{isDragging:!1,isPanning:!1,isZooming:!1,isRotating:!1}),this._startPinchRotation=null,this._lastPinchEvent=null,!0}},{key:"_onTriplePanStart",value:function(t){var e=this.getCenter(t),n=this.mapState.rotateStart({pos:e});return this.updateViewport(n,ae,{isDragging:!0}),!0}},{key:"_onTriplePan",value:function(t){if(!this.isDragging())return!1;if(!this.touchRotate)return!1;var e=this.getCenter(t);e[0]-=t.deltaX;var n=this.mapState.rotate({pos:e});return this.updateViewport(n,ae,{isRotating:!0}),!0}},{key:"_onTriplePanEnd",value:function(t){if(!this.isDragging())return!1;if(this.touchRotate){var e=this.touchRotate.inertia,n=void 0===e?ce:e;if(n&&t.velocityY){var r=this.getCenter(t),i=[r[0],r[1]+=t.velocityY*n/2],o=this.mapState.rotate({pos:i});return this.updateViewport(o,se(se({},ue),{},{transitionDuration:n,transitionEasing:le}),{isDragging:!1,isRotating:!0}),this.blockEvents(n),!1}}var s=this.mapState.rotateEnd();return this.updateViewport(s,null,{isDragging:!1,isRotating:!1}),!0}},{key:"_onDoubleTap",value:function(t){if(!this.doubleClickZoom)return!1;var e=this.getCenter(t),n=this.isFunctionKeyPressed(t),r=this.mapState.zoom({pos:e,scale:n?.5:2});return this.updateViewport(r,Object.assign({},ue,{transitionInterpolator:new Yt({around:e})}),{isZooming:!0}),!0}},{key:"_onKeyDown",value:function(t){if(!this.keyboard)return!1;var e,n=this.isFunctionKeyPressed(t),r=this.keyboard,i=r.zoomSpeed,o=void 0===i?2:i,s=r.moveSpeed,a=void 0===s?100:s,u=r.rotateSpeedX,c=void 0===u?15:u,l=r.rotateSpeedY,h=void 0===l?10:l,f=this.mapStateProps;switch(t.srcEvent.keyCode){case 189:e=n?this.getMapState({zoom:f.zoom-Math.log2(o)-1}):this.getMapState({zoom:f.zoom-Math.log2(o)});break;case 187:e=n?this.getMapState({zoom:f.zoom+Math.log2(o)+1}):this.getMapState({zoom:f.zoom+Math.log2(o)});break;case 37:e=n?this.getMapState({bearing:f.bearing-c}):this.mapState.pan({pos:[a,0],startPos:[0,0]});break;case 39:e=n?this.getMapState({bearing:f.bearing+c}):this.mapState.pan({pos:[-a,0],startPos:[0,0]});break;case 38:e=n?this.getMapState({pitch:f.pitch+h}):this.mapState.pan({pos:[0,a],startPos:[0,0]});break;case 40:e=n?this.getMapState({pitch:f.pitch-h}):this.mapState.pan({pos:[0,-a],startPos:[0,0]});break;default:return!1}return this.updateViewport(e,ue)}}]),t}();function ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function be(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var _e=Object.assign({},At.propTypes,{maxZoom:c.number,minZoom:c.number,maxPitch:c.number,minPitch:c.number,onViewStateChange:c.func,onViewportChange:c.func,onInteractionStateChange:c.func,transitionDuration:c.oneOfType([c.number,c.string]),transitionInterpolator:c.object,transitionInterruption:c.number,transitionEasing:c.func,onTransitionStart:c.func,onTransitionInterrupt:c.func,onTransitionEnd:c.func,scrollZoom:c.oneOfType([c.bool,c.object]),dragPan:c.oneOfType([c.bool,c.object]),dragRotate:c.oneOfType([c.bool,c.object]),doubleClickZoom:c.bool,touchZoom:c.oneOfType([c.bool,c.object]),touchRotate:c.oneOfType([c.bool,c.object]),keyboard:c.oneOfType([c.bool,c.object]),onHover:c.func,onClick:c.func,onDblClick:c.func,onContextMenu:c.func,onMouseDown:c.func,onMouseMove:c.func,onMouseUp:c.func,onTouchStart:c.func,onTouchMove:c.func,onTouchEnd:c.func,onMouseEnter:c.func,onMouseLeave:c.func,onMouseOut:c.func,onWheel:c.func,touchAction:c.string,eventRecognizerOptions:c.object,clickRadius:c.number,interactiveLayerIds:c.array,getCursor:c.func,controller:c.instanceOf(ve)}),we=Object.assign({},At.defaultProps,it,re.defaultProps,{onViewStateChange:null,onViewportChange:null,onClick:null,onNativeClick:null,onHover:null,onContextMenu:function(t){return t.preventDefault()},scrollZoom:!0,dragPan:!0,dragRotate:!0,doubleClickZoom:!0,touchZoom:!0,touchRotate:!1,keyboard:!0,touchAction:"none",eventRecognizerOptions:{},clickRadius:0,getCursor:function(t){var e=t.isDragging,n=t.isHovering;return e?"grabbing":n?"pointer":"grab"}});function xe(t){if(t.lngLat||!t.offsetCenter)return t;var e=t.offsetCenter,n=e.x,r=e.y;if(!Number.isFinite(n)||!Number.isFinite(r))return t;var i=[n,r];t.point=i;var o=this.viewport,s=o.unproject(i,{targetZ:o.meterOffset[2]});return t.lngLat=[s[0],s[1]],t}function Ee(t){var e=this.map;if(!e||!t)return null;var n={},r=this.props.clickRadius;this.props.interactiveLayerIds&&(n.layers=this.props.interactiveLayerIds);try{return e.queryRenderedFeatures(r?[[t[0]-r,t[1]+r],[t[0]+r,t[1]-r]]:t,n)}catch(i){return null}}function Te(t,e){var n=this.props[t];n&&n(xe.call(this,e))}function Pe(t){Te.call(this,"touch"===t.pointerType?"onTouchStart":"onMouseDown",t)}function Ae(t){Te.call(this,"touch"===t.pointerType?"onTouchEnd":"onMouseUp",t)}function Se(t){if(Te.call(this,"touch"===t.pointerType?"onTouchMove":"onMouseMove",t),!this.state.isDragging){var e,n=this.props,r=n.onHover,i=n.interactiveLayerIds;t=xe.call(this,t),(i||r)&&(e=Ee.call(this,t.point));var o=Boolean(i&&e&&e.length>0),s=o&&!this.state.isHovering,a=!o&&this.state.isHovering;(r||s)&&(t.features=e,r&&r(t)),s&&Te.call(this,"onMouseEnter",t),a&&Te.call(this,"onMouseLeave",t),(s||a)&&this.setState({isHovering:o})}}function Me(t){var e=this.props,n=e.onClick,r=e.onNativeClick,i=e.onDblClick,o=e.doubleClickZoom,s=[],a=i||o;switch(t.type){case"anyclick":s.push(r),a||s.push(n);break;case"click":a&&s.push(n)}(s=s.filter(Boolean)).length&&((t=xe.call(this,t)).features=Ee.call(this,t.point),s.forEach((function(e){return e(t)})))}var Oe=(0,u.forwardRef)((function(t,e){var n=(0,u.useContext)(pt),i=(0,u.useMemo)((function(){return t.controller||new ve}),[]),o=(0,u.useMemo)((function(){return new ie.Q(null,{touchAction:t.touchAction,recognizerOptions:t.eventRecognizerOptions})}),[]),a=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)({width:0,height:0,state:{isHovering:!1,isDragging:!1}}).current;l.props=t,l.map=c.current&&c.current.getMap(),l.setState=function(e){l.state=be(be({},l.state),e),a.current.style.cursor=t.getCursor(l.state)};var h,f,d=!0,p=function(t,e,n){if(d)h=[t,e,n];else{var r=l.props,i=r.onViewStateChange,o=r.onViewportChange;Object.defineProperty(t,"position",{get:function(){return[0,0,mt(l.map,t)]}}),i&&i({viewState:t,interactionState:e,oldViewState:n}),o&&o(t,e,n)}};(0,u.useImperativeHandle)(e,(function(){return function(t){return{getMap:t.current&&t.current.getMap,queryRenderedFeatures:t.current&&t.current.queryRenderedFeatures}}(c)}),[]);var g=(0,u.useMemo)((function(){return be(be({},n),{},{eventManager:o,container:n.container||a.current})}),[n,a.current]);g.onViewportChange=p,g.viewport=n.viewport||_t(l),l.viewport=g.viewport;var m=function(t){var e=t.isDragging,n=void 0!==e&&e;if(n!==l.state.isDragging&&l.setState({isDragging:n}),d)f=t;else{var r=l.props.onInteractionStateChange;r&&r(t)}},v=function(){l.width&&l.height&&i.setOptions(be(be(be({},l.props),l.props.viewState),{},{isInteractive:Boolean(l.props.onViewStateChange||l.props.onViewportChange),onViewportChange:p,onStateChange:m,eventManager:o,width:l.width,height:l.height}))};(0,u.useEffect)((function(){return o.setElement(a.current),o.on({pointerdown:Pe.bind(l),pointermove:Se.bind(l),pointerup:Ae.bind(l),pointerleave:Te.bind(l,"onMouseOut"),click:Me.bind(l),anyclick:Me.bind(l),dblclick:Te.bind(l,"onDblClick"),wheel:Te.bind(l,"onWheel"),contextmenu:Te.bind(l,"onContextMenu")}),function(){o.destroy()}}),[]),gt((function(){h&&p.apply(void 0,s(h)),f&&m(f)})),v();var y=t.width,b=t.height,_=t.style,w=t.getCursor,x=(0,u.useMemo)((function(){return be(be({position:"relative"},_),{},{width:y,height:b,cursor:w(l.state)})}),[_,y,b,w,l.state]);return h&&l._child||(l._child=u.createElement(dt,{value:g},u.createElement("div",{key:"event-canvas",ref:a,style:x},u.createElement(At,(0,r.Z)({},t,{width:"100%",height:"100%",style:null,onResize:function(t){var e=t.width,n=t.height;l.width=e,l.height=n,v(),l.props.onResize({width:e,height:n})},ref:c}))))),d=!1,l._child}));Oe.supported=At.supported,Oe.propTypes=_e,Oe.defaultProps=we;function Ce(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!Ce(t[n],e[n]))return!1;return!0}if(Array.isArray(e))return!1;if("object"===Rt(t)&&"object"===Rt(e)){var r=Object.keys(t),i=Object.keys(e);if(r.length!==i.length)return!1;for(var o=0,s=r;o<s.length;o++){var a=s[o];if(!e.hasOwnProperty(a))return!1;if(!Ce(t[a],e[a]))return!1}return!0}return!1}function Le(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var ke={type:c.string.isRequired,id:c.string},Re=0;function Ie(t,e,n){if(t.style&&t.style._loaded){var r=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Le(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},n);return delete r.id,delete r.children,t.addSource(e,r),t.getSource(e)}return null}function je(t){var e=(0,u.useContext)(pt),n=(0,u.useRef)({id:t.id,type:t.type}),r=l((0,u.useState)(0),2)[1],i=(0,u.useMemo)((function(){return t.id||"jsx-source-".concat(Re++)}),[]),o=e.map;(0,u.useEffect)((function(){if(o){var t=function(){return r((function(t){return t+1}))};return o.on("styledata",t),function(){o.off("styledata",t),requestAnimationFrame((function(){o.style&&o.style._loaded&&o.getSource(i)&&o.removeSource(i)}))}}}),[o,i]);var s=o&&o.style&&o.getSource(i);return s?function(t,e,n){et(e.id===n.id,"source id changed"),et(e.type===n.type,"source type changed");var r="",i=0;for(var o in e)"children"===o||"id"===o||Ce(n[o],e[o])||(r=o,i++);if(i){var s=e.type;if("geojson"===s)t.setData(e.data);else if("image"===s)t.updateImage({url:e.url,coordinates:e.coordinates});else if("canvas"!==s&&"video"!==s||1!==i||"coordinates"!==r)if("vector"===s&&t.setUrl)switch(r){case"url":t.setUrl(e.url);break;case"tiles":t.setTiles(e.tiles)}else console.warn("Unable to update <Source> prop: ".concat(r));else t.setCoordinates(e.coordinates)}}(s,t,n.current):s=Ie(o,i,t),n.current=t,s&&u.Children.map(t.children,(function(t){return t&&(0,u.cloneElement)(t,{source:i})}))||null}je.propTypes=ke;function De(t,e){if(null==t)return{};var n,r,i=function(t,e){if(null==t)return{};var n,r,i={},o=Object.keys(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)n=o[r],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function Ne(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Fe(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ne(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ne(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Be={type:c.oneOf(["fill","line","symbol","circle","fill-extrusion","raster","background","heatmap","hillshade","sky"]).isRequired,id:c.string,source:c.string,beforeId:c.string};function Ue(t,e,n,r){et(n.id===r.id,"layer id changed"),et(n.type===r.type,"layer type changed");try{!function(t,e,n,r){var i=n.layout,o=void 0===i?{}:i,s=n.paint,a=void 0===s?{}:s,u=n.filter,c=n.minzoom,l=n.maxzoom,h=n.beforeId,f=De(n,["layout","paint","filter","minzoom","maxzoom","beforeId"]);if(h!==r.beforeId&&t.moveLayer(e,h),o!==r.layout){var d=r.layout||{};for(var p in o)Ce(o[p],d[p])||t.setLayoutProperty(e,p,o[p]);for(var g in d)o.hasOwnProperty(g)||t.setLayoutProperty(e,g,void 0)}if(a!==r.paint){var m=r.paint||{};for(var v in a)Ce(a[v],m[v])||t.setPaintProperty(e,v,a[v]);for(var y in m)a.hasOwnProperty(y)||t.setPaintProperty(e,y,void 0)}for(var b in Ce(u,r.filter)||t.setFilter(e,u),c===r.minzoom&&l===r.maxzoom||t.setLayerZoomRange(e,c,l),f)Ce(f[b],r[b])||t.setLayerProperty(e,b,f[b])}(t,e,n,r)}catch(i){console.warn(i)}}var ze=0;function Ve(t){var e=(0,u.useContext)(pt),n=(0,u.useRef)({id:t.id,type:t.type}),r=l((0,u.useState)(0),2)[1],i=(0,u.useMemo)((function(){return t.id||"jsx-layer-".concat(ze++)}),[]),o=e.map;return(0,u.useEffect)((function(){if(o){var t=function(){return r((function(t){return t+1}))};return o.on("styledata",t),function(){o.off("styledata",t),o.style&&o.style._loaded&&o.removeLayer(i)}}}),[o]),o&&o.style&&o.getLayer(i)?Ue(o,i,t,n.current):function(t,e,n){if(t.style&&t.style._loaded){var r=Fe(Fe({},n),{},{id:e});delete r.beforeId,t.addLayer(r,n.beforeId)}}(o,i,t),n.current=t,null}Ve.propTypes=Be;var Ze={captureScroll:!1,captureDrag:!0,captureClick:!0,captureDoubleClick:!0,capturePointerMove:!1},Ge={captureScroll:c.bool,captureDrag:c.bool,captureClick:c.bool,captureDoubleClick:c.bool,capturePointerMove:c.bool};function He(t){var e=t.containerRef.current,n=t.context.eventManager;if(e&&n){var r={wheel:function(e){var n=t.props;n.captureScroll&&e.stopPropagation(),n.onScroll&&n.onScroll(e,t)},panstart:function(e){var n=t.props;n.captureDrag&&e.stopPropagation(),n.onDragStart&&n.onDragStart(e,t)},anyclick:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onNativeClick&&n.onNativeClick(e,t)},click:function(e){var n=t.props;n.captureClick&&e.stopPropagation(),n.onClick&&n.onClick(e,t)},dblclick:function(e){var n=t.props;n.captureDoubleClick&&e.stopPropagation(),n.onDoubleClick&&n.onDoubleClick(e,t)},pointermove:function(e){var n=t.props;n.capturePointerMove&&e.stopPropagation(),n.onPointerMove&&n.onPointerMove(e,t)}};return n.watch(r,e),function(){n.off(r)}}}function We(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(0,u.useContext)(pt),n=(0,u.useRef)(null),r=(0,u.useRef)({props:t,state:{},context:e,containerRef:n}),i=r.current;return i.props=t,i.context=e,(0,u.useEffect)((function(){return He(i)}),[e.eventManager]),i}function $e(t){var e=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=jt(t);if(e){var i=jt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return It(this,n)}}
1function qe(t){var e=t.instance,n=We(t),r=n.context,i=n.containerRef;return e._context=r,e._containerRef=i,e._render()}var Xe=function(t){kt(n,t);var e=$e(n);function n(){var t;I(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t=e.call.apply(e,[this].concat(i)),(0,a.Z)(Ct(t),"_context",{}),(0,a.Z)(Ct(t),"_containerRef",(0,u.createRef)()),(0,a.Z)(Ct(t),"_onScroll",(function(t){})),(0,a.Z)(Ct(t),"_onDragStart",(function(t){})),(0,a.Z)(Ct(t),"_onDblClick",(function(t){})),(0,a.Z)(Ct(t),"_onClick",(function(t){})),(0,a.Z)(Ct(t),"_onPointerMove",(function(t){})),t}return D(n,[{key:"_render",value:function(){throw new Error("_render() not implemented")}},{key:"render",value:function(){return u.createElement(qe,(0,r.Z)({instance:this},this.props,{onScroll:this._onScroll,onDragStart:this._onDragStart,onDblClick:this._onDblClick,onClick:this._onClick,onPointerMove:this._onPointerMove}))}}]),n}(u.PureComponent);function Ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ke(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ye(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}(0,a.Z)(Xe,"propTypes",Ge),(0,a.Z)(Xe,"defaultProps",Ze);var Qe=Object.assign({},Ge,{draggable:c.bool,onDrag:c.func,onDragEnd:c.func,onDragStart:c.func,offsetLeft:c.number,offsetTop:c.number}),Je=Object.assign({},Ze,{draggable:!1,offsetLeft:0,offsetTop:0});function tn(t){var e=t.offsetCenter;return[e.x,e.y]}function en(t,e,n,r){var i=t[0]+e[0]-n.offsetLeft,o=t[1]+e[1]-n.offsetTop;return r.viewport.unproject([i,o])}function nn(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context,s=e.containerRef;if(n.draggable){t.stopPropagation();var a=tn(t),u=function(t,e){var n=t.center,r=n.x,i=n.y;if(e){var o=e.getBoundingClientRect();return[o.left-r,o.top-i]}return null}(t,s.current);if(i.setDragPos(a),i.setDragOffset(u),r.onDragStart&&u){var c=Object.assign({},t);c.lngLat=en(a,u,n,o),r.onDragStart(c)}}}function rn(t){var e=t.context.eventManager;if(e&&t.state.dragPos){var n={panmove:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var s=tn(t);i.setDragPos(s);var a=i.dragOffset;if(r.onDrag&&a){var u=Object.assign({},t);u.lngLat=en(s,a,n,o),r.onDrag(u)}}(e,t)},panend:function(e){return function(t,e){var n=e.props,r=e.callbacks,i=e.state,o=e.context;t.stopPropagation();var s=i.dragPos,a=i.dragOffset;if(i.setDragPos(null),i.setDragOffset(null),r.onDragEnd&&s&&a){var u=Object.assign({},t);u.lngLat=en(s,a,n,o),r.onDragEnd(u)}}(e,t)},pancancel:function(e){return function(t,e){var n=e.state;t.stopPropagation(),n.setDragPos(null),n.setDragOffset(null)}(e,t)}};return e.watch(n),function(){e.off(n)}}}var on="undefined"!==typeof window&&window.devicePixelRatio||1,sn=function(t){return Math.round(t*on)/on},an=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"x";if(null===t)return e;var r="x"===n?t.offsetWidth:t.offsetHeight;return sn(e/100*r)/r*100},un=Object.assign({},Qe,{className:c.string,longitude:c.number.isRequired,latitude:c.number.isRequired}),cn=Object.assign({},Je,{className:""});function ln(t){var e=function(t){var e=l((0,u.useState)(null),2),n=e[0],r=e[1],i=l((0,u.useState)(null),2),o=i[0],s=i[1],a=We(Ke(Ke({},t),{},{onDragStart:nn}));return a.callbacks=t,a.state.dragPos=n,a.state.setDragPos=r,a.state.dragOffset=o,a.state.setDragOffset=s,(0,u.useEffect)((function(){return rn(a)}),[a.context.eventManager,Boolean(n)]),a}(t),n=e.state,r=e.containerRef,i=t.children,o=t.className,s=t.draggable,a=n.dragPos,c=function(t){var e=t.props,n=t.state,r=t.context,i=e.longitude,o=e.latitude,s=e.offsetLeft,a=e.offsetTop,u=n.dragPos,c=n.dragOffset,h=r.viewport,f=r.map;if(u&&c)return[u[0]+c[0],u[1]+c[1]];var d=mt(f,{longitude:i,latitude:o}),p=l(h.project([i,o,d]),2),g=p[0],m=p[1];return[g+=s,m+=a]}(e),h=l(c,2),f=h[0],d=h[1],p="translate(".concat(sn(f),"px, ").concat(sn(d),"px)"),g=s?a?"grabbing":"grab":"auto",m=(0,u.useMemo)((function(){var t={position:"absolute",left:0,top:0,transform:p,cursor:g};return u.createElement("div",{className:"mapboxgl-marker ".concat(o),ref:e.containerRef,style:t},i)}),[i,o]),v=r.current;return v&&(v.style.transform=p,v.style.cursor=g),m}ln.defaultProps=cn,ln.propTypes=un;u.memo(ln);var hn={top:{x:.5,y:0},"top-left":{x:0,y:0},"top-right":{x:1,y:0},bottom:{x:.5,y:1},"bottom-left":{x:0,y:1},"bottom-right":{x:1,y:1}
vendor: 13,880 bytes, line 1
1,left:{x:0,y:.5},right:{x:1,y:.5}},fn=Object.keys(hn);var dn=Object.assign({},Ge,{className:c.string,longitude:c.number.isRequired,latitude:c.number.isRequired,altitude:c.number,offsetLeft:c.number,offsetTop:c.number,tipSize:c.number,closeButton:c.bool,closeOnClick:c.bool,anchor:c.oneOf(Object.keys(hn)),dynamicPosition:c.bool,sortByDepth:c.bool,onClose:c.func}),pn=Object.assign({},Ze,{className:"",offsetLeft:0,offsetTop:0,tipSize:10,anchor:"bottom",dynamicPosition:!0,sortByDepth:!1,closeButton:!0,closeOnClick:!0,onClose:function(){}});function gn(t,e,n,r){var i=l(r,2),o=i[0],s=i[1],a=t.anchor,u=t.dynamicPosition,c=t.tipSize;return n&&u?function(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.selfWidth,s=t.selfHeight,a=t.anchor,u=t.padding,c=void 0===u?0:u,l=hn[a],h=l.x,f=l.y,d=n-f*s,p=d+s,g=Math.max(0,c-d)+Math.max(0,p-i+c);if(g>0){var m=f,v=g;for(f=0;f<=1;f+=.5)p=(d=n-f*s)+s,(g=Math.max(0,c-d)+Math.max(0,p-i+c))<v&&(v=g,m=f);f=m}var y=.5;.5===f&&(h=Math.floor(h),y=1);var b=e-h*o,_=b+o,w=Math.max(0,c-b)+Math.max(0,_-r+c);if(w>0){var x=h,E=w;for(h=0;h<=1;h+=y)_=(b=e-h*o)+o,(w=Math.max(0,c-b)+Math.max(0,_-r+c))<E&&(E=w,x=h);h=x}return fn.find((function(t){var e=hn[t];return e.x===h&&e.y===f}))||a}({x:o,y:s,anchor:a,padding:c,width:e.width,height:e.height,selfWidth:n.clientWidth,selfHeight:n.clientHeight}):a}function mn(t){var e=(0,u.useRef)(null),n=We(t),r=n.context,i=n.containerRef,o=l((0,u.useState)(!1),2)[1];(0,u.useEffect)((function(){o(!0)}),[e.current]),(0,u.useEffect)((function(){if(r.eventManager&&t.closeOnClick){var e=function(){return n.props.onClose()};return r.eventManager.on("anyclick",e),function(){r.eventManager.off("anyclick",e)}}}),[r.eventManager,t.closeOnClick]);var s=r.viewport,a=r.map,c=t.className,h=t.longitude,f=t.latitude,d=t.tipSize,p=t.closeButton,g=t.children,m=t.altitude;void 0===m&&(m=mt(a,{longitude:h,latitude:f}));var v=s.project([h,f,m]),y=gn(t,s,e.current,v),b=function(t,e,n,r,i){var o=l(r,3),s=o[0],a=o[1],u=o[2],c=t.offsetLeft,h=t.offsetTop,f=t.sortByDepth,d=hn[i],p=s+c,g=a+h,m=an(n,100*-d.x),v=an(n,100*-d.y,"y"),y={position:"absolute",transform:"\n translate(".concat(m,"%, ").concat(v,"%)\n translate(").concat(sn(p),"px, ").concat(sn(g),"px)\n "),display:void 0,zIndex:void 0};return f?(u>1||u<-1||s<0||s>e.width||a<0||a>e.height?y.display="none":y.zIndex=Math.floor((1-u)/2*1e5),y):y}(t,s,i.current,v,y),_=(0,u.useCallback)((function(t){n.props.onClose();var e=n.context.eventManager;e&&e.once("click",(function(t){return t.stopPropagation()}),t.target)}),[]);return u.createElement("div",{className:"mapboxgl-popup mapboxgl-popup-anchor-".concat(y," ").concat(c),style:b,ref:i},u.createElement("div",{key:"tip",className:"mapboxgl-popup-tip",style:{borderWidth:d}}),u.createElement("div",{key:"content",ref:e,className:"mapboxgl-popup-content"},p&&u.createElement("button",{key:"close-button",className:"mapboxgl-popup-close-button",type:"button",onClick:_},"\xd7"),g))}mn.propTypes=dn,mn.defaultProps=pn;u.memo(mn);function vn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var yn=Object.assign({},Ge,{toggleLabel:c.string,className:c.string,style:c.object,compact:c.bool,customAttribution:c.oneOfType([c.string,c.arrayOf(c.string)])}),bn=Object.assign({},Ze,{className:"",toggleLabel:"Toggle Attribution"});function _n(t){var e=We(t),n=e.context,r=e.containerRef,i=(0,u.useRef)(null),o=l((0,u.useState)(!1),2),s=o[0],c=o[1];(0,u.useEffect)((function(){var e;return n.map&&(e=function(t,e,n,r){var i=new(Y().AttributionControl)(t);return i._map=e,i._container=n,i._innerContainer=r,i._updateAttributions(),i._updateEditLink(),e.on("styledata",i._updateData),e.on("sourcedata",i._updateData),i}({customAttribution:t.customAttribution},n.map,r.current,i.current)),function(){return e&&function(t){t._map.off("styledata",t._updateData),t._map.off("sourcedata",t._updateData)}(e)}}),[n.map]);var h=void 0===t.compact?n.viewport.width<=640:t.compact;(0,u.useEffect)((function(){!h&&s&&c(!1)}),[h]);var f=(0,u.useCallback)((function(){return c((function(t){return!t}))}),[]),d=(0,u.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vn(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return u.createElement("div",{style:d,className:t.className},u.createElement("div",{ref:r,"aria-pressed":s,className:"mapboxgl-ctrl mapboxgl-ctrl-attrib ".concat(h?"mapboxgl-compact":""," ").concat(s?"mapboxgl-compact-show":"")},u.createElement("button",{type:"button",className:"mapboxgl-ctrl-attrib-button",title:t.toggleLabel,onClick:f}),u.createElement("div",{ref:i,className:"mapboxgl-ctrl-attrib-inner",role:"list"})))}_n.propTypes=yn,_n.defaultProps=bn;u.memo(_n);function wn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var xn=Object.assign({},Ge,{className:c.string,style:c.object,container:c.object,label:c.string}),En=Object.assign({},Ze,{className:"",container:null,label:"Toggle fullscreen"});function Tn(t){var e=We(t),n=e.context,r=e.containerRef,i=l((0,u.useState)(!1),2),o=i[0],s=i[1],c=l((0,u.useState)(!1),2),h=c[0],f=c[1],d=l((0,u.useState)(null),2),p=d[0],g=d[1];(0,u.useEffect)((function(){var t=new(Y().FullscreenControl);g(t),f(t._checkFullscreenSupport());var e=function(){var e=!t._fullscreen;t._fullscreen=e,s(e)};return N.addEventListener(t._fullscreenchange,e),function(){N.removeEventListener(t._fullscreenchange,e)}}),[]);var m=(0,u.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wn(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);if(!h)return null;var v=t.className,y=t.label,b=o?"shrink":"fullscreen";return u.createElement("div",{style:m,className:v},u.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},u.createElement("button",{key:b,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(b),type:"button",title:y,onClick:function(){p&&(p._container=t.container||n.container,p._onClickFullscreen())}},u.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}Tn.propTypes=xn,Tn.defaultProps=En;var Pn;u.memo(Tn);function An(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Sn=function(){},Mn=Object.assign({},Ge,{className:c.string,style:c.object,label:c.string,disabledLabel:c.string,auto:c.bool,positionOptions:c.object,fitBoundsOptions:c.object,trackUserLocation:c.bool,showUserLocation:c.bool,showAccuracyCircle:c.bool,onViewStateChange:c.func,onViewportChange:c.func,onGeolocate:c.func}),On=Object.assign({},Ze,{className:"",label:"Find My Location",disabledLabel:"Location Not Available",auto:!1,positionOptions:{enableHighAccuracy:!1,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showUserLocation:!0,showAccuracyCircle:!0,onGeolocate:function(){}});function Cn(t,e){var n=e.context,r=e.props,i=function(t){var e=new(Y().LngLat)(t.coords.longitude,t.coords.latitude),n=t.coords.accuracy,r=e.toBounds(n);return[[r._ne.lng,r._ne.lat],[r._sw.lng,r._sw.lat]]}(t),o=n.viewport.fitBounds(i,r.fitBoundsOptions),s=o.longitude,a=o.latitude,u=o.zoom,c=Object.assign({},n.viewport,{longitude:s,latitude:a,zoom:u}),l=new ut(c),h=Object.assign({},l.getViewportProps(),ue),f=r.onViewportChange||n.onViewportChange||Sn;(r.onViewStateChange||n.onViewStateChange||Sn)({viewState:h}),f(h)}function Ln(t){var e=We(t),n=e.context,r=e.containerRef,i=(0,u.useRef)(null),o=l((0,u.useState)(null),2),s=o[0],c=o[1],h=l((0,u.useState)(!1),2),f=h[0],d=h[1];(0,u.useEffect)((function(){var r;return n.map&&(void 0!==Pn?Promise.resolve(Pn):void 0!==window.navigator.permissions?window.navigator.permissions.query({name:"geolocation"}).then((function(t){return Pn="denied"!==t.state})):(Pn=Boolean(window.navigator.geolocation),Promise.resolve(Pn))).then((function(o){d(o),i.current&&((r=function(t,e,n){var r=new(Y().GeolocateControl)(e);r._container=N.createElement("div"),r._map={on:function(){},_getUIString:function(){return""}},r._setupUI(!0),r._map=t.map,r._geolocateButton=n;var i=t.eventManager;return r.options.trackUserLocation&&i&&i.on("panstart",(function(){"ACTIVE_LOCK"===r._watchState&&(r._watchState="BACKGROUND",n.classList.add("mapboxgl-ctrl-geolocate-background"),n.classList.remove("mapboxgl-ctrl-geolocate-active"))})),r.on("geolocate",e.onGeolocate),r}(n,t,i.current))._updateCamera=function(t){return Cn(t,e)},c(r))})),function(){r&&r._clearWatch()}}),[n.map]);var p=(0,u.useCallback)((function(){s&&(s.options=e.props,s.trigger())}),[s]);(0,u.useEffect)((function(){t.auto&&p()}),[s,t.auto]),(0,u.useEffect)((function(){s&&s._onZoom()}),[n.viewport.zoom]);var g=t.className,m=t.label,v=t.disabledLabel,y=t.trackUserLocation,b=(0,u.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?An(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):An(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return u.createElement("div",{style:b,className:g},u.createElement("div",{key:"geolocate-control",className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},u.createElement("button",{key:"geolocate",className:"mapboxgl-ctrl-icon mapboxgl-ctrl-geolocate",ref:i,disabled:!f,"aria-pressed":!y,type:"button",title:f?m:v,"aria-label":f?m:v,onClick:p},u.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))))}Ln.propTypes=Mn,Ln.defaultProps=On;u.memo(Ln);function kn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Rn=function(){},In=Object.assign({},Ge,{className:c.string,style:c.object,onViewStateChange:c.func,onViewportChange:c.func,showCompass:c.bool,showZoom:c.bool,zoomInLabel:c.string,zoomOutLabel:c.string,compassLabel:c.string}),jn=Object.assign({},Ze,{className:"",showCompass:!0,showZoom:!0,zoomInLabel:"Zoom In",zoomOutLabel:"Zoom Out",compassLabel:"Reset North"});function Dn(t){return function(t,e){for(var n=(t||"").split(".").map(Number),r=(e||"").split(".").map(Number),i=0;i<3;i++){var o=n[i]||0,s=r[i]||0;if(o<s)return-1;if(o>s)return 1}return 0}(t,"1.6.0")>=0?2:1}function Nn(t,e,n){var r=t.viewport,i=new ut(Object.assign({},r,n)),o=Object.assign({},i.getViewportProps(),ue),s=e.onViewportChange||t.onViewportChange||Rn;(e.onViewStateChange||t.onViewStateChange||Rn)({viewState:o}),s(o)}function Fn(t,e,n,r){return u.createElement("button",{key:t,className:"mapboxgl-ctrl-icon mapboxgl-ctrl-".concat(t),type:"button",title:e,onClick:n},r||u.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true"}))}function Bn(t){var e=We(t),n=e.context,r=e.containerRef,i=t.className,o=t.showCompass,s=t.showZoom,c=t.zoomInLabel,l=t.zoomOutLabel,h=t.compassLabel,f=(0,u.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?kn(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return u.createElement("div",{style:f,className:i},u.createElement("div",{className:"mapboxgl-ctrl mapboxgl-ctrl-group",ref:r},s&&Fn("zoom-in",c,(function(){Nn(n,t,{zoom:n.viewport.zoom+1})})),s&&Fn("zoom-out",l,(function(){Nn(n,t,{zoom:n.viewport.zoom-1})})),o&&Fn("compass",h,(function(){Nn(n,t,{bearing:0,pitch:0})}),function(t){var e=(0,u.useMemo)((function(){return t.map?Dn(t.map.version):2}),[t.map]),n=t.viewport.bearing,r={transform:"rotate(".concat(-n,"deg)")};return 2===e?u.createElement("span",{className:"mapboxgl-ctrl-icon","aria-hidden":"true",style:r}):u.createElement("span",{className:"mapboxgl-ctrl-compass-arrow",style:r})}(n))))}Bn.propTypes=In,Bn.defaultProps=jn;u.memo(Bn);function Un(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var zn=Object.assign({},Ge,{className:c.string,style:c.object,maxWidth:c.number,unit:c.oneOf(["imperial","metric","nautical"])}),Vn=Object.assign({},Ze,{className:"",maxWidth:100,unit:"metric"});function Zn(t){var e=We(t),n=e.context,r=e.containerRef,i=l((0,u.useState)(null),2),o=i[0],s=i[1];(0,u.useEffect)((function(){if(n.map){var t=new(Y().ScaleControl);t._map=n.map,t._container=r.current,s(t)}}),[n.map]),o&&(o.options=t,o._onMove());var c=(0,u.useMemo)((function(){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?Un(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Un(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute"},t.style)}),[t.style]);return u.createElement("div",{style:c,className:t.className},u.createElement("div",{ref:r,className:"mapboxgl-ctrl mapboxgl-ctrl-scale"}))}Zn.propTypes=zn,Zn.defaultProps=Vn;u.memo(Zn);var Gn="undefined"!==typeof window&&window.devicePixelRatio||1,Hn=Object.assign({},Ge,{redraw:c.func.isRequired});function Wn(t){var e=We(t),n=e.context,r=e.containerRef,i=l((0,u.useState)(null),2),o=i[0],s=i[1];(0,u.useEffect)((function(){s(r.current.getContext("2d"))}),[]);var a=n.viewport,c=n.isDragging;return o&&(o.save(),o.scale(Gn,Gn),t.redraw({width:a.width,height:a.height,ctx:o,isDragging:c,project:a.project,unproject:a.unproject}),o.restore()),u.createElement("canvas",{ref:r,width:a.width*Gn,height:a.height*Gn,style:{width:"".concat(a.width,"px"),height:"".concat(a.height,"px"),position:"absolute",left:0,top:0}})}Wn.propTypes=Hn,Wn.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};function $n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var qn=Object.assign({},Ge,{redraw:c.func.isRequired,style:c.object});function Xn(t){var e=We(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$n(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$n(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute",left:0,top:0,width:i.width,height:i.height},t.style);return u.createElement("div",{ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}Xn.propTypes=qn,Xn.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};function Yn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Kn=Object.assign({},Ge,{redraw:c.func.isRequired,style:c.object});function Qn(t){var e=We(t),n=e.context,r=e.containerRef,i=n.viewport,o=n.isDragging,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Yn(Object(n),!0).forEach((function(e){(0,a.Z)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Yn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({position:"absolute",left:0,top:0},t.style);return u.createElement("svg",{width:i.width,height:i.height,ref:r,style:s},t.redraw({width:i.width,height:i.height,isDragging:o,project:i.project,unproject:i.unproject}))}Qn.propTypes=Kn,Qn.defaultProps={captureScroll:!1,captureDrag:!1,captureClick:!1,captureDoubleClick:!1,capturePointerMove:!1};Y()&&Y().setRTLTextPlugin},4942:function(t,e,n){"use strict";function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,{Z:function(){return r}})},5012:function(t,e,n){"use strict";n.d(e,{Z:function(){return u}});var r=6371008.8,i={centimeters:637100880,centimetres:637100880,degrees:57.22891354143274,feet:20902260.511392,inches:39.37*r,kilometers:6371.0088,kilometres:6371.0088,meters:r,metres:r,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:r/1852,radians:1,yards:6967335.223679999};function o(t,e){void 0===e&&(e="kilometers");var n=i[e];
1if(!n)throw new Error(e+" units is invalid");return t*n}function s(t){return t%360*Math.PI/180}function a(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}var u=function(t,e,n){void 0===n&&(n={});var r=a(t),i=a(e),u=s(i[1]-r[1]),c=s(i[0]-r[0]),l=s(r[1]),h=s(i[1]),f=Math.pow(Math.sin(u/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(l)*Math.cos(h);return o(2*Math.atan2(Math.sqrt(f),Math.sqrt(1-f)),n.units)}},9757:function(t,e,n){"use strict";function r(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}n.d(e,{Z:function(){return r}})},8795:function(t,e,n){"use strict";n.d(e,{Nw:function(){return a},ml:function(){return s},ZP:function(){return u}});var r=n(9757),i=n(477);const o=(0,i.Z)(r.Z),s=o.right,a=o.left;(0,i.Z)((function(t){return null===t?NaN:+t})).center;var u=s},477:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(9757);function i(t){let e=t,n=t,i=t;function o(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<0?r=n+1:o=n}while(r<o)}return r}return 2!==t.length&&(e=(e,n)=>t(e)-n,n=r.Z,i=(e,n)=>(0,r.Z)(t(e),n)),{left:o,center:function(t,n,r=0,i=t.length){const s=o(t,n,r,i-1);return s>r&&e(t[s-1],n)>-e(t[s],n)?s-1:s},right:function(t,e,r=0,o=t.length){if(r<o){if(0!==n(e,e))return o;do{const n=r+o>>>1;i(t[n],e)<=0?r=n+1:o=n}while(r<o)}return r}}}},8776:function(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(const r of t)null!=r&&(n<r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}n.d(e,{Z:function(){return r}})},8398:function(t,e,n){"use strict";function r(t,e){let n;if(void 0===e)for(const r of t)null!=r&&(n>r||void 0===n&&r>=r)&&(n=r);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}n.d(e,{Z:function(){return r}})},3896:function(t,e,n){"use strict";n.d(e,{ZP:function(){return s},G9:function(){return a},ly:function(){return u}});var r=Math.sqrt(50),i=Math.sqrt(10),o=Math.sqrt(2);function s(t,e,n){var r,i,o,s,u=-1;
vendor: 4,279 bytes, line 1
1if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(s=a(t,e,n))||!isFinite(s))return[];if(s>0){let n=Math.round(t/s),r=Math.round(e/s);for(n*s<t&&++n,r*s>e&&--r,o=new Array(i=r-n+1);++u<i;)o[u]=(n+u)*s}else{s=-s;let n=Math.round(t*s),r=Math.round(e*s);for(n/s<t&&++n,r/s>e&&--r,o=new Array(i=r-n+1);++u<i;)o[u]=(n+u)/s}return r&&o.reverse(),o}function a(t,e,n){var s=(e-t)/Math.max(0,n),a=Math.floor(Math.log(s)/Math.LN10),u=s/Math.pow(10,a);return a>=0?(u>=r?10:u>=i?5:u>=o?2:1)*Math.pow(10,a):-Math.pow(10,-a)/(u>=r?10:u>=i?5:u>=o?2:1)}function u(t,e,n){var s=Math.abs(e-t)/Math.max(0,n),a=Math.pow(10,Math.floor(Math.log(s)/Math.LN10)),u=s/a;return u>=r?a*=10:u>=i?a*=5:u>=o&&(a*=2),e<t?-a:a}},8849:function(t,e,n){"use strict";function r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function i(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function o(){}n.d(e,{ZP:function(){return w},B8:function(){return P}});var s=.7,a=1/s,u="\\s*([+-]?\\d+)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",l="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",h=/^#([0-9a-f]{3,8})$/,f=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),d=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),p=new RegExp("^rgba\\("+[u,u,u,c]+"\\)$"),g=new RegExp("^rgba\\("+[l,l,l,c]+"\\)$"),m=new RegExp("^hsl\\("+[c,l,l]+"\\)$"),v=new RegExp("^hsla\\("+[c,l,l,c]+"\\)$"),y={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(){return this.rgb().formatHex()}function _(){return this.rgb().formatRgb()}function w(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=h.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?x(e):3===n?
vendor: 5,389 bytes, line 1
1new A(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?E(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?E(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=f.exec(t))?new A(e[1],e[2],e[3],1):(e=d.exec(t))?new A(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=p.exec(t))?E(e[1],e[2],e[3],e[4]):(e=g.exec(t))?E(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=m.exec(t))?C(e[1],e[2]/100,e[3]/100,1):(e=v.exec(t))?C(e[1],e[2]/100,e[3]/100,e[4]):y.hasOwnProperty(t)?x(y[t]):"transparent"===t?new A(NaN,NaN,NaN,0):null}function x(t){return new A(t>>16&255,t>>8&255,255&t,1)}function E(t,e,n,r){return r<=0&&(t=e=n=NaN),new A(t,e,n,r)}function T(t){return t instanceof o||(t=w(t)),t?new A((t=t.rgb()).r,t.g,t.b,t.opacity):new A}function P(t,e,n,r){return 1===arguments.length?T(t):new A(t,e,n,null==r?1:r)}function A(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function S(){return"#"+O(this.r)+O(this.g)+O(this.b)}function M(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function O(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function C(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new k(t,e,n,r)}function L(t){if(t instanceof k)return new k(t.h,t.s,t.l,t.opacity);if(t instanceof o||(t=w(t)),!t)return new k;if(t instanceof k)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),s=Math.max(e,n,r),a=NaN,u=s-i,c=(s+i)/2;return u?(a=e===s?(n-r)/u+6*(n<r):n===s?(r-e)/u+2:(e-n)/u+4,u/=c<.5?s+i:2-s-i,a*=60):u=c>0&&c<1?0:a,new k(a,u,c,t.opacity)}function k(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function R(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}r(o,w,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHsl:function(){return L(this).formatHsl()},formatRgb:_,toString:_}),r(A,P,i(o,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new A(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?s:Math.pow(s,t),new A(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:S,formatHex:S,formatRgb:M,toString:M})),r(k,(function(t,e,n,r){return 1===arguments.length?L(t):new k(t,e,n,null==r?1:r)}),i(o,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new k(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?s:Math.pow(s,t),new k(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new A(R(t>=240?t-240:t+120,i,r),R(t,i,r),R(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}))},1606:function(t,e,n){"use strict";n.d(e,{Z:function(){return o},M:function(){return s}});var r=n(5402),i=n(5401);function o(t,e){return((0,i.v)(e)?i.Z:s)(t,e)}function s(t,e){var n,i=e?e.length:0,o=t?Math.min(i,t.length):0,s=new Array(o),a=new Array(i);for(n=0;n<o;++n)s[n]=(0,r.Z)(t[n],e[n]);for(;n<i;++n)a[n]=e[n];return function(t){for(n=0;n<o;++n)a[n]=s[n](t);return a}}},2954:function(t,e){"use strict";e.Z=t=>()=>t},8063:function(t,e,n){"use strict";function r(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}n.d(e,{Z:function(){return r}})},5401:function(t,e,n){"use strict";function r(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}n.d(e,{Z:function(){return r},v:function(){return i}})},187:function(t,e,n){"use strict";n.d(e,{ZP:function(){return c},hD:function(){return h}});var r=n(8849);function i(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}var o=n(2954);function s(t,e){return function(n){return t+n*e}}function a(t){return 1===(t=+t)?u:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):(0,o.Z)(isNaN(e)?n:e)}}function u(t,e){var n=e-t;return n?s(t,n):(0,o.Z)(isNaN(t)?e:t)}var c=function t(e){var n=a(e);function i(t,e){var i=n((t=(0,r.B8)(t)).r,(e=(0,r.B8)(e)).r),o=n(t.g,e.g),s=n(t.b,e.b),a=u(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=s(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function l(t){return function(e){var n,i,o=e.length,s=new Array(o),a=new Array(o),u=new Array(o);for(n=0;n<o;++n)i=(0,r.B8)(e[n]),s[n]=i.r||0,a[n]=i.g||0,u[n]=i.b||0;return s=t(s),a=t(a),u=t(u),i.opacity=1,function(t){return i.r=s(t),i.g=a(t),i.b=u(t),i+""}}}var h=l((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[r],s=t[r+1],a=r>
10?t[r-1]:2*o-s,u=r<e-1?t[r+2]:2*s-o;return i((n-r/e)*e,a,o,s,u)}}));l((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],s=t[r%e],a=t[(r+1)%e],u=t[(r+2)%e];return i((n-r/e)*e,o,s,a,u)}}))},4635:function(t,e,n){"use strict";function r(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}n.d(e,{Z:function(){return r}})},5402:function(t,e,n){"use strict";n.d(e,{Z:function(){return p}});var r=n(8849),i=n(187),o=n(1606);function s(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}var a=n(8063);function u(t,e){var n,r={},i={};for(n in null!==t&&"object"===typeof t||(t={}),null!==e&&"object"===typeof e||(e={}),e)n in t?r[n]=p(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var c=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,l=new RegExp(c.source,"g");function h(t,e){var n,r,i,o=c.lastIndex=l.lastIndex=0,s=-1,u=[],h=[];for(t+="",e+="";(n=c.exec(t))&&(r=l.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),u[s]?u[s]+=i:u[++s]=i),(n=n[0])===(r=r[0])?u[s]?u[s]+=r:u[++s]=r:(u[++s]=null,h.push({i:s,x:(0,a.Z)(n,r)})),o=l.lastIndex;return o<e.length&&(i=e.slice(o),u[s]?u[s]+=i:u[++s]=i),u.length<2?h[0]?function(t){return function(e){return t(e)+""}}(h[0].x):function(t){return function(){return t}}(e):(e=h.length,function(t){for(var n,r=0;r<e;++r)u[(n=h[r]).i]=n.x(t);return u.join("")})}var f=n(2954),d=n(5401);function p(t,e){var n,c=typeof e;return null==e||"boolean"===c?(0,f.Z)(e):("number"===c?a.Z:"string"===c?(n=(0,r.ZP)(e))?(e=n,i.ZP):h:e instanceof r.ZP?i.ZP:e instanceof Date?s:(0,d.v)(e)?d.Z:Array.isArray(e)?o.M:"function"!==typeof e.valueOf&&"function"!==typeof e.toString||isNaN(e)?u:a.Z)(t,e)}},6128:function(t,e,n){"use strict";n.d(e,{Z:function(){return i}});var r=n(187),i=(t=>(0,r.hD)(t[t.length-1]))(new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map((function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n})))},8599:function(t,e,n){"use strict";n.d(e,{JG:function(){return d},ZP:function(){return g},yR:function(){return c}});var r=n(8795),i=n(5402),o=n(8063),s=n(4635);function a(t){return+t}var u=[0,1];function c(t){return t}function l(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function h(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=l(i,r),o=n(s,o)):(r=l(r,i),o=n(o,s)),function(t){return o(r(t))}}function f(t,e,n){var i=Math.min(t.length,e.length)-1,o=new Array(i),s=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)o[a]=l(t[a],t[a+1]),s[a]=n(e[a],e[a+1]);return function(e){var n=(0,r.ZP)(t,e,1,i)-1;return s[n](o[n](e))}}function d(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function p(){var t,e,n,r,l,d,p=u,g=u,m=i.Z,v=c;function y(){var t=Math.min(p.length,g.length);return v!==c&&(v=function(t,e){var n;return t>e&&(n=t,t=e,e=n),function(n){return Math.max(t,Math.min(e,n))}}(p[0],p[t-1])),r=t>2?f:h,l=d=null,b}function b(e){return null==e||isNaN(e=+e)?n:(l||(l=r(p.map(t),g,m)))(t(v(e)))}return b.invert=function(n){return v(e((d||(d=r(g,p.map(t),o.Z)))(n)))},b.domain=function(t){return arguments.length?(p=Array.from(t,a),y()):p.slice()},b.range=function(t){return arguments.length?(g=Array.from(t),y()):g.slice()},b.rangeRound=function(t){return g=Array.from(t),m=s.Z,y()},b.clamp=function(t){return arguments.length?(v=!!t||c,y()):v!==c},b.interpolate=function(t){return arguments.length?(m=t,y()):m},b.unknown=function(t){return arguments.length?(n=t,b):n},function(n,r){return t=n,e=r,y()}}function g(){return p()(c,c)}},4182:function(t,e,n){"use strict";function r(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function i(t,e){switch(arguments.length){case 0:break;case 1:"function"===typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"===typeof e?this.interpolator(e):this.range(e)}return this}n.d(e,{o:function(){return r},O:function(){return i}})},3218:function(t,e,n){"use strict";n.d(e,{ZP:function(){return S}});var r,i=n(5402),o=n(4635),s=n(8599),a=n(4182),u=n(3896),c=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(t){if(!(e=c.exec(t)))throw new Error("invalid format: "+t);var e;return new h({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function h(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.
vendor: 5,307 bytes, line 1
1width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function f(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function d(t){return(t=f(Math.abs(t)))?t[1]:NaN}function p(t,e){var n=f(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}l.prototype=h.prototype,h.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var g={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>p(100*t,e),r:p,s:function(t,e){var n=f(t,e);if(!n)return t+"";var i=n[0],o=n[1],s=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+f(t,Math.max(0,e+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function m(t){return t}var v,y,b,_=Array.prototype.map,w=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function x(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?m:(e=_.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],s=0,a=e[0],u=0;i>0&&a>0&&(u+a+1>r&&(a=Math.max(1,r-u)),o.push(t.substring(i-=a,i+a)),!((u+=a+1)>r));)a=e[s=(s+1)%e.length];return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?m:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(_.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"\u2212":t.minus+"",f=void 0===t.nan?"NaN":t.nan+"";function p(t){var e=(t=l(t)).fill,n=t.align,d=t.sign,p=t.symbol,m=t.zero,v=t.width,y=t.comma,b=t.precision,_=t.trim,x=t.type;"n"===x?(y=!0,x="g"):g[x]||(void 0===b&&(b=12),_=!0,x="g"),(m||"0"===e&&"="===n)&&(m=!0,e="0",n="=");var E="$"===p?o:"#"===p&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",T="$"===p?s:/[%p]/.test(x)?c:"",P=g[x],A=/[defgprs%]/.test(x);function S(t){var o,s,c,l=E,p=T;if("c"===x)p=P(t)+p,t="";else{var g=(t=+t)<0||1/t<0;if(t=isNaN(t)?f:P(Math.abs(t),b),_&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),g&&0===+t&&"+"!==d&&(g=!1),l=(g?"("===d?d:h:"-"===d||"("===d?"":d)+l,p=("s"===x?w[8+r/3]:"")+p+(g&&"("===d?")":""),A)for(o=-1,s=t.length;++o<s;)if(48>(c=t.charCodeAt(o))||c>57){p=(46===c?a+t.slice(o+1):t.slice(o))+p,t=t.slice(0,o);break}}y&&!m&&(t=i(t,1/0));var S=l.length+t.length+p.length,M=S<v?new Array(v-S+1).join(e):"";switch(y&&m&&(t=i(M+t,M.length?v-p.length:1/0),M=""),n){case"<":t=l+t+p+M;break;case"=":t=l+M+t+p;break;case"^":t=M.slice(0,S=M.length>>1)+l+t+p+M.slice(S);break;default:t=M+l+t+p}return u(t)}return b=void 0===b?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return t+""},S}return{format:p,formatPrefix:function(t,e){var n=p(((t=l(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(d(e)/3))),i=Math.pow(10,-r),o=w[8+r/3];return function(t){return n(i*t)+o}}}}function E(t,e,n,r){var i,o=(0,u.ly)(t,e,n);switch((r=l(null==r?",f":r)).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(d(e)/3)))-d(Math.abs(t)))}(o,s))||(r.precision=i),b(r,s);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,d(e)-d(t))+1}(o,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-d(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return y(r)}function T(t){var e=t.domain;return t.ticks=function(t){var n=e();return(0,u.ZP)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return E(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),s=0,a=o.length-1,c=o[s],l=o[a],h=10;for(l<c&&(i=c,c=l,l=i,i=s,s=a,a=i);h-- >0;){if((i=(0,u.G9)(c,l,n))===r)return o[s]=c,o[a]=l,e(o);if(i>0)c=Math.floor(c/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function P(){var t,e,n,r,a,u=0,c=1,l=s.yR,h=!1;function f(e){return null==e||isNaN(e=+e)?a:l(0===n?.5:(e=(r(e)-t)*n,h?Math.max(0,Math.min(1,e)):e))}function d(t){return function(e){var n,r;return arguments.length?([n,r]=e,l=t(n,r),f):[l(0),l(1)]}}return f.domain=function(i){return arguments.length?([u,c]=i,t=r(u=+u),e=r(c=+c),n=t===e?0:1/(e-t),f):[u,c]}
1,f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.range=d(i.Z),f.rangeRound=d(o.Z),f.unknown=function(t){return arguments.length?(a=t,f):a},function(i){return r=i,t=i(u),e=i(c),n=t===e?0:1/(e-t),f}}function A(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function S(){var t=T(P()(s.yR));return t.copy=function(){return A(t,S())},a.O.apply(t,arguments)}v=x({thousands:",",grouping:[3],currency:["$",""]}),y=v.format,b=v.formatPrefix},3043:function(t,e,n){"use strict";n.d(e,{Z:function(){return ft}});var r=n(477),i=n(3896);const o=1e3,s=6e4,a=36e5,u=864e5,c=6048e5,l=2592e6,h=31536e6;var f=new Date,d=new Date;function p(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,o){var s,a=[];if(n=i.ceil(n),o=null==o?1:Math.floor(o),!(n<r)||!(o>0))return a;do{a.push(s=new Date(+n)),e(n,o),t(n)}while(s<n&&n<r);return a},i.filter=function(n){return p((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return f.setTime(+e),d.setTime(+r),t(f),t(d),Math.floor(n(f,d))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t===0}:function(e){return i.count(0,e)%t===0}):i:null}),i}var g=p((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));g.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?p((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):g:null};var m=g,v=(g.range,p((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*o)}),(function(t,e){return(e-t)/o}),(function(t){return t.getUTCSeconds()}))),y=v,b=(v.range,p((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*o)}),(function(t,e){t.setTime(+t+e*s)}),(function(t,e){return(e-t)/s}),(function(t){return t.getMinutes()}))),_=b,w=(b.range,p((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*o-t.getMinutes()*s)}),(function(t,e){t.setTime(+t+e*a)}),(function(t,e){return(e-t)/a}),(function(t){return t.getHours()}))),x=w,E=(w.range,p((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*s)/u),(t=>t.getDate()-1))),T=E;E.range;function P(t){return p((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*s)/c}))}var A=P(0),S=P(1),M=P(2),O=P(3),C=P(4),L=P(5),k=P(6),R=(A.range,S.range,M.range,O.range,C.range,L.range,k.range,p((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))),I=R,j=(R.range,p((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));j.every=function(t){return isFinite(t=Math.floor(t))&&t>0?p((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var D=j,N=(j.range,p((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*s)}),(function(t,e){return(e-t)/s}),(function(t){return t.getUTCMinutes()}))),F=N,B=(N.range,p((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*a)}),(function(t,e){return(e-t)/a}),(function(t){return t.getUTCHours()}))),U=B,z=(B.range,p((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/u}),(function(t){return t.getUTCDate()-1}
1))),V=z;z.range;function Z(t){return p((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/c}))}var G=Z(0),H=Z(1),W=Z(2),$=Z(3),q=Z(4),X=Z(5),Y=Z(6),K=(G.range,H.range,W.range,$.range,q.range,X.range,Y.range,p((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}))),Q=K,J=(K.range,p((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));J.every=function(t){return isFinite(t=Math.floor(t))&&t>0?p((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var tt=J;J.range;function et(t,e,n,f,d,p){const g=[[y,1,o],[y,5,5e3],[y,15,15e3],[y,30,3e4],[p,1,s],[p,5,3e5],[p,15,9e5],[p,30,18e5],[d,1,a],[d,3,108e5],[d,6,216e5],[d,12,432e5],[f,1,u],[f,2,1728e5],[n,1,c],[e,1,l],[e,3,7776e6],[t,1,h]];function v(e,n,o){const s=Math.abs(n-e)/o,a=(0,r.Z)((([,,t])=>t)).right(g,s);if(a===g.length)return t.every((0,i.ly)(e/h,n/h,o));if(0===a)return m.every(Math.max((0,i.ly)(e,n,o),1));const[u,c]=g[s/g[a-1][2]<g[a][2]/s?a-1:a];return u.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"===typeof n.range?n:v(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},v]}const[nt,rt]=et(tt,Q,G,V,U,F),[it,ot]=et(D,I,A,T,x,_);var st=n(2663),at=n(8599),ut=n(4182);function ct(t){return new Date(t)}function lt(t){return t instanceof Date?+t:+new Date(+t)}function ht(t,e,n,r,i,o,s,a,u,c){var l=(0,at.ZP)(),h=l.invert,f=l.domain,d=c(".%L"),p=c(":%S"),g=c("%I:%M"),m=c("%I %p"),v=c("%a %d"),y=c("%b %d"),b=c("%B"),_=c("%Y");function w(t){return(u(t)<t?d:a(t)<t?p:s(t)<t?g:o(t)<t?m:r(t)<t?i(t)<t?v:y:n(t)<t?b:_)(t)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Array.from(t,lt)):f().map(ct)},l.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},l.tickFormat=function(t,e){return null==e?w:c(e)},l.nice=function(t){var n=f();return t&&"function"===typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],s=t[i];return s<o&&(n=r,r=i,i=n,n=o,o=s,s=n),t[r]=e.floor(o),t[i]=e.ceil(s),t}(n,t)):l},l.copy=function(){return(0,at.JG)(l,ht(t,e,n,r,i,o,s,a,u,c))},l}function ft(){return ut.o.apply(ht(it,ot,D,I,A,T,x,_,y,st.i$).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}},2663:function(t,e,n){"use strict";n.d(e,{i$:function(){return N},g0:function(){return F}});var r=new Date,i=new Date;function o(t,e,n,s){function a(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return a.floor=function(e){return t(e=new Date(+e)),e},a.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},a.round=function(t){var e=a(t),n=a.ceil(t);return t-e<n-t?e:n},a.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},a.range=function(n,r,i){var o,s=[];if(n=a.ceil(n),i=null==i?1:Math.floor(i),!(n<r)||!(i>0))return s;do{s.push(o=new Date(+n)),e(n,i),t(n)}while(o<n&&n<r);return s},a.filter=function(n){return o((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(a.count=function(e,o){return r.setTime(+e),i.setTime(+o),t(r),t(i),Math.floor(n(r,i))},a.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?a.filter(s?function(e){return s(e)%t===0}:function(e){return a.count(0,e)%t===0}):a:null}),a}const s=6e4,a=864e5,u=6048e5;function c(t){return o((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/u}))}var l=c(0),h=c(1),f=c(2),d=c(3),p=c(4),g=c(5),m=c(6),v=(l.range,h.range,f.range,d.range,p.range,g.range,m.range,o((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/a}),(function(t){return t.getUTCDate()-1}
vendor: 7,594 bytes, line 1
1))),y=v;v.range;function b(t){return o((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*s)/u}))}var _=b(0),w=b(1),x=b(2),E=b(3),T=b(4),P=b(5),A=b(6),S=(_.range,w.range,x.range,E.range,T.range,P.range,A.range,o((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*s)/a),(t=>t.getDate()-1))),M=S,O=(S.range,o((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()})));O.every=function(t){return isFinite(t=Math.floor(t))&&t>0?o((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var C=O,L=(O.range,o((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));L.every=function(t){return isFinite(t=Math.floor(t))&&t>0?o((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var k=L;L.range;function R(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function I(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function j(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var D,N,F,B={"-":"",_:" ",0:"0"},U=/^\s*\d+/,z=/^%/,V=/[\\^$*+?|[\]().{}]/g;function Z(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function G(t){return t.replace(V,"\\$&")}function H(t){return new RegExp("^(?:"+t.map(G).join("|")+")","i")}function W(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function $(t,e,n){var r=U.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function q(t,e,n){var r=U.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function X(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Y(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function K(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Q(t,e,n){var r=U.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function J(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function tt(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function et(t,e,n){var r=U.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function nt(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function rt(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function it(t,e,n){var r=U.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ot(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function st(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function at(t,e,n){var r=U.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ut(t,e,n){var r=U.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function ct(t,e,n){var r=U.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lt(t,e,n){var r=z.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function ht(t,e,n){var r=U.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ft(t,e,n){var r=U.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function dt(t,e){return Z(t.getDate(),e,2)}function pt(t,e){return Z(t.getHours(),e,2)}function gt(t,e){return Z(t.getHours()%12||12,e,2)}function mt(t,e){return Z(1+M.count(C(t),t),e,3)}function vt(t,e){return Z(t.getMilliseconds(),e,3)}function yt(t,e){return vt(t,e)+"000"}function bt(t,e){return Z(t.getMonth()+1,e,2)}function _t(t,e){return Z(t.getMinutes(),e,2)}function wt(t,e){return Z(t.getSeconds(),e,2)}function xt(t){var e=t.getDay();return 0===e?7:e}function Et(t,e){return Z(_.count(C(t)-1,t),e,2)}function Tt(t){var e=t.getDay();return e>=4||0===e?T(t):T.ceil(t)}function Pt(t,e){return t=Tt(t),Z(T.count(C(t),t)+(4===C(t).getDay()),e,2)}function At(t){return t.getDay()}function St(t,e){return Z(w.count(C(t)-1,t),e,2)}function Mt(t,e){return Z(t.getFullYear()%100,e,2)}function Ot(t,e){return Z((t=Tt(t)).getFullYear()%100,e,2)}function Ct(t,e){return Z(t.getFullYear()%1e4,e,4)}function Lt(t,e){var n=t.getDay();return Z((t=n>=4||0===n?T(t):T.ceil(t)).getFullYear()%1e4,e,4)}function kt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Z(e/60|0,"0",2)+Z(e%60,"0",2)}function Rt(t,e){return Z(t.getUTCDate(),e,2)}function It(t,e){return Z(t.getUTCHours(),e,2)}function jt(t,e){return Z(t.getUTCHours()%12||12,e,2)}function Dt(t,e){return Z(1+y.count(k(t),t),e,3)}function Nt(t,e){return Z(t.getUTCMilliseconds(),e,3)}function Ft(t,e){return Nt(t,e)+"000"}function Bt(t,e){return Z(t.getUTCMonth()+1,e,2)}function Ut(t,e){return Z(t.getUTCMinutes(),e,2)}function zt(t,e){return Z(t.getUTCSeconds(),e,2)}function Vt(t){var e=t.getUTCDay();return 0===e?7:e}function Zt(t,e){return Z(l.count(k(t)-1,t),e,2)}function Gt(t){var e=t.getUTCDay();return e>=4||0===e?p(t):p.ceil(t)}function Ht(t,e){return t=Gt(t),Z(p.count(k(t),t)+(4===k(t).getUTCDay()),e,2)}function Wt(t){return t.getUTCDay()}function $t(t,e){return Z(h.count(k(t)-1,t),e,2)}function qt(t,e){return Z(t.getUTCFullYear()%100,e,2)}function Xt(t,e){return Z((t=Gt(t)).getUTCFullYear()%100,e,2)}function Yt(t,e){return Z(t.getUTCFullYear()%1e4,e,4)}function Kt(t,e){var n=t.getUTCDay();return Z((t=n>=4||0===n?p(t):p.ceil(t)).getUTCFullYear()%1e4,e,4)}function Qt(){return"+0000"}function Jt(){return"%"}function te(t){return+t}function ee(t){return Math.floor(+t/1e3)}D=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,s=t.shortDays,a=t.months,u=t.shortMonths,c=H(i),l=W(i),f=H(o),d=W(o),p=H(s),g=W(s),m=H(a),v=W(a),b=H(u),_=W(u),x={a:function(t){return s[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:dt,e:dt,f:yt,g:Ot,G:Lt,H:pt,I:gt,j:mt,L:vt,m:bt,M:_t,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:te,s:ee,S:wt,u:xt,U:Et,V:Pt,w:At,W:St,x:null,X:null,y:Mt,Y:Ct,Z:kt,"%":Jt},E={a:function(t){return s[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Rt,e:Rt,f:Ft,g:Xt,G:Kt,H:It,I:jt,j:Dt,L:Nt,m:Bt,M:Ut,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:te,s:ee,S:zt,u:Vt,U:Zt,V:Ht,w:Wt,W:$t,x:null,X:null,y:qt,Y:Yt,Z:Qt,"%":Jt},T={a:function(t,e,n){var r=p.exec(e.slice(n));return r?(t.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=d.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=b.exec(e.slice(n));return r?(t.m=_.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return S(t,e,n,r)}
1,d:rt,e:rt,f:ct,g:J,G:Q,H:ot,I:ot,j:it,L:ut,m:nt,M:st,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:et,Q:ht,s:ft,S:at,u:q,U:X,V:Y,w:$,W:K,x:function(t,e,r){return S(t,n,e,r)},X:function(t,e,n){return S(t,r,e,n)},y:J,Y:Q,Z:tt,"%":lt};function P(t,e){return function(n){var r,i,o,s=[],a=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a<c;)37===t.charCodeAt(a)&&(s.push(t.slice(u,a)),null!=(i=B[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),s.push(r),u=a+1);return s.push(t.slice(u,a)),s.join("")}}function A(t,e){return function(n){var r,i,o=j(1900,void 0,1);if(S(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=I(j(o.y,0,1))).getUTCDay(),r=i>4||0===i?h.ceil(r):h(r),r=y.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=R(j(o.y,0,1))).getDay(),r=i>4||0===i?w.ceil(r):w(r),r=M.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?I(j(o.y,0,1)).getUTCDay():R(j(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,I(o)):R(o)}}function S(t,e,n,r){for(var i,o,s=0,a=e.length,u=n.length;s<a;){if(r>=u)return-1;if(37===(i=e.charCodeAt(s++))){if(i=e.charAt(s++),!(o=T[i in B?e.charAt(s++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return x.x=P(n,x),x.X=P(r,x),x.c=P(e,x),E.x=P(n,E),E.X=P(r,E),E.c=P(e,E),{format:function(t){var e=P(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=A(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=P(t+="",E);return e.toString=function(){return t},e},utcParse:function(t){var e=A(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),N=D.format,D.parse,F=D.utcFormat,D.utcParse},266:function(t,e,n){"use strict";function r(t,e,n,r,i,o,s){try{var a=t[o](s),u=a.value}catch(c){return void n(c)}a.done?e(u):Promise.resolve(u).then(r,i)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var s=t.apply(e,n);function a(t){r(s,i,o,a,u,"next",t)}function u(t){r(s,i,o,a,u,"throw",t)}a(void 0)}))}}n.d(e,{Z:function(){return i}})},2209:function(t,e,n){"use strict";function r(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}n.d(e,{Z:function(){return r}})},1508:function(t,e,n){"use strict";function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function i(t){return function(t){if(Array.isArray(t))return r(t)}(t)||function(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"===typeof t)return r(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}n.d(e,{Z:function(){return i}})}}]);
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.